diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/commands/debug.txt | 148 | ||||
-rw-r--r-- | npc/commands/numa.txt | 2 | ||||
-rw-r--r-- | npc/scripts.conf | 1 |
3 files changed, 150 insertions, 1 deletions
diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt new file mode 100644 index 00000000..abf5c721 --- /dev/null +++ b/npc/commands/debug.txt @@ -0,0 +1,148 @@ +function script GlobalDebugMenu { + function resetAll { + function doReset { + resetstatus; + resetskill; + resetlvl 1; + dispbottom l("Reset done!"); + if (getarg(0,0) == 3) + { + closedialog; + doevent "::OnGlobalQuestReset"; // executes in all quest npcs // FIXME: maybe have a `resetquest` buildin? + Zeny = 0; + #MerchantBank = 0; + getinventorylist; + for (.@o = 0; .@o < @inventorylist_count; ++.@o) + { + delitem @inventorylist_id[.@o], @inventorylist_amount[.@o]; + } + warp "000-0", 0, 0; // starting point + end; // script must end for doevent to execute + } + return; + } + 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; + + switch (@menuret) + { + case 2: + case 3: doReset @menuret; + case 1: return; + } + + closedialog; + } + + function changeLevel { + clear; + setnpcdialogtitle l("Debug - Change level"); + mes l("To change your base level, use this command:"); + mes ""; + mes " " + col("@blvl <" + l("delta") + ">", 3); + next; + mes l("Example:"); + mes "@blvl 50"; + mes " " + l("Raises your base level by 50"); + mes "@blvl -50"; + mes " " + l("Reduces your base level by 50"); + next; + mes l("To change your job level, use this command:"); + mes ""; + mes " " + col("@jlvl <" + l("delta") + ">", 3); + next; + mes l("Example:"); + mes "@jlvl 50"; + mes " " + l("Raises your job level by 50"); + mes "@jlvl -50"; + mes " " + l("Reduces your job level by 50"); + next; + return; + } + function changeStats { + clear; + setnpcdialogtitle l("Debug - Change stats"); + mes l("To change your stats, use these commands:"); + mes ""; + mes " " + col("@str <" + l("delta") + ">", 3); + mes " " + col("@agi <" + l("delta") + ">", 3); + mes " " + col("@vit <" + l("delta") + ">", 3); + mes " " + col("@int <" + l("delta") + ">", 3); + mes " " + col("@dex <" + l("delta") + ">", 3); + mes " " + col("@luk <" + l("delta") + ">", 3); + next; + mes l("Example:"); + mes "@int 50"; + mes " " + l("Raises your Int by 50"); + mes "@int -50"; + mes " " + l("Reduces your Int by 50"); + next; + mes l("If you simply wish to get 99 in all stats:"); + mes ""; + mes " " + col("@allstats", 3); + next; + mes l("If you wish to reset your stats:"); + mes ""; + mes " " + col("@streset", 3); + next; + return; + } + do + { + clear; + setnpcdialogtitle l("Debug"); + 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; + + .@c = getarg(0,0) ? 2 : 1; + + switch (@menuret) + { + case 1: changeLevel; break; + case 2: changeStats; break; + //case 3: GlobalSkillDebug .@c; break; + //case 4: BarberDebug .@c; break; + //case 5: changeQuests; break; + //case 6: DebugPresets; break; + case 7: resetAll; break; + case 8: return; + case 9: closedialog; end; + } + } while(1); +} + + + +- script @debug 32767,{ + end; + +OnCall: + if (!debug && getgroupid() < 99) + { + end; + } + GlobalDebugMenu; + closedialog; + end; + +OnInit: + bindatcmd "debug", "@debug::OnCall", 0, 99, 0; +} diff --git a/npc/commands/numa.txt b/npc/commands/numa.txt index 5ab58812..cd28c580 100644 --- a/npc/commands/numa.txt +++ b/npc/commands/numa.txt @@ -20,7 +20,7 @@ function script SuperMenu { //case 1: StoneBoard 1; break; case 2: MOTDConfig 1; break; case 3: GlobalEventMenu 1; break; - //case 4: GlobalDebugMenu 1; break; + case 4: GlobalDebugMenu 1; break; default: return; } } while (1); diff --git a/npc/scripts.conf b/npc/scripts.conf index c66cb1af..be68e3a0 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.txt", "npc/commands/numa.txt", // config script |