//= Le Livre d'Ymir http://www.bookofymir.net/ //= traduit par No Healing // ============================================================================== // BattleGround System - KvM 60~79 // ============================================================================== // Registration NPC's // ********************************************************************* bat_room,225,227,4 script Inscription::KvM02R_Guillaume 418,{ // KvM Guillaume end; OnInit: waitingroom "Combat à 5 Joueurs",5,"KvM02_BG::OnGuillaumeJoin",1; end; OnEnterBG: set $@KvM02BG_id1, waitingroom2bg("bat_c02",53,128,"KvM02_BG::OnGuillaumeQuit","KvM02_BG::OnGuillaumeDie"); end; } bat_room,225,204,0 script Inscription::KvM02R_Croix 414,{ // KvM Croix end; OnInit: waitingroom "Combat à 5 Joueurs",5,"KvM02_BG::OnCroixJoin",1; end; OnEnterBG: set $@KvM02BG_id2, waitingroom2bg("bat_c02",146,55,"KvM02_BG::OnCroixQuit","KvM02_BG::OnCroixDie"); end; } // Light Effects // ********************************************************************* bat_c02,54,123,0 script #bat_c02a 111,{ end; OnKvM02LightA: misceffect 54; end; OnKvM02LightB: misceffect 55; end; OnKvM02LightC: misceffect 56; end; } bat_c02,56,125,0 duplicate(#bat_c02a) #bat_c02b 111 bat_c02,58,127,0 duplicate(#bat_c02a) #bat_c02c 111 bat_c02,141,56,0 duplicate(#bat_c02a) #bat_c02d 111 bat_c02,143,58,0 duplicate(#bat_c02a) #bat_c02e 111 bat_c02,145,60,0 duplicate(#bat_c02a) #bat_c02f 111 // Battleground Engine // ********************************************************************* - script KvM02_BG -1,{ end; OnInit: setwall "bat_c02",54,122,6,7,0,"batc02wall_a"; setwall "bat_c02",55,122,5,7,0,"batc02wall_b"; setwall "bat_c02",140,56,6,7,0,"batc02wall_c"; setwall "bat_c02",140,57,5,7,0,"batc02wall_d"; disablenpc "TherapistKvM02a"; disablenpc "TherapistKvM02b"; disablenpc "VintenarKvM02a"; disablenpc "VintenarKvM02b"; end; OnGuillaumeJoin: OnCroixJoin: donpcevent "KvM02_BG::OnReadyCheck"; end; OnGuillaumeQuit: set BG_Delay_Tick, gettimetick(2) + 1200; OnGuillaumeDie: if( $@KvM02BG == 2 ) { set .Guillaume_Count, .Guillaume_Count - 1; set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c02",.Guillaume_Score,.Croix_Score; if( .Guillaume_Count < 1 ) donpcevent "KvM02_BG::OnCroixWin"; } end; OnCroixQuit: set BG_Delay_Tick, gettimetick(2) + 1200; OnCroixDie: if( $@KvM02BG == 2 ) { set .Croix_Count, .Croix_Count - 1; set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c02",.Guillaume_Score,.Croix_Score; if( .Croix_Count < 1 ) donpcevent "KvM02_BG::OnGuillaumeWin"; } end; OnReadyCheck: if( $@KvM02BG ) end; set .@Guillaume, getwaitingroomstate(0,"KvM02R_Guillaume"); set .@Croix, getwaitingroomstate(0,"KvM02R_Croix"); if( .@Guillaume < 5 || .@Croix < 5 ) { if( .@Guillaume > 3 && .@Croix > 3 && !agitcheck() && $@KvM_Flood < gettimetick(2) ) { announce "Champ de Bataille -- Kreiger Von Midgard [60-79] G: " + .@Guillaume + "/5, C: " + .@Croix + "/5",0,0x808080; set $@KvM_Flood, gettimetick(2) + 15; } else mapannounce "bat_room","Champ de Bataille -- Kreiger Von Midgard [60-79] G: " + .@Guillaume + "/5, C: " + .@Croix + "/5",0,0x808080; end; } set $@KvM02BG, 1; // Starting donpcevent "KvM02R_Croix::OnEnterBG"; donpcevent "KvM02R_Guillaume::OnEnterBG"; donpcevent "KvM02_BG::OnStart"; end; OnStart: announce "Champ de Bataille -- La bataille de Kreiger Von Midgard [60-79] vient de débuter!",0,0x808080; enablenpc "TherapistKvM02a"; enablenpc "TherapistKvM02b"; disablenpc "VintenarKvM02a"; disablenpc "VintenarKvM02b"; set $@KvM02BG_Victory, 0; sleep 2000; // Warp Teams bg_warp $@KvM02BG_id1,"bat_c02",53,128; bg_warp $@KvM02BG_id2,"bat_c02",146,55; // ScoreBoard set .Guillaume_Score, 0; set .Croix_Score, 0; initnpctimer; end; OnTimer5000: areapercentheal "bat_c02",50,123,58,131,100,100; areapercentheal "bat_c02",141,52,149,60,100,100; mapannounce "bat_c02","La bataille commencera dans 25 secondes!",0,0x808080; end; OnTimer26000: mapannounce "bat_c02","La bataille commencera dans 4 secondes!",0,0x808080; end; OnTimer27000: donpcevent "::OnKvM02LightA"; end; OnTimer28000: donpcevent "::OnKvM02LightB"; end; OnTimer29000: donpcevent "::OnKvM02LightC"; end; OnTimer30000: // Team Members set .Guillaume_Count, bg_get_data($@KvM02BG_id1, 0); set .Croix_Count, bg_get_data($@KvM02BG_id2, 0); if( .Guillaume_Count < 5 || .Croix_Count < 5 ) { set $@KvM02BG_Victory, 3; set $@KvM02BG, 3; mapannounce "bat_c02","Il n'y a pas assez de participants pour commencer la bataille.",0,0x808080; stopnpctimer; sleep 2000; donpcevent "KvM02_BG::OnStop"; end; } set $@KvM02BG, 2; // Playing areapercentheal "bat_c02",50,123,58,131,100,100; bg_warp $@KvM02BG_id1,"bat_c02",62,119; areapercentheal "bat_c02",141,52,149,60,100,100; bg_warp $@KvM02BG_id2,"bat_c02",137,64; end; OnTimer32000: mapannounce "bat_c02","La bataille de Kreiger Von Midgard vient de commencer!",0,0x808080; end; OnTimer300000: mapannounce "bat_c02","La bataille se terminera dans 30 secondes!",0,0x808080; end; OnTimer330000: if( .Croix_Count > .Guillaume_Count ) donpcevent "KvM02_BG::OnCroixWin"; else if( .Croix_Count < .Guillaume_Count ) donpcevent "KvM02_BG::OnGuillaumeWin"; else { // Draw Game set $@KvM02BG, 3; set $@KvM02BG_Victory, 3; stopnpctimer; sleep 2000; mapannounce "bat_c02","La Bataille est terminée. Elle s'achève par une égalité!",0,0x808080; donpcevent "KvM02_BG::OnStop"; } end; OnGuillaumeWin: set $@KvM02BG, 3; set $@KvM02BG_Victory, 1; stopnpctimer; sleep 2000; mapannounce "bat_c02","L'armée de Guillaume remporte la bataille de Kreiger Von Midgard!",0,0x0000FF; donpcevent "KvM02_BG::OnStop"; end; OnCroixWin: set $@KvM02BG, 3; set $@KvM02BG_Victory, 2; stopnpctimer; sleep 2000; mapannounce "bat_c02","L'armée de Croix remporte la bataille de Kreiger Von Midgard!",0,0xFF0000; donpcevent "KvM02_BG::OnStop"; end; OnStop: disablenpc "TherapistKvM02a"; disablenpc "TherapistKvM02b"; enablenpc "VintenarKvM02a"; enablenpc "VintenarKvM02b"; // Warp Teams bg_warp $@KvM02BG_id1,"bat_c02",53,128; bg_warp $@KvM02BG_id2,"bat_c02",146,55; donpcevent "KvM02_BG_Out::OnBegin"; end; OnReset: stopnpctimer; stopnpctimer "KvM02_BG_Out"; set .Croix_Count, 0; set .Guillaume_Count, 0; set .Croix_Score, 0; set .Guillaume_Score, 0; set $@KvM02BG_Victory, 0; if( $@KvM02BG_id1 ) { bg_destroy $@KvM02BG_id1; set $@KvM02BG_id1, 0; } if( $@KvM02BG_id2 ) { bg_destroy $@KvM02BG_id2; set $@KvM02BG_id2, 0; } disablenpc "TherapistKvM02a"; disablenpc "TherapistKvM02b"; disablenpc "VintenarKvM02a"; disablenpc "VintenarKvM02b"; sleep 1000; mapwarp "bat_c02","bat_room",155,150; sleep 2000; maprespawnguildid "bat_c02",0,3; // Just in case someone else bg_updatescore "bat_c02",0,0; sleep 2000; set $@KvM02BG, 0; donpcevent "KvM02_BG::OnReadyCheck"; // Maybe a game is ready to start end; } - script KvM02_BG_Out -1,{ end; OnBegin: initnpctimer; end; OnTimer3000: mapannounce "bat_c02","La Bataille de Kreiger Von Midgard se terminera dans 1 minute!",0,0x808080; end; OnTimer30000: mapannounce "bat_c02","La Bataille de Kreiger Von Midgard se terminera dans 30 secondes!",0,0x808080; end; OnTimer50000: mapannounce "bat_c02","La Bataille de Kreiger Von Midgard se terminera dans 10 secondes!",0,0x808080; end; OnTimer60000: donpcevent "KvM02_BG::OnReset"; end; } // Battleground Therapist // ********************************************************************* bat_c02,51,130,5 script Rebouteux::TherapistKvM02a 95,{ mes "[Rebouteux]"; mes "Serre bien les dents mon p'tit gars, et prends une bonne bouffée d'air. Ça risque de faire un peu mal..."; specialeffect2 312; close; } bat_c02,148,53,1 script Rebouteux::TherapistKvM02b 95,{ mes "[Rebouteux]"; mes "Serre bien les dents mon p'tit gars, et prends une bonne bouffée d'air. Ça risque de faire un peu mal..."; specialeffect2 312; close; } // Battleground rewards // ********************************************************************* bat_c02,51,130,5 script Aide de Camp (Guillaume)::VintenarKvM02a 419,{ if( $@KvM02BG_Victory ) { if( $@KvM02BG_Victory == 3 ) { setquest 6025; bg_leave; warp "bat_room",155,150; end; } else if( $@KvM02BG_Victory == Bat_Team ) { // Victory set .@Reward, 3; mes "[Swandery]"; mes "Guillaume le Très Saint!!"; mes "Festoyons à notre glorieuse victoire!"; mes "" + strcharinfo(0) + ", voici un symbole de notre triomphe."; close2; } else { // set .@Reward, 1; mes "[Swandery]"; mes "Nous avons failli, mais vous avez su faire preuve de bravoure sur le champ de bataille. Voici de quoi récompenser votre dévotion envers Guillaume Marollo! Que cette défaite soit pour nous une leçon et nous rende plus forts."; close2; } setquest 6025; getitem 7773, .@Reward; bg_leave; warp "bat_room",155,150; end; } end; } bat_c02,148,53,1 script Aide de Camp (Croix)::VintenarKvM02b 415,{ if( $@KvM02BG_Victory ) { if( $@KvM02BG_Victory == 3 ) { setquest 6025; bg_leave; warp "bat_room",155,150; end; } else if( $@KvM02BG_Victory == Bat_Team ) { // Victory set .@Reward, 3; mes "[Swandery]"; mes "Croix le Très Saint!!"; mes "Festoyons à notre glorieuse victoire!"; mes "" + strcharinfo(0) + ", voici un symbole de notre triomphe."; close2; } else { // set .@Reward, 1; mes "[Swandery]"; mes "Point de larmes ni de regrets, " + strcharinfo(0) + ". Nous avons failli, mais nous avons aussi su faire preuve de bravoure. Voici un présent royal de Croix. Puisse-t-il vous permettre de ne jamais oublier cette bataille. Que la prochaine soit celle de notre triomphe!"; close2; } setquest 6025; getitem 7773, .@Reward; bg_leave; warp "bat_room",155,150; end; } end; } // MapFlags // ********************************************************************* bat_c02 mapflag battleground 2 bat_c02 mapflag nomemo bat_c02 mapflag nosave SavePoint bat_c02 mapflag noteleport bat_c02 mapflag nowarp bat_c02 mapflag nowarpto bat_c02 mapflag noreturn bat_c02 mapflag nobranch bat_c02 mapflag nopenalty