summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/001-8/hub.txt20
-rw-r--r--npc/functions/mobpoint.txt6
2 files changed, 25 insertions, 1 deletions
diff --git a/npc/001-8/hub.txt b/npc/001-8/hub.txt
index 4a0cc7e19..b43420346 100644
--- a/npc/001-8/hub.txt
+++ b/npc/001-8/hub.txt
@@ -432,6 +432,26 @@ OnPCLogoutEvent:
warp "Save", 0, 0;
}
}
+ // Crazyfefe hot fix
+ if (@qhub_died) {
+ // It was PK
+ if (killerrid > 2000000 && killerrid < 2100000) {
+ // PVP flag was off
+ if (!getmapflag(.@mapa$, mf_pvp) && !getmapflag(.@mapa$, mf_pvp_noparty) && !getmapflag(.@mapa$, mf_pvpnoguild)) {
+ recovery(getcharid(3));
+ dispbottom l("REVENGE TIME!");
+ .@trueid=getcharid(3);
+ //detachrid();
+ attachrid(killerrid);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_COMMANDS, true);
+ sc_start SC_WALKSPEED,20000,50;
+ addtimer(15000, "#mobptsys::OnUnlock");
+ percentheal -10, -100;
+ detachrid();
+ attachrid(.@trueid);
+ }
+ }
+ }
// This allows code to override death penalty, just once:
// @deathpenalty_override
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index 8ccb7bbf3..54276f40b 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -19,6 +19,11 @@ function script mobpoint {
000-0,0,0,0 script #mobptsys NPC_HIDDEN,{
end;
+OnUnlock:
+ if (checkpcblock() & PCBLOCK_ATTACK)
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
+ end;
+
OnNPCKillEvent:
if (killedrid == MonsterKing) {
announce "An illusionary monster king was killed.", bc_all | bc_pc;
@@ -72,7 +77,6 @@ OnPCKillEvent:
// You get 0.5 times killed player level, and 0 times job level
getexp (.@bxp/2), 0;
}
-
end;
}