Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Author-Script Goddameit My forum : http://bit.ly/MDuQ9F
- //Author-Map TrojanWorm
- //Version 2012-10-31
- //Don't re-release in anywhere and anyway
- //////////////////////////////////////////////////////////////////////////
- pvp_n_1-3 mapflag battleground 2
- pvp_n_1-3,53,99,0 script #BattleGroundwarpA2 100,{
- end;
- OnInit:
- waitingroom "Join Team Angel(Click)",2,"#BattleGroundwarpA2::OnJoin",1;
- end;
- OnJoin:
- if(!$@bg_id_a)
- set $@bg_id_a,waitingroom2bg("pvp_n_1-3",60,100,"","");
- else
- waitingroom2bg_single($@bg_id_a,"pvp_n_1-3",60,100,"#BattleGroundwarpA2");
- warpwaitingpc "pvp_n_1-3",60,100;
- end;
- }
- pvp_n_1-3,146,99,0 script #BattleGroundwarpB2 100,{
- end;
- OnInit:
- waitingroom "Join Team Demon(Click)",2,"#BattleGroundwarpB2::OnJoin",1;
- end;
- OnJoin:
- if(!$@bg_id_b)
- set $@bg_id_b,waitingroom2bg("pvp_n_1-3",139,100,"","");
- else
- waitingroom2bg_single($@bg_id_b,"pvp_n_1-3",139,100,"#BattleGroundwarpB2");
- warpwaitingpc "pvp_n_1-3",139,100;
- end;
- }
- pvp_n_1-3,66,99,0 script #BattleGroundwarpA1 45,2,2,{
- warp "pvp_n_1-3",82,99;
- end;
- }
- pvp_n_1-3,132,100,0 script #BattleGroundwarpB1 45,2,2,{
- warp "pvp_n_1-3",117,100;
- end;
- }
- yuno,154,179,4 script Demon VS Angel 100,{
- if(.status==2)
- {
- mes "Game is running.";
- close;
- }
- if(.status==1)
- {
- if(.playernm>=128)
- {
- mes "Sorry, full";
- close;
- }
- select("Join");
- if(!.playerid[1])
- {
- //callsub OnEndd;
- initnpctimer;
- }
- set .playernm,.playernm+1;
- set .playerid[.playernm],getcharid(0);
- mes "Complete";
- close;
- }
- end;
- OnClock0100:
- OnClock0300:
- OnClock0500:
- OnClock0700:
- OnClock0900:
- OnClock1100:
- OnClock1300:
- OnClock1500:
- OnClock1700:
- //OnClock1900:
- //OnClock2100:
- OnClock2300:
- callsub OnActive;
- end;
- OnActive:
- callsub OnEndd;
- set .status,1;
- enablenpc "Demon VS Angel";
- Announce "[Demon VS Angel]:Someone active the Angel vs Demon Game! Go to @GO pvp and join us!",0;
- Announce "[Demon VS Angel]:Prize is Poring Coin! Go to @GO pvp and join us!",0;
- end;
- OnTimer60000:
- if(.playernm<=32)
- {
- Announce "[Demon VS Angel]:Sorry, player amount isn't enough",0;
- callsub OnEndd;
- end;
- }
- Announce "[Demon VS Angel]:Angel vs Demon Event is ready!",0;
- for(set .@i,1;.@i<=.playernm;set .@i,.@i+1)
- {
- if(.@i%2==0)
- warpchar "pvp_n_1-3",59,99,.playerid[.@i];
- else
- warpchar "pvp_n_1-3",139,99,.playerid[.@i];
- }
- callsub OnEnab2;
- end;
- OnTimer90000:
- set .status,2;
- Announce "[Demon VS Angel]:Go!",0;
- bg_monster $@bg_id_a,"pvp_n_1-3",99,139,"Angel",1907,"Demon VS Angel::OnAdestory";
- bg_monster $@bg_id_b,"pvp_n_1-3",99,59,"Demon",1907,"Demon VS Angel::OnBdestory";
- callsub OnEnab1;
- end;
- OnTimer600000:
- if(.point[1]>.point[2])
- {
- for( set .@i,1; .playerid[.@i]; set .@i,.@i+1 )
- {
- if( attachrid(.playerid[.@i]) )
- {
- if( getcharid(4) == $@bg_id_a )
- getitem 7539,10;
- }
- }
- Announce "[Demon VS Angel]:Team Angel Win!",0;
- }
- else if(.point[2]>.point[1])
- {
- for( set .@i,1; .playerid[.@i]; set .@i,.@i+1 )
- {
- if( attachrid(.playerid[.@i]) )
- {
- if( getcharid(4) == $@bg_id_a )
- getitem 7539,10;
- }
- }
- Announce "[Demon VS Angel]:Team Demon Win!",0;
- }else
- {
- Announce "[Demon VS Angel]:Draw!",0;
- }
- sleep2 3000;
- callsub OnEndd;
- end;
- OnBdestory:
- set .point[1],.point[1]+5;
- set .point[2],.point[2]-3;
- bg_updatescore "pvp_n_1-3",.point[1],.point[2];
- detachrid;
- sleep2 5000;
- bg_monster $@bg_id_b,"pvp_n_1-3",99,59,"Demon",1907,"Demon VS Angel::OnBdestory";
- end;
- OnAdestory:
- set .point[2],.point[2]+5;
- set .point[1],.point[1]-3;
- bg_updatescore "pvp_n_1-3",.point[1],.point[2];
- detachrid;
- sleep2 5000;
- bg_monster $@bg_id_a,"pvp_n_1-3",99,139,"Angel",1907,"Demon VS Angel::OnAdestory";
- end;
- OnEndd:
- set .status,0;
- bg_destroy $@bg_id_a;
- bg_destroy $@bg_id_b;
- set $@bg_id_a,0;
- set $@bg_id_b,0;
- setarray .point[1],0,0;
- killmonsterall "pvp_n_1-3";
- bg_updatescore "pvp_n_1-3",.point[1],.point[2];
- deletearray .playerid[0],128;
- mapwarp "pvp_n_1-3","turbo_room",99,113;
- disablenpc "Demon VS Angel";
- callsub OnDisa;
- return;
- OnEnab1:
- enablenpc "#BattleGroundwarpA1";
- enablenpc "#BattleGroundwarpB1";
- return;
- OnEnab2:
- enablenpc "#BattleGroundwarpA2";
- enablenpc "#BattleGroundwarpB2";
- disablenpc "Demon VS Angel";
- return;
- OnDisa:
- disablenpc "#BattleGroundwarpA1";
- disablenpc "#BattleGroundwarpB1";
- disablenpc "#BattleGroundwarpA2";
- disablenpc "#BattleGroundwarpB2";
- return;
- OnInit:
- sleep2 10000;
- setwall "pvp_n_1-3",69,96,8,0,0,"BattleGroundwarpA21";
- setwall "pvp_n_1-3",70,97,6,0,0,"BattleGroundwarpA22";
- setwall "pvp_n_1-3",71,97,6,0,0,"BattleGroundwarpA23";
- setwall "pvp_n_1-3",72,97,6,0,0,"BattleGroundwarpA24";
- setwall "pvp_n_1-3",73,97,6,0,0,"BattleGroundwarpA25";
- setwall "pvp_n_1-3",74,97,6,0,0,"BattleGroundwarpA26";
- setwall "pvp_n_1-3",75,97,6,0,0,"BattleGroundwarpA27";
- setwall "pvp_n_1-3",76,97,6,0,0,"BattleGroundwarpA28";
- setwall "pvp_n_1-3",129,97,6,0,0,"BattleGroundwarpB21";
- setwall "pvp_n_1-3",130,96,8,0,0,"BattleGroundwarpB22";
- setwall "pvp_n_1-3",128,97,6,0,0,"BattleGroundwarpB23";
- setwall "pvp_n_1-3",127,97,6,0,0,"BattleGroundwarpB24";
- setwall "pvp_n_1-3",126,97,6,0,0,"BattleGroundwarpB25";
- setwall "pvp_n_1-3",125,97,6,0,0,"BattleGroundwarpB26";
- setwall "pvp_n_1-3",124,97,6,0,0,"BattleGroundwarpB27";
- setwall "pvp_n_1-3",123,97,6,0,0,"BattleGroundwarpB28";
- callsub OnEndd;
- end;
- OnPCKillEvent:
- if(strcharinfo(3)=="pvp_n_1-3" && $@bg_id_a && $@bg_id_b)
- {
- if(getcharid(4) == $@bg_id_a)
- {
- set .point[1],.point[1]+1;
- }else
- set .point[2],.point[2]+1;
- bg_updatescore "pvp_n_1-3",.point[1],.point[2];
- }
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement