viewing paste onpclogoutevent | Text

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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
-       script  announce_nvz    -1,{
 
 
OnMinute41:
//if( gettime(3) % 2 != 0 ) end;
 
 
 
announce "The Novice Vs. Zombie Event will begin in 3 minutes.",0;
killmonsterall "quiz_01";
sleep 5000;
announce "The NPC 'Novice vs. Zombie' has appeared in Malangdo! 193, 136",0;
enablenpc "Novice vs. Zombie";
//sleep 55000;
//sleep 60000;
announce "Event: Novice Vs. Zombie will begin in 1 minute! Proceed to Malangdo 193,136 to join.",0;
//sleep 30000;
mapannounce "quiz_01","In 30 seconds the monster will appear!",0;
sleep 5000;
announce "Event: Novice Vs. Zombie will begin in 5 seconds.",0;
sleep 5000;
 
        if (getmapusers("quiz_01") < 2){
        goto OnStopMinPlayerEvent;
}
 
announce "Event: 'Novice Vs. Zombie' has begun!!",0,0x00FF00;
monster "quiz_01",42,369,"Zombie",1036,2;
disablenpc "Novice vs. Zombie";
sleep 10000;
monster "quiz_01",42,369,"Zombie",1036,2;
sleep 10000;
monster "quiz_01",42,369,"Zombie",1036,1;
sleep 10000;
monster "quiz_01",42,369,"Zombie",1036,1;
sleep 10000;
monster "quiz_01",42,369,"Zombie",1036,2;
sleep 30000;
monster "quiz_01",42,369,"Zombie",1036,5;
initnpctimer;
end;
 
//OnTimer5000:
//if ( getmapusers("quiz_01") < 2 )
//{
//killmonsterall "quiz_01";
//announce "'Novice Vs. Zombie' has ended. All of the Zombies are gone.",0;
//disablenpc "Prize";
//stopnpctimer;
//end;
//}
 
if ( getmapusers("quiz_01") > 1 )
{
if ($@NvZCounter >= 5){
    switch(rand(0,2)){
        case 0: mapannounce "quiz_01",getmapusers("quiz_01") +" players are still alive.",0,0x00FF00; break;
        case 1: mapannounce "quiz_01",getmapusers("quiz_01") +" players are STILL alive? Are you sure you're not cheating?",0,0x00FF00; break;
        case 2: mapannounce "quiz_01",getmapusers("quiz_01") +" players are STILL ALIVE? Seriously, I'm gonna have to report you.",0,0x00FF00; break;
        }
} else {
    mapannounce "quiz_01",getmapusers("quiz_01") +" players are still alive.",0,0x00FF00;
}
sleep 10000;
set $@NvZCounter,$@NvZCounter+1;
initnpctimer;
end;
}
initnpctimer;
end;
 
OnStopMinPlayerEvent:
        killmonsterall "quiz_01";
        announce "There are not enough players. The event is now over.", bc_all;
        sleep 3000;
        mapwarp "quiz_01","malangdo",140,114;
        disablenpc "Prize";
        set $@NvZCounter,0;
        end;
 
OnPCDieEvent:
getmapxy .@mapnvz$,.@xnvz,.@ynvz,0;
if ( .@mapnvz$ == "quiz_01") {
sleep2 1;
warp "prontera",200,168;
atcommand "@alive "+ strcharinfo(0);
dispbottom "You have lost...";
}
sleep2 1000;
if ( .@mapnvz$ == "quiz_01" && getmapusers("quiz_01") == 1 ) {
killmonsterall "quiz_01";
mapannounce "quiz_01","You have won, please approach to Prize NPC.",0;
enablenpc "Prize";
set $@NvZCounter,0;
stopnpctimer;
end;
}
end;
 
OnPCLogoutEvent:
 
if ( getmapusers("quiz_01") == 1 ) {
killmonsterall "quiz_01";
mapannounce "quiz_01","You have won, please approach to Prize NPC.",0;
enablenpc "Prize";
set $@NvZCounter,0;
stopnpctimer;
end;
}
 
}
 
quiz_01,42,369,3        script  Prize   72,{
if (sex == 1) {
announce "In 'Novice Vs. Zombie', " + strcharinfo (0) + " has won! Let's congratulate him!",0;
}
else {
announce "In 'Novice Vs. Zombie' " + strcharinfo (0) + " has won! Let's congratulate her!",0;
};
getitem 21009,10;
warp "prontera",200,168;
sleep2 250;
disablenpc "Prize";
end;
}
 
new_1-2,167,187,4       script  Novice vs. Zombie       1015,{
if (BaseLevel > 1) goto L_No;
if (class == 0) goto L_event;
if (class > 0) goto L_No;
L_event:
sc_end SC_ALL;
sc_start SC_DECREASEAGI,300000,10;
percentheal 100,100;
atcommand "@storeall";
warp "quiz_01",42,369;
close;
 
L_No:
mes "[^0000FFNovice Vs. Zombie^000000]";
mes "Please!";
mes "^696969You are not a level 1 Novice! Cheater!^000000";
close;
 
OnInit:
        disablenpc "Novice vs. Zombie";
        disablenpc "Prize";
        end;
 
}
 
quiz_01 mapflag nowarp
quiz_01 mapflag nowarpto
quiz_01 mapflag noteleport
quiz_01 mapflag nosave
quiz_01 mapflag nomemo
quiz_01 mapflag nobranch
quiz_01 mapflag noloot
quiz_01 mapflag noskill
quiz_01 mapflag nightenabled
quiz_01 mapflag nodrop
quiz_01 mapflag noexp
quiz_01 mapflag pvp     off
quiz_01 mapflag pvp_noparty
quiz_01 mapflag pvp_noguild
quiz_01 mapflag nocommand       80
Viewed 619 times, submitted by unknown.