• 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.X+ bless cost tfs 1.3

God Aries

New Member
Joined
Jun 24, 2018
Messages
44
Reaction score
4
good day otland community, i am looking for a bless script with the same cost for all levels,


I tried some scripts of version tfs 1.2 but it only tells me that I already have bless :( I hope and they can help me


i use tfs 1.3 current
 
Solution
Lua:
function onSay(cid)
    local player = Player(cid)
    local totalBlessPrice = 50000
    local hasBless = true
 
    for i = 1, 5 do
        if not player:hasBlessing(i) then
            hasBless = false
            break
        end
    end
 
    if not hasBless then
        if player:removeMoney(totalBlessPrice) then
            for i = 1, 5 do
                player:addBlessing(i, 1)
            end
         
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been blessed by all of eight gods!")
            player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
        else
            player:sendCancelMessage("You don't have enough money. You need " .. totalBlessPrice .. " to buy bless.", cid)...
 
I now use this script tfs 1.3 but i can buy bless many time and I should get the message that I already have the bless

and I don't get any errors

Lua:
function onSay(cid)

    local player = Player(cid)
    local totalBlessPrice = 50000
    if(not(isPlayerPzLocked(cid))) then
    if player:getBlessings() == 8 then
                player:sendCancelMessage("You already have been blessed!", cid)
            elseif player:removeMoney(totalBlessPrice) then
                player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been blessed by all of eight gods!")
                for b = 2, 8 do
                    player:addBlessing(b, 1)
                end
                player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
              
            else
                player:sendCancelMessage("You don't have enough money. You need " .. totalBlessPrice .. " to buy bless.", cid)
            end
    else
        player:sendCancelMessage("You can't buy bless while you are in a battle.")
    end
end
 
Lua:
function onSay(cid)
    local player = Player(cid)
    local totalBlessPrice = 50000
    local hasBless = true
 
    for i = 1, 5 do
        if not player:hasBlessing(i) then
            hasBless = false
            break
        end
    end
 
    if not hasBless then
        if player:removeMoney(totalBlessPrice) then
            for i = 1, 5 do
                player:addBlessing(i, 1)
            end
         
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been blessed by all of eight gods!")
            player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
        else
            player:sendCancelMessage("You don't have enough money. You need " .. totalBlessPrice .. " to buy bless.", cid)
        end
    else
        player:sendCancelMessage("You already have been blessed!", cid)
    end
end
 
Last edited:
Solution
Lua:
function onSay(cid)
    local player = Player(cid)
    local totalBlessPrice = 50000
    local hasBless = true

    for i = 1, 5 do
        if not player:hasBlessing(i) then
            hasBless = false
            break
        end
    end

    if not hasBless then
        if player:removeMoney(totalBlessPrice) then
            for i = 1, 5 do
                player:addBlessing(i, 1)
            end
        
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been blessed by all of eight gods!")
            player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
        else
            player:sendCancelMessage("You don't have enough money. You need " .. totalBlessPrice .. " to buy bless.", cid)
        end
    else
        player:sendCancelMessage("You already have been blessed!", cid)
    end
end
Thanks, this script work perfect đź‘Ś
 
Back
Top