Page 1 of 1
Whats wrong? need help
Posted: 2008-09-22 19:21:37
by Mikas
Code: Select all
sub heal()
repeat
if uo.life<290 then
uo.bandageself()
wait(3000)
endif
wait(1000)
until uo.dead()
end sub
Whats wrong cant understand.. it works heals my self but some times i get error with button ok cant remember now text something like unexepted handle paradise dont remember..
Posted: 2008-09-23 09:39:19
by Infectous
that is a dead cycle or what ever they call it, (burn out your cpu) try reading more info in the tutorials, I use googles translator to understand the Russian... least you will pick up on the theory... looks like you had the right idea just use and "ELSE"
Code: Select all
sub heal()
repeat
if uo.life<290 then
uo.bandageself()
wait(3000)
else
wait(1000)
end if
until uo.dead()
end sub
I like this way cause you can add things to it for ex
Code: Select all
sub heal()
repeat
if uo.poisoned() then
drink_cure()
else
if uo.life<290 then
uo.bandageself()
wait(3000)
else
wait(1000)
end if
end if
until uo.dead()
end sub
Posted: 2008-09-24 08:13:49
by Mikas
t.y you just added else to this

i thought i dont need it..