-
Notifications
You must be signed in to change notification settings - Fork 9
/
animated-smiles.xml
34 lines (28 loc) · 1.12 KB
/
animated-smiles.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="UTF-8"?>
<mod name="animated-smiles" version="1.1" author="slawkens" contact="[email protected]" enabled="yes">
<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>