- script NMM -1,{
OnInit:
set .PvpMap$, "poring_c01";
set .PvpExitMap$, "prontera";
set .PvpExitX,0;
set .PvpExitY,0;
end;
OnHour00:
OnHour03:
OnHour06:
OnHour09:
OnHour12:
OnHour15:
OnHour18:
OnHour21:
// Set here your messages
setarray .@msgs$[0],
"Nightmare has just started",
"Every 3 hours, for 15 min only, every monster in the game will give 2x more Base/Job experience (including MvPs)",
"BUT, during these 15 minuts, the server turns into PK (player killer) mode",
"When killed by another player during NMM, the death penalty is doubled (2% loss instead of 1%)",
"while death caused by a monster is dealt with the regular 1% penalty.",
"Players whose level is lower than lv40 can't kill/be killed by other players during NMM";
// Send everyone in the PvP map back to the exit map
mapwarp .PvpMap$,.PvpExitMap$,.PvpExitX,.PvpExitY;
// Activate Nightmare Mode
initnpctimer;
callsub ApplyPK,1,getbattleflag("base_exp_rate") * 2,getbattleflag("job_exp_rate") * 2;
for (set .@x,0; .@x < getarraysize(.@msgs$); set .@x, .@x + 1) {
announce .@msgs$[.@x],bc_all;
sleep 2000;
}
end;
OnTimer900000: // 15 minutes
announce "Now starts another day, you had sweet dreams ? Nightmare Mode deactivated!",bc_all;
stopnpctimer;
callsub ApplyPK,0,getbattleflag("base_exp_rate") / 2,getbattleflag("job_exp_rate") / 2;
end;
ApplyPK:
set $@Nightmare,getarg(0);
setbattleflag "pk_mode",$@Nightmare;
setbattleflag "base_exp_rate", getarg(1);
setbattleflag "job_exp_rate", getarg(2);
atcommand "@reloadbattleconf";
return;
OnPCDieEvent:
if ($@Nightmare) callfunc "PenaltyBaseExp", (killerrid > 1999999?2:1);
end;
}
function script PenaltyBaseExp {
if (BaseExp) {
set BaseExp, BaseExp / 100 * getarg(0);
announce "~ Nightmare Penalty: -" + getarg(0) + "% Base Exp", bc_self, 0xEAC8E7;
}
return;
}