Ir para conteúdo

Featured Replies

  • Respostas 9
  • Visualizações 741
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    local cost = getBlessingsCost(getPlayerLevel(cid)) Mude para:  local cost = 100000 -- valor da bless Espero ter ajudado.

  • Tente assim:     Se não der tente esse:

Postado
local bless = {1, 2, 3, 4, 5}
local cost = 10000
function onSay(cid, words, param)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerSendCancel(cid, "Você ja tem todas as bless.")
doSendMagicEffect(getPlayerPosition(cid), 2)
return TRUE
end
end

if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doCreatureSay(cid, "Bless!" ,19)
doSendMagicEffect(getPlayerPosition(cid), 49)
doSendMagicEffect(getPlayerPosition(cid), 48)
else
doPlayerSendCancel(cid, "Você precisa de 100k para comprar bless.")
end
return TRUE
end

Tenta usar essa script!

TRABALHOS

 

 

[iTEM.XML] Ancient Helmt dar HP e Duration: http://www.tibiaking.com/forum/topic/35010-itemxml-helmet-dar-vida-e-duration/

 

[CreatureScripts] OwNeD ao character morrerhttp://www.tibiaking.com/forum/topic/35733-creaturescripta-owned-quando-morrer/

 

Postado
  • Solução
Tente assim:

function onSay(cid, words, param)
local p = Player(cid)
local cost = 10000000 -- valor da bless
if(not(isPlayerPzLocked(cid))) then
if(p:hasBlessing(1) and p:hasBlessing(2) and p:hasBlessing(3) and p:hasBlessing(4) and p:hasBlessing(5)) then
p:sendCancelMessage("You have already been blessed by the gods.")
return false
end
if(p:removeMoney(cost)) then
for b = 1,5 do
p:addBlessing(b)
end
p:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
p:sendTextMessage(MESSAGE_INFO_DESCR, "You have been blessed by the 5 gods!")
else
p:sendCancelMessage("You need "..cost.." gold coins to buy all 5 bless.")
end
else
p:sendCancelMessage("You can't buy bless, when you are in a battle.")
end
return false
end

 
 
Se não der tente esse:

 
function onSay(cid, words, param)
local p = Player(cid)
local cost = 100000 -- valor da bless
if(not(isPlayerPzLocked(cid))) then
if(p:hasBlessing(1) and p:hasBlessing(2) and p:hasBlessing(3) and p:hasBlessing(4) and p:hasBlessing(5)) then
p:sendCancelMessage("You have already been blessed by the gods.")
return false
end
if(p:removeMoney(cost)) then
for b = 10,5 do
p:addBlessing(b)
end
p:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
p:sendTextMessage(MESSAGE_INFO_DESCR, "You have been blessed by the 5 gods!")
else
p:sendCancelMessage("You need "..cost.." gold coins to buy all 5 bless.")
end
else
p:sendCancelMessage("You can't buy bless, when you are in a battle.")
end
return false
end

Editado por kelvin.shirazi (veja o histórico de edições)

Ajudei? dá um REP +               ↑↑

 

 

Projetos:

Mapa próprio 8.70.

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo