diff options
Diffstat (limited to 'npc/commands/debug-skill.txt')
-rw-r--r-- | npc/commands/debug-skill.txt | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/npc/commands/debug-skill.txt b/npc/commands/debug-skill.txt index 2a3ef551..1d1dfcd1 100644 --- a/npc/commands/debug-skill.txt +++ b/npc/commands/debug-skill.txt @@ -40,34 +40,25 @@ function script GlobalSkillDebug { mes ""; mes "---"; - - .@size = getarraysize(getvariableofnpc(.debug_skills$, "@sdebug")); - - for (.@s = 0; .@s < .@size; ++.@s) { - .@skill$ = getvariableofnpc(.debug_skills$[.@s], "@sdebug"); - mesf("%s: %d", .@skill$, getskilllv(string_to_data(.@skill$))); - } - + // 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; - .@select$ = implode(getvariableofnpc(.debug_skills$, "@sdebug"), ":"); + menuint + "NV_BASIC", NV_BASIC, + rif(getarg(0,0), menuimage("actions/back", l("Return to Debug menu"))), -1; - if (getarg(0, 0)) { - .@select$ += ":" + menuimage("actions/back", l("Return to Debug menu")); + switch (@menuret) + { + case -1: return; } - select(.@select$); + modifySkill @menuret; - if (--@menu == .@size) { - return; - } else { - .@skill$ = getvariableofnpc(.debug_skills$[@menu], "@sdebug"); - modifySkill(string_to_data(.@skill$)); - } } while (1); } @@ -86,9 +77,5 @@ OnCall: end; OnInit: - setarray(.debug_skills$, - "NV_BASIC", - "EVOL_CRAFTING"); - bindatcmd "sdebug", "@sdebug::OnCall", 0, 99, 0; } |