How to get the tilef (tile_flags) of a item - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: How to get the tilef (tile_flags) of a item (/Thread-How-to-get-the-tilef-tile-flags-of-a-item) |
How to get the tilef (tile_flags) of a item - Gil Amarth - 12-04-2012 04:15 AM 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? RE: How to get the tilef (tile_flags) of a item - RanXerox - 12-04-2012 06:08 AM 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 RE: How to get the tilef (tile_flags) of a item - ChaveS - 12-04-2012 06:36 AM 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 RE: How to get the tilef (tile_flags) of a item - Mordaunt - 12-04-2012 07:12 AM 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? RE: How to get the tilef (tile_flags) of a item - Gil Amarth - 12-05-2012 07:28 AM 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. RE: How to get the tilef (tile_flags) of a item - Mordaunt - 12-05-2012 07:32 AM Interesting, what is your server? RE: How to get the tilef (tile_flags) of a item - Gil Amarth - 12-05-2012 07:39 AM 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. |