• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

[TalkAction] Animated Smiley's

zemiex

New Member
Joined
Mar 27, 2012
Messages
11
Reaction score
2
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:
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:
Back
Top