-
-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Freature] added option for enable or disable emoted spells for each …
…player (#553) Option is used with talkaction, but can be customized to be per item, store, etc. To use, just activate with talkaction "!emote on" or "!emote off"
- Loading branch information
Showing
5 changed files
with
96 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- Usage talkaction: "!emote on" or "!emote off" | ||
local emoteSpell = TalkAction("!emote") | ||
|
||
function emoteSpell.onSay(player, words, param) | ||
if param == "" then | ||
player:sendCancelMessage("You need to specify on/off param.") | ||
return false | ||
end | ||
if param == "on" then | ||
player:setStorageValue(STORAGEVALUE_EMOTE, 1) | ||
player:sendTextMessage(MESSAGE_INFO_DESCR, "You activated emoted spells") | ||
elseif param == "off" then | ||
player:setStorageValue(STORAGEVALUE_EMOTE, 0) | ||
player:sendTextMessage(MESSAGE_INFO_DESCR, "You desactivated emoted spells") | ||
end | ||
return true | ||
end | ||
|
||
emoteSpell:separator(" ") | ||
emoteSpell:register() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters