mirror of
https://github.com/bdnugget/rs-sdk.git
synced 2026-11-07 09:07:30 +00:00
feat(content): PvP deaths respawn at 1hp instead of full health
NPC/environment deaths and duel arena are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2f8d26a40b
commit
60c5445f45
1 file changed
+6
@@ -21,7 +21,9 @@ mes("Oh dear you are dead!");
|
||||
clearqueue(player_death);
|
||||
|
||||
def_obj $prev_wep = inv_getobj(worn, ^wearpos_rhand);
|
||||
def_boolean $pvp_death = false;
|
||||
if (findhero = true) {
|
||||
$pvp_death = true;
|
||||
~pvp_death_lose_items;
|
||||
session_log(^log_moderator, "Player died to <.displayname>");
|
||||
} else {
|
||||
@@ -37,6 +39,10 @@ anim(null, 0);
|
||||
p_stopaction;
|
||||
|
||||
~stat_reset_all;
|
||||
if ($pvp_death = true) {
|
||||
// deaths to another player respawn at 1hp instead of full
|
||||
stat_sub(hitpoints, calc(stat(hitpoints) - 1), 0);
|
||||
}
|
||||
healenergy(10000);
|
||||
~clear_pk_skull;
|
||||
~clear_poison;
|
||||
|
||||
Reference in new issue
Block a user