Walls on Dungeon Entrances. - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Walls on Dungeon Entrances. (/Thread-Walls-on-Dungeon-Entrances) |
Walls on Dungeon Entrances. - Lazarus - 12-03-2012 11:55 PM Hi! There's a way to block the access to the dungeon when the wall it's blocked? Because when you cast a wall of stone inside the dungeon door, the others can get in but can't go back Thanks and sry for my english ^_^ Lazarus. RE: Walls on Dungeon Entrances. - ChaveS - 12-04-2012 03:13 AM Put a item which removes the wall when you cast above it(disable wall of dungeon tiles) Code: [ITEMDEF i_remove_field] or you can test it: Code: [typedef t_dungeon_tile] then .add i_floor_marble .xattr 090 (make it invis) .xmorep xxxx,yyyy,z (the exactly place the dungeon tile send you) .xtype t_dungeon_tile RE: Walls on Dungeon Entrances. - Lazarus - 12-04-2012 09:24 AM Thanks! I just tryied the first and change the FORITEMS 4 to 0 for the exact position ^_^ again, thanks There's a way to block the entrance when there's a wall? RE: Walls on Dungeon Entrances. - ChaveS - 12-04-2012 11:39 AM try it: [typedef t_dungeon_tile] on=@step if <destine_blocktest> src.sysmessage @,,1 The other side is blocked src.go <morep> return 1 endif [function destine_blocktest] //to test where it is if !<args> serv.newitem i_gold new.attr 090 new.p <morep> new.destine_blocktest 1 else timerf,0 remove FORITEMS 0 IF (<baseid> == i_wall_of_stone_8 ) return 1 ENDIF ENDFOR endif RE: Walls on Dungeon Entrances. - Lazarus - 12-04-2012 05:17 PM (12-04-2012 11:39 AM)ChaveS Wrote: try it: Not working. Everytime [with a wall of stone or without] the IF on the function gets in first and never else. The function never get's the 1 on new.destine_blocktest 1 If I use return 1 works the return 1 but... the morep don't get's save or something else that not let me works fine. So, i have a question, why is there that else? else timerf,0 remove FORITEMS 0 IF (<baseid> == i_wall_of_stone_8 ) return 1 ENDIF ENDFOR Thanks for all the help ^_^ really Lazarus. RE: Walls on Dungeon Entrances. - ChaveS - 12-05-2012 03:22 AM it is removing the gold used to check if there is a wall on that place and checking if there is a wall on that place my bad, try Code: [typedef t_dungeon_tile] Then set .xtag.moveback 2,0 (move 2 tiles right) .xtag.moveback -2,0 (move left) .xtag.moveback 0,2 (move top) .xtag.moveback 0,2 (move bot) and .xmorep XXXX,YYYY where XXXX,YYYY is the place where this dungeon tile is sending to... You can use tilef to make this function better: http://forum.spherecommunity.net/Thread-How-to-get-the-tilef-tile-flags-of-a-item somthing like IF (<serv.itemdef.<baseid>.tilef> & tilef_impassable) || ... tilef_wall || etc return 1 ENDIF RE: Walls on Dungeon Entrances. - Lazarus - 12-05-2012 03:48 AM (12-05-2012 03:22 AM)ChaveS Wrote: adsad Nope, not working but there's something bad I guess The first function it's called like the second one. And no one of that has changed. And there's a endif on the sky I had tryied with "changes" but don't works too. The scripts is this: [typedef t_dungeon_tile] on=@step if <destine_blocktest> src.sysmessage @,,1 The other side is blocked move <dtag.moveback> return 1 endif [function destine_blocktest] //to test where it is if !<args> serv.newitem i_gold new.attr 090 new.p <morep> new.destine_blocktest2 return <new.destine_blocktest2> endif [function destine_blocktest2] timerf,0 remove FORITEMS 0 IF (<baseid> == i_wall_of_stone_8 ) return 1 ENDIF ENDFOR // here was a endif RE: Walls on Dungeon Entrances. - Mordaunt - 12-05-2012 04:04 AM You do realise that movement in and out of the dungeon is controlled by teleports right? It is as simple as writing a function to override/replace the existing teleports to add arguments to them so they behave as you wish... RE: Walls on Dungeon Entrances. - Lazarus - 12-05-2012 08:54 AM (12-05-2012 04:04 AM)Mordaunt Wrote: You do realise that movement in and out of the dungeon is controlled by teleports right? I don't know were are the existing teleports and! I don't know that argument's if there it's blocked the entrance with a wall ^_^ becuse that I m here asking for it This is a solution, but your solution it's better, but, I don't know how to do haha Lazarus. RE: Walls on Dungeon Entrances. - Mordaunt - 12-05-2012 09:26 AM They exist in sphere_map_points0.scp under [teleports] I'd just override them with my own teleport Code: ON=@Step |