SphereCommunity
Ressurection help - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Ressurection help (/Thread-Ressurection-help)



Ressurection help - darksoulfe - 03-10-2016 11:27 PM

Well guys day,

I'm hum problem , when I am the owner and write Command .admin I click hum player and try one resurrection nothing happens , I made a resurrection script also a floor where passing over the dead player back to life. The player tries to spend more is prevented , so nothing makes the player live again.

below the script
[ ITEMDEF i_resspase ]
NAME = marble floor
ID = i_Floor_Marble

on = @ create
ATTR = attr_move_never | attr_static | attr_invis
COLOR = 0

ON = @ STEP
SRC.RESURRECT
return 1
endif


I am with this difficulty help me


RE: Ressurection help - Kanibal - 03-11-2016 05:48 PM

WTF?
Code:
ON = @ STEP
SRC.RESURRECT
return 1
endif

This works fine. Sphere 0.56b
Code:
[ITEMDEF i_resspase]
name=marble floor
id=i_floor_marble

on=@create
attr=attr_move_never | attr_static | attr_invis
color=0

on=@step
src.resurrect



RE: Ressurection help - rastrero - 03-12-2016 06:05 AM

Method to do what u want with any item.

1-create item
2- set type t_shrine
3-step the item and resurrect.


RE: Ressurection help - Llirik - 03-13-2016 05:30 PM

Type for t_shrine:

[TYPEDEF t_shrine]
ON=@ContextMenuRequest
SRC.AddContextEntry 101,3006195,<QVAL (<SRC.FLAGS> & statf_dead)? 0:1> //Resurrect
SRC.AddContextEntry 102,3006049,<QVAL (<SRC.Necromancy> < 1000) && (<SRC.FLAGS> & statf_dead) ? 0:1> // Train Necromancy

ON=@ContextMenuSelect
IF (<ARGN>==101) && (<SRC.FLAGS> & statf_dead)
SRC.RESURRECT
ENDIF

IF (<ARGN>==102) && (<SRC.FLAGS> & statf_dead) && (<SRC.Necromancy> < 1000)
IF (<SRC.GOLD> >= 10000)
SRC.GOLD -= 10000
SRC.UPDATE
src.Necromancy += 1
SRC.RESURRECT
ELSE
SRC.SYSMESSAGE You don't have 10000 gold.
ENDIF
ENDIF

Smile


RE: Ressurection help - Khaos - 03-13-2016 10:31 PM

Use Src.Resurrect 1. In fact go to script submissions and grab my t_Shrine code from there and just run checks for a floor tile and make it so it doesn't parse the tithing for the tile.

Llirik, I added support for @DClick just a few moments ago. Try to keep the Src.Resurrect 1 on it instead of removing the 1. It forces the parsing and might be an issue without it. Not sure, it used to be. So forcing it seems more ideal and the syntax looks cleaner using the 1. Smile

Code:
[ItemDef i_resspase]
Name=marble floor
ID=i_Floor_Marble
Type=t_Floor
Can=Can_I_Platform

On=@Create
Attr=Attr_Move_Never|Attr_Static|Attr_Invis

On=@Step
If (<Src.Flags> &StatF_Dead)
Src.Resurrect 1
EndIf

There, that should process it now. Resurrect 2 would never work. If you need them to have fractional life or even full life, let me know. Will edit it for you.