viewing paste Easter Egg | 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 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
/* Easter Egg Hunt Script Version 1.0
    Created by: Aeromesi
    Built for: Hercules/rAthena on the day before Easter! Happy Easter Hercules ^^
    - with @commands for ease-of-use!
    - '@repeategghunt' - Allow you to repeat the previous Easter Egg Hunt setup you made!
    - '@egghunt' - Able to start off by creating Easter Egg Hunt settings. Able to disable or delete the setup to start configuring new Easter Egg Hunt event. 
        (Note: It will be able to tell if created or event is active.)
    - '@joinegghunt' - Allow player to warp to the the map the event is happening on (Basic version only support Prontera)
*/
prontera,147,162,4  script  Easter Egg Hunt 4_GEFFEN_03,{
    mes  .Tname$;
    if ($@Easter_Active) {
        mes "Information";
        mes "Map event is active: ^FF0000"+$EHuntMap$+"^000000";
        mes "Easter Egg Hunt info:";
        mes "^CCCCCCSilver^000000 Egg Reward: "+getitemname($SItem_ID)+" x "+$SReward_AM+" ";
        mes "^ffd700Gold^000000 Egg Reward: "+getitemname($GItem_ID)+" x "+$GReward_AM+"";
    } else
        mes "No ^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Hunt in-progress";
    close;
 
OnInit:
    .Tname$ = "[^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Hunt]";
    $EHuntMap$ = "prontera"; // DO NOT CHANGE THIS - Basic Version will only work on Prontera.
    $EggHuntTotal = 150;     // DO NOT CHANGE THIS - Basic Version will only allow a total of 150, because the Normal Egg+Silver Egg+Gold Egg is equal to 150. (Can change this for you upon request via PM or on Skype.
    $EggHuntTotal2 = 150;    // DO NOT CHANGE THIS - Is simply just the variable that gets counted down.
    end;
}
-   script  EasterEggHunt#Sys   FAKE_NPC,{
OnInit:
    .easter_name$ = "[^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Hunt]";
    bindatcmd "egghunt",strnpcinfo(0)+"::OnAtEasterEggHunt";
    bindatcmd "repeategghunt",strnpcinfo(0)+"::OnAtRepeatEasterEggHunt";
    bindatcmd "joinegghunt",strnpcinfo(0)+"::OnAtJoinEasterEggHunt";
    end;
 
OnAtJoinEasterEggHunt:
    if (!$@Easter_Active) {
        dispbottom "No Easter Egg Hunt Event In-Progress.";
    } else {
        warp $EHuntMap$, 0 ,0;
        dispbottom "Successfully joined Easter Egg Hunt Event.";
    }
    end;
 
OnAtRepeatEasterEggHunt:
    if (getgmlevel() >= 99) {
        if ($@Easter_Active) {
            dispbottom "Easter Egg Hunt Event is currently active.";
        } else {
            if ($ELast_Setup) {
                $@Easter_Active++;
                donpcevent "EasterEggHunt#Sys::OnCounterReset";
                announce "Easter Egg Hunt Event has been restarted by GM "+strcharinfo(0)+"!",bc_all;
                sleep2 2500;
                donpcevent "EasterEggHunt#Sys::OnStartEvent";
            } else {
                dispbottom "You haven't setup a Easter Egg Hunt Event before.";
            }
        }
    }
    end;
OnAtEasterEggHunt:
    if(getgmlevel() >=  99) {
        mes .easter_name$;
        if ($ELast_Setup >= 1) {
            mes "Delete last Setup or Disable Event?";
            switch(select("Delete last Setup", "Disable Easter Egg Hunt", "Exit")) {
            case 1:
                if ($@Easter_Active) {
                    mes "Currently the ^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Hunt is active. Disable or finish the event to delete your setup.";
                    close;
                } else
                    $ELast_Setup = 0;
                mes "Previous setup deleted. Proceed using '^ff0000@egghunt^000000' to create a new ^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Hunt Event.";
                close;
            case 2:
                if ($@Easter_Active) {
                    mes "Would you like to Disable/Prematurely end ^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Hunt for whatever reason?";
                    next;
                    switch(select("Yes please.", "No thanks!")) {
                    case 1:
                        mes "Now Disabling Easter ^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Event.";
                        sleep2 4000;
                        $@Easter_Active = 0;
                        for (.@i = 1; .@i <= 50; .@i++) {
                            disablenpc "Golden Egg#"+ .@i;
                            disablenpc "Silver Egg#"+ .@i;
                            disablenpc "Normal Egg#"+ .@i;
                        }
                        sleep2 1000;
                        announce "Easter Egg Hunt has been disabled by GM "+strcharinfo(0)+".",bc_map;
                        close;
                    case 2:
                        mes .easter_name$;
                        mes "Alrighty then!";
                        close;
                    }
                } else
                    mes "^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Hunt is currently not active.";
                close;
            case 3:
                close;
            }
        } else
            mes "Create ^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Hunt?";
        next;
        switch(select("[Event] ^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Hunt", "Exit")) {
        case 2:
            close;
        case 1:
            if ($@Easter_Active) {
                mes .easter_name$;
                mes "Currently there is a ^8B3626^CCCCCCEaster^000000 ^ffd700Egg^000000 Hunt in session. Please wait until it is over or Disable in the GM options to end the Easter Egg Hunt Event prematurely.";
                close;
            }
            mes .easter_name$;
            mes "Now input the item ID for the ^CCCCCCSilver^000000 Easter Eggs.";
            .@check = 0;
            do {
                input $SItem_ID;
                if ($SItem_ID == 0 || getitemname($SItem_ID) == "null") {
                    dispbottom "Sorry, but it's impossible to enter 0/Invalid ItemID.";
                    dispbottom "Please reinput the total amount of Rewards you'd like players to get catching each Silver Egg.";
                } else 
                    .@check = 1;
            } while (.@check == 0);
            next;
            mes .easter_name$;
            mes "Now input the item ID for the  ^ffd700Gold^000000 Easter Eggs.";           
            input $GItem_ID;
            .@check = 0;
            do {
                input $GItem_ID;
                if ($GItem_ID == 0 || getitemname($GItem_ID) == "null") {
                    dispbottom "Sorry, but it's impossible to enter 0/Invalid ItemID.";
                    dispbottom "Please reinput the total amount of Rewards you'd like players to get catching each Gold Egg.";
                } else 
                    .@check = 1;
            } while (.@check == 0);
            next;
            mes .easter_name$;
            mes "Now input amount of Reward you would like player to receive from catching ^CCCCCCSilver^000000 Easter Egg:";
            do {
                input $SReward_AM;
                if ($SReward_AM == 0) {
                    dispbottom "Sorry, but it's impossible to enter 0 for Rewards.";
                    dispbottom "Please reinput the total amount of Rewards for players who catch Silver Eggs.";
                }
            } while ($SReward_AM > 0);
            next;
            mes .easter_name$;
            mes "Now input amount of Reward you would like player to recieve from catching ^ffd700Gold^000000 Easter Egg:";
            do {
                input $GReward_AM;
                if ($GReward_AM == 0) {
                    dispbottom "Sorry, but it's impossible to enter 0 for Rewards.";
                    dispbottom "Please reinput the total amount of Rewards for players who catch Gold Eggs.";
                }
            } while ($GReward_AM > 0);
            next;
            mes .easter_name$;
            mes "Now activating Easter Egg Hunt Event.";
            $ELast_Setup++;
            $@Easter_Active++;
//          $@EggHuntCount = 0;
//          $EggHuntTotal2 = 150;
            donpcevent "EasterEggHunt#Sys::OnStartEvent";
            close;
        }
    }
    end;
 
OnStartEvent:
    for (.@i = 1; .@i <= 50; .@i++) {
        donpcevent "Golden Egg#"+ .@i +"::OnEnableGoldEgg";
        donpcevent "Silver Egg#"+ .@i +"::OnEnableSilverEgg";
        donpcevent "Normal Egg#"+ .@i +"::OnEnableNormalEgg";
    }
    end;
 
OnCounterReset:
    $@EggHuntCount = 0; // DO NOT TOUCH
    $EggHuntTotal2 = 150; // DO NOT TOUCH
    end;
 
OnEggEndCheck:
    if ($@EggHuntCount >= $EggHuntTotal) {
        $@Easter_Active = 0;
        announce "[Easter Egg Hunt] The Egg Hunt is now over! Hope everyone had fun!",bc_all;
        donpcevent "EasterEggHunt#Sys::OnCounterReset";
        donpcevent "EasterEggHunt#Sys::OnDisableEggs";
    }
    end;
OnDisableEggs:
    for (.@i = 1; .@i <= 50; .@i++) {
        disablenpc "Golden Egg#"+ .@i;
        disablenpc "Silver Egg#"+ .@i;
        disablenpc "Normal Egg#"+ .@i;
    }
    end;
}
 
prontera,150,151,4  script  Normal Egg#1    4_DRAGON_EGG,{
    $@EggHuntCount++;
    dispbottom "That's just a Normal egg! Try to catch the Silver and Gold Eggs!";
    announce "[Easter Egg Hunt] Total of ("+$@EggHuntCount+"/"+$EggHuntTotal2+") have been captured! Better find the Eggs before it's too late!",bc_all;
    disablenpc strnpcinfo(0);
    donpcevent ("EasterEggHunt#Sys")+"::OnEggEndCheck";
    end;
 
OnInit:
    disablenpc strnpcinfo(0);
    end;
 
OnEnableNormalEgg:
    enablenpc strnpcinfo(0);
    donpcevent strnpcinfo(0)+"::OnEggMove";
    end;
 
OnEggMove:
    npcspeed 70;
    while (true) {
        getmapxy .@map$, .@x, .@y, 1;
        while ( checkcell( .@map$, .@x2 = .@x + rand(-10,10), .@y2 = .@y + rand(-10,10), cell_chknopass ) );
        npcwalkto .@x2, .@y2;
        sleep rand(100,200);
    }
    end;
}
 
prontera,150,151,4  script  Silver Egg#1    4_DRAGON_EGG,{
    $@EggHuntCount++;
    dispbottom "You just captured a Silver Egg! Lucky you!";
    announce "[Easter Egg Hunt] Total of ("+$@EggHuntCount+"/"+$EggHuntTotal2+") have been captured! Better find the Eggs before it's too late!",bc_all;
    getitem $SItem_ID, $SReward_AM;
    disablenpc strnpcinfo(0);
    donpcevent ("EasterEggHunt#Sys")+"::OnEggEndCheck";
    end;
 
OnInit:
    disablenpc strnpcinfo(0);
    end;
 
OnEnableSilverEgg:
    enablenpc strnpcinfo(0);
    donpcevent strnpcinfo(0)+"::OnEggMove";
    end;
 
OnEggMove:
    npcspeed 70;
    while (true) {
        getmapxy .@map$, .@x, .@y, 1;
        while (checkcell( .@map$, .@x2 = .@x + rand(-10,10), .@y2 = .@y + rand(-10,10), cell_chknopass ));
        npcwalkto .@x2, .@y2;
        sleep rand(100,200);
    }
    end;
}
 
prontera,150,151,4  script  Golden Egg#1    4_DRAGON_EGG,{
    $@EggHuntCount++;
    dispbottom "You just captured a Gold Egg! Lucky you!";
    announce "[Easter Egg Hunt] Total of ("+$@EggHuntCount+"/"+$EggHuntTotal2+") have been captured! Better find the Eggs before it's too late!",bc_all;
    getitem $GItem_ID, $GReward_AM;
    disablenpc strnpcinfo(0);
    donpcevent ("EasterEggHunt#Sys")+"::OnEggEndCheck";
    end;
 
OnInit:
    disablenpc strnpcinfo(0);
    end;
 
OnEnableGoldEgg:
    enablenpc strnpcinfo(0);
    donpcevent strnpcinfo(0)+"::OnEggMove";
    end;
 
OnEggMove:
    npcspeed 50;
    while (true) {
        getmapxy .@map$, .@x, .@y, 1;
        while ( checkcell( .@map$, .@x2 = .@x + rand(-10,10), .@y2 = .@y + rand(-10,10), cell_chknopass ) );
        npcwalkto .@x2, .@y2;
        sleep rand(100,200);
    }
end;
}
 
// Silver Egg Copies
 
Viewed 1549 times, submitted by Dastgir.