Help - Search - Members - Calendar
Full Version: Not Able To Attack
SphereServer Forums > Sphere .56/.57 > Script Help > Script Requests
-Lano-
is there a way to script an event that not lets a player attack another player unless he/she has been attacked by that player first?
Wiccanian
Should be possible if you check their memories I think. Something like:

CODE
[Events e_retarded_check]
On=@HitTry
if <isplayer>
  if <isevent.e_retarded_check>
    src.sysmessage You are both too retarded to figure out how each other
    return 1
  elseif !<src.memoryfindtype.memory_harmedby.uid>
    src.sysmessage You are too retarded to figure out how to hit that player
    return 1
  endif
endif
-Lano-
hahaha
ClouD_BR
just a little thought
if you can't hit someone unless he has hit you first, how is anyone going to hit anyone? =P
Fire-Dragon-DoL
QUOTE(ClouD_BR @ 16 Feb 2008, 02:07 PM) [snapback]208886[/snapback]

just a little thought
if you can't hit someone unless he has hit you first, how is anyone going to hit anyone? =P


probably is a skill that enable it and lasts X seconds wink.gif

i thought it also for my shard
-Lano-
Well its for my non pvp class/race (pure crafters) on the shard, its a long story, but the main point is that they are very boosted in armor and dmg, but they are not integrated in my pvp system, but some players could still create one just for the fun of killing others very easy, although they even cant loot other players, so now i just need to create a script that wont let them attack before they are attacked
ClouD_BR
you do have the REALLY nice ATTACKER feature now, just have fun with that =P (much better than checking memory items)
make a function like
CODE

[FUNCTION attackedme]
FOR 0 <EVAL <ATTACKER>-1>
   IF (<ATTACKER.<dLOCAL._FOR>> == <ARGN1>)
   RETURN 1
   ENDIF
ENDFOR
   RETURN 0


then you just use something like

ON=@Attack
IF (<ATTACKEDME <SRC>>)
RETURN 0
ELSE
RETURN 1
ENDIF

note: i don't think @attack will cover spell casting (like @hittry wouldn't too), so just use this on @spellcast trigger
-Lano-
aaaaah, very nice, but then the player cant attack npc's either... and thats not the plan, but that should be easy to fix smile.gif thx for the info
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.