Code:
local cost = 100000
local premium = true
function onSay(cid, words, param)
for i = 1, 5 do
if getPlayerBlessing(cid, i) then
doPlayerSendCancel(cid, "You already have one of the blessings.")
return TRUE
end
end
if not premium or premium and isPremium(cid) == TRUE then
if not cost or cost and doPlayerRemoveMoney(cid, cost) == TRUE then
for i = 1, 5 do
doPlayerAddBlessing(cid, i)
end
doCreatureSay(cid, "You are now blessed by the GOD KandoriaOT!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
else
doPlayerSendCancel(cid, "You don't have enough money.")
end
else
doPlayerSendCancel(cid, "You need a premium account.")
end
return TRUE
end
Need the new system to tfs 0.3.5