Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong message types (error message type does not exist) #1444

Merged
merged 2 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data-canary/scripts/spells/support/find_fiend.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function spell.onCastSpell(creature, variant)
message = string.format(message .. " " .. ForgeMonster:getTimeLeftToChangeMonster(target))
end

creature:sendTextMessage(MESSAGE_INFO_DESCR, message)
creature:sendTextMessage(MESSAGE_LOOK, message)
creaturePosition:sendMagicEffect(CONST_ME_MAGIC_BLUE)
return true
end
Expand Down
2 changes: 1 addition & 1 deletion data/libs/concoctions_lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function Concoction:activate(player, item)
local cooldown = self:cooldown()
if self:lastActivatedAt(player) + cooldown > os.time() then
local cooldownLeft = self:lastActivatedAt(player) + cooldown - os.time()
player:sendTextMessage(MESSAGE_STATUS_SMALL,
player:sendTextMessage(MESSAGE_FAILURE,
"You must wait " .. getTimeInWords(cooldownLeft) .. " before using " .. item:getName() .. " again.")
return true
end
Expand Down
10 changes: 5 additions & 5 deletions data/scripts/talkactions/god/vip_manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ function vipGod.onSay(player, words, param)
local target = Player(targetName)

if not action or not targetName then
player:sendTextMessage(MESSAGE_INFO_DESCR, 'Command invalid.\nUsage:\n/vip <action>, <name>, [, <value>]\n\nAvailable actions:\ncheck, adddays, removedays, remove')
player:sendTextMessage(MESSAGE_LOOK, 'Command invalid.\nUsage:\n/vip <action>, <name>, [, <value>]\n\nAvailable actions:\ncheck, adddays, removedays, remove')
return true
end

if not target then
player:sendTextMessage(MESSAGE_INFO_DESCR, string.format('Player "%s" is not online or does not exist!', targetName))
player:sendTextMessage(MESSAGE_LOOK, string.format('Player "%s" is not online or does not exist!', targetName))
return true
end

Expand All @@ -43,7 +43,7 @@ function vipGod.onSay(player, words, param)
end

if amount < config.minDays or amount > config.maxDays then
player:sendTextMessage(MESSAGE_INFO_DESCR, string.format('You can only add %d to %d VIP days at a time.', config.minDays, config.maxDays))
player:sendTextMessage(MESSAGE_LOOK, string.format('You can only add %d to %d VIP days at a time.', config.minDays, config.maxDays))
return true
end

Expand All @@ -55,7 +55,7 @@ function vipGod.onSay(player, words, param)
elseif action == 'removedays' then
local amount = tonumber(params[3])
if not amount then
player:sendTextMessage(MESSAGE_INFO_DESCR, '<value> has to be a numeric value.')
player:sendTextMessage(MESSAGE_LOOK, '<value> has to be a numeric value.')
return true
end
if amount > targetVipDays then
Expand All @@ -75,7 +75,7 @@ function vipGod.onSay(player, words, param)
player:sendTextMessage(MESSAGE_STATUS, string.format('You removed all VIP days from %s.', targetName))

else
player:sendTextMessage(MESSAGE_INFO_DESCR, 'Action is required.\nUsage:\n/vip <action>, <name>, [, <value>]\n\nAvailable actions:\ncheck, adddays, removedays, remove')
player:sendTextMessage(MESSAGE_LOOK, 'Action is required.\nUsage:\n/vip <action>, <name>, [, <value>]\n\nAvailable actions:\ncheck, adddays, removedays, remove')
return true
end
return true
Expand Down
4 changes: 2 additions & 2 deletions data/scripts/talkactions/player/auto_loot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ function autoLoot.onSay(player, words, param)
end
if param == "on" then
player:setStorageValue(STORAGEVALUE_AUTO_LOOT, 1)
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have successfully enabled your automatic looting!")
player:sendTextMessage(MESSAGE_LOOK, "You have successfully enabled your automatic looting!")
elseif param == "off" then
player:setStorageValue(STORAGEVALUE_AUTO_LOOT, 0)
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have successfully disabled your automatic looting!")
player:sendTextMessage(MESSAGE_LOOK, "You have successfully disabled your automatic looting!")
end
return true
end
Expand Down
2 changes: 1 addition & 1 deletion data/scripts/talkactions/player/bank.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local config = {
enabled = true,
messageStyle = MESSAGE_INFO_DESCR
messageStyle = MESSAGE_LOOK
}

if not config.enabled then
Expand Down
4 changes: 2 additions & 2 deletions data/scripts/talkactions/player/emote_spell.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ function emoteSpell.onSay(player, words, param)
end
if param == "on" then
player:setStorageValue(STORAGEVALUE_EMOTE, 1)
player:sendTextMessage(MESSAGE_INFO_DESCR, "You activated emoted spells")
player:sendTextMessage(MESSAGE_LOOK, "You activated emoted spells")
elseif param == "off" then
player:setStorageValue(STORAGEVALUE_EMOTE, 0)
player:sendTextMessage(MESSAGE_INFO_DESCR, "You desactivated emoted spells")
player:sendTextMessage(MESSAGE_LOOK, "You desactivated emoted spells")
end
return true
end
Expand Down