I´ve tryed to use this script on UO, and this wheres i need help considerations:
1°- checklag goes on a eternal loop because on my sever the backpack shows this: [newbie] backpack (%weight% Kg[THIS IS THE W8 ON KILOS])
2°- my check mana for some reason dont work propely
3°- for some reason the first run execute the delay sub right the other times it only ignored it
well this is my first script, and as a brasilian using tradutors and translates softwares its hard to find materials on this site, since i have to translate to english then to portuguese, plz help me out.
Code: Select all
Sub Delay()
var mana = uo.mana
while true
if uo.injournal("visao|frizzle") then ; out of sight
return false
else
while true
if uo.mana == mana then ;if the spell didnt land
wait(100)
else
if uo.mana < mana then ;if the spell land
return false
endif
endif
wend
endif
return false ;brake loop
wend
endsub
; not my pasted from the Nmys Code
sub checklag()
repeat
UO.DeleteJournal()
UO.Click('backpack')
until backpack()==1
endsub
; not my pasted from the Nmys Code
sub backpack()
var n
for n=0 to 200
if uo.injournal('backpack') then
return 1
endif
wait(200)
next
endsub
sub Poisoned()
wait(500)
repeat ; cure till poison efect is off
checklife()
uo.warmode(0)
uo.waittargetself()
uo.cast('Cure')
wait(3000)
until not uo.poisoned('self')
endsub
Sub checklife()
repeat
if uo.life <= 50 then ; check the life is to low, then use total mana pots
uo.usetype(0x0F0E,0x00FF) ; <- life pots
wait(500)
else
uo.waittargetself()
uo.usetype(0x0E21) ; <- the type of the bandages is wrong
wait(2000)
endif
until uo.life >= 80
endsub
Sub checkmana()
repeat
var mana2 = uo.int-40
if uo.mana < 20 then
uo.usetype(0x0F0E,0x0480) ; mana pots
endif
until uo.mana >= mana2
sub pvm()
While not uo.dead() ; litte automation
checklag()
checkmana()
if uo.poisoned('self') then ; if im poisoned
poisoned()
endif
if uo.life < 60 then ; if life is low
checklife()
endif
if uo.life >= 60 then ; main if for the magics
if Uo.InJournal('envenena') && UO.count(0x1F5F)>=2 then ;fs scroll
uo.useobject(0x1F5F,'laststatus')
delay()
endif
if Uo.InJournal('envenena') && UO.count(0x1F5F)<2 then ;fs book
UO.Cast('Flame Strike','laststatus')
delay()
else
UO.Cast('Poison','laststatus') ;if others is false poison
delay()
endif
endif
wend
endsub