summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorjesusalva <cpntb1@ymail.com>2018-02-18 18:22:39 -0300
committerjesusalva <cpntb1@ymail.com>2018-02-18 18:22:39 -0300
commit3cd3c27ee4bb6becc8ee6445f1dc7d04b9cf9832 (patch)
tree794c642953b5d82f9c62256f198e079fb80f1aed /npc
parentb494d616f267467ead9d28882499d7a9c7a6a7f7 (diff)
downloadserverdata-3cd3c27ee4bb6becc8ee6445f1dc7d04b9cf9832.tar.gz
serverdata-3cd3c27ee4bb6becc8ee6445f1dc7d04b9cf9832.tar.bz2
serverdata-3cd3c27ee4bb6becc8ee6445f1dc7d04b9cf9832.tar.xz
serverdata-3cd3c27ee4bb6becc8ee6445f1dc7d04b9cf9832.zip
Make /gm work by adding a binding to @wgm.
Edit bgmaster to understand properly how it works - Needs to right-click, clever.
Diffstat (limited to 'npc')
-rw-r--r--npc/004-2/bgmaster.txt21
-rw-r--r--npc/commands/wgm.txt30
-rw-r--r--npc/scripts.conf1
3 files changed, 49 insertions, 3 deletions
diff --git a/npc/004-2/bgmaster.txt b/npc/004-2/bgmaster.txt
index f5ed8cf56..92db75bb9 100644
--- a/npc/004-2/bgmaster.txt
+++ b/npc/004-2/bgmaster.txt
@@ -4,11 +4,11 @@
004-2,29,23,0 script BGMaster NPC_FEMALE,{
mesn;
- if ($@BattleOn) goto L_Busy;
+ //if ($@BattleOn) goto L_Busy;
mesq l("Hello, lets bg masterize this.");
mes "";
menu
- l("Init!"), L_Init,
+ rif(!$@BattleOn, l("Init!")), L_Init,
l("Join team 1."), L_T1,
l("Join team 2."), L_T2;
@@ -28,11 +28,14 @@ L_T2:
L_SuccessJoin:
mesq l("Done!");
+ next;
+ warp "testbg", 0, 0;
close;
L_Init:
$@BattleOn=1;
- mesn;
+ 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;
@@ -71,6 +74,7 @@ OnPcDeath:
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");
@@ -81,7 +85,16 @@ OnTimer30000:
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;
@@ -92,6 +105,7 @@ OnVictor1:
end;
OnVictor2:
+ if (!$@BattleOn) goto L_Skip;
stopnpctimer();
announce "Team 2 raises victorious!", bc_all;
bg_warp $@FK_Team1, "004-2", 29, 23;
@@ -111,6 +125,7 @@ OnInit:
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");
diff --git a/npc/commands/wgm.txt b/npc/commands/wgm.txt
new file mode 100644
index 000000000..f356305f4
--- /dev/null
+++ b/npc/commands/wgm.txt
@@ -0,0 +1,30 @@
+// @wgm atcommand
+// Request help
+//
+// group lv: 0
+// group char lv: 0
+// log: True
+//
+// usage:
+// @wgm Help
+//
+
+- script @wgm 32767,{
+ end;
+
+OnCall:
+ .@request$ = strtoupper(strip(.@atcmd_parameters$[0])); // sanitize
+ .@map$ = "";
+ .@x = 0;
+ .@y = 0;
+
+ if (.@map$ == "")
+ {
+ .@map$ = .@atcmd_parameters$[0];
+ }
+
+ atcommand("@request "+.@map$);
+
+OnInit:
+ bindatcmd "wgm", "@wgm::OnCall", 0, 0, 1;
+}
diff --git a/npc/scripts.conf b/npc/scripts.conf
index b3606271f..468f39d03 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -103,6 +103,7 @@
"npc/commands/debug.txt",
"npc/commands/super-menu.txt",
"npc/commands/magic.txt",
+"npc/commands/wgm.txt",
// config script
"npc/config/hairstyle_config.txt",