In the server broadcasts it says to use !Mood, !Alignment etc.. but you need to use lowercase !mood.
only ran this in luademo to make sure it didnt have any errors. This can be used to replace !mood so you need to say !mood good. when you say !mood or !mood (some invalid entry), you will get a list of the available moods.
Code:
function onSay(cid, words, param)
local param = string.lower(param)
local storage = 50000
local alignments = {"neutral" = 0, "chaotic neutral" = 1, "lawful neutral" = 2, "good" = 3, "lawful good" = 4, "chaotic good" = 5, "evil" = 6, "lawful evil" = 7, "chaotic evil" = 8}
if isInArray(alignments, param) then
setPlayerStorageValue(cid, storage, alignments[param])
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You alignment has been set to '..param..'.')
--doPlayerSendCancel(cid, 'You alignment has been set to '..param..'.') --it appears as a cancel message now delete the -- and previous line to keep it as a cancel message.
doSendMagicEffect(getPlayerPosition (cid), CONST_ME_POFF)
else
-- Sends the player a message with all the alignments --
text = "Available alignments:\n"
for alignment in pairs (alignments) do
text = text .. "\n" .. alignment
end
text = text .. "\n\nexample: type '!mood good' to change your mood to good."
doPlayerPopupFYI(cid, text)
end
return true
end
>this sign has no text. it looks like it should say "danger warrior skeletons"
14:00 You see a sign.
Nothing is written on it.
Position: [X: 1532] [Y: 1196] [Z: 9].
this is another sign leading down to the same level in another part of the cave. so maybe it should say the same thing?
14:11 You see a sign.
You read: Caution: The burrows are to be taken very seriously! The burrows are very dangerous.
Position: [X: 1485] [Y: 1201] [Z: 9].
>sometimes you lose the red box around the creature your targeting but you still deal damage to it