From 7bc243c7826c3700ae1eb3ec7322a577704e01a2 Mon Sep 17 00:00:00 2001 From: jesusalva Date: Mon, 19 Feb 2018 00:11:27 -0300 Subject: BGMaster was rewriten, but it doesn't works for some reason D: --- npc/004-1/_import.txt | 1 + npc/004-1/bgmaster.txt | 214 +++++++++++++++++++++++++++++++++++++++++++++++++ npc/004-2/_import.txt | 1 - npc/004-2/bgmaster.txt | 135 ------------------------------- 4 files changed, 215 insertions(+), 136 deletions(-) create mode 100644 npc/004-1/bgmaster.txt delete mode 100644 npc/004-2/bgmaster.txt (limited to 'npc') diff --git a/npc/004-1/_import.txt b/npc/004-1/_import.txt index 414c0e196..41c9f1f11 100644 --- a/npc/004-1/_import.txt +++ b/npc/004-1/_import.txt @@ -2,3 +2,4 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/004-1/_mobs.txt", "npc/004-1/_warps.txt", +"npc/004-1/bgmaster.txt", diff --git a/npc/004-1/bgmaster.txt b/npc/004-1/bgmaster.txt new file mode 100644 index 000000000..e9e68c29b --- /dev/null +++ b/npc/004-1/bgmaster.txt @@ -0,0 +1,214 @@ +// TMW2 Scripts. +// Author: +// Jesusalva + +004-1,119,96,0 script Cassia NPC_FEMALE,{ + mesn; + //if ($@BattleOn) goto L_Busy; + mesq l("Hello! I am @@, currently in charge of the Desert Pass.", .name$); + next; + atcommand("@time"); + mesq l("The Fallen Kings challenge ownership of this pass at ##B08:00##b, ##B16:00##b and ##B00:00##b."); + next; + mesq l("Right click on one of their representatives, and choose to join a \'Chat\' when it is close of the time!"); + next; + mesq l("Just as a warning, main chat will change. Use it to discuss the strategy!"); + if (!getgmlevel()) goto L_Close; + mes ""; + menu + rif(!$@BattleOn, l("Init!")), L_Init, + l("Join team 1."), L_T1, + l("Join team 2."), L_T2; + +L_T1: + mesn; + if (bg_join_team($@FK_Team1)) + goto L_SuccessJoin; + mes "An error happened."; + goto L_Close; + +L_T2: + mesn; + if (bg_join_team($@FK_Team1)) + goto L_SuccessJoin; + mes "An error happened."; + goto L_Close; + +L_SuccessJoin: + mesq l("Done!"); + next; + warp "testbg", 0, 0; + close; + +L_Init: + .@Froz = getwaitingroomstate(0,"Emissary#1"); + .@Hali = getwaitingroomstate(0,"Emissary#2"); + if (!.@Froz || !.@Hali) { + mapannounce("004-1", "The Fallen King Event was cancelled.", bc_map); + } + mesn; + next; + $@BattleOn=1; + donpcevent("Emissary#1::SendToBattle"); + donpcevent("Emissary#2::SendToBattle"); + //bg_warp $@FK_Team1, "testbg", 13, 4; + //bg_warp $@FK_Team2, "testbg", 13, 26; + mesn; + next; + mesq str( bg_get_data($@FK_Team1, 0) ); + mesq str( bg_get_data($@FK_Team2, 0) ); + next; + //setbgteam $@FK_Team1, 1; + //setbgteam $@FK_Team2, 2; + //mesn; + //next; + mapannounce("testbg", "May the fight begin!", bc_map); + mesn; + next; + $@FKing_T1 = bg_monster($@FK_Team1, "testbg", 1, 1, "OldFallen", 1079, "Cassia::OnVictor2"); + $@FKing_T2 = bg_monster($@FK_Team2, "testbg", 13, 28, "OldFallen2", 1080, "Cassia::OnVictor1"); + mesn; + next; + initnpctimer(); + close; + +L_Close: + close; + +L_Busy: + mesq l("Sorry, registration period is over."); + close; + +OnPcQuit: + warp "002-4", 0, 0; + bg_leave(); + end; + +OnPcDeath: + warp "002-4", 0, 0; + bg_leave(); + end; + +OnTimer30000: + if (getmapusers("testbg") < 2) goto L_RestartTimer; + mapannounce("testbg", "Reinforcements raise!", bc_map); + $@FKing_T1 = bg_monster($@FK_Team1, "testbg", 1, 1, "FallenGuard1", 1081, "Cassia::OnSkip"); + $@FKing_T2 = bg_monster($@FK_Team2, "testbg", 13, 28, "FallenGuard2", 1082, "Cassia::OnSkip"); + stopnpctimer(); + initnpctimer(); + end; + +OnClock2200: + announce "I am alive!", bc_all; + end; + +OnSkip: + end; + +L_Skip: + end; + +L_RestartTimer: + stopnpctimer(); + initnpctimer(); + end; + +OnVictor1: + if (!$@BattleOn) goto L_Skip; + stopnpctimer(); + announce "Team 1 raises victorious!", bc_all; + bg_warp $@FK_Team1, "004-2", 29, 23; + bg_warp $@FK_Team2, "004-2", 29, 23; + bg_destroy($@FK_Team1); + bg_destroy($@FK_Team2); + $@BattleOn=0; + end; + +OnVictor2: + if (!$@BattleOn) goto L_Skip; + stopnpctimer(); + announce "Team 2 raises victorious!", bc_all; + bg_warp $@FK_Team1, "004-2", 29, 23; + bg_warp $@FK_Team2, "004-2", 29, 23; + bg_destroy($@FK_Team1); + bg_destroy($@FK_Team2); + $@BattleOn=0; + end; + +OnInit: + .@npcId = getnpcid(0, .name$); + setunitdata(.@npcId, UDT_HEADTOP, 1322); // Dress + setunitdata(.@npcId, UDT_HEADMIDDLE, 2204); // Not needed + setunitdata(.@npcId, UDT_HEADBOTTOM, 1800); // Shoes + setunitdata(.@npcId, UDT_WEAPON, 3501); + setunitdata(.@npcId, UDT_HAIRSTYLE, 12); + setunitdata(.@npcId, UDT_HAIRCOLOR, 5); + npcsit; + + .sex = G_FEMALE; + .distance = 7; + // This script is TODO + if (!debug) { + disablenpc "Cassia"; + } + end; +} + + + + + + + +// This script is TODO WIP +/* +004-1,115,93,0 script Emissary#1 NPC_ELF,{ + hello; + +OnSendToBattle: + $@FK_Team1=waitingroom2bg("testbg", 13, 4, "Cassia::OnPcQuit", "Cassia::OnPcDeath"); + setbgteam $@FK_Team1, 1; + bg_warp $@FK_Team1, "testbg", 13, 4; + end; + +OnInit: + .@npcId = getnpcid(0, .name$); + setunitdata(.@npcId, UDT_HEADTOP, 1312); // Light armor + setunitdata(.@npcId, UDT_HEADMIDDLE, 2212); // Pants + setunitdata(.@npcId, UDT_HEADBOTTOM, 1800); // Shoes + setunitdata(.@npcId, UDT_WEAPON, 3501); + setunitdata(.@npcId, UDT_HAIRSTYLE, 13); + setunitdata(.@npcId, UDT_HAIRCOLOR, 7); + + waitingroom("Winterfall", 30, "Cassia::OnSkip", 1); + .sex = G_OTHER; + .distance = 5; + end; +} + + +004-1,117,93,0 script Emissary#2 NPC_ELF,{ + hello; + +OnSendToBattle: + $@FK_Team2=waitingroom2bg("testbg", 13, 26, "Cassia::OnPcQuit", "Cassia::OnPcDeath"); + setbgteam $@FK_Team2, 2; + bg_warp $@FK_Team2, "testbg", 13, 26; + end; + +OnInit: + .@npcId = getnpcid(0, .name$); + setunitdata(.@npcId, UDT_HEADTOP, 1311); // Terran armor + setunitdata(.@npcId, UDT_HEADMIDDLE, 2212); // Pants + setunitdata(.@npcId, UDT_HEADBOTTOM, 1800); // Shoes + setunitdata(.@npcId, UDT_WEAPON, 3501); + setunitdata(.@npcId, UDT_HAIRSTYLE, 13); + setunitdata(.@npcId, UDT_HAIRCOLOR, 7); + + waitingroom("Summerfall", 30, "Cassia::OnSkip", 1); + .sex = G_OTHER; + .distance = 5; + end; + +} +*/ diff --git a/npc/004-2/_import.txt b/npc/004-2/_import.txt index 841c90112..741f8a548 100644 --- a/npc/004-2/_import.txt +++ b/npc/004-2/_import.txt @@ -2,4 +2,3 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/004-2/_mobs.txt", "npc/004-2/_warps.txt", -"npc/004-2/bgmaster.txt", diff --git a/npc/004-2/bgmaster.txt b/npc/004-2/bgmaster.txt deleted file mode 100644 index 92db75bb9..000000000 --- a/npc/004-2/bgmaster.txt +++ /dev/null @@ -1,135 +0,0 @@ -// TMW2 Scripts. -// Author: -// Jesusalva - -004-2,29,23,0 script BGMaster NPC_FEMALE,{ - mesn; - //if ($@BattleOn) goto L_Busy; - mesq l("Hello, lets bg masterize this."); - mes ""; - menu - rif(!$@BattleOn, l("Init!")), L_Init, - l("Join team 1."), L_T1, - l("Join team 2."), L_T2; - -L_T1: - mesn; - if (bg_join_team($@FK_Team1)) - goto L_SuccessJoin; - mes "An error happened."; - goto L_Close; - -L_T2: - mesn; - if (bg_join_team($@FK_Team1)) - goto L_SuccessJoin; - mes "An error happened."; - goto L_Close; - -L_SuccessJoin: - mesq l("Done!"); - next; - warp "testbg", 0, 0; - close; - -L_Init: - $@BattleOn=1; - mesq str( bg_get_data($@FK_Team1, 0) ); - mesq str( bg_get_data($@FK_Team2, 0) ); - next; - //for - bg_warp $@FK_Team1, "testbg", 13, 4; - bg_warp $@FK_Team2, "testbg", 13, 26; - mesn; - next; - //setbgteam $@FK_Team1, 1; - //setbgteam $@FK_Team2, 2; - //mesn; - //next; - mapannounce("testbg", "May the fight begin!", bc_map); - mesn; - next; - $@FKing_T1 = bg_monster($@FK_Team1, "testbg", 1, 1, "OldFallen", 1079, "BGMaster::OnVictor2"); - $@FKing_T2 = bg_monster($@FK_Team2, "testbg", 13, 28, "OldFallen2", 1080, "BGMaster::OnVictor1"); - mesn; - next; - initnpctimer(); - close; - -L_Close: - close; - -L_Busy: - mesq l("Sorry, registration period is over."); - close; - -OnPcQuit: - warp "002-4", 0, 0; - bg_leave(); - end; - -OnPcDeath: - warp "002-4", 0, 0; - bg_leave(); - end; - -OnTimer30000: - if (getmapusers("testbg") < 2) goto L_RestartTimer; - mapannounce("testbg", "Reinforcements raise!", bc_map); - $@FKing_T1 = bg_monster($@FK_Team1, "testbg", 1, 1, "FallenGuard1", 1081, "BGMaster::OnSkip"); - $@FKing_T2 = bg_monster($@FK_Team2, "testbg", 13, 28, "FallenGuard2", 1082, "BGMaster::OnSkip"); - stopnpctimer(); - initnpctimer(); - end; - -OnSkip: - end; - -L_Skip: - end; - -L_RestartTimer: - stopnpctimer(); - initnpctimer(); - end; - -OnVictor1: - if (!$@BattleOn) goto L_Skip; - stopnpctimer(); - announce "Team 1 raises victorious!", bc_all; - bg_warp $@FK_Team1, "004-2", 29, 23; - bg_warp $@FK_Team2, "004-2", 29, 23; - bg_destroy($@FK_Team1); - bg_destroy($@FK_Team2); - $@BattleOn=0; - end; - -OnVictor2: - if (!$@BattleOn) goto L_Skip; - stopnpctimer(); - announce "Team 2 raises victorious!", bc_all; - bg_warp $@FK_Team1, "004-2", 29, 23; - bg_warp $@FK_Team2, "004-2", 29, 23; - bg_destroy($@FK_Team1); - bg_destroy($@FK_Team2); - $@BattleOn=0; - end; - -OnInit: - .@npcId = getnpcid(0, .name$); - setunitdata(.@npcId, UDT_HEADTOP, 1322); // Dress - setunitdata(.@npcId, UDT_HEADMIDDLE, 2204); // Not needed - setunitdata(.@npcId, UDT_HEADBOTTOM, 1800); // Shoes - setunitdata(.@npcId, UDT_WEAPON, 3501); - setunitdata(.@npcId, UDT_HAIRSTYLE, 12); - setunitdata(.@npcId, UDT_HAIRCOLOR, 5); - npcsit; - - waitingroom("Hello World", 30); - $@FK_Team1=waitingroom2bg("testbg", 13, 4, "BGMaster::OnPcQuit", "BGMaster::OnPcDeath"); - $@FK_Team2=waitingroom2bg("testbg", 13, 26, "BGMaster::OnPcQuit", "BGMaster::OnPcDeath"); - - .sex = G_FEMALE; - .distance = 5; - end; -} -- cgit v1.2.3-60-g2f50