summaryrefslogtreecommitdiff
path: root/npc/commands
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2016-08-18 18:45:01 -0400
committergumi <mekolat@users.noreply.github.com>2016-09-02 20:16:53 -0400
commit5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d (patch)
treef917e542caacec1361a237b2ee25ef184dcbcc9b /npc/commands
parent3aaf8002319cdebd93f2292e6d18cb727c532550 (diff)
downloadserverdata-5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d.tar.gz
serverdata-5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d.tar.bz2
serverdata-5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d.tar.xz
serverdata-5d7c9eb8b6f3175d7eb5afe28eb85519d1d2cd2d.zip
last minute changes
Diffstat (limited to 'npc/commands')
-rw-r--r--npc/commands/debug-look.txt40
-rw-r--r--npc/commands/debug-preset.txt40
-rw-r--r--npc/commands/debug-quest.txt92
-rw-r--r--npc/commands/debug-skill.txt26
-rw-r--r--npc/commands/debug.txt50
-rw-r--r--npc/commands/event.txt10
-rw-r--r--npc/commands/motd.txt36
-rw-r--r--npc/commands/scheduled-broadcasts.txt75
-rw-r--r--npc/commands/super-menu.txt (renamed from npc/commands/numa.txt)42
-rw-r--r--npc/commands/warp.txt6
-rw-r--r--npc/commands/zeny.txt6
11 files changed, 203 insertions, 220 deletions
diff --git a/npc/commands/debug-look.txt b/npc/commands/debug-look.txt
index 85dea836..3c4640c5 100644
--- a/npc/commands/debug-look.txt
+++ b/npc/commands/debug-look.txt
@@ -21,28 +21,31 @@ function script BarberDebug {
function setStyle {
clear;
setnpcdialogtitle l("Appearance Debug - Barber");
- mes l("Please enter the desired hairstyle:");
+ mes l("Hair style") + ": " + getlook (LOOK_HAIR);
next;
- input .@h;
- setlook LOOK_HAIR, max(0, min(0x7F, .@h));
+ mes l("Please enter the desired style") + " (1-255)";
+ input .@h, 1, 0xFF;
+ setlook LOOK_HAIR, max(1, min(0xFF, .@h));
return;
}
function setColor {
clear;
setnpcdialogtitle l("Appearance Debug - Barber");
- mes l("Please enter the desired hair color:");
+ mes l("Hair color") + ": " + getlook (LOOK_HAIR_COLOR);
next;
- input .@h;
- setlook LOOK_HAIR_COLOR, max(0, min(0x7F, .@h));
+ mes l("Please enter the desired color") + " (0-255)";
+ input .@h, 0, 0xFF;
+ setlook LOOK_HAIR_COLOR, max(0, min(0xFF, .@h));
return;
}
function setRace {
clear;
setnpcdialogtitle l("Appearance Debug - Race");
- mes l("Please enter the desired race:");
+ mes l("Race") + ": " + Class;
next;
- input .@r;
- jobchange max(0, min(0x7FFF, .@h));
+ mes l("Please enter the desired race") + " (0-32767)";
+ input .@r, 0, 0x7FFF;
+ jobchange max(0, min(0x7FFF, .@r));
return;
}
@@ -60,25 +63,22 @@ function script BarberDebug {
mes l("Race") + ": " + Class;
mes "---";
- mes "";
- mes l("What do you want to change?");
next;
- menuint
- menuimage("actions/edit", l("Gender")), 1,
- menuimage("actions/edit", l("Hair style")), 2,
- menuimage("actions/edit", l("Hair color")), 3,
- menuimage("actions/edit", l("Race")), 4,
- rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))), 5,
- menuimage("actions/exit", l("Close")), 6;
+ mes l("What do you want to change?");
+ select
+ menuimage("actions/edit", l("Gender") + " [" + l("Requires logout") + "]"),
+ menuimage("actions/edit", l("Hair style")),
+ menuimage("actions/edit", l("Hair color")),
+ menuimage("actions/edit", l("Race")),
+ rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu")));
- switch (@menuret)
+ switch (@menu)
{
case 1: setGender; break;
case 2: setStyle; break;
case 3: setColor; break;
case 4: setRace; break;
case 5: return;
- case 6: closedialog; end;
}
} while (1);
}
diff --git a/npc/commands/debug-preset.txt b/npc/commands/debug-preset.txt
index 1012c71c..7b7b94fe 100644
--- a/npc/commands/debug-preset.txt
+++ b/npc/commands/debug-preset.txt
@@ -23,6 +23,11 @@ function script DoRoutine {
clearitem;
}
+ if (compare(.@routine$[0], "e"))
+ {
+ nude;
+ }
+
if (compare(.@routine$[0], "k"))
{
resetskill;
@@ -91,40 +96,10 @@ function script DoRoutine {
}
}
}
-}
-function script DebugPresets {
-
- if (getarg(0, "m") != "m")
- {
- DoRoutine getarg(0);
- end;
- }
-
- clear;
- setnpcdialogtitle l("Debug Presets");
- mes l("This menu allows you to select debug presets.");
- mes "";
- mes l("What preset do you want to use?");
- next;
- // TODO: create presets and add them to a hash table, then dynamically build this menu
- menuint
- menuimage("actions/abort", l("Abort")), 1,
- l("New player"), 2,
- rif(getarg(0,"") == "m", menuimage("actions/back", l("Return to Debug menu"))), 1,
- menuimage("actions/exit", l("Close")), 3;
-
- switch (@menuret)
- {
- case 1: return;
- case 2: DoRoutine "-tksxq z w000-0"; break;
- }
-
- closedialog;
+ return;
}
-
-
- script @pre 32767,{
end;
@@ -137,8 +112,7 @@ OnCall:
{
.@atcmd_parameters$[0] = implode(.@atcmd_parameters$[0], " ");
}
- DebugPresets strip(.@atcmd_parameters$[0]);
- closedialog;
+ DoRoutine strip(.@atcmd_parameters$[0]);
end;
OnInit:
diff --git a/npc/commands/debug-quest.txt b/npc/commands/debug-quest.txt
index a7cb9fab..208291f5 100644
--- a/npc/commands/debug-quest.txt
+++ b/npc/commands/debug-quest.txt
@@ -11,20 +11,18 @@ function script GlobalQuestDebug {
mes l("Please select a quest:");
menuint
- menuimage("actions/back", l("Go back")), 32766,
- l("Gugli (main quest)"), 16,
- "Ale", 10,
- "Astapolos", 11,
- "Gulukan", 12,
- "Jalad", 13,
- "QMuller", 14,
- "Tibbo", 15,
- menuimage("actions/exit", l("Close")), 32767;
+ menuimage("actions/back", l("Go back")), -1,
+ l("Gugli (main quest)"), ShipQuests_Gugli,
+ "Ale", ShipQuests_Ale,
+ "Astapolos", ShipQuests_Astapolos,
+ "Gulukan", ShipQuests_Gulukan,
+ "Jalad", ShipQuests_Jalad,
+ "Q'Muller", ShipQuests_QMuller,
+ "Tibbo", ShipQuests_Tibbo;
switch (@menuret)
{
- case 32766: return;
- case 32767: closedialog; end;
+ case -1: return;
default: callfunc "QuestDebug" + @menuret;
}
} while (1);
@@ -39,26 +37,24 @@ function script GlobalQuestDebug {
mes l("Please select a quest:");
menuint
- menuimage("actions/back", l("Go back")), 32766,
- "Julia", 0,
- "Arpan", 1,
- "Alige", 2,
- "Peter", 3,
- "Nard", 4,
- l("Knife"), 5,
- l("Money"), 6,
- l("Door"), 7,
- "Couwan", 8,
- l("Treasure Chest"), 9,
- "Gugli", 16,
- "Gado", 17,
- menuimage("actions/exit", l("Close")), 32767;
+ menuimage("actions/back", l("Go back")), -1,
+ "Julia", ShipQuests_Julia,
+ "Arpan", ShipQuests_Arpan,
+ "Alige", ShipQuests_Alige,
+ "Peter", ShipQuests_Peter,
+ "Nard", ShipQuests_Nard,
+ l("Knife"), ShipQuests_Knife,
+ l("Money"), ShipQuests_ArpanMoney,
+ l("Door"), ShipQuests_Door,
+ "Couwan", ShipQuests_Couwan,
+ l("Treasure Chest"), ShipQuests_TreasureChest,
+ "Gugli", ShipQuests_Gugli,
+ "Gado", ShipQuests_ChefGado;
switch (@menuret)
{
case 16: qDebugGugli; break;
- case 32766: return;
- case 32767: closedialog; end;
+ case -1: return;
default: callfunc "QuestDebug" + @menuret;
}
} while (1);
@@ -74,22 +70,20 @@ function script GlobalQuestDebug {
mes l("Please select a quest:");
menuint
- menuimage("actions/back", l("Go back")), 32766,
- l("Lazy Brother"), 19,
- l("Urchin"), 20,
- l("Catching a piou"), 21,
- "Eugene (" + l("fisherman") + ")", 22,
- "Q'Onan", 23,
- "Enora", 27,
- "Fexil", 29,
- "Lloyd", 30,
- l("Mona's dad"), 32,
- menuimage("actions/exit", l("Close")), 32767;
+ menuimage("actions/back", l("Go back")), ,
+ l("Lazy Brother"), ArtisQuests_LazyBrother,
+ l("Urchin"), ArtisQuests_Urchin,
+ l("Catching a piou"), ArtisQuests_CatchPiou,
+ "Eugene (" + l("fisherman") + ")", ArtisQuests_Fishman,
+ "Q'Onan", ArtisQuests_QOnan,
+ "Enora", ArtisQuests_Enora,
+ "Fexil", ArtisQuests_Fexil,
+ "Lloyd", ArtisQuests_Lloyd,
+ l("Mona's dad"), ArtisQuests_MonaDad;
switch (@menuret)
{
- case 32766: return;
- case 32767: closedialog; end;
+ case -1: return;
default: callfunc "QuestDebug" + @menuret;
}
} while (1);
@@ -105,17 +99,15 @@ function script GlobalQuestDebug {
mes l("Please select a quest:");
menuint
- menuimage("actions/back", l("Go back")), 32766,
- l("Cookies"), 18,
- "Rumly", 26,
- l("Narrator"), 28,
- "Janus", 31,
- menuimage("actions/exit", l("Close")), 32767;
+ menuimage("actions/back", l("Go back")), -1,
+ l("Cookies"), General_Cookies,
+ "Rumly", General_Rumly,
+ l("Narrator"), General_Narrator,
+ "Janus", General_Janus;
switch (@menuret)
{
- case 32766: return;
- case 32767: closedialog; end;
+ case -1: return;
default: callfunc "QuestDebug" + @menuret;
}
} while (1);
@@ -133,8 +125,7 @@ function script GlobalQuestDebug {
l("Prologue"),
"Artis",
l("Other"),
- rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))),
- menuimage("actions/exit", l("Close"));
+ rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu")));
switch (@menu)
{
@@ -142,7 +133,6 @@ function script GlobalQuestDebug {
case 2: qDebugArtis; break;
case 3: qDebugGeneral; break;
case 4: return;
- default: closedialog; end;
}
} while (1);
}
diff --git a/npc/commands/debug-skill.txt b/npc/commands/debug-skill.txt
index f782e753..187c4009 100644
--- a/npc/commands/debug-skill.txt
+++ b/npc/commands/debug-skill.txt
@@ -13,22 +13,20 @@ function script GlobalSkillDebug {
setnpcdialogtitle l("Skill Debug - Modify Skill");
.@k = getarg(0,1);
.@v = getskilllv(.@k);
- menuint
- menuimage("actions/abort", l("Abort")), 1,
- rif(.@v > 0, menuimage("actions/remove", l("Remove this skill"))), 2,
- rif(.@v < 10, menuimage("actions/raise", l("Raise this skill"))), 3,
- rif(.@v > 0, menuimage("actions/lower", l("Lower this skill"))), 4,
- menuimage("actions/edit", l("Set the level manually")), 5,
- menuimage("actions/back", l("Return to skill debug menu")), 1,
- menuimage("actions/exit", l("Close")), 6;
-
- switch (@menuret)
+ select
+ menuimage("actions/abort", l("Abort")),
+ rif(.@v > 0, menuimage("actions/remove", l("Remove this skill"))),
+ rif(.@v < 10, menuimage("actions/raise", l("Raise this skill"))),
+ rif(.@v > 0, menuimage("actions/lower", l("Lower this skill"))),
+ menuimage("actions/edit", l("Set the level manually")),
+ menuimage("actions/back", l("Return to skill debug menu"));
+
+ switch (@menu)
{
case 2: skill .@k, 0, 0; break;
case 3: skill .@k, min(10, .@v + 1), 0; break;
case 4: skill .@k, max(0, .@v - 1), 0; break;
case 5: setSkill .@k; break;
- case 6: closedialog; end;
}
return;
@@ -52,13 +50,11 @@ function script GlobalSkillDebug {
menuint
"NV_BASIC", NV_BASIC,
- rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))), 32766,
- menuimage("actions/exit", l("Close")), 32767;
+ rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))), -1;
switch (@menuret)
{
- case 32766: return;
- case 32767: closedialog; end;
+ case -1: return;
}
modifySkill @menuret;
diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt
index 1a5cdec9..306bed56 100644
--- a/npc/commands/debug.txt
+++ b/npc/commands/debug.txt
@@ -20,21 +20,19 @@ function script GlobalDebugMenu {
clear;
setnpcdialogtitle l("Debug - Reset");
mes l("What do you want to reset?");
- menuint
- menuimage("actions/abort", l("Abort")), 1,
- menuimage("actions/reset", l("Reset stats, skills, level")), 2,
- menuimage("actions/nuke", l("Reset EVERYTHING")), 3,
- menuimage("actions/back", l("Return to Debug menu")), 1,
- menuimage("actions/exit", l("Close")), 4;
+ select
+ menuimage("actions/abort", l("Abort")),
+ menuimage("actions/reset", l("Reset stats, skills, level")),
+ menuimage("actions/nuke", l("Reset EVERYTHING")),
+ menuimage("actions/back", l("Return to Debug menu"));
- switch (@menuret)
- {
- case 2:
- case 3: doReset @menuret;
- case 1: return;
- }
+ switch (@menu)
+ {
+ case 2:
+ case 3: doReset @menu;
+ }
- closedialog;
+ return;
}
function changeLevel {
@@ -97,30 +95,26 @@ function script GlobalDebugMenu {
mes l("This menu allows you to modify your account data.");
mes "";
mes l("What do you want to do?");
- menuint
- menuimage("actions/manage", l("Change my level")), 1,
- menuimage("actions/manage", l("Change my stats")), 2,
- menuimage("actions/manage", l("Change my skills")), 3,
- menuimage("actions/manage", l("Change my appearance")), 4,
- menuimage("actions/edit", l("Change my quests")), 5,
- menuimage("actions/reset", l("Select a preset")), 6,
- menuimage("actions/nuke", l("Reset")), 7,
- rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))), 8,
- menuimage("actions/exit", l("Close")), 9;
+ select
+ menuimage("actions/manage", l("Change my level")),
+ menuimage("actions/manage", l("Change my stats")),
+ menuimage("actions/manage", l("Change my skills")),
+ menuimage("actions/manage", l("Change my appearance")),
+ menuimage("actions/edit", l("Change my quests")),
+ menuimage("actions/reset", l("Reset")),
+ rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu")));
.@c = getarg(0,0) ? 2 : 1;
- switch (@menuret)
+ switch (@menu)
{
case 1: changeLevel; break;
case 2: changeStats; break;
case 3: GlobalSkillDebug .@c; break;
case 4: BarberDebug .@c; break;
case 5: GlobalQuestDebug .@c; break;
- case 6: DebugPresets "m"; break;
- case 7: resetAll; break;
- case 8: return;
- case 9: closedialog; end;
+ case 6: resetAll; break;
+ case 7: return;
}
} while(1);
}
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index ed40c184..a01162e2 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -4,16 +4,14 @@ function script GlobalEventMenu {
mes l("This menu allows you to manage events and gives access to event-related tools.");
mes "";
mes l("There is no event available right now.");
- menuint
- rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))), 1,
- menuimage("actions/exit", l("Close")), 2;
- if (@menuret == 1)
+ if (getarg(0,0))
{
- return;
+ select
+ menuimage("actions/home", l("Return to Super Menu"));
}
- closedialog;
+ return;
}
diff --git a/npc/commands/motd.txt b/npc/commands/motd.txt
index b0bc4ebd..ff3e6b49 100644
--- a/npc/commands/motd.txt
+++ b/npc/commands/motd.txt
@@ -95,15 +95,15 @@ function script MOTDConfig {
clear;
mes l("line @@: @@", .@n, $MOTD_Messages$[.@n]);
next;
- menuint
- menuimage("actions/back", l("Modify another line")), 1,
- menuimage("actions/remove", l("Remove this line")), 2,
- menuimage("actions/edit", l("Modify this line")), 3,
- rif(.@n > 0, menuimage("actions/raise", l("Move this line up"))), 4,
- rif(.@n < .@max, menuimage("actions/lower", l("Move this line down"))), 5,
- menuimage("actions/home", l("Return to main menu")), 6;
-
- switch (@menuret)
+ select
+ menuimage("actions/back", l("Modify another line")),
+ menuimage("actions/remove", l("Remove this line")),
+ menuimage("actions/edit", l("Modify this line")),
+ rif(.@n > 0, menuimage("actions/raise", l("Move this line up"))),
+ rif(.@n < .@max, menuimage("actions/lower", l("Move this line down"))),
+ menuimage("actions/home", l("Return to main menu"));
+
+ switch (@menu)
{
case 2: removeLine .@n; return;
case 3: editLine .@n; return;
@@ -137,21 +137,19 @@ function script MOTDConfig {
mes l("Enabled: @@", (.@d ? l("no") : l("yes")));
next;
- menuint
- menuimage("actions/toggle", (.@d ? l("Enable") : l("Disable"))), 1,
- menuimage("actions/add", l("Add a new line")), 2,
- rif(.@size, menuimage("actions/manage", l("Modify, move, or remove a line"))), 3,
- rif(.@size, menuimage("actions/test", l("Test MOTD"))), 4,
- rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))), 5,
- menuimage("actions/exit", l("Close")), 6;
+ select
+ menuimage("actions/toggle", (.@d ? l("Enable") : l("Disable"))),
+ menuimage("actions/add", l("Add a new line")),
+ rif(.@size, menuimage("actions/manage", l("Modify, move, or remove a line"))),
+ rif(.@size, menuimage("actions/test", l("Test MOTD"))),
+ rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu")));
- switch (@menuret)
+ switch (@menu)
{
case 1: toggleMOTD; break;
case 2: addNewLine; break;
case 3: modifyLine .@size; break;
case 4: displayMOTD; break;
- case 6: closedialog; end;
default: return;
}
} while (1);
@@ -174,7 +172,7 @@ OnPCLoginEvent:
}
if (debug)
{
- dispbottom "##7<<##B @@?test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>";
+ dispbottom "##7<<##B @@help://test-server|" + col(l("Click here for instructions on how to use the test server."),6) + "@@ ##7>>";
}
end;
diff --git a/npc/commands/scheduled-broadcasts.txt b/npc/commands/scheduled-broadcasts.txt
index b520f0b0..51f1f6a6 100644
--- a/npc/commands/scheduled-broadcasts.txt
+++ b/npc/commands/scheduled-broadcasts.txt
@@ -30,7 +30,7 @@ function script StoneBoard {
l("Every 24 hours"), 24,
l("Never (only on login)"), 0;
- return max(0, @menuret);
+ return @menuret;
}
function setMaxRep {
@@ -50,7 +50,7 @@ function script StoneBoard {
l("Send 20 times"), 20,
l("Send indefinitely"), 0;
- return max(0, @menuret);
+ return @menuret;
}
function setOnLogin {
@@ -61,11 +61,11 @@ function script StoneBoard {
clear;
mes l("Send this message also on login?");
next;
- menuint
- l("No"), 0,
- l("Yes"), 1;
+ select
+ l("No"),
+ l("Yes");
- return max(0, @menuret);
+ return (@menu - 1);
}
function newBroadcast {
@@ -98,14 +98,13 @@ function script StoneBoard {
}
next;
- menuint
- menuimage("actions/cancel", l("Discard")), 1,
- menuimage("actions/edit", l("Start over")), 2,
- menuimage("actions/test", l("Start broadcasting")), 3,
- menuimage("actions/test", l("Start broadcasting, and make an extra broadcast right now")), 4,
- menuimage("actions/exit", l("Close")), 5;
-
- switch (@menuret)
+ select
+ menuimage("actions/cancel", l("Discard")),
+ menuimage("actions/edit", l("Start over")),
+ menuimage("actions/test", l("Start broadcasting")),
+ menuimage("actions/test", l("Start broadcasting, and make an extra broadcast right now"));
+
+ switch (@menu)
{
case 3:
case 4:
@@ -120,12 +119,11 @@ function script StoneBoard {
{
initnpctimer "@sched";
}
- if (@menuret == 4)
+ if (@menu == 4)
{
announce $@SCHED_Msg$, bc_all;
}
case 1: return;
- case 5: closedialog; end;
}
} while(1);
@@ -147,7 +145,7 @@ function script StoneBoard {
mes l("Sent on login: @@", ($@SCHED_Opt[0] ? l("yes") : l("no")));
if ($@SCHED_Opt[1])
{
- .@next = max(1, ((3600000 * ($@SCHED_Opt[1] - $@SCHED_Opt[4])) - getnpctimer(0)));
+ .@next = max(1, ((3600000 * ($@SCHED_Opt[1] - $@SCHED_Opt[4])) - getnpctimer(0, "@sched")));
mes l("Interval: every @@ hour(s)", $@SCHED_Opt[1]);
mes l("Next broadcast: @@", FuzzyTimeFromMs(.@next));
}
@@ -160,20 +158,18 @@ function script StoneBoard {
}
next;
- menuint
- menuimage("actions/abort", l("Abort")), 5,
- rif(.@a, menuimage("actions/test", l("Manually trigger the current broadcast"))), 2,
- rif(.@a, menuimage("actions/remove", l("Stop broadcasting"))), 3,
- rif(!(.@a), menuimage("actions/add", l("Set a new broadcast"))), 4,
- rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu"))), 5,
- menuimage("actions/exit", l("Close")), 6;
-
- switch (@menuret)
+ select
+ menuimage("actions/abort", l("Abort")),
+ rif(.@a, menuimage("actions/test", l("Manually trigger the current broadcast"))),
+ rif(.@a, menuimage("actions/remove", l("Stop broadcasting"))),
+ rif(!(.@a), menuimage("actions/add", l("Set a new broadcast"))),
+ rif(getarg(0,0), menuimage("actions/home", l("Return to Super Menu")));
+
+ switch (@menu)
{
case 2: announce $@SCHED_Msg$, bc_all; break;
case 3: $@SCHED_Msg$ = ""; break;
case 4: newBroadcast; break;
- case 6: closedialog; end;
default: return;
}
} while (1);
@@ -185,21 +181,26 @@ function script StoneBoard {
end;
OnTimer3600000:
- ++$@SCHED_Opt[4];
- if ($@SCHED_Opt[4] == ($@SCHED_Opt[1] - 1))
+ if ($@SCHED_Msg$ == "")
+ {
+ stopnpctimer;
+ end;
+ }
+
+ ++$@SCHED_Opt[4]; // increase hours counter
+ if ($@SCHED_Opt[4] == $@SCHED_Opt[1])
{
stopnpctimer;
- ++$@SCHED_Opt[2];
- if ($@SCHED_Msg$ != "")
+ ++$@SCHED_Opt[2]; // increase total counter
+ announce $@SCHED_Msg$, bc_all;
+ $@SCHED_Opt[4] = 0; // reset hours counter
+ if ($@SCHED_Opt[2] >= $@SCHED_Opt[3] && $@SCHED_Opt[3] > 0)
{
- announce $@SCHED_Msg$, bc_all;
- $@SCHED_Opt[4] = 0;
- if ($@SCHED_Opt[2] < $@SCHED_Opt[3] && $@SCHED_Opt[3] > 0)
- {
- initnpctimer;
- }
+ $@SCHED_Msg$ = ""; // reset message
+ end;
}
}
+ initnpctimer;
end;
OnCall:
diff --git a/npc/commands/numa.txt b/npc/commands/super-menu.txt
index f9fff699..fede6e71 100644
--- a/npc/commands/numa.txt
+++ b/npc/commands/super-menu.txt
@@ -2,33 +2,38 @@ function script SuperMenu {
do
{
.@gid = getgroupid();
+
+ if (.@gid < 3)
+ {
+ GlobalDebugMenu;
+ return;
+ }
+
clear;
setnpcdialogtitle l("Super Menu");
mes l("This menu contains all options available to you, based on your access privileges.");
mes "";
mes l("What do you want to access?");
next;
- menuint
- rif(.@gid >= 3, l("Scheduled broadcasts")), 1,
- rif(.@gid >= 3, l("MOTD")), 2,
- rif(.@gid >= 4, l("Event management")), 3,
- l("Debug"), 4,
- l("Close"), 5;
-
- switch (@menuret)
+ select
+ l("Scheduled broadcasts"),
+ l("MOTD"),
+ rif(.@gid >= 4, l("Event management")),
+ l("Debug");
+
+ switch (@menu)
{
case 1: StoneBoard 1; break;
case 2: MOTDConfig 1; break;
case 3: GlobalEventMenu 1; break;
case 4: GlobalDebugMenu 1; break;
- default: return;
}
} while (1);
}
-- script @numa 32767,{
+- script @super 32767,{
end;
OnCall:
@@ -44,6 +49,21 @@ OnCall:
closedialog;
end;
+OnPCLoginEvent:
+ .@debug_skill = getskilllv(EVOL_SUPER_MENU);
+
+ if (.@debug_skill > 0 && !debug)
+ {
+ skill EVOL_SUPER_MENU, 0, 0; // remove debug skill
+ }
+
+ else if (.@debug_skill < 1 && debug)
+ {
+ skill EVOL_SUPER_MENU, 1, 0; // give debug skill
+ }
+ end;
+
OnInit:
- bindatcmd "numa", "@numa::OnCall", 0, 99, 0;
+ bindatcmd "super", "@super::OnCall", 0, 99, 0;
+ bindatcmd "numa", "@super::OnCall", 0, 99, 0; // alias for those used to TMW's @numa
}
diff --git a/npc/commands/warp.txt b/npc/commands/warp.txt
index f8e25bc0..b4354d51 100644
--- a/npc/commands/warp.txt
+++ b/npc/commands/warp.txt
@@ -227,5 +227,11 @@ OnCall:
end;
OnInit:
+ if (debug > 0)
+ {
+ bindatcmd "w", "@w::OnCall", 0, 2, 0;
+ end;
+ }
+
bindatcmd "w", "@w::OnCall", 1, 2, 1;
}
diff --git a/npc/commands/zeny.txt b/npc/commands/zeny.txt
index 560c7a94..2948a285 100644
--- a/npc/commands/zeny.txt
+++ b/npc/commands/zeny.txt
@@ -86,5 +86,11 @@ OnCall:
end;
OnInit:
+ if (debug > 0)
+ {
+ bindatcmd "esp", "@esp::OnCall", 0, 2, 0;
+ end;
+ }
+
bindatcmd "esp", "@esp::OnCall", 3, 99, 1;
}