SphereCommunity
Wall of Stone - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Wall of Stone (/Thread-Wall-of-Stone)

Pages: 1 2


RE: Wall of Stone - Hellz1nho - 07-11-2012 11:05 PM

(05-24-2012 06:30 PM)Shaklaban Wrote:  i think he wants to make characters able to hit other characters, which is crossed with wall of stone spell, like old sphere versions.

Hi, How do I make the player does not receive damage, which is crossed with Wall of Stone spell? Thank you!


RE: Wall of Stone - Skul - 07-12-2012 12:46 AM

diagonal walk check? this allows players to walk through corners diagonally (like the god client)? Maybe people ARE escaping the 'wall of stone cross' which is an old pk tactic of trapping someone, or is it the fact that someone can cast through the little corners to kill the player? Maybe adding an LOS 'check' to see if the player can't really see through the corner (even though sphere will tell you the player can)
Code:
on=@spelleffect
if ( <serv.spell.<argn1>.flags> & spellflag_harm )
if !(<uid>==<src.uid>)
  local.p.x=<p.x>
  local.p.y=<p.y>
  foritems 1
   if (<type>==t_spell) && (<baseid>==i_wall_stone_7) //is wall of stone
    if (<p.x>==<eval <local.p.x> +1>) || (<p.x>==<eval <local.p.x> +-1>) //left or right 1 tile of character
     local.x += 1
    elseif (<p.y>==<eval <local.p.y> +1>) || (<p.y>==<eval <local.p.y> +-1>) //up or down 1 tile of character
     local.x += 1
    endif
   endif
  endfor
if (<dlocal.x> >= 4) //is trapped?
  return 1 //halt the spell - the player is trapped!
endif
endif



RE: Wall of Stone - Hellz1nho - 07-12-2012 01:11 AM

(07-12-2012 12:46 AM)Skul Wrote:  diagonal walk check? this allows players to walk through corners diagonally (like the god client)? Maybe people ARE escaping the 'wall of stone cross' which is an old pk tactic of trapping someone, or is it the fact that someone can cast through the little corners to kill the player? Maybe adding an LOS 'check' to see if the player can't really see through the corner (even though sphere will tell you the player can)

I think that's exactly what I need. Thank you.
How do I activate that script?


RE: Wall of Stone - Skul - 07-14-2012 12:47 AM

have the @spelleffect trigger placed in an [EVENTS xx] on all the players (and monsters too!)


RE: Wall of Stone - Hellz1nho - 07-14-2012 03:40 AM

still casting thru the wall Sad


RE: Wall of Stone - Skul - 07-14-2012 01:53 PM

here's a little modification, something I missed (if player is trapped by shoreline or some sort of static building) as well as crossed in by wall of stone. I'm guessing you're using i_wall_stone_7 as your default for s_wall_of_stone? Also, be sure the event is added to all the players, this is a must.
Code:
[events e_wall_of_stone] //the event
on=@spelleffect
if ( <serv.spell.<argn1>.flags> & spellflag_harm )
if !(<uid>==<src.uid>)
   local.p.x=<p.x>
   local.p.y=<p.y>
   if !(<canmove e>)
    local.x += 1
   endif
   if !(<canmove w>)
    local.x += 1
   endif
   if !(<canmove n>)
    local.x += 1
   endif
   if !(<canmove s>)
    local.x += 1
   endif
   foritems 1
    if (<type>==t_spell) && (<baseid>==i_wall_stone_7) //is wall of stone
     if (<p.x>==<eval <local.p.x> +1>) || (<p.x>==<eval <local.p.x> +-1>)//left or right 1 tile of character
      local.x += 1
     elseif (<p.y>==<eval <local.p.y> +1>) || (<p.y>==<eval <local.p.y> +-1>) //up or down 1 tile of character
      local.x += 1
     endif
    endif
   endfor
   if (<dlocal.x> >= 4) //is trapped?
    effect=3,i_fx_glow,15,15,1 //invul effect
    return 1 //halt the spell - the player is trapped!
  endif
endif
endif

I just noticed I was missing an 'endif', give it a try.