diff options
-rw-r--r-- | npc/commands/debug.txt | 45 | ||||
-rw-r--r-- | npc/magic/config.txt | 6 |
2 files changed, 46 insertions, 5 deletions
diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt index 6aa0510d..e61858be 100644 --- a/npc/commands/debug.txt +++ b/npc/commands/debug.txt @@ -57,7 +57,6 @@ L_BasicSkills: goto L_Begin; L_FocusSkills: - /* @pool = getskilllv(SKILL_POOL); @mallard = getskilllv(SKILL_MALLARDS_EYE); @brawling = getskilllv(SKILL_BRAWLING); @@ -65,6 +64,7 @@ L_FocusSkills: @poison = getskilllv(SKILL_RESIST_POISON); @astralsoul = getskilllv(SKILL_ASTRAL_SOUL); @raging = getskilllv(SKILL_RAGING); + /* menu "Overview of my focus skills.", L_SeeFocusSkills, "Focus or unfocus.", L_Unfocus, @@ -72,7 +72,47 @@ L_FocusSkills: "Reset focus skills.", L_ResetFocusSkills, "Back to the main menu.", L_Begin, "Close.", L_close; - + */ + mes "Your focusing skill level is " + @pool + "."; + mes "Your mallard's eye skill level is " + @mallard + "."; + mes "Your brawling skill level is " + @brawling + "."; + mes "Your speed skill level is " + @speed + "."; + mes "Your resist poison skill level is " + @poison + "."; + mes "Your astral soul skill level is " + @astralsoul + "."; + mes "Your raging skill level is " + @raging + "."; + next; + .@t=getactivatedpoolskilllist(); + menuint + l("Back"), -3, + l("Focus Skill +"), -2, + rif(getskilllv(SKILL_POOL), l("Focus Skill -")), -1, + ("Toggle Focus - Mallards Eye"), SKILL_MALLARDS_EYE, + ("Toggle Focus - Brawling"), SKILL_BRAWLING, + ("Toggle Focus - Speed"), SKILL_SPEED, + ("Toggle Focus - Resist Ailment"), SKILL_RESIST_POISON, + ("Toggle Focus - Astral Soul"), SKILL_ASTRAL_SOUL, + ("Toggle Focus - Raging"), SKILL_RAGING; + mes ""; + switch (@menuret) { + case -3: goto L_Begin; + case -2: + skill SKILL_POOL, @pool+1, 0; break; + case -1: + skill SKILL_POOL, max(0, @pool-1), 0; break; + default: + if (FOCUSING & getpoolskillFID(@menuret)) { + unpoolskill(@menuret); + mesc "Focus removed", 1; + } else { + .@s = poolskill(@menuret); + if (.@s) + mesc "Focus added", 2; + else + mesc sprintf("Impossible to focus. You can only focus %d skills at a time.", .@t), 1; + } + } + goto L_FocusSkills; + /* L_SeeFocusSkills: cleararray @skilllist_name$[0], "", 8; cleararray @skilllist_id[0], 0, 8; @@ -258,7 +298,6 @@ L_ResetFocusSkills: next; goto L_FocusSkills; */ - goto L_Begin; L_MagicSkills: @general = getskilllv(SKILL_MAGIC); diff --git a/npc/magic/config.txt b/npc/magic/config.txt index 1cde0148..5bcdd306 100644 --- a/npc/magic/config.txt +++ b/npc/magic/config.txt @@ -372,9 +372,11 @@ function script getpoolskillFID { // poolskill(skill) function script poolskill { - if (bitmask_count(FOCUSING) < getskilllv(SKILL_POOL)) + if (bitmask_count(FOCUSING) < getskilllv(SKILL_POOL)) { FOCUSING=FOCUSING | getpoolskillFID(getarg(0)); - return; + return true; + } + return false; } // unpoolskill(skill) |