i have this piece of code
uo.addobject('corpose')
while uo.targeting()
wait(100)
wend
but I target every time the same type (a corpose) manually...
now i'm trying to find an automatic method to get the serial of the corpose that's under me; is there a function like
uo.getserialfromground(obj_type) or are ther any triks to do this?
ciao ciao andre
how to get an automatic SERIAL
Moderators: Murderator+, Murderator
how to get an automatic SERIAL
dagoFee
Code: Select all
Sub GetSerialFromGround()
UO.GetSerial('~0x0000')
End Sub
Code: Select all
Sub GetSerialFromGround()
UO.FindType('0x0000','0x0000','ground')
If UO.FindCount()>0 Then
Return UO.GetSerial('finditem')
Else
Return 0
EndIf
End Sub
i'm trying to use your function in a simple way but doesn't work
where is the mistake?
sub main()
var SERIAL
SERIAL=GetSerialFromGround()
UO.Print(STR(SERIAL))
end sub
it prompts "0" every time
UO.FindType('0x0000','0x0000','ground')
what's ground? i put there 0x2006 (type of corpose) but doesn't work
where is the mistake?
sub main()
var SERIAL
SERIAL=GetSerialFromGround()
UO.Print(STR(SERIAL))
end sub
it prompts "0" every time
UO.FindType('0x0000','0x0000','ground')
what's ground? i put there 0x2006 (type of corpose) but doesn't work
dagoFee