Ok so three major points to cover:
1) User Dies, and looses exp
2) if res'd exp not lost.
3) if logout exp lost on login.
Firstly I'm not sure if you can take exp, as I havent tried it. But I'm assuming you have already figured that part out. Guessing its either :
Anyways I think I have the rest figured out. The best way I can think of doing this is adding a time limit for the taos to resurrect the fallen player, lets say 3 mins for this example.
UserDeath Script:
Code:
Mapquest Trigger - UserDie
[I][COLOR="RoyalBlue"];; Flag 001 set incase player logs out[/COLOR][/I]
[@Main]
#IF
#ACT
SET [001] 1 [I][COLOR="RoyalBlue"]; Set flag incase player logs out to avoid exp loss[/COLOR][/I]
delaygoto [local] 180 @ProcessExpLoss
break
[I][COLOR="royalblue"];; If player is still dead after given time frame, the below script will run
;; will not run if player is resurrected in given timeframe[/COLOR][/I]
[@ProcessExpLoss]
#IF
HLSCRIPTCMD CHECKUNDEADINHOME
HLSCRIPTCMD CHECKUNDEAD
#ACT
TAKEEXP %USERNAME 100
#IF
#ACT
SET [001] 0 [I][COLOR="royalblue"]; Reset login flag, so user doesn't lose exp on login[/COLOR][/I]
break
Login Script Snippet:
Code:
#IF
CHECK [001] 1
#ACT
TAKEEXP %USERNAME 100
SET [001] 0
So thats the best I could come up with on short notice, I hope it helps, if it doesn't, or if it's not what you are looking for, sorry
/Cheeky