• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.0 TWIST OF FATE

Could you post a full script ;D? Cuz i dont have it at all
TFS 1.4 - Talkaction
maybe will be usefull for somebody

XML:
<talkaction words="!pvpbless" script="pvpbless.lua"/>

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
 
I took the script mentioned in the previous comment and adapted it, making it more appropriate and compatible with TFS 1.x. Simple :)

Lua:
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
 
Back
Top