CLEO Help Random

CLEO related
Status
Not open for further replies.

Petricko

Member
Joined
Dec 21, 2014
Messages
23
Reaction score
0
Is posible to make something like this???

I hope you understand . I was the first time today I meet with cleo scripting , otherwise I do pawno scripting . This is much more difficult

Code:
0209: 5@ = random_int_in_ranges 1 10

if 5@ == 1
something here
else if 5@ == 2
something here
else if 5@ == 3
something here
else if 5@ == 10
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
276
Code:
IF 5@ == 1
THEN //0AD1: "5@ is 1" 1000
ELSE 
    IF 5@ == 2
    THEN //0AD1: "5@ is 2" 1000
    ELSE
        IF 5@ == 3
        THEN //0AD1: "5@ is 3" 1000
        ELSE 
            IF 5@ == 10
            THEN //0AD1: "5@ is 10" 1000
            ELSE //0AD1: "5@ <> 1,2,3,10" 1000
            END
        END
    END
END

It's rather easier in some way, think as if 'THEN' and 'ELSE' replace the {}

Code:
if (we == 1){
   do something
}
else{
   do nothing
}

Code:
if we == 1
then do something
else do nothing
end

http://ugbase.eu/tutorials/sanny-builder-syntax/ you can check this tutorial.
 
Status
Not open for further replies.
Top