diff options
author | gumi <git@gumi.ca> | 2019-08-20 23:13:56 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2020-03-08 16:06:36 -0400 |
commit | 71f5ceed044d3908b971f5f5f6457086e0ebaa30 (patch) | |
tree | c9789950beb3969d263ad751e464c1c3e12352f9 /world/map/npc | |
parent | 82974e181c66d3a458b82037649888f268217b05 (diff) | |
download | serverdata-71f5ceed044d3908b971f5f5f6457086e0ebaa30.tar.gz serverdata-71f5ceed044d3908b971f5f5f6457086e0ebaa30.tar.bz2 serverdata-71f5ceed044d3908b971f5f5f6457086e0ebaa30.tar.xz serverdata-71f5ceed044d3908b971f5f5f6457086e0ebaa30.zip |
add a command to absolve players
Diffstat (limited to 'world/map/npc')
-rw-r--r-- | world/map/npc/commands/absolve.txt | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/world/map/npc/commands/absolve.txt b/world/map/npc/commands/absolve.txt new file mode 100644 index 00000000..217fafa7 --- /dev/null +++ b/world/map/npc/commands/absolve.txt @@ -0,0 +1,57 @@ +-|script|raise|32767 +{ + if (GM < 40 && GM < G_SYSOP) end; + set .@rid, if_then_else(@args$ != "", getcharid(3, @args$), BL_ID); + if (.@rid < 1 || !(isloggedin(.@rid))) end; + + addtimer 0, strnpcinfo(0) + "::OnRaise", .@rid; + message strcharinfo(0), "absolve : player absolved."; + end; + +OnRaise: + warp getsavepoint(0), getsavepoint(1), getsavepoint(2); + set PC_DIE_COUNTER, 0; + set Hp, MaxHp; + message strcharinfo(0), "Server : you have been revived."; + end; + +OnInit: + registercmd "@raise", strnpcinfo(0); + end; +} + + +-|script|absolve|32767 +{ + if (GM < 40 && GM < G_SYSOP) end; + set .@rid, if_then_else(@args$ != "", getcharid(3, @args$), BL_ID); + if (.@rid < 1 || !(isloggedin(.@rid))) end; + + addtimer 0, strnpcinfo(0) + "::OnRaise", .@rid; + message strcharinfo(0), "absolve : player absolved."; + end; + +OnRaise: + set Zeny, 0; + getinventorylist; + set @item_it, 0; + freeloop 1; + goto L_Drop; // drop all items + +L_Drop: + delitem @inventorylist_id[@item_it], @inventorylist_amount[@item_it]; + set @item_it, @item_it + 1; + if (@item_it >= @inventorylist_count) goto L_Raise; + goto L_Drop; + +L_Raise: + warp getsavepoint(0), getsavepoint(1), getsavepoint(2); + set PC_DIE_COUNTER, 0; + set Hp, 1; + message strcharinfo(0), "Server : your sins have been forgiven."; + end; + +OnInit: + registercmd "@absolve", strnpcinfo(0); + end; +} |