SphereCommunity

Full Version: What Command Would I Use For "If My Character Is Damaged/Attacked?"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys, I know to use ontrigger=damage if you want something to happen while attacking something but what would I use if I want something to happen to the other person if they are attacking me? For example I make a ring my character wears and if my character tests that he parried a blow I want a trigger for something to happen to the person attacking me. Kind of like reactive armor spell does but want to use it on various items.
Thanks!
@HitTry
@HitMiss
@Hit
@GetHit
@Attack

on=@attack
if (<src.act.hits> = <src.act.str>) && (<src.act.action> == -1) && (<src.act.obody> == 065)
src.act.go=<src.p>
endif

//动物园
if (<valstr(strlen(<SRC.REGION.name>))>=3) && (<SRC.REGION.FLAGS> == 028aa)
src.go 4291 954 10
//src.action -1
endif


//矿洞名称计算公式
if ((<valstr(strlen(<SRC.REGION.name>))>=10) || (<valstr(strlen(<SRC.REGION.name>))>=11) || (<valstr(strlen(<SRC.REGION.name>))>=13) || (<valstr(strlen(<SRC.REGION.name>))>=17)) && (<SRC.REGION.FLAGS> & 04000)
if (<src.findlayer(1).id> > 0)
src.findlayer(1).unequip
endif

if (<src.findlayer(2).id> > 0)
src.findlayer(2).unequip
endif
endif
return 0

on=@gethit
//speaku <actarg1>
if (<valstr(strlen(<SRC.REGION.name>))>=3) && (<SRC.REGION.FLAGS> == 028aa)
if (<src.npc>) && (!(<serial> = <src.MemoryFindType.0002.LINK>)) && (<src.MemoryFindType.0002.LINK> > 0)
src.remove
endif
endif

if ((<valstr(strlen(<SRC.REGION.name>))>=10) || (<valstr(strlen(<SRC.REGION.name>))>=11) || (<valstr(strlen(<SRC.REGION.name>))>=13) || (<valstr(strlen(<SRC.REGION.name>))>=17)) || (<SRC.REGION.FLAGS> & 04000)
if (<src.npc> == 1)// && (!(<serial> = <src.MemoryFindType.0002.LINK>))
var.ffgs=<flags>
src.remove
//src.MemoryFindType.0002.LINK.criminal
flags=<var.ffgs>
endif
endif
//if (<findlayer(33).id> > 0)// && (<act.DISTANCE> < 2)
// EFFECT=3,FX_CURSE_EFFECT,6,15,1
//endif
return 0
For 51a? Allot of that doesn't look like it's for 51a.. Also was just looking for one line to test if my player is being attacked.
sphere 0.51a
(07-04-2013 03:29 PM)evening Wrote: [ -> ]sphere 0.51a

But with lil.
Without lil it wouldn't work.
lil has released the source code, I have the new update it, so I will be more trigger events
Reference URL's