Ir para conteúdo

Featured Replies

Postado

Essa talk esta fazendo 5 aol de uma vez, era pra sair 1 e blessed

local bless = {1, 2, 3, 4, 5}
local cost = 20000
function onSay(cid, words, param)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerPopupFYI(cid, "Você ja tem seu aol protegido com bless.")
doSendMagicEffect(getPlayerPosition(cid), 31)
return TRUE
end
end

if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
doPlayerAddItem(cid, 2173, 1)
end
doCreatureSay(cid, "Aol Protected!!!" ,19)
doSendMagicEffect(getPlayerPosition(cid), 49)
doSendMagicEffect(getPlayerPosition(cid), 48)
else
doPlayerPopupFYI(cid, "Você precisa de 20k para comprar aol protegido.")
end
return TRUE
end

(1º) | [8.60] - Galaxy Server - Download

(2º) | [8.60] - Glorious Server - Download

(3º) | [8.60] - Epic Server - Download

Resolvido por MarcosFraga

Ir para solução
Postado

Não estou mt certo se irá adiantar, mas ñ custa tentar:

local bless = {1, 2, 3, 4, 5}
local cost = 20000
function onSay(cid, words, param)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerPopupFYI(cid, "Você ja tem seu aol protegido com bless.")
doSendMagicEffect(getPlayerPosition(cid), 31)
return TRUE
end
end

if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doPlayerAddItem(cid, 2173, 1)
doCreatureSay(cid, "Aol Protected!!!" ,19)
doSendMagicEffect(getPlayerPosition(cid), 49)
doSendMagicEffect(getPlayerPosition(cid), 48)
else
doPlayerPopupFYI(cid, "Você precisa de 20k para comprar aol protegido.")
end
return TRUE
end

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Postado
  • Solução

Qualquer Coisa tenta:

function onSay(cid,words,param,channel)
if doPlayerRemoveMoney(cid, 20000) then
  for i = 1,5 do
      if not getPlayerBlessing(cid, i) then
          doPlayerAddBlessing(cid, i)
      end
  end
  doPlayerAddItem(cid,2173,1)
  doSendMagicEffect(getCreaturePosition(cid),26)
  doPlayerSendTextMessage(cid,22,"Aol + Bless")
else
    doPlayerSendCancel(cid, "Not enough gold")
end
return true
end 
<talkaction words="!aol" event="script" value="seuarquivo.lua"/>

Editado por MarcosFraga (veja o histórico de edições)

Donate

 

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