cast on account and char

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

cast on account and char

Post by iRuLez »

all know with in some shard is possible to create with 1 account, 1/2/3/4/5 char.
well i have need with a script with if one of five char is online then cast spell on him.

i have create this, but is more slow if my friend is connect with the last char

Code: Select all

sub qwe()
	uo.waittargetobject("player1")
	uo.cast(namespell)
	wait(200)
	uo.waittargetobject("player2")
	uo.cast(namespell)
	wait(200)
	uo.waittargetobject("player3")
	uo.cast(namespell)
endsub
where player1/2/3 have been add with ",addobject player1/2/3" and save it in tab "Objects"

Do u know another method for this?
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

Post by iRuLez »

don't work

Code: Select all

sub reft()
	var i
	dim pg[2]
		pg[0] = "0x0005f80f"
		pg[1] = "0x0005f80d"
	
	uo.cast("Magic Reflection","pg[i]")
endsub
and display inject say: "invalid serial index"
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Code: Select all

sub reft() 
   var i 
   dim pg[2] 
      pg[0] = "0x0005f80f" 
      pg[1] = "0x0005f80d" 
    
   for i = 0 to 1
   	uo.print(str(uo.getDistance(pg[i])))# need to check what getDistance return for offline char
   	if uo.getDistance(pg[i]) then 
   		uo.cast("Magic Reflection",pg[i])
   		return
   	end if
   next
endsub
iRuLez
Posts: 104
Joined: 2006-05-04 18:40:42

Post by iRuLez »

grin, i love u :D
tnx
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

em... no thanks...
Post Reply