Help - Search - Members - Calendar
Full Version: Death Robe Fix
SphereServer Forums > Sphere .56/.57 > Community Script Pack > Functions
pyromapes2k
Topic probably misleading but still.

Not really a function but it seems to fit best here.

CODE
ON=@Death
If <Findlayer.22>
tag.robe=<Findlayer.22.uid>
If <Findlayer.3>
tag.feet=<Findlayer.3.uid>
Endif
Endif

ON=@DeathCorpse
If <tag0.robe>
Uid.<tag.robe>.z = 3
Uid.<tag.feet>.z = 8
tag.robe=
tag.feet=
Argo.Update
endif


Any player or NPC who dies while wearing a robe does not have it displayed on their corpse. This fixes that by setting the robe to take the place of your boots/shoes and setting your shoes to take the place of a neck item which wont be shown anyway if you are wearing a robe.

I used the tags because the Z is reset between death and deathcorpse and because a timerf on the items causes the player or npc to lose the robe for a noticeable amount of time.

I had to use the feet layer because all other layers seem to be displayed under feet for a corpse (i.e. the boots would always overlap the robe).

(this works for all layer 22 items, including death robes. Kind of annoying when you have a cave full of evil cultists and the last thing they do before dying is get necked tongue.gif)


pyromapes2k
just added an image to make sure you got what I meant (I tend to explain things badly)

One on the left is before, right is after.
ShiryuX
It took me some moments to understand this, first though was something about the Death Shroud.
I'll add it to the SVN. Thank you.
pyromapes2k
Sorry, just noticed, the @deathcorpse should check if tag.feet exists before it tries to set its Z smile.gif
jeem
I've updated the SVN
Shaklaban
if dying players layer 3 empty it giving errors.

15:51:ERROR:(toplu_events.scp,37)Undefined symbol 'z'
15:51:ERROR:(toplu_events.scp,37)Undefined symbol 'z'
15:51:ERROR:(toplu_events.scp,37)Undefined keyword 'Uid..z'

i fix it.


CODE
ON=@DeathCorpse
If <tag0.robe>
Uid.<tag.robe>.z = 3
tag.robe=
endif
if <tag0.feet>
Uid.<tag.feet>.z = 8
tag.feet=
endif
Argo.Update
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.