пишит поиск нпс и не ищет.
посто я ни чё не смыслю в скриптах

Code: Select all
sub Taming()
var n, j, AllNames_Key, Finded, Serial
;<=-------------------------------------------------------------------------------=>
;************************************настройки***********************************
;<=-------------------------------------------------------------------------------=>
AllNames_Key = 90 ; клавиша вызываемая функцию all names по умолчанию 'Z'
dim Animal[10] ; количество нпс в списке приручаемых для поиска +1
Animal[1]="Bull [npc]" ; сам список животных...
Animal[2]="Llama [npc]"
Animal[3]="Dog [npc]"
Animal[4]="Cow [npc]"
Animal[5]="sheep [npc]"
Animal[6]="Chicken [npc]"
Animal[7]="Rat [npc]"
Animal[8]="Pig [npc]"
Animal[9]="Snake [npc]"
Animal[10]=""
;***********************************************************************************
UO.DeleteJournal()
repeat
SearchStart:
UO.Print('Searching NPC...')
UO.DeleteJournal()
UO.Press(AllNames_Key);
Wait(100)
SearchNext:
Finded = ''
if (UO.InJournal('[npc]')==0) если нету ни одного NPC
GOTO SearchEnd
endif
J = UO.InJournal('[npc]')-1 ; ищем нпс по журналу
n=1
while not Animal[n]==''
if (UO.GetName(UO.JournalSerial(J)) == Animal[n]) then
Finded = UO.GetName(UO.JournalSerial(J))
endif
n=n+1
wend
if Finded == '' then
UO.SetJournalLine(J,'')
; UO.ShowJournal('100') ; для отладки
GOTO SearchNext
endif
; êîíåö öûêëà SearchNext
Finded = UO.GetName(UO.JournalSerial(J))
Serial = UO.JournalSerial(J)
TimeAnimal(Serial)
GOTO SearchStart
SearchEnd:
Wait(5000)
Until UO.SkillVal('Animal Taming','1') >= 1000
UO.Print('Íàâûê Animal Taming ïðîêà÷åí...')
end sub
sub TimeAnimal(Animal)
UO.Print('Taming '+UO.GetName(Animal)+'...')
repeat
GotoXY(UO.GetX(Animal),UO.GetY(Animal))
if (UO.GetName(Animal)=='sheep [npc]') then
UO.WaitTargetObject(Animal)
UO.usetype('0x0F51')
Wait(250)
endif
UO.DeleteJournal()
Wait(100)
UO.WaitTargetObject(Animal)
UO.UseSkill('Animal Taming')
While not UO.InJournal("accept you as its master") and not UO.InJournal("You fail to tame the") and not UO.InJournal("I am too far away") and not UO.InJournal("You are your own master") and not UO.InJournal("already tame") and not UO.InJournal("quantity taming skill") and not UO.InJournal("can't") and not UO.InJournal("creature very hungry")
Wait(100)
Wend
Until UO.InJournal("accept you as its master") or UO.InJournal("You are your own master") or UO.InJournal("already tame") or UO.InJournal("quantity taming skill") or UO.InJournal("can't") or UO.InJournal("creature very hungry") or not uo.GetDistance(Animal)
UO.Print('Aminal tamed successfuly')
if not UO.InJournal("has be removed") and UO.GetDistance(Animal) then
UO.Print('Kill '+UO.GetName(Animal)+'...');
UO.Attack(Animal)
GotoXY(UO.GetX(Animal),UO.GetY(Animal))
while not UO.InJournal("Body of")
Wait(100)
wend
UO.WarMode(0)
endif
end sub
sub Veterinary()
UO.AddObject('horse_for_veterinary')
UO.Print('Íà êàêîì æèâîòíîì áóäåì êà÷àòü?')
while UO.Targeting()
wait(50)
wend
repeat
; Wash bloody bandages
if not UO.Count('0x0E21') then
UO.Waittargettype('0x1008')
UO.Usetype('0x0E20')
Wait(100)
endif
; Healing animal
UO.DeleteJournal()
repeat
UO.waittargetobject('horse_for_veterinary')
UO.usetype('0x0E21')
while not UO.InJournal("You heal") and not UO.InJournal('but they barely help.') and not UO.InJournal('You fail to heal') and not UO.InJournal('You put the bloody') and not UO.InJournal('you wanna make a mummy?')
Wait(10)
UO.WarMode(0)
wend
UO.DeleteJournal()
until UO.GetHP('horse_for_veterinary') == UO.GetMaxHP('horse_for_veterinary')
; Healing self
if UO.GetHP() < UO.GetMaxHP() then
UO.bandageself()
while not UO.InJournal("You heal") and not UO.InJournal('but they barely help.') and not UO.InJournal('You fail to heal') and not UO.InJournal('You put the bloody')and not UO.InJournal('you wanna make a mummy?')
Wait(10)
UO.WarMode(0)
wend
endif
; Attack animal
UO.Attack('horse_for_veterinary')
while UO.GetHP('horse_for_veterinary') == UO.GetMaxHP('horse_for_veterinary')
Wait(10)
wend
Until UO.Dead('horse') or not UO.Count('0x0E21') or UO.SkillVal('Veterinary','1') == 1000
end sub
P.S. зарание спасибо