viewing paste MazeEvent | 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 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436
// ===== eAthena Script =======================================
// = Maze Event
// ===== By: ==================================================
// = Cruxiaer
// ===== Current Version: =====================================
// = 1.00
// ===== Compatible With: =====================================
// = eAthena 1.x
// ===== Description: =========================================
// = Maze Game where players have to walk into portals
// = till they win.
// ===== How to use: ==========================================
// $@prize    = amount of Event Points to be won
// @chance    = the difficulty of winning, higher is harder
// Edit OnClock events to change when will the Event start
// ===== Changelog: ===========================================
// 1.00 - First release
// 1.01 - Fixed 500EP bonus and added active upon PM func
//===== Credits: =============================================
//= Euph for original Maze Game script
//============================================================
 
prontera,156,170,0    script    mazeevent    45,2,2,{
 
    if ( $mazeinit == 0 ) {
        disablenpc "mazeevent";
        end;
    }
 
    // Check for equipment that would give an advantage.
    if (     countitem(1363) ||
        countitem(1372) ||
        countitem(1373) ||
        countitem(2410) ||
        countitem(2515) ||
        countitem(4131) ||
        countitem(4210) ||
        countitem(5150) ||
        countitem(5203) ||
        countitem(5273) ||
        countitem(5274) ||
        countitem(5275) ) {
            mes "[^FF0000Maze^000000]";
            mes "Please store any equipment that increases your movement speed.";
            close;
            end;
    }
 
    // Check for any consumable items that would give an advantage.
    if ( countitem(662) ||
        countitem(12016) ||
        countitem(12028) ||
        countitem(12262) ) {
            mes "[^FF0000Maze^000000]";
            mes "Please store any consumables that increases your movement speed.";
            close;
            end;
    }
 
    // Remove Peco / Cart
    atcommand strcharinfo(0)+":@option 0 0 0";
 
 
    // Remove Any Speed Buffs
    sc_end SC_SPEEDUP0;
    sc_end SC_SPEEDUP1;
    sc_end SC_INCREASEAGI;
    sc_end SC_WINDWALK;
    sc_end SC_CARTBOOST;
    sc_end SC_CLOAKING;
    sc_end SC_BERSERK;
    sc_end SC_RUN;
    sc_end SC_AVOID;
 
    // Grant 5 Minute Walking Speed Increase
    sc_start SC_INCREASEAGI,600000,1;
    
 
    // Warp to Event
    warp "force_1-3", 19, 189;
    set #EVENTPOINTS, #EVENTPOINTS+500;
    dispbottom "500 Event Points are awarded for joining this Event.";
}
 
 
-    script    Maze#announcer    -1,{
 
OnInit:
// Unload NPCs except this one at server start.
    disablenpc "mazeevent";
disablenpc "mz_portal#1";
disablenpc "mz_portal#2";
disablenpc "mz_portal#3";
disablenpc "mz_portal#4";
disablenpc "mz_portal#5";
disablenpc "mz_portal#6";
    disablenpc "mz_portal#7";
disablenpc "mz_portal#8";
disablenpc "mz_portal#9";
disablenpc "mz_portal#10";
disablenpc "mz_portal#11";
disablenpc "mz_portal#12";
disablenpc "mz_portal#13";
disablenpc "mz_portal#14";
disablenpc "mz_portal#15";
disablenpc "mz_portal#16";
disablenpc "mz_portal#17";
disablenpc "mz_portal#18";
disablenpc "mz_portal#19";
disablenpc "mz_portal#20";
disablenpc "mz_portal#21";
disablenpc "mz_portal#22";
disablenpc "mz_portal#23";
disablenpc "mz_portal#24";
disablenpc "Maze#asdf";
end;
 
OnClock0100:
OnClock0200:
OnClock0300:
OnClock0400:
OnClock0500:
OnClock0600:
OnClock0700:
OnClock0800:
OnClock0900:
OnClock1000:
OnClock1100:
OnClock1200:
OnClock1300:
OnClock1400:
OnClock1500:
OnClock1600:
OnClock1700:
OnClock1800:
OnClock1900:
OnClock2000:
OnClock2100:
OnClock2200:
OnClock2300:
OnClock0000:
 
announce "Maze: A maze event will begin in 2 minutes in Prontera.",0,0x99FFCC;
sleep2 90000;
announce "Maze: Enter the Warp in Prontera to join the Maze event.",0,0x99FFCC;
 
// Clear up the map.
areawarp "force_1-3",104,18,189,10,"prontera",159,116;
 
// Load NPCs + hide the Maze guy
    set $mazeinit, 1;
enablenpc "mazeevent";
enablenpc "Maze#asdf";
hideonnpc "Maze#asdf";
initnpctimer;
end;
 
OnTimer30000:
mapannounce "prontera","Maze: Last 30 seconds.",0,0x99FFCC;
sleep2 5000;
mapannounce "prontera","Maze: If you want to join please enter the Warp Portal.",0,0x99FFCC;
end;
 
OnTimer50000:
mapannounce "prontera","Maze: Last 10 seconds.",0,0x99FFCC;
end;
 
OnTimer60000:
mapannounce "prontera","Maze: Time's up.",0,0x99FFCC;
end;
 
OnTimer61000:
disablenpc "mazeevent";
donpcevent "Maze#asdf::OnEnable";
stopnpctimer;
end;
}
 
force_1-3,100,187,4    script    Maze#asdf    702,{
    set $@prize, rand(5000,10000);
    mes "[Maze Manager]";
    mes "Here is your prize:^336699";
    mes $@prize+"^000000 Event Points!";
    set #EVENTPOINTS, #EVENTPOINTS+$@prize;
    logmes "EP won from Maze Event :"+$@prize;
    goto L_EndIt;
    
L_EndIt:
        next;
warp "prontera",155,175;
// Hide the NPC
disablenpc "Maze#asdf";
end;
 
OnEnable:
if(getmapusers("force_1-3")<2) goto L_NotEnough;
mapannounce "force_1-3","Maze: We are about to start the maze... here's how to play.",0,0x99FFCC;
sleep2 4000;
mapannounce "force_1-3","Maze: Everybody must keep running through portals.",0,0x99FFCC;
sleep2 4000;
mapannounce "force_1-3","Maze: Each portal will warp you to a random room.",0,0x99FFCC;
sleep2 4000;
mapannounce "force_1-3","Maze: With some luck, somebody will find the finish!",0,0x99FFCC;
sleep2 4000;
mapannounce "force_1-3","Maze: And then, they will win the event.",0,0x99FFCC;
sleep2 4000;
mapannounce "force_1-3","Maze: Is everybody ready?! We're going to start!",0,0x99FFCC;
sleep2 4000;
mapannounce "force_1-3","Maze: 3....",0,0x99FFCC;
sleep2 2000;
mapannounce "force_1-3","Maze: 2...",0,0x99FFCC;
sleep2 2000;
mapannounce "force_1-3","Maze: 1..",0,0x99FFCC;
sleep2 2000;
mapannounce "force_1-3","Maze: GO!",0,0x99FFCC;
    enablenpc "mz_portal#1";
    enablenpc "mz_portal#2";
    enablenpc "mz_portal#3";
    enablenpc "mz_portal#4";
    enablenpc "mz_portal#5";
    enablenpc "mz_portal#6";
    enablenpc "mz_portal#7";
    enablenpc "mz_portal#8";
    enablenpc "mz_portal#9";
    enablenpc "mz_portal#10";
    enablenpc "mz_portal#11";
    enablenpc "mz_portal#12";
    enablenpc "mz_portal#13";
    enablenpc "mz_portal#14";
    enablenpc "mz_portal#15";
    enablenpc "mz_portal#16";
    enablenpc "mz_portal#17";
    enablenpc "mz_portal#18";
    enablenpc "mz_portal#19";
    enablenpc "mz_portal#20";
    enablenpc "mz_portal#21";
    enablenpc "mz_portal#22";
    enablenpc "mz_portal#23";
    enablenpc "mz_portal#24";
end;
 
L_NotEnough:
    mapannounce "force_1-3","Maze: Not enough players. Cancelling this round.",0,0x99FFCC;
    areawarp "force_1-3",10,189,189,10,"prontera",143,171;
        disablenpc "mz_portal#1";
        disablenpc "mz_portal#2";
        disablenpc "mz_portal#3";
        disablenpc "mz_portal#4";
        disablenpc "mz_portal#5";
        disablenpc "mz_portal#6";
        disablenpc "mz_portal#7";
        disablenpc "mz_portal#8";
        disablenpc "mz_portal#9";
        disablenpc "mz_portal#10";
        disablenpc "mz_portal#11";
        disablenpc "mz_portal#12";
        disablenpc "mz_portal#13";
        disablenpc "mz_portal#14";
        disablenpc "mz_portal#15";
        disablenpc "mz_portal#16";
        disablenpc "mz_portal#17";
        disablenpc "mz_portal#18";
        disablenpc "mz_portal#19";
        disablenpc "mz_portal#20";
        disablenpc "mz_portal#21";
        disablenpc "mz_portal#22";
        disablenpc "mz_portal#23";
        disablenpc "mz_portal#24";
    end;
 
}
 
-    script    mazer    -1,{
OnWhisperGlobal:
    if (getgmlevel()==99) {
        announce "Maze: A maze event will begin in 2 minutes in Prontera.",0,0x99FFCC;
sleep2 90000;
announce "Maze: Enter the Warp in Prontera to join the Maze event.",0,0x99FFCC;
 
// Clear up the map.
areawarp "force_1-3",104,18,189,10,"prontera",159,116;
 
// Load NPCs + hide the Maze guy
    set $mazeinit, 1;
enablenpc "mazeevent";
enablenpc "Maze#asdf";
hideonnpc "Maze#asdf";
initnpctimer;
end;
 
OnTimer30000:
mapannounce "prontera","Maze: Last 30 seconds.",0,0x99FFCC;
sleep2 5000;
mapannounce "prontera","Maze: If you want to join please enter the Warp Portal.",0,0x99FFCC;
end;
 
OnTimer50000:
mapannounce "prontera","Maze: Last 10 seconds.",0,0x99FFCC;
end;
 
OnTimer60000:
mapannounce "prontera","Maze: Time's up.",0,0x99FFCC;
end;
 
OnTimer61000:
disablenpc "mazeevent";
donpcevent "Maze#asdf::OnEnable";
stopnpctimer;
end;
    } else {
    dispbottom "You are not authorised for this function.";
    }
}
 
-    script    mz_portal::maze_portal    -1,{
    OnTouch:
    set @chance, rand(20,30);
    set .@win_chance, (getmapusers("force_1-3")*@chance);
    if ( rand(1,.@win_chance) == .@win_chance ) {
        warp "force_1-3",100,184;
        announce "Maze: "+strcharinfo(0)+" has solved the maze event! Next round is in 1 hour.",0,0x99FFCC;
        disablenpc "mz_portal#1";
        disablenpc "mz_portal#2";
        disablenpc "mz_portal#3";
        disablenpc "mz_portal#4";
        disablenpc "mz_portal#5";
        disablenpc "mz_portal#6";
        disablenpc "mz_portal#7";
        disablenpc "mz_portal#8";
        disablenpc "mz_portal#9";
        disablenpc "mz_portal#10";
        disablenpc "mz_portal#11";
        disablenpc "mz_portal#12";
        disablenpc "mz_portal#13";
        disablenpc "mz_portal#14";
        disablenpc "mz_portal#15";
        disablenpc "mz_portal#16";
        disablenpc "mz_portal#17";
        disablenpc "mz_portal#18";
        disablenpc "mz_portal#19";
        disablenpc "mz_portal#20";
        disablenpc "mz_portal#21";
        disablenpc "mz_portal#22";
        disablenpc "mz_portal#23";
        disablenpc "mz_portal#24";
        sleep 5000;
areawarp "force_1-3",10,189,29,170,"prontera",155,175;
areawarp "force_1-3",170,189,189,170,"prontera",155,175;
areawarp "force_1-3",10,147,189,11,"prontera",155,175;
        mapannounce "force_1-3","Maze: Congratulations! Talk to me for a prize.",0,0x99FFCC;
        hideoffnpc "Maze#asdf";
        end;
    }
    set .@this_entry, rand(1,15);
    switch (.@this_entry) {
        case 1:
            warp "force_1-3",19,189;
            end;
        case 2:
            warp "force_1-3",170,179;
            end;
        case 3:
            warp "force_1-3",19,147;
            end;
        case 4:
            warp "force_1-3",59,128;
            end;
        case 5:
            warp "force_1-3",90,138;
            end;
        case 6:
            warp "force_1-3",179,128;
            end;
        case 7:
            warp "force_1-3",109,100;
            end;
        case 8:
            warp "force_1-3",140,50;
            end;
        case 9:
            warp "force_1-3",170,99;
            end;
        case 10:
            warp "force_1-3",19,50;
            end;
        case 11:
            warp "force_1-3",100,10;
            end;
        case 12:
            warp "force_1-3",170,60;
            end;
        case 13:
            warp "force_1-3",20,29;
            end;
        case 14:
            warp "force_1-3",60,29;
            end;
        case 15:
            warp "force_1-3",130,20;
            end;
    }
}
 
force_1-3,29,179,0    duplicate(maze_portal)    mz_portal#1    45,2,2
force_1-3,180,170,0    duplicate(maze_portal)    mz_portal#2    45,2,2
force_1-3,29,99,0    duplicate(maze_portal)    mz_portal#3    45,2,2
force_1-3,69,138,0    duplicate(maze_portal)    mz_portal#4    45,2,2
force_1-3,109,137,0    duplicate(maze_portal)    mz_portal#5    45,2,2
force_1-3,140,147,0    duplicate(maze_portal)    mz_portal#6    45,2,2
force_1-3,60,90,0    duplicate(maze_portal)    mz_portal#7    45,2,2
force_1-3,130,100,0    duplicate(maze_portal)    mz_portal#8    45,2,2
force_1-3,180,90,0    duplicate(maze_portal)    mz_portal#9    45,2,2
force_1-3,69,59,0    duplicate(maze_portal)    mz_portal#10    45,2,2
force_1-3,90,59,0    duplicate(maze_portal)    mz_portal#11    45,2,2
force_1-3,179,50,0    duplicate(maze_portal)    mz_portal#12    45,2,2
force_1-3,20,10,0    duplicate(maze_portal)    mz_portal#13    45,2,2
force_1-3,69,19,0    duplicate(maze_portal)    mz_portal#14    45,2,2
force_1-3,179,29,0    duplicate(maze_portal)    mz_portal#15    45,2,2
force_1-3,139,109,0    duplicate(maze_portal)    mz_portal#16    45,2,2
force_1-3,10,99,0    duplicate(maze_portal)    mz_portal#17    45,2,2
force_1-3,130,137,0    duplicate(maze_portal)    mz_portal#18    45,2,2
force_1-3,59,69,0    duplicate(maze_portal)    mz_portal#19    45,2,2
force_1-3,109,59,0    duplicate(maze_portal)    mz_portal#20    45,2,2
force_1-3,60,109,0    duplicate(maze_portal)    mz_portal#21    45,2,2
force_1-3,100,147,0    duplicate(maze_portal)    mz_portal#22    45,2,2
force_1-3,100,128,0    duplicate(maze_portal)    mz_portal#23    45,2,2
force_1-3,180,109,0    duplicate(maze_portal)    mz_portal#24    45,2,2
 
force_1-3    mapflag    nobranch
force_1-3    mapflag    nomemo
force_1-3    mapflag    nopenalty
force_1-3    mapflag    nosave    SavePoint
force_1-3    mapflag    noskill
force_1-3    mapflag    noteleport
force_1-3    mapflag    nowarpto
force_1-3    mapflag    restricted    3
Viewed 840 times, submitted by Guest.