Скрипт на БС(ексепт или не експт) хелп
Posted: 2005-03-11 21:13:13
История такова : Собрал(именно собрал) скрипт на БС с целью выуживания ексептовых вещей при прокачке или "так",но что то где то не так и скрипт не работает - пишет ошибку в 44 линии.Может кто глянет опытным глазом и поможет мне? Идея скрипта :
1)находит нап полу инготы,кует последнюю вещь;
2)должен по идее находить ексепт вещь и скидывать а пол(тут и возникает проблема ,может подправите что?)
3)плавит вещи ;
4)сбрасывает инготы в кучку уже лежащую на полу.
sub main()
start:
uo.set("distance","1")
while not uo.dead()
If UO.Count ("0x1BF2") == 0 Then
wait (1000)
UO.Waittargetground ('0x1BF2')
wait (100)
UO.Usetype ("0x13E3")
wait (500)
UO.Lclick (76,390)
wait (2000)
UO.Lclick (76,390)
wait (65000)
plav()
wait(2000)
dropi()
While (UO.ObjAtLayer('Bpack') == '')
wait(10000)
wend
Nuke_hungry()
else
UO.Waittargettype ("0x1BF2")
wait (100)
UO.Usetype ("0x13E3")
wait (500)
UO.Lclick (76,390)
wait (65000)
wait (500)
endif
wend
end sub
sub prov()
if UO.Count("0x143A")<1 then # check for items in the backpack
goto start
else
UO.FindType("0x143A") #serching the items
Wait(500)
UO.addobject("a","finditem")
wait(500)
if UO.getname("a") == "Exceptional shadow gorget [Crafted by Nike]"
uo.exec("drophere finditem")
wait(1000)
else
plav()
end sub
sub plav()
var i=0
while i < 10
uo.waittargettype('0x143A')
uo.usefromground('0x0fb1')
wait(3000)
i = i+1
wend
i=0
wait(5000)
end sub
sub dropi()
UO.Exec("set finddistance 1")
var d = '0x1BF2'
drop(d)
end sub
sub drop(d)
var serial=0
var color=-1
var container = "ground"
while UO.Count(d) > 0
UO.FindType(d,-1,"my")
serial=UO.GetSerial("finditem")
color=UO.GetColor(serial)
UO.Ignore(serial)
if container=="ground" then
UO.FindType(d,color,"ground")
if UO.FindCount()>0 then
UO.MoveItem(serial,"0","finditem","0","0","0")
else
UO.DropHere(serial)
endif
else
UO.MoveItem(serial,"0",container)
endif
wait(1000)
UO.IgnoreReset()
end sub
sub Nuke_hungry()
wait(400)
uo.serverprint(".hungry")
wait(800)
if ((uo.lastmessage()=="You are DYING of hunger...") or (uo.lastmessage()=="You are almost dying of hunger") or (uo.lastmessage()=="You are starving") or (uo.lastmessage()=="Your stomash hurts and you feel dizzy")or (uo.lastmessage()=="Your stomash hurts") or (uo.lastmessage()=="You are REALLY hungry") or (uo.lastmessage()=="You are somewhat hungry") or (uo.lastmessage()=="You are a little hungry") or (uo.lastmessage()=="You aren't hungry at all"))==true then
uo.exec("usetype 0x097B")
endif
endsub
З.Ы. Скрипт рассчитан на POL
1)находит нап полу инготы,кует последнюю вещь;
2)должен по идее находить ексепт вещь и скидывать а пол(тут и возникает проблема ,может подправите что?)
3)плавит вещи ;
4)сбрасывает инготы в кучку уже лежащую на полу.
sub main()
start:
uo.set("distance","1")
while not uo.dead()
If UO.Count ("0x1BF2") == 0 Then
wait (1000)
UO.Waittargetground ('0x1BF2')
wait (100)
UO.Usetype ("0x13E3")
wait (500)
UO.Lclick (76,390)
wait (2000)
UO.Lclick (76,390)
wait (65000)
plav()
wait(2000)
dropi()
While (UO.ObjAtLayer('Bpack') == '')
wait(10000)
wend
Nuke_hungry()
else
UO.Waittargettype ("0x1BF2")
wait (100)
UO.Usetype ("0x13E3")
wait (500)
UO.Lclick (76,390)
wait (65000)
wait (500)
endif
wend
end sub
sub prov()
if UO.Count("0x143A")<1 then # check for items in the backpack
goto start
else
UO.FindType("0x143A") #serching the items
Wait(500)
UO.addobject("a","finditem")
wait(500)
if UO.getname("a") == "Exceptional shadow gorget [Crafted by Nike]"
uo.exec("drophere finditem")
wait(1000)
else
plav()
end sub
sub plav()
var i=0
while i < 10
uo.waittargettype('0x143A')
uo.usefromground('0x0fb1')
wait(3000)
i = i+1
wend
i=0
wait(5000)
end sub
sub dropi()
UO.Exec("set finddistance 1")
var d = '0x1BF2'
drop(d)
end sub
sub drop(d)
var serial=0
var color=-1
var container = "ground"
while UO.Count(d) > 0
UO.FindType(d,-1,"my")
serial=UO.GetSerial("finditem")
color=UO.GetColor(serial)
UO.Ignore(serial)
if container=="ground" then
UO.FindType(d,color,"ground")
if UO.FindCount()>0 then
UO.MoveItem(serial,"0","finditem","0","0","0")
else
UO.DropHere(serial)
endif
else
UO.MoveItem(serial,"0",container)
endif
wait(1000)
UO.IgnoreReset()
end sub
sub Nuke_hungry()
wait(400)
uo.serverprint(".hungry")
wait(800)
if ((uo.lastmessage()=="You are DYING of hunger...") or (uo.lastmessage()=="You are almost dying of hunger") or (uo.lastmessage()=="You are starving") or (uo.lastmessage()=="Your stomash hurts and you feel dizzy")or (uo.lastmessage()=="Your stomash hurts") or (uo.lastmessage()=="You are REALLY hungry") or (uo.lastmessage()=="You are somewhat hungry") or (uo.lastmessage()=="You are a little hungry") or (uo.lastmessage()=="You aren't hungry at all"))==true then
uo.exec("usetype 0x097B")
endif
endsub
З.Ы. Скрипт рассчитан на POL