summaryrefslogtreecommitdiff
path: root/npc/commands/debug.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-10 03:00:20 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-10 03:00:20 -0300
commitba1e827b6b4c17c35a163e6b55be8c122de632b8 (patch)
tree819f93d0ffee3697e336471710afb9681f0b8d86 /npc/commands/debug.txt
parent6e7f3113c0faad9edd4367d100ba9dd77e8d3130 (diff)
downloadserverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.tar.gz
serverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.tar.bz2
serverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.tar.xz
serverdata-ba1e827b6b4c17c35a163e6b55be8c122de632b8.zip
Add several convenience functions. Fix some bugs regarding misuse of readparam()
Diffstat (limited to 'npc/commands/debug.txt')
-rwxr-xr-xnpc/commands/debug.txt312
1 files changed, 9 insertions, 303 deletions
diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt
index c1ebf81d..f14d1363 100755
--- a/npc/commands/debug.txt
+++ b/npc/commands/debug.txt
@@ -1,11 +1,6 @@
function script Debug {
- if(!@debug_npc) goto L_Begin;
- mes "The debug NPCs have been deprecated. Please use this command instead:";
- mes "";
- mes "%%E ##a@debug##0";
- @debug_npc = 0;
- goto L_close;
+ goto L_Begin;
L_Begin:
@debug_mask = 65535;
@@ -13,8 +8,8 @@ L_Begin:
@mexp = ((MAGIC_EXPERIENCE & @debug_mask) >> @debug_shift);
mes "What do you want to do?";
menu
+ "Reset stat points.", L_Level,
"Change my level.", L_Level,
- "Change my stats.", L_Status,
"Change my basic skills.", L_BasicSkills,
"Change my focus skills.", L_FocusSkills,
"Change my magic skills.", L_MagicSkills,
@@ -51,188 +46,6 @@ L_SameLevel:
next;
goto L_Begin;
-L_Status:
- mes "What do you want to do?";
- menu
- "Set all of my stats myself.", L_ChangeStrength,
- "Set one of my stats myself.", L_ChangeSingleStat,
- "Get maximum points in all stats.", L_ChangeAllStats,
- "Reset my status points.", L_ResetStatusPoints,
- "Back to the main menu.", L_Begin,
- "Close.", L_close;
-
-L_ChangeAllStats:
- Str = 99;
- Agi = 99;
- Vit = 99;
- Int = 99;
- Dex = 99;
- Luk = 99;
- mes "You now have 99 in all stats.";
- next;
- goto L_Begin;
-
-L_ChangeStrength:
- mes "How much strength do you want to have (min: 1 - max: 99)?";
- input @str;
- if (@str < 1)
- goto L_StatTooLow;
- if (@str > 99)
- goto L_StatTooHigh;
- Str = @str;
- goto L_ChangeAgility;
-
-L_ChangeAgility:
- mes "How much agility do you want to have (min: 1 - max: 99)?";
- input @agi;
- if (@agi < 1)
- goto L_StatTooLow;
- if (@agi > 99)
- goto L_StatTooHigh;
- Agi = @agi;
- goto L_ChangeVitality;
-
-L_ChangeVitality:
- mes "How much vitality do you want to have (min: 1 - max: 99)?";
- input @vit;
- if (@vit < 1)
- goto L_StatTooLow;
- if (@vit > 99)
- goto L_StatTooHigh;
- Vit = @vit;
- goto L_ChangeIntelligence;
-
-L_ChangeIntelligence:
- mes "How much intelligence do you want to have (min: 1 - max: 99)?";
- input @int;
- if (@int < 1)
- goto L_StatTooLow;
- if (@int > 99)
- goto L_StatTooHigh;
- Int = @int;
- goto L_ChangeDexterity;
-
-L_ChangeDexterity:
- mes "How much dexterity do you want to have (min: 1 - max: 99)?";
- input @dex;
- if (@dex < 1)
- goto L_StatTooLow;
- if (@dex > 99)
- goto L_StatTooHigh;
- Dex = @dex;
- goto L_ChangeLuck;
-
-L_ChangeLuck:
- mes "How much luck do you want to have (min: 1 - max: 99)?";
- input @luk;
- if (@luk < 1)
- goto L_StatTooLow;
- if (@luk > 99)
- goto L_StatTooHigh;
- Luk = @luk;
- mes "You now have " + Str + " in strength.";
- mes "You now have " + Agi + " in agility.";
- mes "You now have " + Vit + " in vitality.";
- mes "You now have " + Int + " in intelligence.";
- mes "You now have " + Dex + " in dexterity.";
- mes "You now have " + Luk + " in luck.";
- next;
- goto L_Begin;
-
-L_StatTooLow:
- mes "Bad choice. Minimum stat value is 1. Aborting.";
- next;
- goto L_Status;
-
-L_StatTooHigh:
- mes "Bad choice. Maximum stat value is 99. Aborting.";
- next;
- goto L_Status;
-
-L_ChangeSingleStat:
- mes "Which stat do you want to change?";
- menu
- "Strength.", L_ChangeStrengthSingle,
- "Agility.", L_ChangeAgilitySingle,
- "Vitality.", L_ChangeVitalitySingle,
- "Intelligence.", L_ChangeIntelligenceSingle,
- "Dexterity.", L_ChangeDexteritySingle,
- "Luck.", L_ChangeLuckSingle,
- "Back to the main menu.", L_Begin,
- "Close.", L_close;
-
-L_ChangeStrengthSingle:
- mes "How much strength do you want to have (min: 1 - max: 99)?";
- input @str;
- if (@str < 1)
- goto L_StatTooLow;
- if (@str > 99)
- goto L_StatTooHigh;
- Str = @str;
- mes "You now have " + Str + " in strength.";
- next;
- goto L_Begin;
-
-L_ChangeAgilitySingle:
- mes "How much agility do you want to have (min: 1 - max: 99)?";
- input @agi;
- if (@agi < 1)
- goto L_StatTooLow;
- if (@agi > 99)
- goto L_StatTooHigh;
- Agi = @agi;
- mes "You now have " + Agi + " in agility.";
- next;
- goto L_Begin;
-
-L_ChangeVitalitySingle:
- mes "How much vitality do you want to have (min: 1 - max: 99)?";
- input @vit;
- if (@vit < 1)
- goto L_StatTooLow;
- if (@vit > 99)
- goto L_StatTooHigh;
- Vit = @vit;
- mes "You now have " + Vit + " in vitality.";
- next;
- goto L_Begin;
-
-L_ChangeIntelligenceSingle:
- mes "How much intelligence do you want to have (min: 1 - max: 99)?";
- input @int;
- if (@int < 1)
- goto L_StatTooLow;
- if (@int > 99)
- goto L_StatTooHigh;
- Int = @int;
- mes "You now have " + Int + " in intelligence.";
- next;
- goto L_Begin;
-
-L_ChangeDexteritySingle:
- mes "How much dexterity do you want to have (min: 1 - max: 99)?";
- input @dex;
- if (@dex < 1)
- goto L_StatTooLow;
- if (@dex > 99)
- goto L_StatTooHigh;
- Dex = @dex;
- mes "You now have " + Dex + " in dexterity.";
- next;
- goto L_Begin;
-
-L_ChangeLuckSingle:
- mes "How much luck do you want to have (min: 1 - max: 99)?";
- input @luk;
- if (@luk < 1)
- goto L_StatTooLow;
- if (@luk > 99)
- goto L_StatTooHigh;
- Luk = @luk;
- mes "You now have " + Luk + " in luck.";
- next;
- goto L_Begin;
-
L_ResetStatusPoints:
resetstatus;
mes "Stats successfully resetted.";
@@ -240,113 +53,13 @@ L_ResetStatusPoints:
goto L_Begin;
L_BasicSkills:
- @emote = getskilllv(SKILL_EMOTE);
- @trade = getskilllv(SKILL_TRADE);
- @party = getskilllv(SKILL_PARTY);
- menu
- "Overview of my basic skills.", L_BasicSkillsOverview,
- "Add basic skills.", L_AddBasicSkills,
- "Reset basic skills.", L_ResetBasicSkills,
- "Back to main menu.", L_Begin,
- "Close.", L_close;
-
-L_BasicSkillsOverview:
- mes "Your level in the emote skill is " + @emote + ".";
- mes "Your level in the trade skill is " + @trade + ".";
- mes "Your level in the party skill is " + @party + ".";
- next;
- goto L_BasicSkills;
-
-L_AddBasicSkills:
- menu
- "Emote", L_ChangeEmoteSkill,
- "Trade.", L_ChangeTradeSkill,
- "Party.", L_ChangePartySkill,
- "All basic skills to their maximum level.", L_AllBasicSkills,
- "Back to the basic skills menu.", L_BasicSkills,
- "Close.", L_close;
-
-L_ChangeEmoteSkill:
- mes "Your level in the emote skill is " + @emote + ". What do you want to do?";
- menu
- "Get level 0.", L_Next,
- "Get level 1.", L_ChangeEmoteSkill1;
-
-L_Next:
- if (@menu == 1)
- addtoskill SKILL_EMOTE, 0;
- mes "Emote skill changed to level 0.";
- next;
- goto L_BasicSkills;
-
-L_ChangeEmoteSkill1:
- addtoskill SKILL_EMOTE, 1;
- mes "Emote skill changed to level 1.";
- next;
- goto L_BasicSkills;
-
-L_ChangeTradeSkill:
- mes "Your level in the trade skill is " + @trade + ". What do you want to do?";
- menu
- "Get level 0.", L_Next1,
- "Get level 1.", L_ChangeTradeSkill1;
-
-L_Next1:
- if (@menu == 1)
- addtoskill SKILL_TRADE, 0;
- mes "Trade skill changed to level 0.";
- next;
- goto L_BasicSkills;
-
-L_ChangeTradeSkill1:
- addtoskill SKILL_TRADE, 1;
- mes "Trade skill changed to level 1.";
- next;
- goto L_BasicSkills;
-
-L_ChangePartySkill:
- mes "Your level in the party skill is " + @trade + ". What do you want to do?";
- menu
- "Get level 0.", L_Next2,
- "Get level 1.", L_ChangePartySkill1,
- "Get level 2.", L_ChangePartySkill2;
-
-L_Next2:
- if (@menu == 1)
- addtoskill SKILL_PARTY, 0;
- mes "Party skill changed to level 0.";
- next;
- goto L_BasicSkills;
-
-L_ChangePartySkill1:
- addtoskill SKILL_PARTY, 1;
- mes "Party skill changed to level 1.";
- next;
- goto L_BasicSkills;
-
-L_ChangePartySkill2:
- addtoskill SKILL_PARTY, 2;
- mes "Party skill changed to level 2.";
- next;
- goto L_BasicSkills;
-
-L_AllBasicSkills:
- addtoskill SKILL_EMOTE, 1;
- addtoskill SKILL_TRADE, 1;
- addtoskill SKILL_PARTY, 2;
- mes "Basic skills added.";
- next;
- goto L_BasicSkills;
-
-L_ResetBasicSkills:
- addtoskill SKILL_EMOTE, 0;
- addtoskill SKILL_TRADE, 0;
- addtoskill SKILL_PARTY, 0;
- mes "Basic skills removed.";
- next;
- goto L_BasicSkills;
+ skill SKILL_EMOTE, 6, 0;
+ //addtoskill SKILL_TRADE, 0;
+ //addtoskill SKILL_PARTY, 0;
+ goto L_Begin;
L_FocusSkills:
+ /*
@pool = getskilllv(SKILL_POOL);
@mallard = getskilllv(SKILL_MALLARDS_EYE);
@brawling = getskilllv(SKILL_BRAWLING);
@@ -546,6 +259,8 @@ L_ResetFocusSkills:
mes "Focus skills removed.";
next;
goto L_FocusSkills;
+ */
+ goto L_Begin;
L_MagicSkills:
@general = getskilllv(SKILL_MAGIC);
@@ -973,12 +688,3 @@ OnInit:
end;
}
-027-2,125,103,0 script Debug#5 NPC154,{
- @debug_npc = 1;
- callfunc "Debug";
- end;
-OnInit:
- if (!debug)
- disablenpc "Debug#5";
- end;
-}