• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Player die with bless and lose their backpack

viking

Member
Joined
Aug 20, 2015
Messages
323
Reaction score
22
My otserver tfs 1.2, some players are die and lost the backpack (with blessings)

what to do?
 
I would recommend try searching in search for bless but items are lost cause bless script probaly bugged


Code:
local bless = {1, 2, 3, 4, 5}
local price_bless = 50000

function onSay(player, words, param)

    for i = 1, table.maxn(bless) do
        if player:hasBlessing(bless[i]) then
            player:sendCancelMessage("You already have all blessings.")
            player:getPosition():sendMagicEffect(CONST_ME_POFF)
            return false
        end
    end

    if player:removeMoney(price_bless) then
        for i = 1, table.maxn(bless) do
            player:addBlessing(bless[i])
        end
       
        player:sendTextMessage(MESSAGE_INFO_DESCR, "You have bought all blessings.")
        player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
    else
        player:sendCancelMessage("You don't have enough money.")
        player:getPosition():sendMagicEffect(CONST_ME_POFF)
    end
   
    return true
end

This script put only 1 bless? o/
 
Back
Top