How i should use this? Changing this line:Code:doPlayerAddBlessing(cid, 6)
doPlayerAddBlessing(cid, bless[i])
Code:player:addBlessing(6)
TFS 1.4 - TalkactionCould you post a full script ;D? Cuz i dont have it at all
<talkaction words="!pvpbless" script="pvpbless.lua"/>
function onSay(cid, words, param)
local cost = 10000
if not getPlayerBlessing(cid, 6) then
if doPlayerRemoveMoney(cid, cost) then
doPlayerAddBlessing(cid, 6)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
else
doCreatureSay(cid, "You do not have enough money to buy this blessing!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You already have Twist of Fate!")
end
return true
end
function onSay(cid, words, param)
local player = Player(cid)
local cost = 10000
if player then
if not player:hasBlessing(6) then
if player:removeMoney(cost) then
player:addBlessing(6)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
player:say("You received the Twist of Fate blessing!", TALKTYPE_ORANGE_1)
else
player:say("You do not have enough money to buy this blessing!", TALKTYPE_ORANGE_1)
player:getPosition():sendMagicEffect(CONST_ME_POFF)
end
else
player:say("You already have the Twist of Fate blessing!", TALKTYPE_ORANGE_1)
end
end
return true
end