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
Shaklaban
Master
**

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

DOT

Post: #11
RE: targon_ground - need help ^_^
well you can add: (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).STATICS>) then they are not able to teleport a tile which contains statics. if you want to disable just some types of statics you can loop through statics: http://wiki.sphere.torfo.org/index.php/Map_Points you can control their properties with <serv.itemdef.x.can> thing. if you want to disable teleport on blocking ingame items you can use foritems 0 and control the can flag of items in for loop "if (<can>&can_i_block)".
(This post was last modified: 08-07-2012 02:36 PM by Shaklaban.)
08-07-2012 02:32 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: #12
RE: targon_ground - need help ^_^
(08-07-2012 02:32 PM)Shaklaban Wrote:  well you can add: (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).STATICS>) then they are not able to teleport a tile which contains statics. if you want to disable just some types of statics you can loop through statics: http://wiki.sphere.torfo.org/index.php/Map_Points you can control their properties with <serv.itemdef.x.can> thing. if you want to disable teleport on blocking ingame items you can use foritems 0 and control the can flag of items in for loop "if (<can>&can_i_block)".


I can do something like:

if ((<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).ISNEARTYPE t_grass>) || t_normal || t _rock
return 1
else
return 0

?

just to know, this will simply all the function and works only in grass, normal terrain or rock.

Thanks for the .statics Tongue, I'll try it.


WITH STATICS works fine but the houses... I can still get in the player's houses... Sad

[Image: 2hy9q0y.png]
(This post was last modified: 08-07-2012 02:46 PM by Lazarus.)
08-07-2012 02:41 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: #13
RE: targon_ground - need help ^_^
yeah it will be simpler but slower because even the first condition of an "if" is wrong, others will be executed by sphere. maybe its not important in that case but in larger loops its becoming problem if you have lot of players.

also you can't just look for grass because in same point there can be grass + wall.

for houses, you can try to check region on targp.
(This post was last modified: 08-07-2012 03:17 PM by Shaklaban.)
08-07-2012 03:15 PM
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: #14
RE: targon_ground - need help ^_^
yeah, all t_multi have more of owner, so just check it
08-07-2012 04:20 PM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #15
RE: targon_ground - need help ^_^
Code:
if (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_multi)
  src.sysmessage you cannot teleport into a house
  return 1
endif

that would fix the house issue...
As for the items and such, it would be a shorter script to say what you CAN tele onto than what you can't....

Code:
[function summon_ground_avaible]
if  (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_normal) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_grass) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_sand) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_swamp) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_snow) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_jungle) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_forest)
  return 0
else
  src.sysmessage cannot teleport there
  return 1
endif

Now if they target anything that is NOT ground they will not be allowed to teleport, couple this with the check for a multi, distance and los and it should prevent any nonsense

[Image: 2nis46r.jpg]
08-08-2012 06:57 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: #16
RE: targon_ground - need help ^_^
(08-08-2012 06:57 AM)Mordaunt Wrote:  
Code:
if (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_multi)
  src.sysmessage you cannot teleport into a house
  return 1
endif

that would fix the house issue...
As for the items and such, it would be a shorter script to say what you CAN tele onto than what you can't....

Code:
[function summon_ground_avaible]
if  (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_normal) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_grass) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_sand) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_swamp) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_snow) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_jungle) || (<SERV.MAP(<argv[0]>,<argv[1]>,<argv[3]>).TYPE==t_forest)
  return 0
else
  src.sysmessage cannot teleport there
  return 1
endif

Now if they target anything that is NOT ground they will not be allowed to teleport, couple this with the check for a multi, distance and los and it should prevent any nonsense

That of t_multi doesn't works... I can tp in the houses Sad can you try in your own server please :'(?
but I'll try the other set of scripts, and will edit this.

I need go to dinner now.

Thanks, rly ^_^

[Image: 2hy9q0y.png]
08-08-2012 10:51 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #17
RE: targon_ground - need help ^_^
Yeah, that's my bad I screwed that part up and now looking at it I can't for the life of me remember how to check for it, I'm just way to rusty I guess

[Image: 2nis46r.jpg]
08-08-2012 01:27 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: 5 Guest(s)