Перейти к содержанию

BG KVM


Рекомендуемые сообщения

Хочется добавить в очередь KVM арену "Free For All" в авто-очередь.

Проверьте пожалуйста, правильно ли я всё сделал. Вот кусок кода.

// Battleground Queue Admin

// *********************************************************************

- script BG_Queue_Join -1,{

end;

OnInit:

// Configuration

// *****************************************************

// Battleground Rotation - Main NPC name

setarray .BG_Arenas$[0], "Flavius_TD","Conquest", "Rush", "FFA_Arena";

// Battleground Arena Name - for announcements

setarray .BG_Names$[0], "Team DeathMatch", "Conquest", "Rush", "KVM";

// Minimum Players to start the BG

setarray .BG_Min[0], 2, 2, 2, 3;

// Maximum Players per Team

setarray .BG_Max[0], 35, 35, 35, 35;

// BG Message Colors

setarray .BG_Color$[0], "0x808000", "0xFFA500", "0xDDA0DD", "0x483D8B";

// Team Building Mode : 0 = Lineal | 1 = Random | 2 = Class Priority | 3 = Faction Mode | 4 = Team Color ( by script set Bat_Team,N; )

set .TeamMode, 0;

// Main Code

// *****************************************************

set .BG_Count, getarraysize(.BG_Arenas$);

set .BG_Queue, bg_queue_create("Battleground Arena","BG_Queue_Join::OnJoinEvent",200);

set .VS_Queue, bg_queue_create("Free For All Arena","BG_Queue_Join::OnVersusJoin",200);

// Move to Next Arena

if( $BG_Index >= .BG_Count ) set $BG_Index,0; // Restart Rotation

set .BG_Arena$,.BG_Arenas$[$BG_Index];

set .Ready, 1;

donpcevent "BG_Queue_Join::OnDoHappyHour";

initnpctimer; // Rotation if BG don't start... Comment if you don't want to use this method

// Comment the next two lines if you don't want to allow @joinbg and @leavebg commands.

bindatcmd "joinbg","BG_Queue_Join::OnDoJoin",0,99;

bindatcmd "bg","BG_Queue_Join::OnDoJoin",0,99;

bindatcmd "leavebg","BG_Queue_Join::OnDoLeave",0,99;

end;

OnDoJoin: // @joinbg

if (BaseLevel<200) {

dispbottom "[sorry, as you will gather 200+ level, come to participate in fights!]";

end;

}

if( checkquest(8506,PLAYTIME) == 2 )

erasequest 8506;

if( checkquest(8506,PLAYTIME) != -1 )

{

dispbottom "[You are a Deserter. You can't participate until the indicator goes off]";

end;

}

if( .BG_Arena$ == "FFA_Arena" ){

bg_queue_join .VS_Queue;

end;

}

bg_queue_join .BG_Queue;

end;

OnDoLeave: // @leavebg

if( .BG_Arena$ == "FFA_Arena" ){

bg_queue_leave .VS_Queue;

end;

}

bg_queue_leave .BG_Queue;

end;

Ссылка на комментарий
Поделиться на другие сайты

Ошибок нет никаких. Прикол в том, что нас закидывает в отдельную очередь от остальных бг и когда набирается нужное кол-во участников, то пишется "BattleGround -- Free For All -- Begining" и ничего при этом не происходит.

Ссылка на комментарий
Поделиться на другие сайты

Ну сперва я обратил внимание на


setarray .BG_Arenas$[0], "Flavius_TD","Conquest", "Rush", "FFA_Arena";

и


if( .BG_Arena$ == "FFA_Arena" ){
bg_queue_join .VS_Queue;
end;
}


if( .BG_Arena$ == "FFA_Arena" ){
bg_queue_leave .VS_Queue;
end;
}

но потом понял, что это о командах

Телепортнись в bat_c05 и проверь там наличие аннонса

-- Free For All - Starting in 10 seconds --

Ссылка на комментарий
Поделиться на другие сайты

×
×
  • Создать...
Яндекс.Метрика