Yoko

All sides of Injection
It is currently 2025-12-23 09:27:43

All times are UTC+02:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2006-02-01 20:03:42 
Offline

Joined: 2006-02-01 19:58:29
Posts: 14
I wanna create a function that when i make it runs, the script look for every players that are at last 7 tiles of distance from me!

Affe looking for it, it will cast ma in every one of them!


I tried this

sub ma_mais_perto()
uo.set('finddistance','7')
uo.findtype(0x0191,-1,'ground')

;if Uo.FindCount() > 0 then
; for i=0 to Uo.FindCount()
; if 'finditem' == Uo.GetSerial('self') then
; uo.ignore('finditem')
; end if
; uo.cast('Magic Arrow','finditem')
; uo.ignore('finditem')
; wait (650)
;next
;end if

uo.findtype(0x0190,-1,'ground')

if Uo.FindCount() > 0 then
uo.findtype(0x0190,-1,'ground')
for i=0 to Uo.FindCount()
if 'finditem' == Uo.GetSerial('self') then
uo.ignore('finditem')
end if
uo.cast('Magic Arrow','finditem')
uo.ignore('finditem')
wait (650)
next
end if
end sub


But iґm learning to script yet, and i got some problems with FOR, some one can help me ?


Top
   
 Post subject:
PostPosted: 2006-02-01 20:55:52 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Try this

Code:
ma_mais_perto() 
uo.set('finddistance','7')
uo.ignore('self')
    uo.findtype('0x0190',-1,'ground')
    while uo.findcount()
      uo.cast('Magic Arrow','finditem')
      wait (650)
      uo.ignore('finditem')
      uo.findtype('0x0190',-1,'ground')
    wend
    uo.findtype('0x0191',-1,'ground')
    while uo.findcount()
      uo.cast('Magic Arrow','finditem')
      wait (650)
      uo.ignore('finditem')
      uo.findtype('0x0191',-1,'ground')
    wend
  uo.ignorereset()
endsub


Top
   
 Post subject:
PostPosted: 2006-02-01 21:58:57 
Offline

Joined: 2006-02-01 19:58:29
Posts: 14
all right :D
tks to much ;D


Top
   
 Post subject:
PostPosted: 2006-02-26 18:47:39 
Offline

Joined: 2006-02-13 18:02:06
Posts: 26
you should play around with this

integer UO.GetNotoriety([object]) - return notoriety of character specified by object (evilness, "color")

* 1 : Innocent
* 2 : Friend
* 3 : Gray
* 4 : Criminal
* 5 : Enemy
* 6 : Murderer


so you dont marrow your friends if they are around you


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 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