sub taming() VAR Y,i DIM horse[4] horse[1] = "0x00cc" horse[2] = "0x00e4" horse[3] = "0x00e2" horse[4] = "0x00c8" UO.ServerPrint("All release") start: UO.Exec("ignorereset") For i=1 to 4 While UO.CountGround(horse[i])>0 tam(horse[i]) Wend NEXT goto start end sub
sub tam(X) VAR Y nacalo: Y = 0 UO.Canceltarget() UO.Waittargetground(X) UO.Useskill("Taming") UO.DeleteJournal() While not UO.InJournal("It seems to accept you as master") and not UO.InJournal("You fail to tame the creature") and not UO.InJournal("remembers you") and Y < 40 Y = Y + 1 Wait(500) Wend If UO.InJournal("You fail to tame the creature") then goto nacalo End if UO.ServerPrint("All release") UO.Ignore("lasttarget") UO.Print(STR(UO.CountGround(0x00E2)+UO.CountGround(0x00E4)+UO.CountGround(0x00C8)+UO.CountGround(0x00CC))+" losadok ne tamilosj") end sub
sub taming() VAR i DIM horse[4] horse[0] = "0x00cc" horse[1] = "0x00e4" horse[2] = "0x00e2" horse[3] = "0x00c8" UO.ServerPrint("All release") while true UO.ignorereset() For i = 0 to 3 While UO.CountGround(horse[i])>0 tam(horse[i]) Wend NEXT wait(100) ; !!! wend end sub
sub tam(X) VAR Time repeat UO.Canceltarget() UO.Waittargetground(X) UO.Useskill("Taming") UO.DeleteJournal() Time = UO.Timer() repeat Wait(100) until not UO.InJournal("It seems to accept you as master|You fail to tame the creature|remembers you") or Time + 200 <= UO.Timer() until UO.InJournal("You fail to tame the creature") UO.ServerPrint("All release") UO.Ignore("lasttarget") UO.Print(STR(UO.CountGround(0x00E2)+UO.CountGround(0x00E4)+UO.CountGround(0x00C8)+UO.CountGround(0x00CC))+" losadok ne tamilosj") end sub
Last edited by ZeroDX on 2012-02-15 13:33:20, edited 1 time in total.
как то странно таймить стал. Но в итоге все равно вылетает. Может есть скрипт на тайминг понадежнее? С которым можешь поделиться Таймить н-нное кол-во лошадей, без посоха и кормежки. Главное цикличность.
sub AnimalTaming() VAR n=1, corpse var animal1 = '0x00D0' #тип животного UO.Set('quiet','0') uo.ignorereset() uo.warmode('0') Repeat uo.Set('finddistance', 8) uo.FindType(animal1, -1, 'ground') if uo.FindCount()>0 then uo.warmode(0) UO.DeleteJournal() UO.DeleteJournal() UO.WaitTargetObject('finditem') UO.Useskill('Animal Taming') repeat wait(100) until UO.InJournal('fail|It seems|already|rememb|creature') or uo.GetX('finditem')==0 If Uo.InJournal('It seems|already|creature') Then UO.Hide('finditem') UO.Ignore('finditem') uo.say('all release') endif else uo.ignorereset() UO.Msg(".resync") wait(500) eat() endif wait(500) Until uo.Dead() end sub Sub eat() var havka = '0x097B', LastTimer REPEAT UO.DeleteJournal() LastTimer=UO.Timer() UO.findtype(havka,-1,'backpack') If UO.FindCount() > 0 Then UO.Useobject('finditem') wait(200) Else UO.Print( 'кончилась рыба' ) return 0 end if Until UO.InJournal("stuffed!|think|found|Вы ничего не можете") OR UO.Timer()>LastTimer+200 end sub
1) у вас разрешены вообще инжект скрипты? 2) ваши админы не запретили отпускать притамленных существ на волю? 3) когда именно именно вылетает клиент и как? PS галка TWI включена должна быть в закладке MAIN инжекта
кто-то когда-то тут со мной спорил что скрипт может просто так вылетать (причем какой то простой пылесос с пола). Оказалось что до фига левых галочек, не настроен на 2-х ядерный проц, клиент без пониженной нагрузки и параллельно работало еще 3 окна, да и в скрипте было в 8 строках 4 ошибки...