viewing paste Unknown #120 | 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
prontera,150,177,5  script  League of Legends   120,{
 
    mes "[^FF7700League of Legends^000000]";
    mes "Welcome summoner!";
    mes "";
    mes "Team 1: "+((.team1name$=="")?"^FF0000-none-^000000":"^0077FF"+.team1name$+"^000000");
    mes "Team 2: "+((.team2name$=="")?"^FF0000-none-^000000":"^0077FF"+.team2name$+"^000000");
    next;
    switch(select("Registry:Remove registry:Exit"))
    {
        case 1:
            if(.team1$!="" && .team2$!="")
            {
                mes "[^FF7700League of Legends^000000]";
                mes "Two teams already registered.";
                close;
            }
            else if(.team1name$==getpartyname(getcharid(1)) || .team2name$==getpartyname(getcharid(1)))
            {
                mes "[^FF7700League of Legends^000000]";
                mes "Your team is already registered.";
                close;
            }
            else if(getpartyleader(getcharid(1),2)!=getcharid(0))
            {
                mes "[^FF7700League of Legends^000000]";
                mes "Only the party leader can register.";
                close;
            }
            else
            {
                getpartymember(getcharid(1));
                set @partymembercount,$@partymembercount;
                /*if (@partymembercount<5)
                {
                    mes "[^FF7700League of Legends^000000]";
                    mes "You need 5 partymembers to register!";
                    close;
                }*/
                if(.team1name$=="")
                {
                    set .team1name$, getpartyname(getcharid(1));
                    copyarray .team1players$[0],$@partymembername$[0],@partymembercount;
                    set .team1id$, getcharid(0);
                }
                else
                {
                    set .team2name$, getpartyname(getcharid(1));
                    copyarray .team2players$[0],$@partymembername$[0],@partymembercount;
                    set .team2id$, getcharid(0);
                }
                mes "[^FF7700League of Legends^000000]";
                mes "Your team is registered now.";
                announce "Team "+getpartyname(getcharid(1))+" has registered for League of Legends.",0,0xFF7700;
                close2;
                sleep2 5000;
                if(.team1name$!="" && .team2name$!="")
                {
                    announce "Both Teams registered for League of Legends. You have 5 minutes to enter the match now.",0,0xFF7700;
                    initnpctimer;
                    end;
                }
                end;
            }
            
        case 2:
            if(.team1name$==getpartyname(getcharid(1)))
            {
                deletearray .team1$[0],getarraysize(.team1$);
                set .team1name$, "";
                mes "[^FF7700League of Legends^000000]";
                mes "Registry removed.";
                close;
            }
            else if(.team2name$==getpartyname(getcharid(1)))
            {
                deletearray .team2$[0],getarraysize(.team2$);
                set .team2name$, "";
                mes "[^FF7700League of Legends^000000]";
                mes "Registry removed.";
                close;
            }
            else
            {
                mes "[^FF7700League of Legends^000000]";
                mes "You aren't registered.";
                close;
            }
            
        case 3:
            mes "[^FF7700League of Legends^000000]";
            mes "Goodbye!";
            close;
    }
    
OnTimer300000:
    announce "One Team didn't show up for League of Legends. Resetting Registry...",0,0xFF7700;
    deletearray .team1players$[0],getarraysize(.team1players$);
    set .team1name$, "";
    deletearray .team2players$[0],getarraysize(.team2players$);
    set .team2name$, "";
    end;
}
Viewed 635 times, submitted by Guest.