From 89dc0f87eb1657156c24f2d90bf2615d7ec16bd7 Mon Sep 17 00:00:00 2001 From: vfjpl Date: Thu, 22 Jul 2021 00:02:27 +0200 Subject: [PATCH] Fix stamina minutes check in the skills window (#1155) --- modules/game_skills/skills.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/game_skills/skills.lua b/modules/game_skills/skills.lua index fc892012..a29e334a 100644 --- a/modules/game_skills/skills.lua +++ b/modules/game_skills/skills.lua @@ -1,5 +1,5 @@ -skillsWindow = nil -skillsButton = nil +local skillsWindow = nil +local skillsButton = nil function init() connect(LocalPlayer, { @@ -350,11 +350,11 @@ function onStaminaChange(localPlayer, stamina) local text = tr("You have %s hours and %s minutes left", hours, minutes) .. '\n' .. tr("You will not gain 50%% more experience because you aren't premium player, now you receive only 1x experience points") setSkillPercent('stamina', percent, text, '#89F013') - elseif stamina > 2400 and g_game.getClientVersion() < 1038 then + elseif stamina >= 2400 and g_game.getClientVersion() < 1038 then local text = tr("You have %s hours and %s minutes left", hours, minutes) .. '\n' .. tr("If you are premium player, you will gain 50%% more experience") setSkillPercent('stamina', percent, text, 'green') - elseif stamina <= 2400 and stamina > 840 then + elseif stamina < 2400 and stamina > 840 then setSkillPercent('stamina', percent, tr("You have %s hours and %s minutes left", hours, minutes), 'orange') elseif stamina <= 840 and stamina > 0 then local text = tr("You have %s hours and %s minutes left", hours, minutes) .. "\n" ..