обнаружения елема, каст vortexa, лут
Posted: 2009-04-18 09:15:14
вот четыре куска скрипта проблема в том после того как vortex убил елема чар не хочет кидать на vortex ан орт, потом не хочет подходить туда где был убит елем , и не хочет лутать то что воляица на палуи не вкл основный скрипт
спс таму кто мне поможет или даст саветы в чём там праблема
Code: Select all
sub ControlOfDanger()
Var Elemental
while 1
UO.DeleteJournal()
while not UO.InJournal('Elemental')
wait(100)
wend
Elemental=UO.JournalSerial(UO.InJournal("Elemental")-1)
if UO.GetGraphic(Elemental)=='0x0010' then
UO.exec('terminate start')
UO.exec('terminate autohide')
wait(1000)
KillElem(Elemental)
end if
wend
end sub
Sub KillElem(Elemental)
Var Vortex,ElementalX,ElementalY
UO.warmode(0)
uo.exec('usetype 0x0f0e 0x0631')
wait(300)
CastSpel('Energy Vortex',Elemental)
repeat
wait(400)
until UO.InJournal("Energy Vortex")
Vortex=UO.JournalSerial(UO.InJournal("Energy Vortex")-1)
repeat
ElementalX=UO.GetX(Elemental) ## Следим за координатами Элема, что бы не убежал
ElementalY=UO.GetY(Elemental) ## Следим за координатами Элема, что бы не убежал
wait(500)
until UO.Isnpc(Elemental)==0 ## Ждём пока Элем умрёт
CastSpel('Dispel',Vortex)
repeat
wait(600)
until UO.Isnpc(Vortex)==0 ## Ждём пока Вортекс умрёт
Walker(ElementalX,ElementalY,0) ## Идём к месту смерти Элема
Looting() ## Лутаем
UO.exec("exec start")
UO.exec("exec autohide")
end sub
Sub CastSpel(spel,object)
Var LastMana
Cast:
while UO.Mana<50
if UO.Count('0x0F0E','0x09DF') then
UO.UseType ('0x0F0E','0x09DF')
endif
wait(4000)
wend
UO.WaitTargetObject(object)
UO.Cast(spel)
LastMana=UO.Mana
repeat
wait(200)
until UO.Mana < LastMana
if UO.InJournal("fizzles") then
uo.deletejournal()
goto Cast
end if
end sub
Sub Looting()
Var i
dim Item[5]
Item[1] = 0x19B9 ##
Item[2] = 0x19B7 ##
Item[3] = 0x19BA ##
Item[4] = 0x19B8 ##
Item[5] = 0x0EED ##
for i=1 to 5
UO.FindType(Item[i],-1,'ground')
if UO.FindCount() then
UO.MoveItem('finditem','0','backpack')
wait(600)
CheckLag()
end if
next
end sub
sub WaitForChange()
var Text1=uo.GetName()+': You loosen some rocks but fail to find any useable
ore.'
var Text2='There is no ore here to mine.'
var Text3="You can't reach this."
var Text4="That is too far away."
var Text5="You can't do much in your current state."
var Text6="You have no line of sight to that location"
var Text7="You can't see the target"
var Text8="Try mining in rock."
var Text9="You put the Iron Ore in your pack."
var Text10="You put the Rusty Ore in your pack."
var Text11="You put the Old Copper Ore in your pack."
var Text12="You put the Dull Copper Ore in your pack."
var Text13="You put the Copper Ore in your pack."
var Text14="You put the Bronze Ore in your pack."
var Text15="You put the Silver Ore in your pack."
var Text16="You put the Gold Ore in your pack."
var Text17="You put the Rose Ore in your pack."
var mess
for var i=0 to 200
mess=uo.Journal(0)
if uo.Journal(0)==Text2 or uo.Journal(0)==Text3 or uo.Journal(0)==Text4 or uo.Journal(0)==Text6 or uo.Journal(0)==Text7 or uo.Journal(0)==Text8 or uo.Journal(0)==Text9 or uo.Journal(0)==Text10 or uo.Journal(0)==Text11 or uo.Journal(0)==Text12 or uo.Journal(0)==Text13 or uo.Journal(0)==Text14 or uo.Journal(0)==Text15 or uo.Journal(0)==Text16 or uo.Journal(0)==Text17 then
return 1
end if
if uo.Journal(0)==Text1 then
wait(1000)
return 0
end if
if mess[0]=='Y' and mess[1]=='o' and mess[2]=='u' and mess[4]=='p' and mess[5] =='u' and mess[6]=='t' then
return 0
end if
wait(50)
next
return 0
end sub