Hi, im working on a autotaming script.
Its almost done, but theres 1 thing missing.
When i use findtype to find the animal i wanna tame, it finds the animal w/o any problems.
But after i tame it and use findtype again to shrink the animal, it wont find my pet !!
why ?!?
Autotaming help
Moderators: Murderator+, Murderator
Beyonder wrote:It can be so, that a tamed pet and dire pet have different types.
Check it in first place.
Also it can be that your script uses UO.Ignore() somewhere.
And the last thing coming to mind is maybe you try writing its ID to a var and after taming just use it with that ID?
for i=1 to 6
uo.findtype(ToTame[i], '-1', 'ground')
wait(300)
if uo.findcount()>0 then
tamar( 'finditem' )
endif
next
this call my tamar sub. it tames the pet
This is tamar:
sub tamar( animal )
var erro='You have failed'
var acerto='accept you'
var noskill='lack the skill'
var longe='too far to tame'
var harpa=0x40FBFB85
uo.print('Tamando o animal')
uo.deletejournal()
while NOT UO.INJOURNAL(acerto)
uo.deletejournal()
uo.waittargetobject(animal)
uo.useobject(harpa)
repeat
wait(300)
until uo.injournal(erro) || uo.injournal(acerto) || uo.injournal(noskill) || uo.injournal(longe)
if uo.dead() OR uo.injournal(noskill) OR uo.findcount(animal) < 1 then
return
endif
wend
uo.print('Animal tamado com sucesso')
wait(1000)
uo.waittargetlast()
uo.usetype('0x0f0e', '0x0455')
end sub
im using waittargetlast now, cuz it works.
but i cant use waittargetobject(animal)
cuz it wont work at all.
Beyonder wrote:Try doing this thing:
1) Check ID of untamed animal. Write it down.
2) Tame it manually.
3) Recheck its ID. There is a big chance that it changes the ID when becomes tame.
If it is so, thats why you cant use waittargetobject. When you try using it, there is no animal with such ID left in the world.
May be, ill check.
Question:
IF id changes, it will still be my lasttarget ?!?
AFAK, UID cant be changed by a single SRC.UID=XXXXXXXXX on sphere.
To change the uid, the pet would have to be removed and another with the same specs created with the mem flag IPET linked with me (owner). So i think it would no be my lasttarget anymore.