viewing paste Run For Your Life v2.6 | Athena

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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
//===== eAthena/rAthena Script =======================================
//= Run for Your Life
//===== By: ==================================================
//= Mysterious
//===== Current Version: =====================================
//= 2.6
//===== Compatible With: =====================================
//= eAthena or rAthena SVN
//===== Description: =========================================
//= A Run for your Life event (Based for Novices)
//===== TODO: ================================================
// - Change more coding
//===== Additional Comments: =================================
//= v1.0 - First release [Mysterious]
//= v2.0 - Overhaul of Entire Script [Mysterious]
//= v2.1 - Fixed Sentence structures [Mysterious]
//= v2.2 - Fixed a Typo and made it obvious what players had to change [Mysterious]
//= v2.3 - Removed unnecessary 'next;' thanks to soUPas [Mysterious]
//= v2.4 - Fixed an issue where the prize giver was showing up when not supposed to [Mysterious]
//= v2.5 - Added Friendly Messages [Mysterious]
//= v2.6 - Removed duplicated OnInIt labels [Mysterious]
//============================================================
 
// Mapflags for the Map
quiz_01 mapflag nowarpto
quiz_01 mapflag nowarp
quiz_01 mapflag noteleport
quiz_01 mapflag nomemo
quiz_01 mapflag nosave  SavePoint
quiz_01 mapflag nobranch
quiz_01 mapflag noicewall
quiz_01 mapflag nopenalty
quiz_01 mapflag nobranch
quiz_01 mapflag noexp
quiz_01 mapflag noreturn
quiz_01 mapflag pvp_noparty
quiz_01 mapflag restricted      1
 
-       script  RFYL#disable    -1,{
 
OnInit:
        disablenpc "Zombie Master";
        disablenpc "Present For You";
}
 
xxx,xxx,xxx,xxx script  Zombie Minion   1015,{
 
if (getgmlevel() >= 40) goto LMS_Admin;
        mes "[Minion]";
        mes "Hello " + strcharinfo(0) + ", my master is busy.";
        mes "*sigh*";
        close;
 
LMS_Admin:
        mes "[Minion]";
        mes "Hello " + strcharinfo(0) + ", would you like me to call my Boss?";
        mes "He is the only one who can start it!";
        menu "- Start Event",M_RFYL,"- Spectate",M_warp,"- End Event",M_EndEvent,"- No Thanks",M_Leave;
 
        M_RFYL:
                next;
                mes "[Minion]";
                mes "Hold on while I call my master.";
                close2;
                set $@offvar,1;
                goto StartEvent;
 
        M_warp:
                next;
                mes "[Minion]";
                mes "Very well, I will warp you to the map!";
                warp "quiz_01",42,369;
                close;
 
        M_Leave:
                next;
                mes "[Minion]";
                mes "Ok " + strcharinfo(0) +"! Please come back after.";
                close;
               
        M_EndEvent:
                next;
                mes "[Minion]";
                mes "Ok master, I will stop the event for you right away!";
                next;
                set $@offvar,1;
                disablenpc "Zombie Master";
                disablenpc "Present For You";
                killmonsterall "quiz_01";
                areawarp "quiz_01",10,10,450,450,"rachel",120,135;
                stopnpctimer;
                disablenpc "Zombie Minion";
                warp "rachel",120,135;
                sleep 180000;
                enablenpc "Zombie Minion";
 
StartEvent: // Announcement to notify all players
        announce "Zombie Vs. Novice event Will begin in 3 minutes. Head East/North",0;
        killmonsterall "quiz_01";
        sleep 55000;
        announce "Zombie Vs. Novice event will begin in 2 minutes! Head East/North",0;
        sleep 5000;
        announce "Zombie Master: I have now appeared in Rachel!",0;
        enablenpc "Zombie Master";
        sleep 60000;
        announce "Zombie Vs. Novice event will begin in 1 minute!",0;
        sleep 30000;
        mapannounce "quiz_01","In 30 seconds the zombies will spawn!",0;
        sleep 25000;
        announce "Zombie Vs. Novice event will begin in ~5~",0;
        sleep 1000;
        announce "Zombie Vs. Novice event will begin in ~4~",0;
        sleep 1000;
        announce "Zombie Vs. Novice event will begin in ~3~",0;
        sleep 1000;
        announce "Zombie Vs. Novice event will begin in ~2~",0;
        sleep 1000;
        announce "Zombie Vs. Novice event will begin in ~1~",0;
        sleep 1000;
        announce "Zombie Vs. Novice event has now begun!",0,0x00FF00;
 
        disablenpc "Zombie Master";
        //disablenpc "Present For You"; <-- Not sure why this was needed?
       //Round 1
        sleep 10000;
        monster "quiz_01",42,369,"Zombie",1015,1;
        sleep 10000;
        monster "quiz_01",42,369,"Zombie-2",1015,1;
        sleep 10000;
        monster "quiz_01",42,369,"Zombie-3",1015,1;
        sleep 10000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        sleep 55000;
        mapannounce "quiz_01","Round 2!",0;
        sleep 10000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        sleep 55000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        mapannounce "quiz_01","Round 3!",0;
        sleep 10000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        sleep 55000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        mapannounce "quiz_01","Round 4!",0;
        sleep 10000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        sleep 10000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        sleep 55000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        mapannounce "quiz_01","Round 5!",0;
        sleep 10000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        sleep 55000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        mapannounce "quiz_01","Round 6!",0;
        sleep 10000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        sleep 55000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        mapannounce "quiz_01","Round 7! Final Round!",0;
        sleep 10000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        sleep 20000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        sleep 30000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        sleep 40000;
        monster "quiz_01",42,369,"Zombie-4",1036,1;
        sleep 50000;
        monster "quiz_01",42,369,"Zombie-4",1036,1;
        sleep 60000;
        monster "quiz_01",42,369,"Zombie-4",1015,1;
        initnpctimer;
        end;
 
        OnTimer0500:
        if ( getmapusers("quiz_01") == 0 )
{
        killmonsterall "quiz_01";
        announce "RFYL Event: Event has ended. No one has joined.",0;
        stopnpctimer;
        end;
}
        else if ( getmapusers("quiz_01") > 1 )
{
        mapannounce "quiz_01",getmapusers("quiz_01") +" has survived the event.",0,0x00FF00;;
        initnpctimer;
        end;
}
        initnpctimer;
        end;
 
        OnPCDieEvent:
        getmapxy .@mapnvz$,.@xnvz,.@ynvz,0;
        if ( .@mapnvz$ == "quiz_01") {
        sleep2 1;
        warp "rachel",120,135;
        atcommand "@alive "+ strcharinfo(0);
        dispbottom "Sorry, but you were killed.";
}
        sleep2 0500;
        if ( .@mapnvz$ == "quiz_01" && getmapusers("quiz_01") == 1 ) {
        killmonsterall "quiz_01";
        mapannounce "quiz_01","You have won, approach the Present For You NPC please.",0;
        enablenpc "Present For You";
        stopnpctimer;
        end;
}
        end;
}
 
quiz_01,42,378,3        script  Present For You 72,{
 
        mes "[Present For You]";
        mes "Please tell me your name.";
        next;
        input .@name$;
        if(.@name$ != strcharinfo(0)) {
                mes "[Present For You]";
                mes "Are you sure that is your name?";
                close;
        }
        mes "[Present For You]";
        mes "Congrats. You've won.";
        close2;
        announce "Present For You: We have a winner! "+.@name$+" has won the Novice vs Zombie event!",0;
        getitem 674, 3; // Change This item id to what ever you want
        warp "rachel",120,135;
        disablenpc "Present For You";
        end;
}
 
xxxx,xxx,xxx,xxx        script  Zombie Master   1298,{
        if (BaseLevel > 1) goto L_ClassLevel; //Change '1' to your desired level
        if (class == 0) goto L_Event; //Checks if the player is a Novice, if so, proceeds into the event.
        if (class > 0) goto L_ClassLevel; //Checks if the Player is NOT a Novice. If they aren't, they are not allowed to participate.
 
 L_Event:
        mes "[ ^0000FFZombie Master^000000 ]";
        mes "You wish to participate the Zombie Vs. Novice event?";
        next;
        switch(select("- Yes","- No")) {
        case 1:
    sc_end SC_ALL;
    percentheal 100,100;
    warp "quiz_01",42,369;
    end;
    break;
        case 2:
    next;
    mes "[ ^0000FFZombie Master^000000 ]";
    mes "Come back when your ready.";
    close;
    break;
 
 L_ClassLevel:
        mes "[ ^0000FFZombie Master^000000 ]";
        mes "Sorry, but it seems you are not a Novice and Level 1.";
        close;
}
Viewed 283 times, submitted by unknown.