// KvM Officerer - Guillaume
// *********************************************************************
bat_room,143,178,5 script KVM 7v7 Officer#1::kvm1_offi_gui 492,{
mes "[KVM Officer]";
if( Bat_Team == 2 )
{
mes "Get out of here you stinky Croix!";
close;
}
if( Bat_Team == 0 )
{
mes "Please sign up for an army with Prince Croix or General Guillaume!";
close;
}
mes "Hello " + strcharinfo(0) + ", let's show the power of the Guillaume Army to those stinky Croixs!";
next;
if( select("I want to join your army!:End Conversation") == 2 )
close;
mes "[KVM Officer]";
if( KvM_RoomDelay >= gettimetick(2) )
{
mes "Since your last reservation was a failure you must wait "+callfunc("Time2Str",KvM_RoomDelay)+". To book a new one";
close;
}
if( #KvM_CoolDelayTimer >= gettimetick(2)) //Cooldowntimer
{
if (#KvM_CoolDelayCount>$KvM_MaxRd){
mes "Cette account � d�j� fait plus de "+$KvM_MaxRd+" KvM cette heure you must wait "+callfunc("Time2Str",#KvM_CoolDelay)+".";
close;
}
//debugmes "CoolDelay check Ok";
}
else {
set #KvM_CoolDelayTimer,gettimetick(2)+3600; //1H delay
set #KvM_CoolDelayCount,0; //raz counter
}
if( BG_Delay_Tick >= gettimetick(2) )
{
mes "You are a Deserter!!";
mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
close;
}
// if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
// if( checkquest(6025,PLAYTIME) != -1 )
if( KvM_BG_Tick >= gettimetick(2) )
{
mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until "+callfunc("Time2Str",KvM_BG_Tick);
next;
mes "[KVM Officer]";
mes "Stand-by for KvM Battle until the time limit passes.";
close;
}
if( BaseLevel < 90 || (Class >= 0 && Class <= 23) || (Class >= 4001 && Class <= 4007) || (Class >= 4023 && Class <= 4045))
{
mes "I'm very please you want to join our army, but I'm sorry: This arena is only for players rebirth and advence char with baselevel >=90.";
close;
}
set .@onlineparty,callfunc("CheckMembers",getcharid(1));
if (.@onlineparty < $KvM1_MinCo){
mes "I'm sorry, But you must have "+$KvM1_MinCo+" players in your party to enter KvM";
close;
}
if ($@KvM1_roomReserved[3]!=0 && $@KvM1_roomReserved[3] != getcharid(1)){
mes "I'm sorry: The room is already reserved at the moment, come back soon to check it out.";
close;
}
if ($@KvM1_roomReserved[2] == getcharid(1) || $@KvM1_roomReserved[3] == getcharid(1) || $@KvM1_roomReserved[4] == getcharid(1)){
mes "I'm sorry: your team as already reserved the room in red side. Please switch side.";
close;
}
mes "Good luck!";
close2;
set $@KvM1_roomReserved[1],getcharid(1); //Party reservation
set .partyname$,strcharinfo(1);
initnpctimer;
//debugmes "Start "+strnpcinfo(0)+" npctimer, time ="+getnpctimer(0)+" remain="+getnpctimer(2);
warp "bat_room",169,224;
end;
OnTimer120000 : //2min timer
set .@userin,getareausers("bat_room",166,220,173,227);
//debugmes strnpcinfo(0)+" 2min check, .@userin="+.@userin+" $KvM1_MinCo="+$KvM1_MinCo;
if ($@KvM1_roomReserved[1] != 0 && .@userin !=0){
if (.@userin >= $KvM1_MinCo) {
initnpctimer; //Ok for the moment
//debugmes "Restart "+strnpcinfo(0)+" npctimer, time ="+getnpctimer(0)+" remain="+getnpctimer(2);
}
else { //Team not ready
mapannounce "bat_room","The team "+.partyname$+" has been kicked out KvM waitingroom, come back when you're ready !!'",1,0x3684FF;
areawarp "bat_room",166,220,173,227,"bat_room",154,149;
getpartymember($@KvM1_roomReserved[1],2);
set .@size,$@partymembercount;
copyarray .@partymemberaid[0],$@partymemberaid[0],.@size;
for (set .@i,0; .@i<.@size; set .@i,.@i+1){
if (attachrid(.@partymemberaid[.@i])==1) { //if attachok
set KvM_RoomDelay,gettimetick(1)+$KvM1_RoomDelay; //90 sec before rego KvM
detachrid;
}
}
stopnpctimer;
set $@KvM1_roomReserved[1], 0;
}
}
else {
stopnpctimer;
set $@KvM1_roomReserved[1], 0; //Free room
}
end;
}
// KvM Officer - Croix
// *********************************************************************
bat_room,143,121,1 script KVM 7v7 Officer#2::kvm1_offi_cro 492,{
mes "[KVM Officer]";
if( Bat_Team == 1 )
{
mes "Get out of here you stupid Guillaume!";
close;
}
if( Bat_Team == 0 )
{
mes "Please sign up for an army with Prince Croix or General Guillaume!";
close;
}
mes "Hello " + strcharinfo(0) + ", let's show the power of the Croix Army to those stinky Guillaumes!";
next;
if( select("I want to join your army!:End Conversation") == 2 )
close;
mes "[KVM Officer]";
if( KvM_RoomDelay >= gettimetick(2) )
{
mes "Since your last reservation was a failure you must wait "+callfunc("Time2Str",KvM_RoomDelay)+". To book a new one";
close;
}
if( #KvM_CoolDelayTimer >= gettimetick(2)) //Cooldowntimer
{
if (#KvM_CoolDelayCount>$KvM_MaxRd){
mes "Cette account � d�j� fait plus de "+$KvM_MaxRd+" KvM cette heure you must wait "+callfunc("Time2Str",#KvM_CoolDelay)+".";
close;
}
//debugmes "CoolDelay check Ok";
}
else {
set #KvM_CoolDelayTimer,gettimetick(2)+3600; //1H delay
set #KvM_CoolDelayCount,0; //raz counter
}
if( BG_Delay_Tick >= gettimetick(2) )
{
mes "You are a Deserter!!";
mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
close;
}
// if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
// if( checkquest(6025,PLAYTIME) != -1 )
if( KvM_BG_Tick >= gettimetick(2) )
{
mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until "+callfunc("Time2Str",KvM_BG_Tick);
next;
mes "[KVM Officer]";
mes "Stand-by for KvM Battle until the time limit passes.";
close;
}
if( BaseLevel < 90 || (Class >= 0 && Class <= 23) || (Class >= 4001 && Class <= 4007) || (Class >= 4023 && Class <= 4045))
{
mes "I'm very please you want to join our army, but I'm sorry: This arena is only for players rebirth and advence char with baselevel >=90.";
close;
}
set .@onlineparty,callfunc("CheckMembers",getcharid(1));
if (.@onlineparty < $KvM1_MinCo){
mes "I'm sorry, But you must have "+$KvM1_MinCo+" people in party to enter KvM";
close;
}
if ($@KvM1_roomReserved[2]!=0 && $@KvM1_roomReserved[2] != getcharid(1)){
mes "I'm sorry: The room is already reserved atm, come back soon to check it out.";
close;
}
if ($@KvM1_roomReserved[1] == getcharid(1) || $@KvM1_roomReserved[3] == getcharid(1) || $@KvM1_roomReserved[4] == getcharid(1)){
mes "I'm sorry: your team as already reserved the room in blue side. Please switch side.";
close;
}
mes "Good luck!";
close2;
set $@KvM1_roomReserved[2],getcharid(1); //Party reservation
set .partyname$,strcharinfo(1);
initnpctimer;
//debugmes "Start "+strnpcinfo(0)+" npctimer, time ="+getnpctimer(0)+" remain="+getnpctimer(2);
warp "bat_room",169,207;
end;
OnTimer120000 : //2min timer
set .@userin,getareausers("bat_room",166,204,173,211);
//debugmes strnpcinfo(0)+" 2min check, .@userin="+.@userin+" $KvM1_MinCo="+$KvM1_MinCo;
if ($@KvM1_roomReserved[2] != 0 && .@userin !=0){
if (.@userin >= $KvM1_MinCo) {
initnpctimer; //Ok for the moment
//debugmes "Restart "+strnpcinfo(0)+" npctimer, time ="+getnpctimer(0)+" remain="+getnpctimer(2);
}
else { //Team not ready
mapannounce "bat_room","The team "+.partyname$+" has been kicked out KvM waitingroom, come back when you're ready !!'",1,0x3684FF;
areawarp "bat_room",166,204,173,211,"bat_room",154,149;
getpartymember($@KvM1_roomReserved[2],2);
set .@size,$@partymembercount;
copyarray .@partymemberaid[0],$@partymemberaid[0],.@size;
for (set .@i,0; .@i<.@size; set .@i,.@i+1){
if (attachrid(.@partymemberaid[.@i])==1) { //if attachok
set KvM_RoomDelay,gettimetick(1)+$KvM1_RoomDelay; //90 sec before rego KvM
detachrid;
}
}
stopnpctimer;
set $@KvM1_roomReserved[2], 0;
}
}
else {
stopnpctimer;
set $@KvM1_roomReserved[2], 0; //Free room
}
end;
}