The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
targon_ground - need help ^_^
Author Message
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #1
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 Tongue] 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!

[Image: 2hy9q0y.png]
08-07-2012 09:35 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #2
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
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #3
RE: targon_ground - need help ^_^
doesn't cansee/canseelos work only on items and chars Shock ?
08-07-2012 10:24 AM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #4
RE: targon_ground - need help ^_^
well if its works is this means canseelos automatically take arguments on targon_item and targon_ground?
08-07-2012 10:43 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #5
RE: targon_ground - need help ^_^
Not works the canseloos Sad i copy paste that and doens't get in the IF Sad

[Image: 2hy9q0y.png]
08-07-2012 11:05 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #6
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 


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
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #7
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
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #8
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 Smile

[Image: 2hy9q0y.png]
08-07-2012 12:04 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #9
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
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #10
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 Smile

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

[Image: 2hy9q0y.png]
(This post was last modified: 08-07-2012 02:20 PM by Lazarus.)
08-07-2012 01:59 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)