From ec12291fa6c83825dc5c4d76792812407d98cec7 Mon Sep 17 00:00:00 2001 From: Marco Date: Fri, 17 May 2024 12:45:13 -0300 Subject: [PATCH] resolve conversation --- data/libs/systems/vip.lua | 18 ++++++------------ .../large_seashell.lua} | 0 data/scripts/creaturescripts/player/login.lua | 6 ++---- 3 files changed, 8 insertions(+), 16 deletions(-) rename data/scripts/actions/{items/large_sea_shell.lua => objects/large_seashell.lua} (100%) diff --git a/data/libs/systems/vip.lua b/data/libs/systems/vip.lua index 35b0fc67743..9e76fd8ad80 100644 --- a/data/libs/systems/vip.lua +++ b/data/libs/systems/vip.lua @@ -1,16 +1,10 @@ local config = { - activationMessage = "You have received %s VIP days.", - expirationMessage = "Your VIP days have expired.", - vipDaysInfiniteMessage = "You have an infinite amount of VIP days remaining.", - noVipStatusMessage = "You do not have VIP status on your account.", - vipTimeRemainingMessage = "You have %s of VIP time remaining.", - outfits = {}, mounts = {}, } function Player.onRemoveVip(self) - self:sendTextMessage(MESSAGE_ADMINISTRATOR, config.expirationMessage) + self:sendTextMessage(MESSAGE_ADMINISTRATOR, "Your VIP status has expired. All VIP benefits have been removed.") for _, outfit in ipairs(config.outfits) do self:removeOutfit(outfit) @@ -21,7 +15,7 @@ function Player.onRemoveVip(self) end local playerOutfit = self:getOutfit() - if table.contains(config.outfits, self:getOutfit().lookType) then + if table.contains(config.outfits, playerOutfit.lookType) then if self:getSex() == PLAYERSEX_FEMALE then playerOutfit.lookType = 136 else @@ -37,7 +31,7 @@ end function Player.onAddVip(self, days, silent) if not silent then - self:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format(config.activationMessage, days)) + self:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You have been granted %s days of VIP status.", days)) end for _, outfit in ipairs(config.outfits) do @@ -53,15 +47,15 @@ end function CheckPremiumAndPrint(player, msgType) if player:getVipDays() == 0xFFFF then - player:sendTextMessage(msgType, config.vipDaysInfiniteMessage) + player:sendTextMessage(msgType, "You have an unlimited VIP status.") return true end local playerVipTime = player:getVipTime() if playerVipTime < os.time() then - player:sendTextMessage(msgType, config.noVipStatusMessage) + player:sendTextMessage(msgType, "Your VIP status is currently inactive.") return true end - player:sendTextMessage(msgType, string.format(config.vipTimeRemainingMessage, getFormattedTimeRemaining(playerVipTime))) + player:sendTextMessage(msgType, string.format("You have %s of VIP time remaining.", getFormattedTimeRemaining(playerVipTime))) end diff --git a/data/scripts/actions/items/large_sea_shell.lua b/data/scripts/actions/objects/large_seashell.lua similarity index 100% rename from data/scripts/actions/items/large_sea_shell.lua rename to data/scripts/actions/objects/large_seashell.lua diff --git a/data/scripts/creaturescripts/player/login.lua b/data/scripts/creaturescripts/player/login.lua index d286253312d..fbe4f9e63b6 100644 --- a/data/scripts/creaturescripts/player/login.lua +++ b/data/scripts/creaturescripts/player/login.lua @@ -49,10 +49,8 @@ function playerLoginGlobal.onLogin(player) end -- Boosted - player:sendTextMessage(MESSAGE_BOOSTED_CREATURE, "Today's boosted creature: " .. Game.getBoostedCreature() .. " \ -Boosted creatures yield more experience points, carry more loot than usual and respawn at a faster rate.") - player:sendTextMessage(MESSAGE_BOOSTED_CREATURE, "Today's boosted boss: " .. Game.getBoostedBoss() .. " \ -Boosted bosses contain more loot and count more kills for your Bosstiary.") + player:sendTextMessage(MESSAGE_BOOSTED_CREATURE, string.format("Today's boosted creature: %s.\nBoosted creatures yield more experience points, carry more loot than usual, and respawn at a faster rate.", Game.getBoostedCreature())) + player:sendTextMessage(MESSAGE_BOOSTED_CREATURE, string.format("Today's boosted boss: %s.\nBoosted bosses contain more loot and count more kills for your Bosstiary.", Game.getBoostedBoss())) -- Rewards local rewards = #player:getRewardList()