123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373 |
- //===== rAthena Script =======================================
- //= Système de Champs de Bataille - KvM 80-99
- //===== Description: =========================================
- //= [Conversion Officielle]
- //= Champs de Bataille Kreiger Von Midgard pour les niveaux 80 à 99
- //= - Équipe victorieuse : 5 points
- //= - Équipe perdante : 1 point
- //===== Historique des modifications: ========================
- //= 1.0 Première version. [L0ne_W0lf]
- //= 1.1 Mise à jour depuis les fichiers Aegis officiels. [L0ne_W0lf]
- //= 1.2 Mise à jour des annonces et dialogues depuis iRO.
- //= Légère modification du fonctionnement du tableau des scores.
- //= Suppression des soins de zone, et autres détails mineurs.
- //= 1.3 Ajout des vérifications de configuration pour activer l’interface de file d’attente ou l’ancienne méthode. [Aleos]
- //===== Traduit par OverSu et Liara ==========================
- // PNJ de la Salle d’Attente
- //============================================================
- bat_room,169,226,5 script Salle d’Attente KvM#a::KvM01R_Guillaume 418,{
- end;
- OnInit:
- waitingroom "Poste de Combat - 5 Joueurs",6,"KvM01_BG_Out::OnGuillaumeJoin",1;
- end;
- OnEnterBG:
- set $@KvM01BG_id1, waitingroom2bg("bat_c01",52,129,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
- end;
- }
- bat_room,169,205,3 script Salle d’Attente KvM#b::KvM01R_Croix 414,{
- end;
- OnInit:
- waitingroom "Poste de Combat - 5 Joueurs",6,"KvM01_BG_Out::OnCroixJoin",1;
- end;
- OnEnterBG:
- set $@KvM01BG_id2, waitingroom2bg("bat_c01",147,55,"KvM01_BG::OnCroixQuit","KvM01_BG::OnCroixDie");
- end;
- }
- bat_room,169,220,0 warp2 #kvm801 2,2,bat_room,154,150
- bat_room,169,211,0 warp2 #kvm802 2,2,bat_room,154,150
- // Lignes de Départ
- //============================================================
- - script KVM01::EffetCellule -1,{
- end;
- OnKvM01One:
- specialeffect EF_CHANGECOLD;
- end;
- OnKvM01Two:
- specialeffect EF_CHANGEPOISON;
- end;
- }
- bat_c01,54,124,3 duplicate(EffetCellule) #CelluleRougeA1-1 139
- bat_c01,55,124,3 duplicate(EffetCellule) #CelluleRougeA2-1 139
- bat_c01,56,124,3 duplicate(EffetCellule) #CelluleRougeA3-1 139
- bat_c01,57,124,3 duplicate(EffetCellule) #CelluleRougeA4-1 139
- bat_c01,57,125,3 duplicate(EffetCellule) #CelluleRougeA5-1 139
- bat_c01,57,126,3 duplicate(EffetCellule) #CelluleRougeA6-1 139
- bat_c01,57,127,3 duplicate(EffetCellule) #CelluleRougeA7-1 139
- bat_c01,145,59,3 duplicate(EffetCellule) #CelluleRougeB1-1 139
- bat_c01,144,59,3 duplicate(EffetCellule) #CelluleRougeB2-1 139
- bat_c01,143,59,3 duplicate(EffetCellule) #CelluleRougeB3-1 139
- bat_c01,142,59,3 duplicate(EffetCellule) #CelluleRougeB4-1 139
- bat_c01,142,56,3 duplicate(EffetCellule) #CelluleRougeB5-1 139
- bat_c01,142,57,3 duplicate(EffetCellule) #CelluleRougeB6-1 139
- bat_c01,142,58,3 duplicate(EffetCellule) #CelluleRougeB7-1 139
- bat_c01,54,128,3 script #Camp_A_depart01 139,4,4,{
- end;
- OnInit:
- disablenpc "#Camp_A_depart01";
- end;
- OnEnable:
- enablenpc "#Camp_A_depart01";
- end;
- OnDisable:
- disablenpc "#Camp_A_depart01";
- end;
- OnTouch:
- set Bat_Team,1;
- if (!getbattleflag("feature.bgqueue"))
- setquest 6025;
- end;
- }
- bat_c01,146,56,3 script #Camp_B_depart01 139,4,4,{
- end;
- OnInit:
- disablenpc "#Camp_B_depart01";
- end;
- OnEnable:
- enablenpc "#Camp_B_depart01";
- end;
- OnDisable:
- disablenpc "#Camp_B_depart01";
- end;
- OnTouch:
- set Bat_Team,2;
- if (!getbattleflag("feature.bgqueue"))
- setquest 6025;
- end;
- }
- // Moteur du Champ de Bataille KvM
- //============================================================
- - script KvM01_BG -1,{
- end;
- OnInit:
- if (getbattleflag("feature.bgqueue"))
- bg_unbook "bat_c01";
- mapwarp "bat_c01","bat_room",154,150;
- setwall "bat_c01",54,122,6,7,0,"mur_c01a";
- setwall "bat_c01",55,122,5,7,0,"mur_c01b";
- setwall "bat_c01",140,56,6,7,0,"mur_c01c";
- setwall "bat_c01",140,57,5,7,0,"mur_c01d";
- disablenpc "Officier KvM#KvM01A";
- disablenpc "Officier KvM#KvM01B";
- end;
- OnGuillaumeQuit:
- if (getbattleflag("feature.bgqueue"))
- bg_desert;
- // else
- // set BG_Delay_Tick, gettimetick(2) + 1200;
- OnGuillaumeDie:
- if( $@KvM01BG == 2 ) {
- set .Guillaume_Count, .Guillaume_Count - 1;
- bg_updatescore "bat_c01",.Guillaume_Count,.Croix_Count;
- if( .Guillaume_Count < 1 )
- donpcevent "KvM01_BG::OnCroixWin";
- else {
- mapannounce "bat_c01", "Guillaume : "+.Guillaume_Count+" soldats restants.",bc_map,"0x00ff00";
- mapannounce "bat_c01", "Croix : "+.Croix_Count+" combattants encore debout.",bc_map,"0x00ff00";
- }
- }
- end;
- OnCroixQuit:
- if (getbattleflag("feature.bgqueue"))
- bg_desert;
- // else
- // set BG_Delay_Tick, gettimetick(2) + 1200;
- OnCroixDie:
- if( $@KvM01BG == 2 ) {
- set .Croix_Count, .Croix_Count - 1;
- bg_updatescore "bat_c01",.Guillaume_Count,.Croix_Count;
- if( .Croix_Count < 1 )
- donpcevent "KvM01_BG::OnGuillaumeWin";
- else {
- mapannounce "bat_c01", "Guillaume : "+.Guillaume_Count+" soldats restants.",bc_map,"0x00ff00";
- mapannounce "bat_c01", "Croix : "+.Croix_Count+" combattants encore debout.",bc_map,"0x00ff00";
- }
- }
- end;
- OnGuillaumeActive:
- warp "bat_c01",61,120;
- end;
- OnCroixActive:
- warp "bat_c01",138,63;
- end;
- OnStart:
- disablenpc "Officier KvM#KvM01A";
- disablenpc "Officier KvM#KvM01B";
- set $@KvM01BG_Victory, 0;
- bg_warp $@KvM01BG_id1,"bat_c01",53,128;
- bg_warp $@KvM01BG_id2,"bat_c01",146,55;
- initnpctimer;
- end;
- OnTimer1000:
- mapannounce "bat_c01", "Dans 1 minute, la bataille du KvM commence !",bc_map,"0x00ff00";
- end;
- OnTimer3000:
- mapannounce "bat_c01", "Durée maximale de la bataille : 5 minutes.",bc_map,"0x00ff00";
- end;
- OnTimer6000:
- mapannounce "bat_c01", "Préparez-vous, renforcez vos camarades !",bc_map,"0x00ff00";
- donpcevent "#Camp_A_depart01::OnEnable";
- donpcevent "#Camp_B_depart01::OnEnable";
- end;
- OnTimer13000:
- donpcevent "#Camp_A_depart01::OnDisable";
- donpcevent "#Camp_B_depart01::OnDisable";
- end;
- OnTimer30000:
- mapannounce "bat_c01", "Début de la bataille dans 30 secondes !",bc_map,"0x00ff00";
- end;
- OnTimer45000:
- mapannounce "bat_c01", "15 secondes avant le choc des armées !",bc_map,"0x00ff00";
- donpcevent "::OnKvM01One";
- end;
- OnTimer50000:
- mapannounce "bat_c01", "10 secondes avant la guerre !",bc_map,"0x00ff00";
- donpcevent "::OnKvM01Two";
- end;
- OnTimer55000:
- mapannounce "bat_c01", "5 secondes... Respirez. Armez-vous. Tenez bon !",bc_map,"0x00ff00";
- donpcevent "::OnKvM01One";
- end;
- OnTimer59000:
- mapannounce "bat_c01", "C’EST PARTI ! À L’ASSAUT !",bc_map,"0x00ff00";
- donpcevent "::OnKvM01Two";
- end;
- OnTimer61000:
- set .Guillaume_Count, bg_get_data($@KvM01BG_id1, 0);
- set .Croix_Count, bg_get_data($@KvM01BG_id2, 0);
- if (!getbattleflag("feature.bgqueue")) {
- if (.Guillaume_Count < 5 || .Croix_Count < 5) {
- set $@KvM01BG_Victory, 3;
- set $@KvM01BG, 3;
- mapannounce "bat_c01","Pas assez de participants pour commencer !",1,0x696969;
- stopnpctimer;
- donpcevent "KvM01_BG::OnStop";
- end;
- }
- }
- bg_updatescore "bat_c01",.Guillaume_Count,.Croix_Count;
- set $@KvM01BG, 2; // En cours
- bg_warp $@KvM01BG_id1,"bat_c01",61,120;
- bg_warp $@KvM01BG_id2,"bat_c01",138,63;
- end;
- OnTimer360000:
- mapannounce "bat_c01", "Fin du KvM ! Cessez le feu !",bc_map,"0x00ff00";
- if( .Croix_Count > .Guillaume_Count )
- donpcevent "KvM01_BG::OnCroixWin";
- else if( .Croix_Count < .Guillaume_Count )
- donpcevent "KvM01_BG::OnGuillaumeWin";
- else {
- set $@KvM01BG, 3;
- set $@KvM01BG_Victory, 3;
- mapannounce "bat_c01", "Égalité parfaite. Aucun vainqueur aujourd’hui.",bc_map,"0x00ff00";
- donpcevent "KvM01_BG::OnStop";
- }
- end;
- OnGuillaumeWin:
- set $@KvM01BG, 3;
- set $@KvM01BG_Victory, 1;
- mapannounce "bat_c01", "Victoire pour l’Armée Guillaume !",bc_map,"0x00ff00";
- donpcevent "KvM01_BG::OnStop";
- end;
- OnCroixWin:
- set $@KvM01BG, 3;
- set $@KvM01BG_Victory, 2;
- mapannounce "bat_c01", "L’Armée Croix remporte la_
- // Sortie de champ de bataille - KvM
- //============================================================
- - script KvM01_BG_Out -1,{
- end;
- OnBegin:
- initnpctimer;
- end;
- OnTimer1000:
- mapannounce "bat_c01", "Parlez à l'officier pour recevoir vos récompenses du KvM.",bc_map,"0x00ff00";
- end;
- OnTimer3000:
- mapannounce "bat_c01", "Vous avez 30 secondes pour réclamer vos points.",bc_map,"0x00ff00";
- end;
- OnTimer5000:
- mapannounce "bat_c01", "N’oubliez pas : sans parler à l’officier, aucun point ne sera attribué !",bc_map,"0x00ff00";
- end;
- OnTimer55000:
- mapannounce "bat_c01", "Retour à la base imminent !",bc_map,"0x00ff00";
- end;
- OnTimer60000:
- stopnpctimer;
- if (getbattleflag("feature.bgqueue"))
- bg_reserve "bat_c01", true;
- mapwarp "bat_c01","bat_room",154,150;
- set getvariableofnpc(.Croix_Count,"KvM01_BG"), 0;
- set getvariableofnpc(.Guillaume_Count,"KvM01_BG"), 0;
- set $@KvM01BG_Victory, 0;
- if( $@KvM01BG_id1 ) { bg_destroy $@KvM01BG_id1; set $@KvM01BG_id1, 0; }
- if( $@KvM01BG_id2 ) { bg_destroy $@KvM01BG_id2; set $@KvM01BG_id2, 0; }
- if (getbattleflag("feature.bgqueue"))
- bg_unbook "bat_c01";
- disablenpc "Officier KvM#KvM01A";
- disablenpc "Officier KvM#KvM01B";
- set $@KvM01BG, 0;
- end;
- OnGuillaumeJoin:
- OnCroixJoin:
- if( $@KvM01BG )
- end;
- set .@Guillaume, getwaitingroomstate(0,"KvM01R_Guillaume");
- set .@Croix, getwaitingroomstate(0,"KvM01R_Croix");
- if( .@Guillaume < 5 || .@Croix < 5 )
- end;
- set $@KvM01BG, 1; // Démarrage en cours
- donpcevent "KvM01R_Croix::OnEnterBG";
- donpcevent "KvM01R_Guillaume::OnEnterBG";
- donpcevent "KvM01_BG::OnStart";
- end;
- }
- // PNJs de récompense - KvM
- //============================================================
- bat_c01,51,130,5 script Officier KvM#KvM01A 419,{
- if( $@KvM01BG_Victory ) {
- mes "[Officier KvM]";
- if( $@KvM01BG_Victory == Bat_Team ) {
- mes "Bravo, combattant de l'honneur !";
- mes "Que la gloire du KvM t’accompagne.";
- mes "Tu gagnes : ^0055FF5 points de victoire^000000.";
- close2;
- set kvm_point,kvm_point + 5;
- }
- else {
- mes "Courage, l’échec n’est qu’un pas vers la victoire.";
- mes "Tu gagnes quand même : ^7777771 point de participation^000000.";
- close2;
- set kvm_point,kvm_point + 1;
- }
- bg_leave;
- set Bat_Team,0;
- if (!getbattleflag("feature.bgqueue"))
- warp "bat_room",154,150;
- }
- end;
- }
- bat_c01,148,53,1 duplicate(Officier KvM#KvM01A) Officier KvM#KvM01B 415
- // File d’attente BG - Désactive les scripts inutiles
- //============================================================
- - script BGQueueInit#kvm01 -1,{
- end;
- OnInit:
- if (getbattleflag("feature.bgqueue")) {
- unloadnpc "KvM01R_Guillaume";
- unloadnpc "KvM01R_Croix";
- unloadnpc "#kvm801";
- unloadnpc "#kvm802";
- }
- end;
- }
|