Skip to content

Commit

Permalink
update talkactions.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel committed May 9, 2024
1 parent b097636 commit 2457825
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion data/scripts/talkactions/god/manage_badge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ function addBadge.onSay(player, words, param)

split[2] = split[2]:trimSpace()
local id = tonumber(split[2])
target:addBadge(id)
if target:addBadge(id) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format('You added a badge with ID "%i" to player "%s".', id, target:getName()))
target:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("%s added a badge to you.", player:getName()))
end
return true
end

Expand Down
6 changes: 5 additions & 1 deletion data/scripts/talkactions/god/manage_title.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ function addTitle.onSay(player, words, param)

split[2] = split[2]:trimSpace()
local id = tonumber(split[2])
target:addTitle(id)
if target:addTitle(id) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format('You added a title with ID "%i" to player "%s".', id, target:getName()))
target:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("%s added a title to you.", player:getName()))
end

return true
end

Expand Down
File renamed without changes.

0 comments on commit 2457825

Please sign in to comment.