Yoko

All sides of Injection
It is currently 2025-12-23 12:08:29

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Autotaming help
PostPosted: 2005-05-04 02:35:13 
Offline

Joined: 2004-04-14 22:08:20
Posts: 16
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 ?!?


Top
   
 Post subject:
PostPosted: 2005-05-04 11:52:22 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
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?


Top
   
 Post subject:
PostPosted: 2005-05-04 18:36:22 
Offline

Joined: 2004-04-14 22:08:20
Posts: 16
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.


Top
   
 Post subject:
PostPosted: 2005-05-05 12:43:07 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
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.


Top
   
 Post subject:
PostPosted: 2005-05-05 19:17:14 
Offline

Joined: 2004-04-14 22:08:20
Posts: 16
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.


Top
   
 Post subject:
PostPosted: 2005-05-06 07:48:41 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
It would be just easyer to check their ID's and the question would be closed ;D.
I just dont have taming skill to check it myself.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited