function onSay(cid, words, param)
if getPlayerBlessing(cid,5) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already been blessed")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
if doPlayerRemoveMoney(cid, 50000) == TRUE then
for i = 1,5 do
doPlayerAddBlessing(cid,i)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received blessings!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ICEAREA)
end
end
return TRUE
end
<talkaction words="!bless" script="bless.lua"/>
Next time post in the right section, Requests
Code:function onSay(cid, words, param) if getPlayerBlessing(cid,5) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already been blessed") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA) else if doPlayerRemoveMoney(cid, 50000) == TRUE then for i = 1,5 do doPlayerAddBlessing(cid,i) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received blessings!") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ICEAREA) end end return TRUE end
Code:<talkaction words="!bless" script="bless.lua"/>
function onSay(cid, words, param, channel)
if getPlayerBlessing(cid, 5) == FALSE then
if getPlayerMoney(cid) >= 150000 then
for i = 1,5 do
doPlayerAddBlessing(cid, i)
end
doSendMagicEffect(getCreaturePosition(cid), 39)
doPlayerRemoveMoney(cid, 150000)
doPlayerSendTextMessage(cid, 22, "You have been blessed by the gods!")
else
doPlayerSendCancel(cid, "You don't have enough money.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You have already been blessed.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return true
end
<talkaction words="!blessings" script="blessings.lua" />
Code:function onSay(cid, words, param, channel) if getPlayerBlessing(cid, 5) == FALSE then if getPlayerMoney(cid) >= 150000 then for i = 1,5 do doPlayerAddBlessing(cid, i) end doSendMagicEffect(getCreaturePosition(cid), 39) doPlayerRemoveMoney(cid, 150000) doPlayerSendTextMessage(cid, 22, "You have been blessed by the gods!") else doPlayerSendCancel(cid, "You don't have enough money.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "You have already been blessed.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end return true end
Code:<talkaction words="!blessings" script="blessings.lua" />
That script is working, you should change your distro.
Then you're doing something wrong xD..
You get any error on console when executing command?