viewing paste Unknown #623 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
-       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;
}
Viewed 296 times, submitted by Myzter.