Lazarus   
		
			Master 
			   
			
			
 
 
			
	Posts: 352 
	Likes Given: 11
 
Likes Received: 7 in 6 posts 
	Joined: Jun 2012
	
 Reputation: 1
  
			Hybris Ultima Online
 ![]()  
		
	 | 
	
		
			
targon_ground - need help ^_^ 
			 
			
				Hi, first sry for my english. 
I m creating a new script of a BLINK DAGGER like [DotA or HoN item   ] works when you use it, you can teleport in the map [like teleport spell but without cast time]
 
I have create the ON=@TARGON_GROUND like this:
 
Code: 
 ON=@TARGON_GROUND 
IF (<SRC.TARG.UID>==<SRC.UID>) 
SRC.SYSMESSAGE you can't teletransport on yourself! 
RETURN 1 
ENDIF 
sound=150 
src.go <src.TARGP> 
RETURN 1 
ENDIF
  
but I wan't anothers IF, like cant transport to anywere were you don't see [LIKE THE ORIGINAL TELEPORT SPELL] 
AND you can't transport to a another player.
 
how can I add that IF's?
 
Thank you!
			  
			
			
 
			
		 |  
	 
 | 
	| 08-07-2012 09:35 AM | 
	
		
	 | 
	
	
		   
		 
		
	 | 
	
		
		WRWR   
		
			Journeyman 
			  
			
			
 
 
			
	Posts: 212 
	Likes Given: 30
 
Likes Received: 1 in 1 posts 
	Joined: Mar 2012
	
 Reputation: 1
  
			
 ![]()  
		
	 | 
	
		
			
RE: targon_ground - need help ^_^ 
			 
			
				
Code: 
 IF (<SRC.TARG.UID>==<SRC.UID>) 
SRC.SYSMESSAGE you can't teletransport on yourself! 
RETURN 1 
ENDIF
  
its not ground and it useless
 
try this
 
Code: 
 ON=@TARGON_GROUND 
IF !(<CANSEELOS>) 
SRC.SMSG You have no line of sight to that location. 
RETURN 1 
ENDIF 
src.sound=150 
src.go <SRC.TARGP>
  
			 
			
			
			
				
(This post was last modified: 08-07-2012 10:11 AM by WRWR.)
 
				
			 
		 |  
	 
 | 
	| 08-07-2012 10:09 AM | 
	
		
	 | 
	
	
		   
		 
		
	 | 
	
		
		Shaklaban   
		
			Master 
			   
			
			 
			
	Posts: 378 
	Likes Given: 0
 
Likes Received: 1 in 1 posts 
	Joined: Mar 2012
	
 Reputation: 8
  
			DOT
 ![]()  
		
	 | 
	
		
			
RE: targon_ground - need help ^_^ 
			 
			
				well then it is only works on items and characters like darksun says so 
PHP Code: 
 [function canseelospoint] serv.newitem i_gold new.attr=attr_invis new.p=<args> if (<canseelos <new>>)     return 1 endif return 0 
 
  
you can use this function like if (<src.canseelospoint <targp>>)
 
also i don't try but you can try canseelos function with coordinates <canseelos <src.targp>>, if so you don't need canseelospoint function.
			  
			
			
			
				
(This post was last modified: 08-07-2012 11:21 AM by Shaklaban.)
 
				
			 
		 |  
	 
 | 
	| 08-07-2012 11:20 AM | 
	
		
	 | 
	
	
		   
		 
		
	 | 
	
		
		WRWR   
		
			Journeyman 
			  
			
			
 
 
			
	Posts: 212 
	Likes Given: 30
 
Likes Received: 1 in 1 posts 
	Joined: Mar 2012
	
 Reputation: 1
  
			
 ![]()  
		
	 | 
	
		
			
RE: targon_ground - need help ^_^ 
			 
			
				
Code: 
 ON=@TARGON_GROUND 
IF (<DISTANCE <SRC.TARGP>> > 5) || !(<SRC.CANSEELOS <SRC.TARGP>>) 
SRC.SMSG You can't reach it. 
RETURN 1 
ELSE 
SRC.GO <SRC.TARGP> 
ENDIF
  
but it work with teleport on static items only...trying to make it work on map tiles also
 
 
Hehe, 
 
Code: 
 ON=@DCLICK 
TARGETFG f_go 
RETURN 1 
 
[FUNCTION f_go] 
IF (<DISTANCE <SRC.TARGP>> > 7) || !(<SRC.CANSEELOS <SRC.TARGP>>) 
SRC.SMSG you can't reach it. 
RETURN 1 
ELSE 
SRC.GO <SRC.TARGP> 
ENDIF
  
work fine 
you can go to location within 7tiles and canseelos
			  
			
			
			
				
(This post was last modified: 08-07-2012 11:41 AM by WRWR.)
 
				
			 
		 |  
	 
 | 
	| 08-07-2012 11:26 AM | 
	
		
	 | 
	
	
		   
		 
		
	 | 
	
		
		Lazarus   
		
			Master 
			   
			
			
 
 
			
	Posts: 352 
	Likes Given: 11
 
Likes Received: 7 in 6 posts 
	Joined: Jun 2012
	
 Reputation: 1
  
			Hybris Ultima Online
 ![]()  
		
	 | 
	
		
			
RE: targon_ground - need help ^_^ 
			 
			
				 (08-07-2012 11:26 AM)WRWR Wrote:  
Code: 
 ON=@TARGON_GROUND 
IF (<DISTANCE <SRC.TARGP>> > 5) || !(<SRC.CANSEELOS <SRC.TARGP>>) 
SRC.SMSG You can't reach it. 
RETURN 1 
ELSE 
SRC.GO <SRC.TARGP> 
ENDIF
  
 
but it work with teleport on static items only...trying to make it work on map tiles also 
 
Hehe,  
Code: 
 ON=@DCLICK 
TARGETFG f_go 
RETURN 1 
 
[FUNCTION f_go] 
IF (<DISTANCE <SRC.TARGP>> > 7) || !(<SRC.CANSEELOS <SRC.TARGP>>) 
SRC.SMSG you can't reach it. 
RETURN 1 
ELSE 
SRC.GO <SRC.TARGP> 
ENDIF
  
 
work fine 
you can go to location within 7tiles and canseelos 
That works fine but... you can tele in the walls and others stuff of the game.  
Any check or something to fix that?
 
Rly thanks to all   
			 
			
			
 
			
		 |  
	 
 | 
	| 08-07-2012 12:04 PM | 
	
		
	 | 
	
	
		   
		 
		
	 | 
	
		
		Shaklaban   
		
			Master 
			   
			
			 
			
	Posts: 378 
	Likes Given: 0
 
Likes Received: 1 in 1 posts 
	Joined: Mar 2012
	
 Reputation: 8
  
			DOT
 ![]()  
		
	 | 
	
		
			
RE: targon_ground - need help ^_^ 
			 
			
				well you can use that function: 
Code: 
 [function summon_ground_avaible] 
if (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE T_wall>)  
    return 0 
elif (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE t_window>)  
    return 0     
elif (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE t_water>)  
    return 0         
endif 
return 1
  
usage:
 
if <summon_ground_avaible <src.targp>>
			  
			
			
			
				
(This post was last modified: 08-07-2012 12:28 PM by Shaklaban.)
 
				
			 
		 |  
	 
 | 
	| 08-07-2012 12:26 PM | 
	
		
	 | 
	
	
		   
		 
		
	 | 
	
		
		Lazarus   
		
			Master 
			   
			
			
 
 
			
	Posts: 352 
	Likes Given: 11
 
Likes Received: 7 in 6 posts 
	Joined: Jun 2012
	
 Reputation: 1
  
			Hybris Ultima Online
 ![]()  
		
	 | 
	
		
			
RE: targon_ground - need help ^_^ 
			 
			
				 (08-07-2012 12:26 PM)Shaklaban Wrote:  well you can use that function: 
Code: 
 [function summon_ground_avaible] 
if (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE T_wall>)  
    return 0 
elif (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE t_window>)  
    return 0     
elif (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE t_water>)  
    return 0         
endif 
return 1
  
usage: 
 
if <summon_ground_avaible <src.targp>> 
That works PERFECT
 
thanks   
There is the function if anyone wants to use: 
[CALLED BY TARGETFG f_go]
 
Code: 
 [FUNCTION f_go] 
IF (<DISTANCE <SRC.TARGP>> > 7) || !(<SRC.CANSEELOS <SRC.TARGP>>) 
SRC.SMSG No alcanzas eso. 
RETURN 1 
ELSE 
if <summon_ground_avaible <src.targp>> 
SRC.GO <SRC.TARGP> 
ENDIF 
 
[function summon_ground_avaible] 
if (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE T_wall>)  
SRC.SMSG No puedes ahi. 
    return 0 
elif (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE t_window>)  
SRC.SMSG No puedes ahi. 
    return 0     
elif (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE t_water>)  
SRC.SMSG No puedes ahi. 
    return 0        
elif (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE t_tree>)  
SRC.SMSG No puedes ahi. 
    return 0          
endif 
return 1
  
I'll add more t_ there    i have added t_Tree ^_^
 
 
EDIT:
 
New problems:
 
-Multi houses [the default houses of sphere] [you can tp in in the wall] 
-fences [iron fences] 
-items
			  
			
			
 
			
				
(This post was last modified: 08-07-2012 02:20 PM by Lazarus.)
 
				
			 
		 |  
	 
 | 
	| 08-07-2012 01:59 PM | 
	
		
	 | 
	
	
		   
		 
		
	 |