SphereCommunity
Resurrection malus - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Requests (/Forum-Script-Requests)
+--- Thread: Resurrection malus (/Thread-Resurrection-malus)



Resurrection malus - Claus - 06-02-2020 12:52 AM

Hi, since I tried, without success, to create a script that made sure that, at the time of the resurrection, the character had the stats stuck at 20 for some time, I ask you for help

so i have this
Code:
[function f_resurrection]
targetf r_resurrection_targ
        SRC.NEWITEM=i_timer_GEN_COOLDOWN_20
        SRC.TAG.GC8UID=<NEW.UID>
        SRC.ACT.EQUIP
        
[function r_resurrection_targ]    
        src.say @,3,1 Tym Vas
        argo.resurrect
        argo.str = 20
        argo.int = 20
        argo.dex = 20
        argo.say = *I'm sick after return to life*
        src.mana -=75
        ARGO.effect 3,I_FX_HEAL_EFFECT,5,16,0
        argo.NEWITEM=i_timer_res_sikness
        argo.sysmessage Return to life!
        argo.TAG.GC240UID=<NEW.UID>
        uid.<argo.uid>.equip=<argo.act.uid>

end timer obj
Code:
[ITEMDEF i_timer_res_sickness]            
NAME=Delay Teleport
ID=i_handr_1
TYPE=T_EQ_SCRIPT

ON=@Create
ATTR=attr_invis | attr_decay
MORE1=24

ON=@Equip
TIMER=10

ON=@Timer
cont.str = [color=#FF0000] here i need help   if i put here for example 400, after ten second the stats will be 400, i need a way to store strengt before ress [/color]
cont.int = [color=#FF0000] here i need help
cont.dex = [color=#FF0000] here i need help
CONT.TAG.CG240=
CONT.TAG.GC240UID=
remove
return 1

as you can see I have difficulty making sure that after the second resurrection the character returns to his normal stats
how can I do?[/color]



RE: Resurrection malus - Coruja - 06-02-2020 04:30 AM

You can use the trigger @Resurrect instead. Just add the event e_resurrect_sick on all players (EventsPlayer setting on sphere.ini)

Code:
[EVENTS e_resurrect_sick]
ON=@Resurrect
MESSAGE *I'm sick after return to life*
FINDID.i_memory_resurrect_sick.REMOVE
SERV.NEWITEM i_memory_resurrect_sick
NEW.EQUIP


[ITEMDEF i_memory_resurrect_sick]
NAME=Resurrect Sick Timer
ID=i_handr_1
TYPE=t_eq_script

ON=@Create
TIMER=20

ON=@Timer
REMOVE
return 1

ON=@Equip
TAG.Backup.Str=<SRC.STR>
TAG.Backup.Dex=<SRC.DEX>
TAG.Backup.Int=<SRC.INT>
SRC.STR=20
SRC.DEX=20
SRC.INT=20

ON=@Unequip
SRC.STR=<TAG0.Backup.Str>
SRC.DEX=<TAG0.Backup.Dex>
SRC.INT=<TAG0.Backup.Int>