Hello everyone, I kind of need help with this problem because i get lots of complains that it doesnt work to do "!Bless" which pisses me off.
Here is how my talkactions.xml looks
And this is the bless.lua file.
Is there ANYONE that could help me, and tell me why this doesn't work?
Im using this server: http://otland.net/f18/9-60-9-61-forgotten-server-v0-2-14-mystic-spirit-166619/
Here is how my talkactions.xml looks
Code:
<?xml version="1.0" encoding="UTF-8"?>
<talkactions>
<!-- player talkactions -->
<talkaction words="!buypremium" script="buyprem.lua"/>
<talkaction words="!leavehouse" script="leavehouse.lua"/>
<talkaction words="!save" script="save.lua"/>
<talkaction words="!changesex" script="changesex.lua"/>
<talkaction words="!uptime" script="uptime.lua"/>
<talkaction words="!deathlist" script="deathlist.lua"/>
<talkaction words="!shop" script="znoteshop.lua"/>
<talkaction words="!buybless;/buybless;!bless;/bless" script="bless.lua" />
<!-- test talkactions -->
<talkaction words="!z" script="magiceffect.lua"/>
<talkaction words="!x" script="animationeffect.lua"/>
</talkactions>
And this is the bless.lua file.
Code:
-- [( Made by LucasOlzon from otland.net )] --
function onSay(cid, words, param)
local fail = 0
if getPlayerLevel(cid) < 31 then
cost = 2000
else
cost = ((getPlayerLevel(cid) - 30) * 200) + 2000
end
if cost > 20000 then
cost = 20000
end
for i = 1, 5 do
if getPlayerBlessing(cid, i) then
fail = fail + 1
else
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddBlessing(cid, i)
if i == 5 and not(fail == 5) then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
end
else
doCreatureSay(cid, "You do not have enough money to buy all the blessings or cap/slot to get the rest of money!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
break
end
end
end
if fail == 5 then
doPlayerSendCancel(cid, "You already have all the blessings!")
end
return TRUE
end
Is there ANYONE that could help me, and tell me why this doesn't work?
Im using this server: http://otland.net/f18/9-60-9-61-forgotten-server-v0-2-14-mystic-spirit-166619/