• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction [Very Easy] emotikons

Erexo

Kage
Premium User
Joined
Mar 27, 2010
Messages
743
Solutions
5
Reaction score
200
Location
Pr0land
GitHub
Erexo
Hello,
simple but useful :)

emots.lua
LUA:
function onSay(cid, words, param)
    doCreatureSay(cid, words, TALKTYPE_ORANGE_1)
return 1
end


talkactions.xml
XML:
<talkaction words=":);:D;:P;:3;:*;:p;:V;:v;:o;:O;:];:[;:|;:@;^^;LOL;lol;LoL;lOl;xD;XD" event="script" value="emots.lua" />


Greetings,
Erexo.
 
Pretty cool, but if i send them in PM, the person who i am sending them will be unable to see when im not near them? Will they work in sentence?
 
Hello,
simple but useful :)

emots.lua
LUA:
function onSay(cid, words, param)
    doCreatureSay(cid, words, TALKTYPE_ORANGE_1)
return 1
end


talkactions.xml
XML:
<talkaction words=":);:D;:P;:3;:*;:p;:V;:v;:o;:O;:];:[;:|;:@;^^;LOL;lol;LoL;lOl;xD;XD" event="script" value="emots.lua" />


Greetings,
Erexo.

with kiss:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Custom Commands" version="1.0" author="Kaiser" contact="[email protected]" enabled="yes">
<!-- Smiles event -->
	<config name="animated-smiles-config"><![CDATA[
		exhaust = 1 -- in seconds
		storage = 3000 -- storage value used to save exhaustion
	]]></config>

	<talkaction words="xd, :d, ;d, =d, xp, :p, ;p, =p, :o, ;o, ;s, :s, :/, ;/, :*, ;*, =*, :>, ;>, :), ;), =), :(, ;(, =(, :[, ;[, :], ;], :@, ;@, ^^, ^.^, -.-" separator="," logged="no" hidden="yes" case-sensitive="no" event="script"><![CDATA[
		domodlib('animated-smiles-config')

		local config = {
			exhaust = exhaust,
			storage = storage
		}

		function onSay(cid, words, param, channel)
			if(channel ~= CHANNEL_DEFAULT) then
				return false
			end

			if(exhaustion.check(cid, config.storage)) then -- prevent spam
				return true
			end

			if(isInArray({":*", ";*", "=*"}, words)) then
				doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HEARTS)
			end

			exhaustion.set(cid, config.storage, config.exhaust)
			doCreatureSay(cid, words, TALKTYPE_ORANGE_1)
			return true
		end
	]]></talkaction>
	</mod>
 
@azzkaban
I wanted to show the simplicity of the script :)

@Wavoz
Yup, that is some kind of `bug`, when u PM to someone, he wont recive it.

-Edit:
Hotfix:
LUA:
function onSay(cid, words, param, channel)
      if channel > 1000 then
            doCreatureSay(cid, words, TALKTYPE_ORANGE_1)
            return 1
      end
return false
end
 
Last edited:
Back
Top