viewing paste globos | Athena

Posted on the | Last edited on
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 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719
//==============================================================================
// - El festival de los Globos de la ciudad de Prontera.
// - Este festival se celebra tradicionalmente en los alrededores de los Castillos de Prontera.
// - Cuatro equipos deberán defender los globos de su color, y explotar los demás.
//==============================================================================
 
-   script  Globos  -1,{
 
OnInit:
    disablenpc "Bardo";
    //Configuración por defecto
    if ($GlobosGMLvl == 0) set $GlobosGMLvl, 2; //Nivel de GM Mínimo
    if ($GlobosTeams == 0) set $GlobosTeams, 2; //Mínimo de equipos
    if ($GlobosJugadoresMin == 0) set $GlobosJugadoresMin, 1; //Mínimo de personas por equipo
    if ($GlobosJugadoresMax == 0) set $GlobosJugadoresMax, 8; //Máximo de personas por equipo
    if ($Poring == 0) set $Poring, 50; //Porings por equipo
    if ($Drops == 0) set $Drops, 50; //Drops por equipo
    if ($Poporing == 0) set $Poporing, 50; //Poporings por equipo
    if ($Marin == 0) set $Marin, 50; //Marins por equipo
end;
 
OnWhisperGlobal:
    if (getgroupid() < $GlobosGMLvl) end;
    if (@whispervar0$ == "run") {set $@GlobosEvent,0; callsub(OnClock2100); end;}
    mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]";
    mes "¿Qué deseas configurar?";
        switch(select("Niveles y equipos:Monstruos:Opciones::"+($@GlobosEvent ? "":"Iniciar evento")+":Nada")){
            case 1: next; callsub(C_ConfigTeam); break;
            case 2: next; callsub(C_ConfigMobs); break;
            case 3: next; callsub(C_ConfigOptions); break;
            case 4: next; callsub(C_ConfigPrize); break;
            case 5: close2; callsub(OnClock2100); break;
            case 6: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Estoy a vuestro servicio."; close;
        }
end;
 
C_ConfigTeam:
    mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]";
    mes "¿Niveles Mínimos o equipos?","Nivel Mínimo de GM: ^0059FF"+$GlobosGMLvl+"^000000";
    mes "Mínimo de equipos para iniciar el evento: ^0059FF"+$GlobosTeams+"^000000";
    mes "Mínimo de Jugadores por equipo: ^0059FF"+$GlobosJugadoresMin+"^000000";
    mes "Máximo de Jugadores por equipo: ^0059FF"+$GlobosJugadoresMax+"^000000";
    next;
        switch(select("Nivel de GM:Mínimo de Equipos:Mínimo de Jugadores:Máximo de Jugadores:Listo")){
            case 1: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Escribe el nivel mínimo de GM para configurar el evento."; input $GlobosGMLvl; next; callsub(C_ConfigTeam); break;
            case 2: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Escribe el mínimo de equipos para iniciar el evento."; input $GlobosTeams; next; callsub(C_ConfigTeam); break;
            case 3: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Escribe el mínimo de usuarios para iniciar el evento."; input $GlobosJugadoresMin; next; callsub(C_ConfigTeam); break;
            case 4: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Escribe el máximo de usuarios para iniciar el evento."; input $GlobosJugadoresMax; next; callsub(C_ConfigTeam); break;
            case 5: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Estoy a vuestro servicio."; close;
        }
end;
 
C_ConfigMobs:
    mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]";
    mes "¿Cuantos Globos habrá por equipo?";
    mes "Porings por equipo: ^FF8080"+$Poring+"^000000";
    mes "Drops por equipo: ^FFA015"+$Drops+"^000000";
    mes "Poporings por equipo: ^35B235"+$Poporing+"^000000";
    mes "Marins por equipo: ^4DA6FF"+$Marin+"^000000";
    next;
        switch(select("Porings:Drops:Poporings:Marins:Listo")){
            case 1: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Escribe el número de Porings por equipo."; input $Poring; next; callsub(C_ConfigMobs); break;
            case 2: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Escribe el número de Drops por equipo."; input $Drops; next; callsub(C_ConfigMobs); break;
            case 3: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Escribe el número de Poporings por equipo."; input $Poporing; next; callsub(C_ConfigMobs); break;
            case 4: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Escribe el número de Marins por equipo."; input $Marin; next; callsub(C_ConfigMobs); break;
            case 5: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Estoy a vuestro servicio."; close;
        }
end;
 
C_ConfigOptions:
    mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]";
    mes "¿Deseas activar o desactivar algo?";
    mes "Skills: ^0059FF"+($GlobosSkill?"Desactivadas":"Activadas")+"^000000";
    mes "PvP: ^0059FF"+($GlobosPvP?"Activada":"Desactivada")+"^000000";
    next;
        switch(select(($GlobosSkill?"Activar":"Desactivar")+" Skills:"+($GlobosPvP?"Desactivar":"Activar")+" PvP:Listo")){
            case 1: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Skills en el mapa han sido "+($GlobosSkill?"activadas":"desactivadas")+"."; if($GlobosSkill == 1) {set $GlobosSkill,0;} else {set $GlobosSkill,1;} next; callsub(C_ConfigOptions); break;
            case 2: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","PvP en el mapa ha sido "+($GlobosPvP?"activado":"desactivado")+"."; if($GlobosPvP) {set $GlobosPvP,0;} else {set $GlobosPvP,1;} next; callsub(C_ConfigOptions); break;
            case 3: mes "[^008800Event Manager:^000000 ^FF8080Globos^000000]","Estoy a vuestro servicio."; close;
        }
end;
 
C_ConfigPrize:
    mes "[^008800Event Manager^000000]";
    mes "¿Deseas configurar premio o cantidad?","El premio actual es: ^0059FF"+getitemname($MckPrizeID)+" ^000000[ID: ^FFA500"+$MckPrizeID+"^000000]","La cantidad que gana el primer lugar en eventos es: ^0059FF"+$MckPrizeAmount+"^000000 que se reduce 10% por lugar.";
    next;
        switch(select("Premio:Cantidad:Listo")){
            case 1: mes "[^008800Event Manager^000000]","Escribe el ID del item para dar como premio."; input $MckPrizeID; next; callsub(C_ConfigPrize); break;
            case 2: mes "[^008800Event Manager^000000]","Escribe la cantidad del items para dar como premio."; input $MckPrizeAmount; next; callsub(C_ConfigPrize); break;
            case 3: mes "[^008800Event Manager^000000]","Estoy a vuestro servicio."; close;
        }
end;
 
OnClock0000:
OnClock0300:
OnClock0600:
OnClock0900:
OnClock1200:
OnClock1500:
OnClock1800:
OnClock2100:
    if($@GlobosEvent == 1) end;
    set .@i, 2000000;
    do {
        if(.@i % 500 == 0) sleep 20; // prevent infinite loop
        if(attachrid(.@i)) {
            if(Casa$ == "Poring") {set Casa$,""; if (countitem(19607) != 0) delitem 19607,1;}
            if(Casa$ == "Drops") {set Casa$,""; if (countitem(19604) != 0) delitem 19604,1;}
            if(Casa$ == "Poporing") {set Casa$,""; if (countitem(19606) != 0) delitem 19606,1;}
            if(Casa$ == "Marin") {set Casa$,""; if (countitem(19605) != 0) delitem 19605,1;}
            detachrid;
        }
        set .@i, .@i +1;
    } while(.@i <= 2010000);
    announce "Un torneo de Globos está a punto de comenzar, 5 minutos para registrarse.",0;
    mapwarp "te_prt_gld","prontera",142,170;
    killmonsterall "te_prt_gld";
    enablenpc "Bardo";
    set $@Teams,0;
    set $@Globos,0;
    set $@GlobosEvent,1;
    set $PoringPlayer,0;
    set $DropsPlayer,0;
    set $PoporingPlayer,0;
    set $MarinPlayer,0;
    set $@Poring,0;
    set $@Drops,0;
    set $@Poporing,0;
    set $@Marin,0;
    initnpctimer;
end;
 
OnTimer60000:
    announce "4 minutos para registrarse en el torneo de Globos.",0;
end;
 
OnTimer120000:
    announce "3 minutos para registrarse en el torneo de Globos.",0;
end;
 
OnTimer180000:
    announce "2 minutos para registrarse en el torneo de Globos.",0;
end;
 
OnTimer240000:
    announce "1 minuto para registrarse en el torneo de Globos.",0;
    if($@Teams < $GlobosTeams) {
        sleep 5000;
        mapannounce "te_prt_gld","El número de equipos mínimos no ha sido alcanzado. Si ningún otro equipo entra, el evento será cancelado.",0;
        sleep 5000;
        mapannounce "te_prt_gld","Se requiere "+($GlobosTeams-$@Teams)+" equipo"+($GlobosTeams-$@Teams == 1?"":"s")+" mas.",0;
    }
    sleep 5000;
    set .@i, 2000000;
    do {
        if(.@i % 500 == 0) sleep 20; // prevent infinite loop
        if(attachrid(.@i)) {
            if(Casa$ == "Poring" && $PoringPlayer < $GlobosJugadoresMin) announce "Tu equipo no cumple con los jugadores mínimos necesarios. Si nadie mas entra, tu equipo será descalificado.",bc_self,0xFF8080;
            if(Casa$ == "Drops" && $DropsPlayer < $GlobosJugadoresMin) announce "Tu equipo no cumple con los jugadores mínimos necesarios. Si nadie mas entra, tu equipo será descalificado.",bc_self,0xFFA015;
            if(Casa$ == "Poporing" && $PoporingPlayer < $GlobosJugadoresMin) announce "Tu equipo no cumple con los jugadores mínimos necesarios. Si nadie mas entra, tu equipo será descalificado.",bc_self,0x35B235;
            if(Casa$ == "Marin" && $MarinPlayer < $GlobosJugadoresMin) announce "Tu equipo no cumple con los jugadores mínimos necesarios. Si nadie mas entra, tu equipo será descalificado.",bc_self,0x4DA6FF;
            detachrid;
        }
        set .@i, .@i +1;
    } while(.@i <= 2010000);
end;
 
OnTimer300000:
    set .@i, 2000000;
    do {
        if(.@i % 500 == 0) sleep 20; // prevent infinite loop
        if(attachrid(.@i)) {
            if(Casa$ == "Poring" && $PoringPlayer < $GlobosJugadoresMin) {set Casa$,""; if(countitem(19607) != 0) {delitem 19607,1;} set $PoringPlayer,0; warp "prontera",142,170;}
            if(Casa$ == "Drops" && $DropsPlayer < $GlobosJugadoresMin) {set Casa$,""; if(countitem(19604) != 0) {delitem 19604,1;} set $DropsPlayer,0; warp "prontera",142,170;}
            if(Casa$ == "Poporing" && $PoporingPlayer < $GlobosJugadoresMin) {set Casa$,""; if(countitem(19606) != 0) {delitem 19606,1;} set $PoporingPlayer,0; warp "prontera",142,170;}
            if(Casa$ == "Marin" && $MarinPlayer < $GlobosJugadoresMin) {set Casa$,""; if(countitem(19605) != 0) {delitem 19605,1;} set $MarinPlayer,0; warp "prontera",142,170;}
            detachrid;
        }
        set .@i, .@i +1;
    } while(.@i <= 2010000);
    set $@Teams,0;
    if($PoringPlayer >= $GlobosJugadoresMin) set $@Teams,$@Teams+1;
    if($DropsPlayer >= $GlobosJugadoresMin) set $@Teams,$@Teams+1;
    if($PoporingPlayer >= $GlobosJugadoresMin) set $@Teams,$@Teams+1;
    if($MarinPlayer >= $GlobosJugadoresMin) set $@Teams,$@Teams+1;
    if($@Teams >= $GlobosTeams) set $@Globos,1;
if($@Globos) {
    announce "El torneo de Globos ha comenzado.",0;
    if($PoringPlayer > 0) {
        monster "te_prt_gld",0,0,"Poring",1002,$Poring,"Globos::OnPoring";
        set $@Poring,$Poring;
    }
    if($DropsPlayer > 0) {
        monster "te_prt_gld",0,0,"Drops",1113,$Drops,"Globos::OnDrops";
        set $@Drops,$Drops;
    }
    if($PoporingPlayer > 0) {
        monster "te_prt_gld",0,0,"Poporing",1031,$Poporing,"Globos::OnPoporing";
        set $@Poporing,$Poporing;
    }
    if($MarinPlayer > 0) {
        monster "te_prt_gld",0,0,"Marin",1242,$Marin,"Globos::OnMarin";
        set $@Marin,$Marin;
    }
    monster "te_prt_gld",0,0,"Ghostring",1120,5,"Globos::OnGhostring";
    stopnpctimer;
    goto L_Score;
} else {
    disablenpc "Bardo";
    announce "No se completaron los equipos para el torneo de Globos",0;
    set .@i, 2000000;
    do {
        if(.@i % 500 == 0) sleep 20; // prevent infinite loop
        if(attachrid(.@i)) {
            if(Casa$ == "Poring") {set Casa$,""; if(countitem(19607) != 0) {delitem 19607,1;}}
            if(Casa$ == "Drops") {set Casa$,""; if(countitem(19604) != 0) {delitem 19604,1;}}
            if(Casa$ == "Poporing") {set Casa$,""; if(countitem(19606) != 0) {delitem 19606,1;}}
            if(Casa$ == "Marin") {set Casa$,""; if(countitem(19605) != 0) {delitem 19605,1;}}
            detachrid;
        }
        set .@i,.@i+1;
    } while(.@i <= 2010000);
    sleep 5000;
    mapwarp "te_prt_gld","prontera",142,170;
    set $@GlobosEvent,0;
    stopnpctimer;
}
end;
 
L_Score:
    do {
        if($@Poring > $@Drops && $@Poring > $@Poporing && $@Poring > $@Marin) mapannounce "te_prt_gld",($@Poring > 0?"Porings: "+$@Poring+" ":"")+($@Drops > 0?"Drops: "+$@Drops+" ":"")+($@Poporing > 0?"Poporings: "+$@Poporing+" ":"")+($@Marin > 0?"Marins: "+$@Marin:""),0,0xFF8080;
        else if($@Drops > $@Poring && $@Drops > $@Poporing && $@Drops > $@Marin) mapannounce "te_prt_gld",($@Poring > 0?"Porings: "+$@Poring+" ":"")+($@Drops > 0?"Drops: "+$@Drops+" ":"")+($@Poporing > 0?"Poporings: "+$@Poporing+" ":"")+($@Marin > 0?"Marins: "+$@Marin:""),0,0xFFA015;
        else if($@Poporing > $@Poring && $@Poporing > $@Drops && $@Poporing > $@Marin) mapannounce "te_prt_gld",($@Poring > 0?"Porings: "+$@Poring+" ":"")+($@Drops > 0?"Drops: "+$@Drops+" ":"")+($@Poporing > 0?"Poporings: "+$@Poporing+" ":"")+($@Marin > 0?"Marins: "+$@Marin:""),0,0x35B235;
        else if($@Marin > $@Poring && $@Marin > $@Drops && $@Marin > $@Poporing) mapannounce "te_prt_gld",($@Poring > 0?"Porings: "+$@Poring+" ":"")+($@Drops > 0?"Drops: "+$@Drops+" ":"")+($@Poporing > 0?"Poporings: "+$@Poporing+" ":"")+($@Marin > 0?"Marins: "+$@Marin:""),0,0x4DA6FF;
        else mapannounce "te_prt_gld",($@Poring > 0?"Porings: "+$@Poring+" ":"")+($@Drops > 0?"Drops: "+$@Drops+" ":"")+($@Poporing > 0?"Poporings: "+$@Poporing+" ":"")+($@Marin > 0?"Marins: "+$@Marin:""),0;
        sleep 60000;
    } while($@Teams != 1);
    end;
 
OnPoring:
    if(Casa$ == "Poring") equip 19607;
    if(Casa$ == "Drops") equip 19604;
    if(Casa$ == "Poporing") equip 19606;
    if(Casa$ == "Marin") equip 19605;
    set $@Poring,$@Poring-1;
    if($@Poring == 0 && $@Teams > 1) {
        mapannounce "te_prt_gld","La Casa de los Porings ha sido descalificada.",0,0xFF8080;
        set $@PoringPlace,$@Teams;
        set $@Teams,$@Teams-1;
    }
    if($@Teams == 1) goto L_End;
    end;
 
OnDrops:
    if(Casa$ == "Poring") equip 19607;
    if(Casa$ == "Drops") equip 19604;
    if(Casa$ == "Poporing") equip 19606;
    if(Casa$ == "Marin") equip 19605;
    set $@Drops,$@Drops-1;
    if($@Drops == 0 && $@Teams > 1) {
        mapannounce "te_prt_gld","La Casa de los Drops ha sido descalificada.",0,0xFFA015;
        set $@DropsPlace,$@Teams;
        set $@Teams,$@Teams-1;
    }
    if($@Teams == 1) goto L_End;
    end;
 
OnPoporing:
    if(Casa$ == "Poring") equip 19607;
    if(Casa$ == "Drops") equip 19604;
    if(Casa$ == "Poporing") equip 19606;
    if(Casa$ == "Marin") equip 19605;
    set $@Poporing,$@Poporing-1;
    if($@Poporing == 0 && $@Teams > 1) {
        mapannounce "te_prt_gld","La Casa de los Poporings ha sido descalificada.",0,0x35B235;
        set $@PoporingPlace,$@Teams;
        set $@Teams,$@Teams-1;
    }
    if($@Teams == 1) goto L_End;
    end;
 
OnMarin:
    if(Casa$ == "Poring") equip 19607;
    if(Casa$ == "Drops") equip 19604;
    if(Casa$ == "Poporing") equip 19606;
    if(Casa$ == "Marin") equip 19605;
    set $@Marin,$@Marin-1;
    if($@Marin == 0 && $@Teams > 1) {
        mapannounce "te_prt_gld","La Casa de los Marins ha sido descalificada.",0,0x4DA6FF;
        set $@MarinPlace,$@Teams;
        set $@Teams,$@Teams-1;
    }
    if($@Teams == 1) goto L_End;
    end;
 
OnGhostring:
    if(Casa$ == "Poring") equip 19607;
    if(Casa$ == "Drops") equip 19604;
    if(Casa$ == "Poporing") equip 19606;
    if(Casa$ == "Marin") equip 19605;
    monster "te_prt_gld",0,0,"Ghostring",1120,1,"Globos::OnGhostring";
    end;
 
L_End:
    killmonsterall "te_prt_gld";
    disablenpc "Bardo";
    sleep 5000;
    if($@Poring > 0) {
        mapannounce "te_prt_gld","La casa de los Porings ha ganado el torneo de los Globos.",0,0xFF8080;
        set $@PoringPlace,$@Teams;
    }
    if($@Drops > 0) {
        mapannounce "te_prt_gld","La casa de los Drops ha ganado el torneo de los Globos.",0,0xFFA015;
        set $@DropsPlace,$@Teams;
    }
    if($@Poporing > 0) {
        mapannounce "te_prt_gld","La casa de los Poporings ha ganado el torneo de los Globos.",0,0x35B235;
        set $@PoporingPlace,$@Teams;
    }
    if($@Marin > 0) {
        mapannounce "te_prt_gld","La casa de los Marins ha ganado el torneo de los Globos.",0,0x4DA6FF;
        set $@MarinPlace,$@Teams;
    }
    goto E_Winners;
    end;
 
OnPCLogoutEvent:
    if(Casa$ == "Poring") if($PoringPlayer) set $PoringPlayer,$PoringPlayer-1;
    if(Casa$ == "Drops") if($DropsPlayer) set $DropsPlayer,$DropsPlayer-1;
    if(Casa$ == "Poporing") if($PoporingPlayer) set $PoporingPlayer,$PoporingPlayer-1;
    if(Casa$ == "Marin") if($MarinPlayer) set $MarinPlayer,$MarinPlayer-1;
    end;
 
OnPCLoginEvent:
    if(Casa$ == "Poring") {set Casa$,""; if(countitem(19607) != 0) {delitem 19607,1;}}
    if(Casa$ == "Drops") {set Casa$,""; if(countitem(19604) != 0) {delitem 19604,1;}}
    if(Casa$ == "Poporing") {set Casa$,""; if(countitem(19606) != 0) {delitem 19606,1;}}
    if(Casa$ == "Marin") {set Casa$,""; if(countitem(19605) != 0) {delitem 19605,1;}}
    end;
 
E_Winners:
    set $@GlobosEvent,0;
    disablenpc "Bardo";
    set .@i, 2000000;
    do {
        if ( .@i % 500 == 0 ) sleep 20; // prevent infinite loop
        if ( attachrid(.@i) ) {
            if($@Poring > 0) {
                if(Casa$ == "Poring") {
                    if (countitem(19607) != 0) delitem 19607,1; // Poring
                    set GlobosWin,GlobosWin+1;
                        if(GlobosWin == 1) getitem "Poring_Hat",1;
                        else if(GlobosWin == 10) getitem "Poporing_Cap",1;
                        else if(GlobosWin == 20) getitem "Jumping_Poring",1;
                        else if(GlobosWin == 30) getitem "Poring_Party_Hat",1;
                        else if(GlobosWin == 40) getitem "Triple_Poring_Hat",1;
                        else if(GlobosWin == 50) getitem "Poring_Cake_Cap",1;
                    getitem "Poring_Box",1;
                    //getitem "Poring_Coin",1;
                    if(GlobosWin == 1) getitem "Poring_Doll",1;
                    getitem 673,20;
                    set Casa$,"";
                } else if(Casa$ == "Drops") {
                    getitem "Poring_Box",1;         
                    if($@DropsPlace == 2) getitem 673,15;
                    else if($@DropsPlace == 3) getitem 673,10;
                    else if($@DropsPlace == 4) getitem 673,5;
                    if (countitem(19604) != 0) delitem 19604,1; // Drops
                    set Casa$,"";
                } else if(Casa$ == "Poporing") {
                    getitem "Poring_Box",1;         
                    if($@PoporingPlace == 2) getitem 673,15;
                    else if($@PoporingPlace == 3) getitem 673,10;
                    else if($@PoporingPlace == 4) getitem 673,5;
                    if (countitem(19606) != 0) delitem 19606,1; // Poporing
                    set Casa$,"";
                } else if(Casa$ == "Marin") {
                    getitem "Poring_Box",1;         
                    if($@MarinPlace == 2) getitem 673,15;
                    else if($@MarinPlace == 3) getitem 673,10;
                    else if($@MarinPlace == 4) getitem 673,5;
                    if (countitem(19605) != 0) delitem 19605,1; // Marin
                    set Casa$,"";
                }
            } else if($@Drops > 0) {
                if(Casa$ == "Drops") {
                    if (countitem(19604) != 0) delitem 19604,1; // Drops
                    set GlobosWin,GlobosWin+1;
                        if(GlobosWin == 1) getitem "Poring_Hat",1;
                        else if(GlobosWin == 10) getitem "Poporing_Cap",1;
                        else if(GlobosWin == 20) getitem "Jumping_Poring",1;
                        else if(GlobosWin == 30) getitem "Poring_Party_Hat",1;
                        else if(GlobosWin == 40) getitem "Triple_Poring_Hat",1;
                        else if(GlobosWin == 50) getitem "Poring_Cake_Cap",1;
                    getitem "Poring_Box",1;
                    //getitem "Poring_Coin",1;
                    if(GlobosWin == 1) getitem "Poring_Doll",1;
                    getitem 673,20;
                    set Casa$,"";
                } else if(Casa$ == "Poring") {
                    getitem "Poring_Box",1;         
                    if($@PoringPlace == 2) getitem 673,15;
                    else if($@PoringPlace == 3) getitem 673,10;
                    else if($@PoringPlace == 4) getitem 673,5;
                    if (countitem(19607) != 0) delitem 19607,1; // Poring
                    set Casa$,"";
                } else if(Casa$ == "Poporing") {
                    getitem "Poring_Box",1;         
                    if($@PoporingPlace == 2) getitem 673,15;
                    else if($@PoporingPlace == 3) getitem 673,10;
                    else if($@PoporingPlace == 4) getitem 673,5;
                    if (countitem(19606) != 0) delitem 19606,1; // Poporing
                    set Casa$,"";
                } else if(Casa$ == "Marin") {
                    getitem "Poring_Box",1;         
                    if($@MarinPlace == 2) getitem 673,15;
                    else if($@MarinPlace == 3) getitem 673,10;
                    else if($@MarinPlace == 4) getitem 673,5;
                    if (countitem(19605) != 0) delitem 19605,1; // Marin
                    set Casa$,"";
                }
            } else if($@Poporing > 0) {
                if(Casa$ == "Poporing") {
                    if (countitem(19606) != 0) delitem 19606,1; // Poporing
                    set GlobosWin,GlobosWin+1;
                        if(GlobosWin == 1) getitem "Poring_Hat",1;
                        else if(GlobosWin == 10) getitem "Poporing_Cap",1;
                        else if(GlobosWin == 20) getitem "Jumping_Poring",1;
                        else if(GlobosWin == 30) getitem "Poring_Party_Hat",1;
                        else if(GlobosWin == 40) getitem "Triple_Poring_Hat",1;
                        else if(GlobosWin == 50) getitem "Poring_Cake_Cap",1;
                    getitem "Poring_Box",1;
                    //getitem "Poring_Coin",1;
                    if(GlobosWin == 1) getitem "Poring_Doll",1;
                    getitem 673,20;
                    set Casa$,"";
                } else if(Casa$ == "Poring") {
                    getitem "Poring_Box",1;         
                    if($@PoringPlace == 2) getitem 673,15;
                    else if($@PoringPlace == 3) getitem 673,10;
                    else if($@PoringPlace == 4) getitem 673,5;
                    if (countitem(19607) != 0) delitem 19607,1; // Poring
                    set Casa$,"";
                } else if(Casa$ == "Drops") {
                    getitem "Poring_Box",1;         
                    if($@DropsPlace == 2) getitem 673,15;
                    else if($@DropsPlace == 3) getitem 673,10;
                    else if($@DropsPlace == 4) getitem 673,5;
                    if (countitem(19604) != 0) delitem 19604,1; // Drops
                    set Casa$,"";
                } else if(Casa$ == "Marin") {
                    getitem "Poring_Box",1;         
                    if($@MarinPlace == 2) getitem 673,15;
                    else if($@MarinPlace == 3) getitem 673,10;
                    else if($@MarinPlace == 4) getitem 673,5;
                    if (countitem(19605) != 0) delitem 19605,1; // Marin
                    set Casa$,"";
                }
            } else if($@Marin > 0) {
                if(Casa$ == "Marin") {
                    if (countitem(19605) != 0) delitem 19605,1; // Marin
                    set GlobosWin,GlobosWin+1;
                        if(GlobosWin == 1) getitem "Poring_Hat",1;
                        else if(GlobosWin == 10) getitem "Poporing_Cap",1;
                        else if(GlobosWin == 20) getitem "Jumping_Poring",1;
                        else if(GlobosWin == 30) getitem "Poring_Party_Hat",1;
                        else if(GlobosWin == 40) getitem "Triple_Poring_Hat",1;
                        else if(GlobosWin == 50) getitem "Poring_Cake_Cap",1;
                    getitem "Poring_Box",1;
                    //getitem "Poring_Coin",1;
                    if(GlobosWin == 1) getitem "Poring_Doll",1;
                    getitem 673,20;
                    set Casa$,"";
                } else if(Casa$ == "Poring") {
                    getitem "Poring_Box",1;         
                    if($@PoringPlace == 2) getitem 673,15;
                    else if($@PoringPlace == 3) getitem 673,10;
                    else if($@PoringPlace == 4) getitem 673,5;
                    if (countitem(19607) != 0) delitem 19607,1; // Poring
                    set Casa$,"";
                } else if(Casa$ == "Drops") {
                    getitem "Poring_Box",1;         
                    if($@DropsPlace == 2) getitem 673,15;
                    else if($@DropsPlace == 3) getitem 673,10;
                    else if($@DropsPlace == 4) getitem 673,5;
                    if (countitem(19604) != 0) delitem 19604,1; // Drops
                    set Casa$,"";
                } else if(Casa$ == "Poporing") {
                    getitem "Poring_Box",1;         
                    if($@PoporingPlace == 2) getitem 673,15;
                    else if($@PoporingPlace == 3) getitem 673,10;
                    else if($@PoporingPlace == 4) getitem 673,5;
                    if (countitem(19606) != 0) delitem 19606,1; // Poporing
                    set Casa$,"";
                }
            }
        }
    detachrid;
    set .@i,.@i+1;
    } while(.@i <= 2010000);
    sleep 10000;
    mapwarp "te_prt_gld","prontera",142,170;
    end;
}   
 
prontera.gat,157,179,4  script  Bardo   741,{
    mes "[Bardo]";
    mes "Cuatro casas se alzan,";
    mes "cuatro en busca del poder.";
    mes "En la fiesta de los Globos,";
    mes "una sola se salvará.";
    next;
    if(Casa$ == "Poring") goto L_RePoring;
    if(Casa$ == "Drops") goto L_ReDrops;
    if(Casa$ == "Poporing") goto L_RePoporing;
    if(Casa$ == "Marin") goto L_ReMarin;
    menu "¿Qué es eso de la fiesta de los Globos?",L_Bard1,"¿Como termina la historia?",L_Bard3,"Eso es cosa de niños pequeños.",-;
 
    mes "[Bardo]";
    mes "Si eso eso te parece...";
    close;
 
L_Bard1:
    mes "[Bardo]";
    mes "¿Nunca has oído hablar de la fiesta de los Globos?";
    mes "Muy bien, pues yo te lo explicaré todo desde el principio.";
    next;
    mes "[Bardo]";
    mes "Hace unos 100 años, en la ciudad de Prontera, existían cuatro grandes casas que se repartían el poder de la ciudad.";
    mes "Todas poseían grandes guerreros y todas buscaban el mismo objetivo, el único control de la ciudad.";
    next;
    mes "[Bardo]";
    mes "La casa de los ^FF8080Porings^000000, hijos del fuego eterno.";
    mes "La casa de los ^FFA015Drops^000000, hijos de la madre tierra.";
    mes "La casa de los ^35B235Poporings^000000, hijos del inalcanzable viento.";
    mes "La casa de los ^4DA6FFMarins^000000, hijos de la gran dama del agua.";
    next;
    mes "[Bardo]";
    mes "Numerosos atentados acontecían con frecuencia entre las distintas casas y la sangre corría por las calles de Prontera.";
    next;
    mes "[Bardo]";
    mes "Hasta que el Rey, viendo la gravedad de la situación, decidió actuar.";
    mes "Sin embargo su forma de actuar, resultó un tanto extraña, pero al fin y al cabo, eficaz.";
    next;
    mes "[Bardo]";
    mes "Así el Rey mandó anunciar:";
    mes "El poder en Prontera, no debe costar más sangre humana.";
    mes "Mañana los miembros de las cuatro casas deberán acudir al recinto de los Castillos de Prontera para celebrar un simple tornéo que finalizará esta disputa.";
    mes "Cada casa poseerá una cantidad de globos de un color, los cuales deberán proteger como si fuesen habitantes de Prontera. Así también deberán tratar a los globos de las otras casas como si se tratasen de los enemigos de la ciudad. La última casa que quede en pie, habrá demostrado que es la mejor candidata para gobernar esta ciudad, y por ello obtendrá el control de Prontera.";
    next;
    mes "[Bardo]";
    mes "Todas las casas estubieron deacuerdo al leer las sabias palabras de su Rey y acudieron al torneo al día siguiente.";
    mes "Y francamente, todo salió según lo esperado, y desde entonces todos los días como hoy se celebra esta pequeña fiesta, para recordar el fin de aquella lejana y amarga era de asesinatos en la ciudad.";
    next;
 
L_Bard2:
    menu "Pero, ¿qué casa ganó el torneo?",L_Bard3,"Ahora, me tengo que ir.",-;
 
    mes "[Bardo]";
    mes "Hasta pronto.";
    close;
 
L_Bard3:
    mes "[Bardo]";
    mes "Veo que realmente te ha interesado mi historia.";
    mes "¿Realmente quieres saber que casa ganó el torneo?";
    mes "¿Qué tal si lo descubres por tí mismo?";
    mes "¿Te gustaría vivir en persona el torneo de los Globos?";
    next;
    menu "¡¡¡Sí!!!",L_Bard4,"Me estás asustando...",-;
 
    mes "[Bardo]";
    mes "Bueno, pues entonces no te contaré el final...";
    close;
 
L_Bard4:
    if($@Globos == 1) goto L_AlreadyStarted;
    mes "[Bardo]";
    mes "Bien, y dime, ¿cuál de estos globos te gusta más?";
    next;
    menu "- El ^FF8080Poring^000000 (^FF8080"+$PoringPlayer+"^000000).",L_Poring,"- El ^FFA015Drops^000000 (^FFA015"+$DropsPlayer+"^000000).",L_Drops,"- El ^35B235Poporing^000000 (^35B235"+$PoporingPlayer+"^000000).",L_Poporing,"- El ^4DA6FFMarin^000000 (^4DA6FF"+$MarinPlayer+"^000000).",L_Marin;
 
L_Poring:
    if($PoringPlayer == $GlobosJugadoresMax) {
        mes "[Bardo]";
        mes "Lo siento, esta casa ya está completa. Por favor, elige otra.";
        next;
        goto L_Bard4;
        end;
    }
    set Casa$,"Poring";
    set $PoringPlayer,$PoringPlayer+1;
    if($PoringPlayer == 1) set $@Teams,$@Teams+1;
    mes "[Bardo]";
    mes "Muy bien, pues allá vamos.";
    getitembound 19607,1,4;
    next;
    equip 19607; //19606 Poporing, 19604 Drops, 19605 Marin, 19607 Poring
    warp "te_prt_gld",65,65;
    close;
 
L_Drops:
    if($DropsPlayer == $GlobosJugadoresMax) {
        mes "[Bardo]";
        mes "Lo siento, esta casa ya está completa. Por favor, elige otra.";
        next;
        goto L_Bard4;
        end;
    }
    set Casa$,"Drops";
    set $DropsPlayer,$DropsPlayer+1;
    if($DropsPlayer == 1) set $@Teams,$@Teams+1;
    mes "[Bardo]";
    mes "Muy bien, pues allá vamos.";
    getitembound 19604,1,4;
    next;
    equip 19604; //19606 Poporing, 19604 Drops, 19605 Marin, 19607 Poring
    warp "te_prt_gld",65,245;
    close;
 
L_Poporing:
    if($PoporingPlayer == $GlobosJugadoresMax) {
        mes "[Bardo]";
        mes "Lo siento, esta casa ya está completa. Por favor, elige otra.";
        next;
        goto L_Bard4;
        end;
    }
    set Casa$,"Poporing";
    set $PoporingPlayer,$PoporingPlayer+1;
    if($PoporingPlayer == 1) set $@Teams,$@Teams+1;
    mes "[Bardo]";
    mes "Muy bien, pues allá vamos.";
    getitembound 19606,1,4;
    next;
    equip 19606; //19606 Poporing, 19604 Drops, 19605 Marin, 19607 Poring
    warp "te_prt_gld",255,65;
    close;
 
L_Marin:
    if($MarinPlayer == $GlobosJugadoresMax) {
        mes "[Bardo]";
        mes "Lo siento, esta casa ya está completa. Por favor, elige otra.";
        next;
        goto L_Bard4;
        end;
    }
    set Casa$,"Marin";
    set $MarinPlayer,$MarinPlayer+1;
    if($MarinPlayer == 1) set $@Teams,$@Teams+1;
    mes "[Bardo]";
    mes "Muy bien, pues allá vamos.";
    getitembound 19605,1,4;
    next;
    equip 19605; //19606 Poporing, 19604 Drops, 19605 Marin, 19607 Poring
    warp "te_prt_gld",250,250;
    close;
 
L_RePoring:
    mes "[Bardo]";
    mes "¿Quieres volver al torneo?";
    next;
    menu "Sí.",-,"No.",L_ReNo;
    warp "te_prt_gld",65,65;
    end;
 
L_ReDrops:
    mes "[Bardo]";
    mes "¿Quieres volver al torneo?";
    next;
    menu "Sí.",-,"No.",L_ReNo;
    warp "te_prt_gld",65,245;
    end;
 
L_RePoporing:
    mes "[Bardo]";
    mes "¿Quieres volver al torneo?";
    next;
    menu "Sí.",-,"No.",L_ReNo;
    warp "te_prt_gld",255,65;
    end;
 
L_ReMarin:
    mes "[Bardo]";
    mes "¿Quieres volver al torneo?";
    next;
    menu "Sí.",-,"No.",L_ReNo;
    warp "te_prt_gld",250,250;
    end;
 
L_ReNo:
    mes "[Bardo]";
    mes "¿Y entonces para qué me hablas?";
    close;
 
L_AlreadyStarted:
    emotion 16;
    mes "[Bardo]";
    mes "Lo lamento mucho pero no puedo permitir ningún registro nuevo porque ya comenzó el evento.";
    close;
}
 
te_prt_gld  mapflag nomemo
te_prt_gld  mapflag noreturn
te_prt_gld  mapflag nowarp
te_prt_gld  mapflag nowarpto
te_prt_gld  mapflag nosave
te_prt_gld  mapflag notrade
te_prt_gld  mapflag autotrade
te_prt_gld  mapflag noloot
te_prt_gld  mapflag nodrop
te_prt_gld  mapflag noexp
te_prt_gld  mapflag nopenalty
te_prt_gld  mapflag nochat
te_prt_gld  mapflag novending
te_prt_gld  mapflag nobranch
te_prt_gld  mapflag nightenabled
 
Viewed 835 times, submitted by GallaZ.