This script show animated smiley's. So a player can send an animated smiley for everbody else to watch. Just use !s [smiley here].
Put this in talkaction.xml:
Create script called animatedsmiley.lua and put this in:
Put this in talkaction.xml:
Code:
<talkaction words="!s" event="script" value="animatedsmiley.lua"/>
Create script called animatedsmiley.lua and put this in:
Code:
-- script by phyxia
-- animated smiley (animatedtext)
local c = {
[1] = COLOR_GREEN, -- add colors here
[2] = COLOR_LIGHTBLUE,
[3] = COLOR_ORANGE,
[4] = COLOR_RED,
[5] = COLOR_PINK,
[6] = COLOR_GREY,
[7] = COLOR_LIGHTGREEN,
[8] = COLOR_DARKBROWN,
[9] = COLOR_PURPLE,
[10] = COLOR_DARKYELLOW,
[11] = COLOR_WHITE,
[12] = COLOR_YELLOW,
[13] = COLOR_TEAL,
[14] = COLOR_DARKORANGE
}
function onSay(cid, words, param, channel)
local pos = getCreaturePosition(cid) -- pos
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "Command requires param. !s [smiley here]")
doPlayerSendCancel(cid, "Sorry, not possible")
else
doSendAnimatedText(pos, param, c[math.random(14)]) -- gets random color + your smiley
end
return TRUE
end
Last edited: