viewing paste topic/11010- runordie_2.3 | 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
//===== eAthena Script =====================================
//= Run or Die ( aka. Poring Bomb Event )
//===== By: ================================================
//= AnnieRuru
//===== Current Version: ===================================
//= 2.3
//===== Compatible With: ===================================
//= Hercules 2015-11-15
//= DO NOT USE THIS SCRIPT IF YOUR HERCULES COMPILE BEFORE THIS DATE
//===== Description: =======================================
//= Avoid the poring bomb at all cost !
//===== Topic ==============================================
//= http://herc.ws/board/topic/11010-
//===== Additional Comments: ===============================
//= Its time to use queue iterator script commands !
//==========================================================
 
prontera,148,182,5      script  Run Or Die      1_F_MARIA,{
        if ( getgmlevel() >= 99 ) { // gm level to bypass the registration
                warp "guild_vs5", 0,0;
                end;
        }
        if ( queuesize( getvariableofnpc( .qid, "runordie" ) ) >= 100 ) { // 100 participant max
                mes "[Run Or Die]";
                mes "I'm sorry, the room is full";
                close;
        }
        percentheal 100, 100;
        warp "guild_vs5", 0,0;
        queueadd getvariableofnpc( .qid, "runordie" ), getcharid(3);
        end;
}
 
-       script  runordie        FAKE_NPC,{
OnInit:
        disablenpc "Run Or Die";
        bindatcmd "runordie", strnpcinfo(0)+"::OnStart", 99,100;
        .onesec = 1000; // use for script debugging... set to 100 to make the announcement run faster
        end;
OnStart:
OnClock0145: // set your time here
OnClock0445:
OnClock0745:
OnClock1045:
OnClock1345:
OnClock1645:
OnClock1945:
OnClock2245:
        enablenpc "Run Or Die";
        mapwarp "guild_vs5", "prontera", 148,172;
        killmonsterall "guild_vs5";
        .start = true;
        .qid = queue();
        queueopt .qid, QUEUEOPT_DEATH, strnpcinfo(0)+"::OnDeath";
        queueopt .qid, QUEUEOPT_LOGOUT, strnpcinfo(0)+"::OnQuit";
        queueopt .qid, QUEUEOPT_MAPCHANGE, strnpcinfo(0)+"::OnMapChange";
        announce "Run Or Die!!!: Are you ready to join Run Or Die event???", bc_all;
        sleep 4 * .onesec;
        announce "Run Or Die: For Those who dare to join please '@warp prontera 148 172' to participate", bc_all;
        sleep 6 * .onesec;
        announce "Run Or Die: Register time will be closing after 1 minute", bc_all;
        sleep 20 * .onesec;
        announce "Run Or Die: Last 30 second", bc_all;
        sleep 10 * .onesec;
        announce "Run Or Die: Rush type in '@warp prontera 148 172' to join", bc_all;
        sleep 10 * .onesec;
        announce "Run Or Die: Last 10 second to register", bc_all;
        sleep 5 * .onesec;
        announce "Run Or Die: 5", bc_all;
        sleep 1000;
        announce "Run Or Die: 4", bc_all;
        sleep 1000;
        announce "Run Or Die: 3", bc_all;
        sleep 1000;
        announce "Run Or Die: 2", bc_all;
        sleep 1000;
        announce "Run Or Die: 1", bc_all;
        sleep 1000;
        announce "Run Or Die: Time is up...I will come again 3 hour later..", bc_all;
        disablenpc "Run Or Die";
        if ( queuesize(.qid) < 2 ) { // cannot start event if nobody joins(0) or just having (1) player
                announce "Run Or Die: Not enough players to start the event...", bc_all;
                mapwarp "guild_vs5", "prontera", 148,172;
                queuedel .qid;
                .start = false;
                end;
        }
        mapannounce "guild_vs5", "Welcome to Run Or Die event", bc_map;
        sleep 3 * .onesec;
        mapannounce "guild_vs5", "This is an easy event", bc_map;
        sleep 3 * .onesec;
        mapannounce "guild_vs5", "Just stay AWAY from anything that you think its DANGEROUS!!", bc_map;
        sleep 3 * .onesec;
        mapannounce "guild_vs5", "Stay alive as long as YOU CAN!!!!", bc_map;
        sleep 3 * .onesec;
        mapannounce "guild_vs5", "The LAST SURVIVOR will be the WINNER", bc_map;
        sleep 3 * .onesec;
        mapannounce "guild_vs5", "event will start in 3", bc_map;
        sleep 1 * .onesec;
        mapannounce "guild_vs5", "2...", bc_map;
        sleep 1 * .onesec;
        mapannounce "guild_vs5", "1...", bc_map;
        sleep 1 * .onesec;
        mapannounce "guild_vs5", "Its time to run !!", bc_map;
        while ( .start ) {
                .@more += rand(1,2);
                monster "guild_vs5", 0,0, "Come On Baby!!!", BOMBPORING, 2 + .@more, "", 0;
                monster "guild_vs5", 0,0, "Come On Baby!!!", BOMBPORING, 2 + .@more, "", 1;
                monster "guild_vs5", 0,0, "Come On Baby!!!", BOMBPORING, 2 + .@more, "", 2;
                sleep 5000;
        }
        end;
OnMapChange:
        if ( @Queue_Destination_Map$ == "guild_vs5" ) end;
OnDeath:
OnQuit:
        queueremove .qid, getcharid(3);
        if ( queuesize(.qid) > 1 ) end;
        .start = false;
        killmonsterall "guild_vs5";
        .@it = queueiterator(.qid);
        .@aid = qiget(.@it);
        qiclear .@it;
        announce "Run Or Die: Congratulations ~ the winner is "+ rid2name(.@aid), bc_all;
        getitem Poring_Coin, 5, .@aid; // winner prize
        queuedel .qid;
        sleep 5000;
        mapwarp "guild_vs5", "prontera", 148,172;
        end;
}
guild_vs5       mapflag nowarp
guild_vs5       mapflag nowarpto
guild_vs5       mapflag noteleport
guild_vs5       mapflag nosave  SavePoint
guild_vs5       mapflag noskill
guild_vs5       mapflag nomemo
guild_vs5       mapflag nopenalty
guild_vs5       mapflag noicewall
Viewed 949 times, submitted by AnnieRuru.