Why when i put 2 ifs, in the same script,
my uo starts to get slower? And when i load 3 scripts, all of them with 2 ifs, i cant play, because i have little crashs all the time...
E.G
sub Bandages()
while true
if uo.life <= 90 then
if uo.mana >= 50 then
uo.exec ("bandageself")
wait (2000)
else
wait (1500)
end if
end if
wend
end sub
Why when i put 2 ifs in the same script, my uo starts to lag
Moderators: Murderator+, Murderator
-
paulinho4life
- Posts: 45
- Joined: 2004-07-20 00:14:10
Re: Why when i put 2 ifs in the same script, my uo starts to
You have empty cycle (no actions) if your health greater 90. Scripts with empty cycle is simple way to lags and full busy your processor. Insert wait(100) to end of your script (before 'wend') and enjoypaulinho4life wrote:Why when i put 2 ifs, in the same script,
my uo starts to get slower? And when i load 3 scripts, all of them with 2 ifs, i cant play, because i have little crashs all the time...
E.G
sub Bandages()
while true
if uo.life <= 90 then
if uo.mana >= 50 then
uo.exec ("bandageself")
wait (2000)
else
wait (1500)
end if
end if
wend
end sub
another way you could do it is
just a suggestion 
or not use the while command and set a label(thats how I set my infinite loops)
hrmm actually that'd still lag
Edred has the right of it
Code: Select all
sub Bandages()
while true
if uo.life <= 90 AND uo.mana >= 50 then
uo.exec ("bandageself")
wait (2000)
else
wait (1500)
end if
wend
end sub
or not use the while command and set a label(thats how I set my infinite loops)
Code: Select all
sub Bandages()
top:
if uo.life <= 90 then
if uo.mana >= 50 then
uo.exec ("bandageself")
wait (2000)
else
wait (1500)
end if
goto top
end sub
-
Lord Ruslan Nightmare
- Expert!
- Posts: 359
- Joined: 2004-04-25 11:11:07
- Contact: