CLEO Help Modify wait into 32@ or 33@

CLEO related
Status
Not open for further replies.

hahahafuccoff

Member
Joined
Jun 6, 2018
Messages
16
Reaction score
0
Code:
WHILE TRUE
WAIT 0
//HERE COME MY DIALOG AND OTHER FUNCS
//THIS IS JUST AN EXAMPLE

if and
dialog.CheckBoxIsChecked(1@, 1) 
28@ == 1
then
chatmsg "1 working" -1
wait 3000
28@ = 2
end

if and
dialog.CheckBoxIsChecked(1@, 1) 
28@ == 2
then
chatmsg "2 working" -1
wait 3000
28@ = 3
end

if and
dialog.CheckBoxIsChecked(1@, 1) 
28@ == 150
then
chatmsg "3 working. Finishing" -1
wait 3000
28@ = 0
dialog.SetCheckBoxChecked(1@, 1, 0)
end

END


So my question is how can i change "wait 3000" into 32@ or 33@ (timer variabiles)


Code:
32@ = 0
while true
    if 32@ > 3000
    then
    teleport
    32@ = 0
    end
end

That's what monday tried to explain me, but i tried to change into

[font=Monaco, Consolas, Courier, monospace]32@ = 0[/font]
[font=Monaco, Consolas, Courier, monospace]WHILE TRUE[/font]
[font=Monaco, Consolas, Courier, monospace]WAIT 0[/font]
[font=Monaco, Consolas, Courier, monospace]//HERE COME MY DIALOG AND OTHER FUNCS[/font]
[font=Monaco, Consolas, Courier, monospace]//THIS IS JUST AN EXAMPLE[/font]

[font=Monaco, Consolas, Courier, monospace]if and[/font]
[font=Monaco, Consolas, Courier, monospace]dialog.CheckBoxIsChecked(1@, 1) [/font]
[font=Monaco, Consolas, Courier, monospace]28@ == 1[/font]
[font=Monaco, Consolas, Courier, monospace]then[/font]
[font=Monaco, Consolas, Courier, monospace]chatmsg "1 working" -1[/font]
[font=Monaco, Consolas, Courier, monospace][size=small][font=Monaco, Consolas, Courier, monospace]if 32@ > 3000
then[/font]
[/font][/size]
[font=Monaco, Consolas, Courier, monospace]28@ = 2
[/font]
[font=Monaco, Consolas, Courier, monospace]32@ = 0
[/font]
[font=Monaco, Consolas, Courier, monospace]end[/font]
[font=Monaco, Consolas, Courier, monospace]end[/font]

[font=Monaco, Consolas, Courier, monospace]if and[/font]
[font=Monaco, Consolas, Courier, monospace]dialog.CheckBoxIsChecked(1@, 1) [/font]
[font=Monaco, Consolas, Courier, monospace]28@ == 2[/font]
[font=Monaco, Consolas, Courier, monospace]then[/font]
[font=Monaco, Consolas, Courier, monospace]chatmsg "2 working" -1[/font]
[font=Monaco, Consolas, Courier, monospace][size=small][font=Monaco, Consolas, Courier, monospace]if [/font][font=Monaco, Consolas, Courier, monospace]32@[/font][font=Monaco, Consolas, Courier, monospace] > 3000[/font]
[font=Monaco, Consolas, Courier, monospace]then[/font][/font][/size]
[font=Monaco, Consolas, Courier, monospace]28@ = 3
[/font]
[font=Monaco, Consolas, Courier, monospace]32@ = 0
[/font]
[font=Monaco, Consolas, Courier, monospace]end[/font]
[font=Monaco, Consolas, Courier, monospace]end[/font]

[font=Monaco, Consolas, Courier, monospace]if and[/font]
[font=Monaco, Consolas, Courier, monospace]dialog.CheckBoxIsChecked(1@, 1) [/font]
[font=Monaco, Consolas, Courier, monospace]28@ == 3[/font]
[font=Monaco, Consolas, Courier, monospace]then[/font]
[font=Monaco, Consolas, Courier, monospace]chatmsg "3 working. Finishing" -1[/font]
[font=Monaco, Consolas, Courier, monospace][size=small][font=Monaco, Consolas, Courier, monospace][font=Monaco, Consolas, Courier, monospace]if [/font][/font][font=Monaco, Consolas, Courier, monospace][font=Monaco, Consolas, Courier, monospace]32@[/font][/font][font=Monaco, Consolas, Courier, monospace][font=Monaco, Consolas, Courier, monospace] > 3000[/font][/font]
[font=Monaco, Consolas, Courier, monospace][font=Monaco, Consolas, Courier, monospace]then[/font][/font][/font][/size]
[font=Monaco, Consolas, Courier, monospace]28@ = 0
[/font]
[font=Monaco, Consolas, Courier, monospace]32@ = 0
[/font]
[font=Monaco, Consolas, Courier, monospace]end[/font]
[font=Monaco, Consolas, Courier, monospace]dialog.SetCheckBoxChecked(1@, 1, 0)[/font]
[font=Monaco, Consolas, Courier, monospace]end[/font]

[font=Monaco, Consolas, Courier, monospace]END
[/font]


But it fucked my entire mod and didn't work. Any ideas ?
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,492
Reaction score
236
Location
( ͡° ͜ʖ ͡°)
PHP:
0AB1: @Waitfunction 1 wait_for 3000


:Waitfunction
32@ = 0
repeat
wait 0
until 32@ > 0@
0AB2: 0


or like this:

PHP:
WHILE TRUE
    WAIT 0
    //HERE COME MY DIALOG AND OTHER FUNCS
    //THIS IS JUST AN EXAMPLE
    
    if and
    dialog.CheckBoxIsChecked(1@, 1) 
    28@ == 1
    then
        chatmsg "1 working" -1
        32@ = 0
        repeat
        wait 0
        until 32@ > 3000
        28@ = 2
    end
    
    if and
    dialog.CheckBoxIsChecked(1@, 1) 
    28@ == 2
    then
        chatmsg "2 working" -1
        32@ = 0
        repeat
        wait 0
        until 32@ > 3000
        28@ = 3
    end
    
    if and
    dialog.CheckBoxIsChecked(1@, 1) 
    28@ == 150
    then
        chatmsg "3 working. Finishing" -1
        32@ = 0
        repeat
        wait 0
        until 32@ > 3000
        28@ = 0
        dialog.SetCheckBoxChecked(1@, 1, 0)
    end

END
 
Status
Not open for further replies.
Top