• 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 script

Ü Pendragon

Member
Joined
Apr 10, 2017
Messages
51
Reaction score
6
Hi guys, I have a problem with these bless. I am not a programmer or anything so I think they work badly. The script grants the 8 blessings and when you die by pvp you lose the twist of fate (1) and by putting bless again you can. But they accumulate, now you have double the blessings. To some extent, if you die 30 times in pvp, you won't spend 30 times on bless monsters. (why does it accumulate)

Lua:
local talk = TalkAction("!bless")

function talk.onSay(cid)
    local player = Player(cid)
    local totalBlessPrice = getBlessingsCost(player:getLevel()) * 5 * 0.7

    if(player:hasBlessing(1) and player:hasBlessing(2) and player:hasBlessing(3) and player:hasBlessing(4) and player:hasBlessing(5) and player:hasBlessing(6) and player:hasBlessing(7) and player:hasBlessing(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 = 1, 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
end

talk:separator(" ")
talk:register()
Post automatically merged:

I also thought about whether it is possible to add that the limit is 1. But I think this is not the best way to solve it. Thanks in advance.

xd.png
 
What client are you using? 8 blessings don't exist on every client, It was introduced lately.
 
Client 10. Does the client have something to do with it? :0 If the player does not have the 8 bless on my server, he loses at least 1 item when he dies some times, that's why I always put 8 when saying the command
 
Client 10. Does the client have something to do with it?
Not really, I just thought you're using something old which won't need the 8 blessings.
If the player does not have the 8 bless on my server, he loses at least 1 item when he dies some times, that's why I always put 8 when saying the command
Which TFS are you using? Because I just checked the latest TFS and it only got the 5 main blessings and the PVP blessing one, You don't have to use 8 blessings.
If you're using OTServBR then you need to add their blessing module and you need to download their latest source because they did many source changes for blessings.
 
Not really, I just thought you're using something old which won't need the 8 blessings.

Which TFS are you using? Because I just checked the latest TFS and it only got the 5 main blessings and the PVP blessing one, You don't have to use 8 blessings.
If you're using OTServBR then you need to add their blessing module and you need to download their latest source because they did many source changes for blessings.
Yes, I am using OTBR. And ok bro I'm going to check the commits to see if I can fix something. Thanks for your help.
 
Back
Top