<?xml version="1.0" encoding="UTF-8"?>
<mod name="Talkactions" version="1.0" author="Sepultra" contact="Fu Manchu" enabled="yes">
<!-- Custom Commands -->
<talkaction log="yes" access="0" words="!aol" event="script"><![CDATA[
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) true then
doPlayerAddItem(cid, 2173, 1) ;
doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_BLUE) ;
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ("You've bought an amulet of loss!")) ;
else
doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ;
return doPlayerSendCancel(cid, ("You don't have enough money.")) ;
end ; return true ;
end ;
]]></talkaction>
<talkaction log="yes" access="0" words="!bless" event="script"><![CDATA[
function onSay(cid, words, param, channel)
local blessings, cost = { 1, 2, 3, 4, 5 }, 50000
for i = 1, #blessings do
if(getPlayerBlessing(cid, blessings[i])) then
doPlayerSendCancel(cid, ("You already have been blessed by God Sepultra.")) ;
doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ;
elseif(getPlayerMoney(cid) < cost) then
doPlayerSendCancel(cid, ("You do not have enough money.")) ;
doSendMagicEffect(getThingPosition(cid), CONST_ME_POFF) ;
else
doPlayerAddBlessing(cid, blessings[i]) ;
doPlayerRemoveMoney(cid, cost) ;
doSendMagicEffect(getThingPosition(cid),39) ;
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ("You have recived all 5 blessings from God Sepultra.")) ;
end
return true
end
end
]]></talkaction>
</mod>