SphereCommunity
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)

Pages: 1 2 3


RE: Walls on Dungeon Entrances. - Lazarus - 12-05-2012 09:34 AM

(12-05-2012 09:26 AM)Mordaunt Wrote:  They exist in sphere_map_points0.scp under [teleports]
I'd just override them with my own teleport

Code:
ON=@Step
If <whatever>
  return 1
else
  src.move <coords>
endif

And to finish this [i will try later] the script should be:


FORITEMS 0
IF (<baseid> == i_wall_of_stone_8 )
return 1
ENDIF
ENDFOR

rly?

Shock Just to clarify the post.


-And... I had to delete that teleporters, right?
-How can I make a IF that if IN X pos are there a wall of stone... you can't telep?

Thanks to all!


RE: Walls on Dungeon Entrances. - Mordaunt - 12-05-2012 10:41 AM

Under what conditions are you making the wall of stone though?
Is this just your method to keep people out under specific conditions?
If so you don't need the wall of stone if you are turning off the teleports.


RE: Walls on Dungeon Entrances. - Lazarus - 12-05-2012 10:58 AM

(12-05-2012 10:41 AM)Mordaunt Wrote:  Under what conditions are you making the wall of stone though?
Is this just your method to keep people out under specific conditions?
If so you don't need the wall of stone if you are turning off the teleports.

I m trying to do that if the new position [morep], were the telep will transport you, is blocked because in them are a <BASEID> == i_wall_stone_7_b [mine wall of stone casted by s_wall_of_stone in my server], you will get a error [The position is blocked] and not get in Shock


Lazarus.


RE: Walls on Dungeon Entrances. - Mordaunt - 12-05-2012 11:24 AM

Ok, so make sure that you are checking for the wall of stone on the other end of the teleporters then


RE: Walls on Dungeon Entrances. - ChaveS - 12-05-2012 12:50 PM

The idea here is:

Imagine a tile of a dungeon at 1,1 which send you to 2,2 using the sphere_map_points scripts

1 Now you put a INIVISIBLE item on 1,1
2 Now you set .xmorep 2,2 on this item
3 This tile, when you step on it, will create a gold item on 2,2 (because it reads the morep)
4 the gold check if there is a wall on it
5 if there is wall on it, the INVISIBLE ITEM will send you back

new.destine_blocktest2  <----- it shouldnt be there
return <new.destine_blocktest2>

try this way

Code:
[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
serv.newitem i_virtstone_8 //to avoid server crash if 2 coins stack togheter and timerf,remove runs on a missed item
new.attr 090
new.p <morep>
return <new.destine_blocktest2>

[function destine_blocktest2]
FORITEMS 0
IF (<baseid> == i_wall_stone_7_b )
return 1
ENDIF
ENDFOR
timerf 0,remove



RE: Walls on Dungeon Entrances. - Lazarus - 12-07-2012 02:11 AM

(12-05-2012 12:50 PM)ChaveS Wrote:  !!

Im trying this but not working Sad


RE: Walls on Dungeon Entrances. - Skul - 12-10-2012 10:38 PM

Create an [areadef] around all your entrances and exits and add and create [regiontype r_nofields], example:
Code:
[events e_nofields]
on=@spellselect
if ( <serv.spell.<argn1>.flags> & spellflag_field )
  if (<region.isevent.r_nofields>) || (<targp.region.isevent.r_nofields>)
    sysmessage You can not cast a field spell here.
    return 1
  endif
endif

[regiontype r_nofields] //add this regiontype to your areadef events on all entrances and exits
defname=r_nofields



RE: Walls on Dungeon Entrances. - RanXerox - 12-11-2012 09:52 AM

That area would have to be pretty big since that trigger will only fire if the caster is standing in the region... casters outside of the region can still cast into it I suspect.


RE: Walls on Dungeon Entrances. - htid4life - 12-11-2012 01:26 PM

im not sure but i think he coverd that with

Code:
if (<region.isevent.r_nofields>) || (<targp.region.isevent.r_nofields>)

the targp.region part


RE: Walls on Dungeon Entrances. - Skul - 12-11-2012 04:40 PM

Might want to expand the area to prevent the field from blocking 'around' the area, allowing the caster to create a 'box' large enough to take too much time to try and block the entrance.