summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-11 11:45:30 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-11 11:45:30 -0300
commit964018501cd9c86790ff206692500841056733d1 (patch)
tree6de960490befac31afa56d52570331694c8482a7 /npc
parentf29978094ea5a9962ac149805c0393d5d3dda7e4 (diff)
downloadserverdata-964018501cd9c86790ff206692500841056733d1.tar.gz
serverdata-964018501cd9c86790ff206692500841056733d1.tar.bz2
serverdata-964018501cd9c86790ff206692500841056733d1.tar.xz
serverdata-964018501cd9c86790ff206692500841056733d1.zip
Fix some bugs (registercmd), improve a bit debug menu
Diffstat (limited to 'npc')
-rw-r--r--npc/commands/debug.txt25
-rw-r--r--npc/functions/main.txt11
2 files changed, 32 insertions, 4 deletions
diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt
index e61858be..ad56d904 100644
--- a/npc/commands/debug.txt
+++ b/npc/commands/debug.txt
@@ -86,6 +86,8 @@ L_FocusSkills:
l("Back"), -3,
l("Focus Skill +"), -2,
rif(getskilllv(SKILL_POOL), l("Focus Skill -")), -1,
+ l("Add all focus skills"), 0,
+ l("Remove all focus skills"), -4,
("Toggle Focus - Mallards Eye"), SKILL_MALLARDS_EYE,
("Toggle Focus - Brawling"), SKILL_BRAWLING,
("Toggle Focus - Speed"), SKILL_SPEED,
@@ -99,6 +101,23 @@ L_FocusSkills:
skill SKILL_POOL, @pool+1, 0; break;
case -1:
skill SKILL_POOL, max(0, @pool-1), 0; break;
+ case 0:
+ addtoskill SKILL_MALLARDS_EYE, 9;
+ addtoskill SKILL_BRAWLING, 9;
+ addtoskill SKILL_SPEED, 9;
+ addtoskill SKILL_RESIST_POISON, 9;
+ addtoskill SKILL_ASTRAL_SOUL, 9;
+ addtoskill SKILL_RAGING, 9;
+ break;
+ case -4:
+ skill SKILL_POOL, 0, 0; break;
+ addtoskill SKILL_MALLARDS_EYE, 0;
+ addtoskill SKILL_BRAWLING, 0;
+ addtoskill SKILL_SPEED, 0;
+ addtoskill SKILL_RESIST_POISON, 0;
+ addtoskill SKILL_ASTRAL_SOUL, 0;
+ addtoskill SKILL_RAGING, 0;
+ break;
default:
if (FOCUSING & getpoolskillFID(@menuret)) {
unpoolskill(@menuret);
@@ -669,15 +688,15 @@ L_close:
}
- script Debug Spell NPC32767,{
- if(!debug && getgmlevel() < CMD_DEBUG) end;
+OnDebug:
+ if (!debug && getgmlevel() < CMD_DEBUG) end;
callfunc "Debug";
end;
OnDeprecated:
message strcharinfo(0), "Debug : ##3The #debug spell has been superseded by the ##B@debug##b command.";
end;
OnInit:
- registercmd "@debug", "Debug Spell";
- registercmd "#debug", "Debug Spell::OnDeprecated";
+ registercmd "@debug", "Debug Spell::OnDebug";
end;
}
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index 58d1bff0..930e5283 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -602,7 +602,11 @@ function script wgm {
}
function script registercmd {
- bindatcmd getarg(0), getarg(1), getarg(2, 0);
+ // Remove "@" from command start
+ .@cmd$=getarg(1);
+ if (charat(.@cmd$, 0) == "@")
+ delchar(.@cmd$, 0);
+ bindatcmd getarg(0), .@cmd$, getarg(2, 0);
return;
}
@@ -615,3 +619,8 @@ function script readparam2 {
return;
}
+function script updateskill {
+ skill getarg(0), getarg(1), 0;
+ return;
+}
+