[Encerrado] Ajuda Com Sistema de BLess

willks123
em Tópicos Sem Resposta

willks123

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 08/07/07Posts: 31Gênero: Masculino

Pessoal, se alguem puder me ajudar... Esse meu script de bless só esta removendo gold da BP, ele nao usa o Gold do Banco. Tem como arrumar ele pra mim pra Caso o player nao tenha o GOLD na bp ele usar o do Banco?

bless:
 

Spoiler
local blessPrice = 50000 -- preço em Gold Coins.

local function haveAllBlessings(player)
    local blessingsCount = 0
    for blessing = 1, 8 do
        if player:hasBlessing(blessing) then
            blessingsCount = blessingsCount + 1
        end
    end
    
    return blessingsCount == 8
end

function onSay(player, words, param)
    if haveAllBlessings(player) then
        return player:sendTextMessage(MESSAGE_INFO_DESCR, "You have already been blessed by the gods.") and true
    end
    
    if not player:removeMoney(blessPrice) then
        return player:sendCancelMessage("You do not have enough money.") and true
    end
    
    for blessing = 1, 8 do
        if not player:hasBlessing(blessing) then
            player:addBlessing(blessing, 1)
        end
    end
    
    player:sendTextMessage(MESSAGE_INFO_DESCR, "You have bought all blessings.")
    
    return true
end

 

 

Stigal

don't ever stop...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 28/11/10Posts: 3402Gênero: Masculino
A questão neste tópico de suporte foi encerrada por falta de resposta. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta

VI6MDIG.png

 

"O fracasso é a oportunidade de se começar de novo inteligentemente"

Minhas Redes Sociais: Youtube | Página & Grupo | Steam  | Discord Xtibia | Skype: @mrooger

 

OTpanel