viewing paste Unknown #12494 | 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
//
//
//  Author      Goddameit
//  Version     2014/02/22
//  Web__       http://goo.gl/0vY9GV
//
//
aretnorp,178,351,3  script  BG DoTa 572,{
    if( getgroupid() >= 99 )
    {
        if( select("Do Reset","None") == 1 )
            donpcevent strnpcinfo(0)+"::onresett";
    }
    if(.game_status==1||.game_status==2)
    {
        mes "Sorry, game is running";
        close;
    }
    if(select("Join","Cancel")==2)
        close;
    if(.dat_join>=120)
    {
        mes "Sorry, full";
        close;
    }
    for(.@i=1;.@i<=.dat_join;.@i++)
        if(.dat_aid[.@i]==getcharid(3))
        {
            mes "You already join in.";
            close;
        }
    .dat_join += 1;
    .dat_aid[.dat_join] = getcharid(3);
    bg_leave;
    mes "Done";
    close2;
    if( .dat_join < 10 )
        announce "[BG DoTa]: Player Amount : ["+.dat_join+"/10]",0;
    if( .dat_join >= 10 && .active == 0 )
    {
        initnpctimer;
        killmonsterall "dota01";
        .active = 1;
        bg_destroy .dat_bgid1;
        bg_destroy .dat_bgid2;
        .dat_bgid1 = 0;
        .dat_bgid2 = 0;
        mapwarp "dota01","aretnorp",196,244;
        announce "[BG DoTa]: Game Active",0;
    }
    end;
onleave:
    bg_leave;
    end;
OnTimer1000:
    .game_status = 1;
    .@npcname$ = strnpcinfo(0);
    announce "[BG DoTa]: Game Start",0;
    .dat_bgid1 = bg_teamcreate("dota01",24,33,.@npcname$+"::onleave","");
    .dat_bgid2 = bg_teamcreate("dota01",362,342,.@npcname$+"::onleave","");
    for(.@i=1;.@i<=.dat_join;.@i++)
        if(.@i%2)
            bg_teamjoin(.dat_bgid1,.dat_aid[.@i]);
        else
            bg_teamjoin(.dat_bgid2,.dat_aid[.@i]);
    bg_warp .dat_bgid1,"dota01",24,33;
    bg_warp .dat_bgid2,"dota01",362,342;
    end;
onresett:
    .dat_join = 0;
    .active = 0;
    .game_status = 0;
    deletearray .dat_aid[0],128;
    bg_destroy .dat_bgid1;
    bg_destroy .dat_bgid2;
OnInit:
    mapwarp "dota01","prontera",150,180;
    end;
OnTimer2000:
// 3215//3218
    .@npcname$ = strnpcinfo(0);
    set .gid_astone,bg_monster(.dat_bgid1,"dota01",68,48,"",1258,.@npcname$+"::onbgaloss");
    set .gid_aline1[0],bg_monster(.dat_bgid1,"dota01",38,123,"",1900,.@npcname$+"::onlinea1b3");
    set .gid_aline1[1],bg_monster(.dat_bgid1,"dota01",35,170,"",1900,.@npcname$+"::onlinea1b2");
    set .gid_aline1[2],bg_monster(.dat_bgid1,"dota01",39,246,"",1900,.@npcname$+"::onlinea1b1");
    set .gid_aline2[0],bg_monster(.dat_bgid1,"dota01",104,80,"",1900,.@npcname$+"::onlinea2b3");
    set .gid_aline2[1],bg_monster(.dat_bgid1,"dota01",115,111,"",1900,.@npcname$+"::onlinea2b2");
    set .gid_aline2[2],bg_monster(.dat_bgid1,"dota01",160,157,"",1900,.@npcname$+"::onlinea2b1");
    set .gid_aline3[0],bg_monster(.dat_bgid1,"dota01",135,25,"",1900,.@npcname$+"::onlinea3b3");
    set .gid_aline3[1],bg_monster(.dat_bgid1,"dota01",181,25,"",1900,.@npcname$+"::onlinea3b2");
    set .gid_aline3[2],bg_monster(.dat_bgid1,"dota01",332,27,"",1900,.@npcname$+"::onlinea3b1");
    set .gid_bstone,bg_monster(.dat_bgid2,"dota01",318,313,"",1189,.@npcname$+"::onbgbloss");
    set .gid_bline1[0],bg_monster(.dat_bgid2,"dota01",275,362,"",1016,.@npcname$+"::onlineb1b3");
    set .gid_bline1[1],bg_monster(.dat_bgid2,"dota01",205,356,"",1016,.@npcname$+"::onlineb1b2");
    set .gid_bline1[2],bg_monster(.dat_bgid2,"dota01",89,351,"",1016,.@npcname$+"::onlineb1b1");
    set .gid_bline2[0],bg_monster(.dat_bgid2,"dota01",359,264,"",1016,.@npcname$+"::onlineb2b3");
    set .gid_bline2[1],bg_monster(.dat_bgid2,"dota01",360,203,"",1016,.@npcname$+"::onlineb2b2");
    set .gid_bline2[2],bg_monster(.dat_bgid2,"dota01",358,157,"",1016,.@npcname$+"::onlineb2b1");
    set .gid_bline3[0],bg_monster(.dat_bgid2,"dota01",275,280,"",1016,.@npcname$+"::onlineb3b3");
    set .gid_bline3[1],bg_monster(.dat_bgid2,"dota01",261,234,"",1016,.@npcname$+"::onlineb3b2");
    set .gid_bline3[2],bg_monster(.dat_bgid2,"dota01",236,203,"",1016,.@npcname$+"::onlineb3b1");
    setmobnoattackable .gid_astone,1;
    setmobnowalkable .gid_astone,1;
    setmobnoattackable .gid_bstone,1;
    setmobnowalkable .gid_bstone,1;
    for(.@i=1;.@i<=3;.@i++)
        for(.@j=0;.@j<3;.@j++)
        {
            setmobnowalkable getd(".gid_bline"+.@i+"["+.@j+"]"),1;
            setmobnowalkable getd(".gid_aline"+.@i+"["+.@j+"]"),1;
            if(.@j!=2)
            {
                setmobnoattackable getd(".gid_bline"+.@i+"["+.@j+"]"),1;
                setmobnoattackable getd(".gid_aline"+.@i+"["+.@j+"]"),1;
            }
        }
    end;
//-----------------------------------------
onbgaloss:
    mapwarp "dota01","aretnorp",196,244;
    sleep2 5000;
    bg_warp .dat_bgid2,"dota01",390,8;
    initnpctimer "BG DoTa Reward";
    end;
//-----------------------------------------
onbgbloss:
    mapwarp "dota01","aretnorp",196,244;
    sleep2 5000;
    bg_warp .dat_bgid1,"dota01",390,8;
    initnpctimer "BG DoTa Reward";
    end;
 
//-----------------------------------------
onlinea1b3:
onlinea2b3:
onlinea3b3:
    .game_status = 2;
    setmobnoattackable .gid_astone,0;
    end;
onlinea1b2:
    setmobnoattackable .gid_aline1[0],0;
    end;
onlinea1b1:
    setmobnoattackable .gid_aline1[1],0;
    end;
onlinea2b2:
    setmobnoattackable .gid_aline2[0],0;
    end;
onlinea2b1:
    setmobnoattackable .gid_aline2[1],0;
    end;
onlinea3b2:
    setmobnoattackable .gid_aline3[0],0;
    end;
onlinea3b1:
    setmobnoattackable .gid_aline3[1],0;
    end;
//-----------------------------------------
onlineb1b3:
onlineb2b3:
onlineb3b3:
    .game_status = 2;
    setmobnoattackable .gid_bstone,0;
    end;
onlineb1b2:
    setmobnoattackable .gid_bline1[0],0;
    end;
onlineb1b1:
    setmobnoattackable .gid_bline1[1],0;
    end;
onlineb2b2:
    setmobnoattackable .gid_bline2[0],0;
    end;
onlineb2b1:
    setmobnoattackable .gid_bline2[1],0;
    end;
onlineb3b2:
    setmobnoattackable .gid_bline3[0],0;
    end;
onlineb3b1:
    setmobnoattackable .gid_bline3[1],0;
    end;
//-----------------------------------------
}
dota01,390,8,4  script  BG DoTa Reward  100,{
    getitem 7905,50;
    getitem 12189,5;
    warp "aretnorp",184,351;
    end;
OnTimer20000:
    donpcevent "BG DoTa::onresett";
    end;
}
dota01  mapflag battleground
dota01  mapflag nosave
dota01  mapflag noreturn
dota01  mapflag nobranch
dota01  mapflag pvp_noguild
dota01  mapflag partylock
dota01  mapflag nowarp
dota01  mapflag novending
dota01  mapflag noteleport
dota01  mapflag nomemo
 
 
 
 
 
 
//aretnorp,177,352,3    duplicate(BG DoTa)  BG Register#h1-1    572
Viewed 849 times, submitted by karazu.