summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2016-08-13 13:49:46 -0400
committergumi <mekolat@users.noreply.github.com>2016-09-01 12:09:00 -0400
commitf0173b4dcba4cc8ab82a57e44e3b5176a1ad2def (patch)
treeaf42a83ff77f799c0d36172f18dedf34319d59ca /npc
parent981a1e7326f879ffecf0532d36b0bad0a0bdcecf (diff)
downloadserverdata-f0173b4dcba4cc8ab82a57e44e3b5176a1ad2def.tar.gz
serverdata-f0173b4dcba4cc8ab82a57e44e3b5176a1ad2def.tar.bz2
serverdata-f0173b4dcba4cc8ab82a57e44e3b5176a1ad2def.tar.xz
serverdata-f0173b4dcba4cc8ab82a57e44e3b5176a1ad2def.zip
add skill debug
Diffstat (limited to 'npc')
-rw-r--r--npc/commands/debug-skill.txt85
-rw-r--r--npc/commands/debug.txt2
-rw-r--r--npc/scripts.conf1
3 files changed, 87 insertions, 1 deletions
diff --git a/npc/commands/debug-skill.txt b/npc/commands/debug-skill.txt
new file mode 100644
index 00000000..f782e753
--- /dev/null
+++ b/npc/commands/debug-skill.txt
@@ -0,0 +1,85 @@
+function script GlobalSkillDebug {
+
+ function modifySkill {
+
+ function setSkill {
+ clear;
+ mes l("Enter desired skill level:");
+ input .@y;
+ skill getarg(0,1), max(0, min(10, .@y)), 0;
+ return;
+ }
+
+ 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)
+ {
+ 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;
+ }
+
+ do
+ {
+ clear;
+ setnpcdialogtitle l("Skill Debug");
+ mes l("This menu allows you to change your skills.");
+ mes "";
+
+ mes "---";
+ // FIXME: maybe get skills from an array or `getskilllist;` <= would need a `getskillinfo()` buildin though
+ mes "NV_BASIC: " + getskilllv(NV_BASIC);
+ mes "---";
+
+ mes "";
+ mes l("Which skill do you wish to change?");
+ next;
+
+ menuint
+ "NV_BASIC", NV_BASIC,
+ rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))), 32766,
+ menuimage("actions/exit", l("Close")), 32767;
+
+ switch (@menuret)
+ {
+ case 32766: return;
+ case 32767: closedialog; end;
+ }
+
+ modifySkill @menuret;
+
+ } while (1);
+}
+
+
+
+- script @sdebug 32767,{
+ end;
+
+OnCall:
+ if (!debug && getgroupid() < 99)
+ {
+ end;
+ }
+ GlobalSkillDebug;
+ closedialog;
+ end;
+
+OnInit:
+ bindatcmd "sdebug", "@sdebug::OnCall", 0, 99, 0;
+}
diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt
index abf5c721..54cb96fe 100644
--- a/npc/commands/debug.txt
+++ b/npc/commands/debug.txt
@@ -118,7 +118,7 @@ function script GlobalDebugMenu {
{
case 1: changeLevel; break;
case 2: changeStats; break;
- //case 3: GlobalSkillDebug .@c; break;
+ case 3: GlobalSkillDebug .@c; break;
//case 4: BarberDebug .@c; break;
//case 5: changeQuests; break;
//case 6: DebugPresets; break;
diff --git a/npc/scripts.conf b/npc/scripts.conf
index be68e3a0..f0849238 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -38,6 +38,7 @@
"npc/commands/zeny.txt",
"npc/commands/motd.txt",
"npc/commands/event.txt",
+"npc/commands/debug-skill.txt",
"npc/commands/debug.txt",
"npc/commands/numa.txt",