Yoko

All sides of Injection
It is currently 2026-03-16 22:10:34

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 2004-11-03 17:51:21 
Offline

Joined: 2004-11-02 21:52:22
Posts: 9
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

_________________
dagoFee


Top
   
 Post subject:
PostPosted: 2004-11-03 18:31:09 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
Code:
Sub GetSerialFromGround()
  UO.GetSerial('~0x0000')
End Sub


Code:
Sub GetSerialFromGround()
  UO.FindType('0x0000','0x0000','ground')
  If UO.FindCount()>0 Then
    Return UO.GetSerial('finditem')
  Else
    Return 0
  EndIf
End Sub


Top
   
 Post subject:
PostPosted: 2004-11-03 19:16:33 
Offline

Joined: 2004-11-02 21:52:22
Posts: 9
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

_________________
dagoFee


Top
   
 Post subject:
PostPosted: 2004-11-03 20:02:29 
Offline
Expert!
User avatar

Joined: 2004-04-04 21:40:09
Posts: 1007
UO.Print(STR(SERIAL)) --> UO.Print(SERIAL)


Top
   
 Post subject:
PostPosted: 2004-11-03 20:08:06 
Offline

Joined: 2004-11-02 21:52:22
Posts: 9
thanks : )

_________________
dagoFee


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 8 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