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
How to get the tilef (tile_flags) of a item
Author Message
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #1
How to get the tilef (tile_flags) of a item
I´m doing a script and I need to know if the surface wich the players target is walkable or not. (the surface are statics, not terrain, of course)

In the Spherewiki I have found the tile_flags defined in the sphere.ini, but I have only found how to read them with the MOVE <args> function. And I need to get the tile flags of a selected item, not the tile where the players stand or want move.

Anyone knows the syntax to read tilef values of items?
12-04-2012 04:15 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: How to get the tilef (tile_flags) of a item
There is (was?) a built-in function CANWALK... I could find no useful documentation for it however, just this reference in the revisions:

Quote:13-04-2004, Balkon
- OF_NoHouseMuteSpeech (0200) - if enabled players are able to hear each other inside and outside the house
- Started remaking a CanSeeLos and CanWalk, temporary added EF_CanSeeLos_New (0800) to enable both changes
as for now it fixes shoot through walls an fall through the floor in house regions interception area bugs,
more changes here later...
12-04-2012 06:08 AM
Find all posts by this user Like Post Quote this message in a reply
ChaveS
Journeyman
*

Posts: 69
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2012
Reputation: 0



Post: #3
RE: How to get the tilef (tile_flags) of a item
ie <SERV.ITEMDEF.i_gold.TFLAGS>

ie2 <SERV.ITEMDEF.<act.baseid>.TFLAGS>

[DEFNAME tile_flags] // by Shadowlord
tilef_background 01 // No idea. None whatsoever. Maybe it's the blackness.
tilef_weapon 02 // I smack thee with this here ... club?
tilef_transparent 04 // Yeah. So we can see through it?
tilef_translucent 08 // Okay...
tilef_wall 010 // Hey look, we can't walk through it!
tilef_damaging 020 // Lava, perhaps? Fires, hmm!
tilef_impassable 040 // Mountains and stuff, I'll wager.
tilef_wet 080 // Water? Or mud? Or a slick road in a rainstorm? Probably the first.
tilef_unknown 0100 // Uh...
tilef_surface 0200 // Tables or something?
tilef_bridge 0400 // I wonder why they'd have a flag for that.
tilef_stackable 0800
tilef_window 01000 // So we can see/shoot out?
tilef_noshoot 02000 // ? We can't shoot out or something? So, like a glass window maybe?
tilef_prefixA 04000 // A card
tilef_prefixAn 08000 // An apple
tilef_internal 010000 // hair, beards, etc
tilef_foliage 020000 // Probably bushes and tree leaves and stuff.
tilef_partialHue 040000 // semi-glowy?
tilef_unknown_1 080000 // Well, gee. I should see if it's used on anything...
tilef_map 0100000 // Sounds good to me.
tilef_container 0200000 // They flag these!?
tilef_wearable 0400000 // Omigod!
tilef_lightSource 0800000 // I'm getting tired of typing repetitive shiznit now.
tilef_animated 01000000 // Like fire again. And stuff. Those spinny propeller thingies!
tilef_noDiagonal 02000000 // !?!???!!?
tilef_unknown_2 04000000 // I really hope some of these unknowns are n/w/s/e facing flags.
tilef_armor 08000000 // Armor, okay, so does that count shields? Hmmm?
tilef_roof 010000000 // "Don't fall through me!" Or why isn't it just flagged surface or something?
tilef_door 020000000 // Okay...
tilef_stairBack 040000000 // Don't we have stairs that go forward or left too? This could cover both...
tilef_stairRight 080000000 // Well, whatever, you can climb them, so, hey... Good use for a
(This post was last modified: 12-04-2012 06:36 AM by ChaveS.)
12-04-2012 06:36 AM
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: #4
RE: How to get the tilef (tile_flags) of a item
What ChaveS wrote is indeed correct however a word of warning....

I was using tile_flagsin one of my scripts and honestly they are far from reliable. Identical tiles may or may not have the same flags.

Can I ask what you are using it for?

[Image: 2nis46r.jpg]
12-04-2012 07:12 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #5
RE: How to get the tilef (tile_flags) of a item
So, tflags was the function I was looking for. Thanks.

I´m using for my city building system. My server is pretty much similar to Minecraft, the players can build anything from the scratch. They build floors, walls, doors, roofs, and everything else tile to tile. And they configure his own towns like they want.

I needed the tflags to prevent some exploits and abuse of the system. I´m using also typer like t_floor, t_wall, t_roof,... but a double check is also important.
(This post was last modified: 12-05-2012 07:28 AM by Gil Amarth.)
12-05-2012 07:28 AM
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: #6
RE: How to get the tilef (tile_flags) of a item
Interesting, what is your server?

[Image: 2nis46r.jpg]
12-05-2012 07:32 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #7
RE: How to get the tilef (tile_flags) of a item
It´s a spanish roleplay server, I don´t have any web yet, it is in alpha stage. We have only a forum of discussion.

When I´ll finish the development, I´ll put the link under my signature.
12-05-2012 07:39 AM
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)