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
Help! Animal Taming
Moderators: Murderator+, Murderator
Code: Select all
A[1] = "0x00DC"P.S.
uo.findtype(A[n], '-1', '1') = uo.findtype(A[n], '-1', 'ground')
///
-
tvilarinho
- Posts: 3
- Joined: 2009-04-07 19:16:55
Re: Help! Animal Taming
The problem was here:tvilarinho wrote:Code: Select all
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
Code: Select all
for
if
next
else
endif///
-
tvilarinho
- Posts: 3
- Joined: 2009-04-07 19:16:55