From 59bd0206b44a70c0d93a290c031ce877ef782f98 Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 6 Mar 2024 17:52:05 -0300 Subject: [PATCH] fix: offline training messages types and speed --- data/scripts/creaturescripts/player/offline_training.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/scripts/creaturescripts/player/offline_training.lua b/data/scripts/creaturescripts/player/offline_training.lua index abfb0b94b3d..0201ab6d125 100644 --- a/data/scripts/creaturescripts/player/offline_training.lua +++ b/data/scripts/creaturescripts/player/offline_training.lua @@ -12,7 +12,7 @@ function offlineTraining.onLogin(player) player:setOfflineTrainingSkill(SKILL_NONE) if offlineTime < 600 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must be logged out for more than 10 minutes to start offline training.") + player:sendTextMessage(MESSAGE_OFFLINE_TRAINING, "You must be logged out for more than 10 minutes to start offline training.") return true end @@ -50,13 +50,13 @@ function offlineTraining.onLogin(player) end text = string.format("%s.", text) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, text) + player:sendTextMessage(MESSAGE_OFFLINE_TRAINING, text) local vocation = player:getVocation() local promotion = vocation:getPromotion() local topVocation = not promotion and vocation or promotion - local updateSkills = false + if table.contains({ SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE }, offlineTrainingSkill) then local modifier = topVocation:getBaseAttackSpeed() / 1000 updateSkills = player:addOfflineTrainingTries(offlineTrainingSkill, (trainingTime / modifier) / (offlineTrainingSkill == SKILL_DISTANCE and 4 or 2))