Yoko

All sides of Injection
It is currently 2025-10-21 07:03:03

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Help! Animal Taming
PostPosted: 2009-04-11 21:18:43 
Offline

Joined: 2009-04-07 19:16:55
Posts: 3
I've made a script that was supposed to tame an ANIMAL which was found in the ground. I got the types of 25 animals (horses, llama, chicken, pig... etc) and wrote the script. When i logged into UO to test the script, NO ANIMAL COULD BE FOUND in the ground by the funtion "Uo.Fidtype".
I think the script is correct, but maybe i forgot some line or code. I would be very thankful if someone could see the script and try to help me, if the script have some problem or wrong code.

PS: I tried to run the script both with "Track world itens" activated and disactivated. I also tried Uo.Findtye(Uo.Getgraphic(A[n]),'-1','ground), but it didn't work.

Here comes the script:
Sub tamatudo()

UO.Set("finddistance","5")
var pettarget = 0x00000000
Var i,n
DIM A[25]
A[1] = 0x00DC
A[2] = 0x00DA
A[3] = 0x00E2
A[4] = 0x00CC
A[5] = 0x00E4
A[6] = 0x00D9
A[7] = 0x00E7
A[8] = 0x00D8
A[9] = 0x00CB
A[10] = 0x00E8
A[11] = 0x00CF
A[12] = 0x00E9
A[13] = 0x00EE
A[14] = 0x00D0
A[15] = 0x0051
A[16] = 0x00D5
A[17] = 0x00EA
A[18] = 0x00DF
A[19] = 0x00D3
A[20] = 0x00CA
A[21] = 0x00C8
A[22] = 0x00CD
A[23] = 0x0034
A[24] = 0x00E2
A[25] = 0x0006
i = 100

FOR n=1 TO 25

Uo.FindType(A[n],'-1','Ground')
if uo.findcount() > 0 then
pettarget = uo.getserial('finditem')
Uo.AddObject('tamar',pettarget)
Wait (200)
Uo.WaitTargetObject('tamar')
Uo.Useskill("Animal Taming")
Wait (18000)
Wait (i)
NEXT
Else
Uo.Print("No animal was found on the ground")
EndIf

End Sub


Top
   
 Post subject:
PostPosted: 2009-04-12 15:14:42 
Offline

Joined: 2009-02-28 15:02:09
Posts: 42
Location: Украина
Code:
A[1] = "0x00DC"
etc...


P.S.
uo.findtype(A[n], '-1', '1') = uo.findtype(A[n], '-1', 'ground')

_________________
///


Top
   
 Post subject:
PostPosted: 2009-04-12 16:35:56 
Offline

Joined: 2009-04-07 19:16:55
Posts: 3
Hey DreadLord. I have already tried the way you suggested, and it didn't work.

Sorry for the clumsy english.


Top
   
 Post subject: Re: Help! Animal Taming
PostPosted: 2009-04-12 18:02:06 
Offline

Joined: 2009-02-28 15:02:09
Posts: 42
Location: Украина
tvilarinho wrote:
Code:
sub tamatudo() 
uo.set('finddistance' ,'5')
VAR n
DIM A[25]
A[1] = '0x00DC'
A[2] = '0x00DA'
A[3] = '0x00E2'
A[4] = '0x00CC'
A[5] = '0x00E4'
A[6] = '0x00D9'
A[7] = '0x00E7'
A[8] = '0x00D8'
A[9] = '0x00CB'
A[10] = '0x00E8'
A[11] = '0x00CF'
A[12] = '0x00E9'
A[13] = '0x00EE'
A[14] = '0x00D0'
A[15] = '0x0051'
A[16] = '0x00D5'
A[17] = '0x00EA'
A[18] = '0x00DF'
A[19] = '0x00D3'
A[20] = '0x00CA'
A[21] = '0x00C8'
A[22] = '0x00CD'
A[23] = '0x0034'
A[24] = '0x00E2'
A[25] = '0x0006'
for n = 1 to 25
  uo.findtype(A[n], '-1', '1')
  if uo.findcount() > 0 then
    uo.waittargetobject('finditem')
    uo.useskill('Animal Taming')
    wait(18000)
  endif
next
end sub


The problem was here:
Code:
for
  if
next
  else
  endif

_________________
///


Top
   
 Post subject:
PostPosted: 2009-04-12 18:21:32 
Offline

Joined: 2009-04-07 19:16:55
Posts: 3
Hey!! Thanks for the help!! Now the script is working well!!! :D :D :D

Thanks again!


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 guests


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