Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script assault -1,{
- OnInit:
- disablenpc "assault_register";
- end;
- OnWhisperGlobal:
- if ( compare( @whispervar0$, "on" ) == 0 ) end;
- if ( .assault_on == 1 ) {
- dispbottom "event has started";
- end;
- }
- else if ( .assault_on == 2 ) {
- dispbottom "event is going on";
- end;
- }
- announce "assault event will start, the 1st two guilds that register will be participated in this event", 0;
- set .assault_on, 1;
- enablenpc "assault_register";
- end;
- Onstart:
- set .assault_on, 2;
- mapannounce "bat_a01", "gogogo", 0;
- monster "bat_a01",173,346,"EMPERIUM",1288,1,"assault::OnBlueempdead"; // blue team
- monster "bat_a01",165,50,"EMPERIUM",1288,1,"assault::OnRedempdead"; // red team
- end;
- OnRedempdead:
- killmonsterall "bat_a01";
- if ( getcharid(2) == .red ) {
- set .redscore, .redscore -1;
- if ( .redscore < 0 ) set .redscore, 0;
- announce " red team kill its own emperium, minue 1 point", 1;
- }
- else {
- set .bluescore, .bluescore +1 ;
- announce " blue team score a point !["+ .bluescore +"]", 1;
- }
- if ( .bluescore == 5 ) {
- announce " blue team has won this game !", 1;
- mapwarp "bat_a01", "prontera", 155, 183;
- set .assault_on, 0;
- }
- else {
- monster "bat_a01",173,346,"EMPERIUM",1288,1,"assault::OnBlueempdead"; // blue team
- monster "bat_a01",165,50,"EMPERIUM",1288,1,"assault::OnRedempdead"; // red team
- warpguild "bat_a01", 157,346, .blue;
- warpguild "bat_a01", 147,49, .red;
- }
- end;
- OnBlueempdead:
- killmonsterall "bat_a01";
- if ( getcharid(2) == .blue ) {
- set .bluescore, .bluescore -1;
- if ( .bluescore < 0 ) set .bluescore, 0;
- announce " blue team kill its own emperium, minue 1 point", 1;
- }
- else {
- set .redscore, .redscore +1 ;
- announce "red team score a point !["+ .redscore +"]", 1;
- }
- if ( .redscore == 5 ) {
- announce "red team has won this game !", 1;
- mapwarp "bat_a01", "prontera", 155, 183;
- set .assault_on, 0;
- }
- else {
- monster "bat_a01",173,346,"EMPERIUM",1288,1,"assault::OnBlueempdead"; // blue team
- monster "bat_a01",165,50,"EMPERIUM",1288,1,"assault::OnRedempdead"; // red team
- warpguild "bat_a01", 157,346, .blue;
- warpguild "bat_a01", 147,49, .red;
- }
- end;
- }
- prontera,156,179,5 script assault_register 100,{
- mes "register ?";
- next;
- if ( select ("yes:no") == 2 ) close;
- if ( getvariableofnpc( .red, "assault" ) ) {
- set getvariableofnpc( .blue, "assault" ), getcharid(2);
- announce strcharinfo(2) +" has register as blue team, event will start immediately", 0;
- donpcevent "assault::Onstart";
- warpguild "bat_a01", 157,346, getvariableofnpc( .blue, "assault" );
- warpguild "bat_a01", 147,49, getvariableofnpc( .red, "assault" );
- disablenpc strnpcinfo(0);
- close;
- }
- else {
- set getvariableofnpc( .red, "assault" ), getcharid(2);
- announce strcharinfo(2) +" has register as red team, anyone else going to register as blue team ?", 0;
- close;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement