- script custom_bg#control -1,{
OnInit:
set .minplayer2start, 2; // minimum player to start
setarray .rewarditem,
23108,20, // reward to the winning team
23108,10; // reward to the losing team
set .startingscore, 99; // score at start
set .eventlasting, 120; // event last 100 seconds
end;
OnStart:
if ( getwaitingroomstate( 0, ".red1npcname$" ) < .minplayer2start || getwaitingroomstate( 0, ".blue1npcname$" ) < .minplayer2start ) end;
set .red1, waitingroom2bg( "endless_war",64,86, strnpcinfo(0)+"::OnredQuit", strnpcinfo(0)+"::OnredDead", ".red1npcname$" );
copyarray .team11aid[.@i], $@arenamembers[.@i], $@arenamembersnum;
set .blue1, waitingroom2bg( "endless_war",191,86, strnpcinfo(0)+"::OnblueQuit", strnpcinfo(0)+"::OnblueDead", ".blue1npcname$" );
copyarray .team22aid[.@i], $@arenamembers[.@i], $@arenamembersnum;
delwaitingroom ".red1npcname$";
delwaitingroom ".blue1npcname$";
disablenpc .red1npcname$;
disablenpc .blue1npcname$;
bg_warp .red1, "endless_war", 64,86;
bg_warp .blue1, "endless_war", 191,86;
sleep2 3000;
mapannounce "endless_war", "[Clan War] : Clan with most kills within 2 mins wins!",0;
set .score[1], .startingscore;
set .score[2], .startingscore;
bg_updatescore "endless_war", .score[1], .score[2];
sleep .eventlasting * 1000;
if ( .score[1] == .score[2] )
mapannounce "endless_war", "[Clan War] : The war has been declared draw!",0;
else if ( .score[1] > .score[2] ) {
mapannounce "endless_war", "[Clan War] : The Troll Clan has won the war!", 0;
callsub L_reward, 1, 0;
callsub L_reward, 2, 2;
}
else if ( .score[1] < .score[2] ) {
mapannounce "endless_war", "[Clan War] : The Fairy Clan has won the war!", 0;
callsub L_reward, 2, 0;
callsub L_reward, 1, 2;
}
bg_warp .red1, "crystilia" ,68,77;
bg_warp .blue1, "mellina", 70,72;
bg_destroy .red1;
bg_destroy .blue1;
enablenpc .red1npcname$;
enablenpc .blue1npcname$;
donpcevent ".red1npcname$::OnStart";
donpcevent ".blue1npcname$::OnStart";
end;
L_reward:
set .@size, getarraysize( getd(".team"+ getarg(0) +"aid") );
for ( set .@i, 0; .@i < .@size; set .@i, .@i +1 )
if ( isloggedin( getd(".team"+ getarg(0) +"aid["+ .@i +"]" ) ) )
getitem .rewarditem[ getarg(1) ], .rewarditem[ getarg(1) +1 ], getd(".team"+ getarg(0) +"aid["+ .@i +"]" );
return;
OnredDead: callsub L_dead, 1;
OnblueDead: callsub L_dead, 2;
L_dead:
set .score[ getarg(0) ], .score[ getarg(0) ] -1;
bg_updatescore "endless_war", .score[1], .score[2];
if ( .score[ getarg(0) ] == 0 )
awake strnpcinfo(0);
end;
OnredQuit: callsub L_quit, 1, .red1;
OnblueQuit: callsub L_quit, 2, .blue1;
L_quit:
if ( bg_get_data( getarg(1), 0) ) end;
set .score[ getarg(0) ], 0;
awake strnpcinfo(0);
end;
}
crystilia,62,87,5 script Troll Clan #custom_bg 468,{
end;
OnInit:
sleep 1;
set getvariableofnpc( .red1npcname$, "custom_bg#control" ), strnpcinfo(0);
OnStart:
waitingroom "Kill War", getvariableofnpc( .minplayer2start, "custom_bg#control" ), strnpcinfo(0)+"::OnJoin",1;
end;
OnJoin:
announce "[Clan War] : Troll Clan side has ["+ getwaitingroomstate(0) +"/"+ getvariableofnpc( .minplayer2start, "custom_bg#control" ) +"] Users. ( Kill War )",0;
donpcevent "custom_bg#control::OnStart";
end;
//OnInit:
// waitingroom "Kill War", getvariableofnpc( .minplayer2start, "custom_bg#control" ), "custom_bg#control::OnStart", getvariableofnpc( .minplayer2start, "custom_bg#control" );
// end;
}
mellina,63,74,5 script Fairy Clan #custom_bg 435,{
end;
OnInit:
sleep 1;
set getvariableofnpc( .blue1npcname$, "custom_bg#control" ), strnpcinfo(0);
OnStart:
waitingroom "Kill War", getvariableofnpc( .minplayer2start, "custom_bg#control" ), strnpcinfo(0)+"::OnJoin",1;
end;
OnJoin:
announce "[Clan War] : Fairy Clan side has ["+ getwaitingroomstate(0) +"/"+ getvariableofnpc( .minplayer2start, "custom_bg#control" ) +"] Users. ( Kill War )",0;
donpcevent "custom_bg#control::OnStart";
end;
//OnInit:
// waitingroom "Kill War", getvariableofnpc( .minplayer2start, "custom_bg#control" ), "custom_bg#control::OnStart", getvariableofnpc( .minplayer2start, "custom_bg#control" );
// end;
}
endless_war mapflag battleground 2
endless_war mapflag nosave SavePoint
endless_war mapflag nowarp
endless_war mapflag nowarpto
endless_war mapflag noteleport
endless_war mapflag nomemo
endless_war mapflag nopenalty
endless_war mapflag nobranch
endless_war mapflag noicewall
does anybody have any idea why this script it not working? or is there any some kind of mistake here? when the minimum required player is set like 2/2 and the other side has 2/2 also... it doesnt do anything.. like the it doesn't warp me to the endless_war area?
Question
caspa
does anybody have any idea why this script it not working? or is there any some kind of mistake here? when the minimum required player is set like 2/2 and the other side has 2/2 also... it doesnt do anything.. like the it doesn't warp me to the endless_war area?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.