From 32ed04e8b183702a69ae61c88213652b0cc42070 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 27 Jul 2021 09:53:48 -0300 Subject: Improve debug logging and optimize a tiny bit Cindy Cave --- npc/031-4/cindyCave.txt | 6 +----- npc/commands/debug.txt | 11 ++++++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/npc/031-4/cindyCave.txt b/npc/031-4/cindyCave.txt index a7306f70..9f9f88ae 100644 --- a/npc/031-4/cindyCave.txt +++ b/npc/031-4/cindyCave.txt @@ -148,15 +148,12 @@ L_Return_1: end; L_CaveLogic: - $@FIGHT_YETI_ROUND_PEN = $@FIGHT_YETI_PLAYER_COUNT; - if ($@FIGHT_YETI_ROUND_PEN > 60) - $@FIGHT_YETI_ROUND_PEN = 60; if ($@FIGHT_YETI_PLAYER_COUNT <= 0) goto L_CleanUp; set $@FIGHT_YETI_ROUND_TIMER, $@FIGHT_YETI_ROUND_TIMER + 5; // Advance 5 seconds if (mobcount("031-4", "Cindy::OnPetDeath") <= 0) goto L_NextWave; - if ($@FIGHT_YETI_ROUND_TIMER + $@FIGHT_YETI_ROUND_PEN >= ($@YETI_FOREVER ? 45 : 120)) + if ($@FIGHT_YETI_ROUND_TIMER + min($@FIGHT_YETI_PLAYER_COUNT, 60) >= ($@YETI_FOREVER ? 45 : 120)) goto L_NextWave; goto L_Return_1; @@ -203,7 +200,6 @@ L_CleanUp: $@FIGHT_YETI_WAVE = 0; $@FIGHT_YETI_ROUND_TIMER = 0; $@YETI_COUNT = 0; - $@FIGHT_YETI_ROUND_PEN = 0; $@FIGHT_YETI_NUMBER = 0; $@YETI_FOREVER = false; killmonster "031-4", "Cindy::OnPetDeath"; diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt index 419b5742..b86dab04 100644 --- a/npc/commands/debug.txt +++ b/npc/commands/debug.txt @@ -35,6 +35,7 @@ L_Level: goto L_LevelTooHigh; if (BaseLevel == @lvl) goto L_SameLevel; + gmlog sprintf("Level set from %d to %d", BaseLevel, @lvl); BaseLevel = @lvl; resetstatus; mes "You are now level " + BaseLevel + "."; @@ -114,9 +115,9 @@ L_FocusSkills: switch (@menuret) { case -3: goto L_Begin; case -2: - skill SKILL_POOL, @pool+1, 0; break; + skill SKILL_POOL, @pool+1, 0; gmlog("Focus+"); break; case -1: - skill SKILL_POOL, max(0, @pool-1), 0; break; + skill SKILL_POOL, max(0, @pool-1), 0; gmlog("Focus-"); break; case 0: updateskill SKILL_MALLARDS_EYE, 9; updateskill SKILL_BRAWLING, 9; @@ -124,15 +125,17 @@ L_FocusSkills: updateskill SKILL_RESIST_POISON, 9; updateskill SKILL_ASTRAL_SOUL, 9; updateskill SKILL_RAGING, 9; + gmlog("All focus to max"); break; case -4: - skill SKILL_POOL, 0, 0; break; + skill SKILL_POOL, 0, 0; updateskill SKILL_MALLARDS_EYE, 0; updateskill SKILL_BRAWLING, 0; updateskill SKILL_SPEED, 0; updateskill SKILL_RESIST_POISON, 0; updateskill SKILL_ASTRAL_SOUL, 0; updateskill SKILL_RAGING, 0; + gmlog("All focus reset"); break; default: if (FOCUSING & getpoolskillFID(@menuret)) { @@ -493,6 +496,7 @@ L_AddAll: mes "All skills added to their maximum level."; mes "Maximum number of Legacy Magic Experience points."; mes "You are now level " + BaseLevel + "."; + gmlog("Build set to max level and all skills"); next; goto L_Begin; @@ -551,6 +555,7 @@ L_ResetAll: mes "All skills removed."; mes "Magic experience reset."; mes "You are now level " + BaseLevel + "."; + gmlog("Character reset"); next; goto L_Begin; -- cgit v1.2.3-60-g2f50