a mass if wants to run through all the arrays each time it is ran...
example:
Code: Select all
sub killbird()
var i
DIM t[9]
t[0] = "0x0005" ; eagle
t[1] = "0x0006" ; bird
t[2] = "0x00D0" ; chicken
t[3] = "0x00E7" ; cow
t[4] = "0x00D8" ; cow
t[5] = "0x00CF" ; sheep
t[6] = "0x00ED" ; hind
t[7] = "0x00EA" ; hart
t[8] = "0x00D1" ; goat
for i = 0 to 8
uo.findtype(t[i],-1,"ground")
if uo.findcount() then
uo.attack("finditem")
else
uo.print("wtf you looking at?")
endif
next
end sub
it looks for them all & tries to attack every one of them if more then one are found lol, which is ok when you wanna kill them all... now that I look at it I could put a return in there proceed to kill... that will be a different lesson
run this with nothing around you will get
wtf you looking at?
wtf you looking at?
wtf you looking at?
wtf you looking at?
wtf you looking at?
wtf you looking at?
wtf you looking at?
wtf you looking at?
any way to rethink your taming strategy... if simply to find any and all running around the forest use the above format or the 3rd one here it works with laststatus. Last shard I was on you could tame sheep to GM so I filled a room with 30 sheep and used "uomacro - targetnext"... then I got carried away & though wth may as well shear em while I was afk
note this is a 2 parter the second part is set to a hot key for on the run manual taming... not quite what I want it to do but I am always learning too & really don't tame that much so it's not quite finished but it gets the job done
Code: Select all
sub Taming()
Uo.Exec("set finddistance 5")
deletejournal(uo.getname('self')+": stop")
While not uo.injournal(uo.getname('self')+": stop")
Uo.Press(187) ;next Target
Wait(500)
tame()
wait(1000)
if uo.injournal("It seems|already tame") then
Uo.msg("all release")
end if
deletejournal("You can't|own master")
uo.waittargetobject('laststatus')
uo.useskill('Animal Lore')
repeat
wait(100)
until uo.injournal("You can't|own master")
uo.findtype('0x00CF','-1','ground')
while uo.findcount() >= 1 and uo.getdistance('finditem') <=4
repeat
if uo.getdistance('finditem') > 2 then
WalkN(0,0,'finditem')
else
uo.waittargetobject('finditem')
uo.useobject('cleaver')
wait(1000)
endif
uo.findtype('0x00CF','-1','ground')
until uo.findcount() == 0
WalkN(2513,84,'')
wend
uo.usefromground('carrots')
wend
end sub
hotkey
Code: Select all
sub tame()
var retry = "You fail to tame the"
var end = "You can't tame them.|cannot be|remembers you and|It seems to accept you as|You are too far|You can not see the creature.|You are your own|You give up|do that while|You cannot tame that|You are preoccupied|is already tame|Thou hast tamed "+uo.getname('Animal')
deletejournal(end)
uo.waittargetobject('laststatus')
UO.addobject('Animal')
uo.getname('Animal')
while NOT uo.injournal(end)
if uo.warmode('1') OR uo.injournal("You are preoccupied|You give up") then
deletejournal("You are preoccupied|You give up")
uo.print('get out of war mode')
repeat
wait(100)
until uo.warmode()==0 AND uo.life>=uo.str-10
endif
deletejournal(end)
deletejournal(retry)
uo.waittargetobject('Animal')
wait (100)
uo.useskill ("Taming")
repeat
wait (200)
until uo.injournal(end) or uo.injournal(retry)
wend
endsub
note: I use addobject cleaver for my sword type wep to shear the sheep
my "=" button is targetnext (in uo ingame options macros key=187)
and ,addtype carrots on the ground to eat
also this is a newer server so some messages may not apply or may need to be edited for yours
sorry for the mess but I think you will get the idea, I don't tame that much anymore so what is done is done till I move to a new server
if "function not found" simply search yokoforums for the function ex the walkn & deletejournal good luck & hope it helps