Ir para conteúdo

Featured Replies

Postado

to precisando de um Aol que funcione durante 30x porexemplo eu to com o Aol,ai morro 1,2,3,4... e meu Loot não cai(a menos que esteje red ou black),ai quando for a 30x q eu morri com o mesmo aol o aol some.

 

Rep+ pra quem ajuda

 

Projeto/Serviços que desenvolvi durante esse Tempo.

[SERVIDOR] - NTO By Madara Rinnegan - Criado em 2014

Resolvido por Danihcv

Ir para solução
  • Respostas 29
  • Visualizações 1.2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Tente: function onDeath(cid)     aol = 2173     slot = getPlayerSlotItem(cid, CONST_SLOT_NECKLACE)          if slot.itemid == aol and getItemAttribute(slot.uid, 'charges') == 1 then         doRemove

  • Testei desse modo. As charges bugaram e deixaram o item infinito, por isso não indiquei essas tags.

  • vdd, testei no otx nao bugou, ate que chegou na ultima charge, perdao pelo post

Postado

Vê se assim funciona:

Vá na pasta data/creaturescripts/scripts e veja se tem um arquivo chamado preparedeath.lua se tiver basta substituir seu conteúdo inteiro por este:

local stor = {}

function onDeath(cid, corpse, deathList, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if (getPlayerSlotItem(cid, 2).itemid == 2173) then
doCreatureSetDropLoot(cid, false)
doPlayerSetLossSkill(cid, false)
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 10)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
if #stor < 30 then
table.insert(stor, (#stor + 1))
else
table.remove(stor, 30)
table.remove(stor, 29)
table.remove(stor, 28)
table.remove(stor, 27)
table.remove(stor, 26)
table.remove(stor, 25)
table.remove(stor, 24)
table.remove(stor, 23)
table.remove(stor, 22)
table.remove(stor, 21)
table.remove(stor, 20)
table.remove(stor, 19)
table.remove(stor, 18)
table.remove(stor, 17)
table.remove(stor, 16)
table.remove(stor, 15)
table.remove(stor, 14)
table.remove(stor, 13)
table.remove(stor, 12)
table.remove(stor, 11)
table.remove(stor, 10)
table.remove(stor, 9)
table.remove(stor, 8)
table.remove(stor, 7)
table.remove(stor, 6)
table.remove(stor, 5)
table.remove(stor, 4)
table.remove(stor, 3)
table.remove(stor, 2)
table.remove(stor, 1)
end
return TRUE
end
end
return TRUE
end

 

Se não tiver, adicione essa tag ao arquivo creaturescripts.xml:

	<event type="death" name="SkullAmulet" event="script" value="preparedeath.lua"/>

E crie o arquivo preparedeath.lua e coloque o código que eu coloquei aí.

 

 

 

Se funcionar, eu vejo se dá pra simplificar. 

É pq eu não sei se dá pra esvaziar uma table toda. To pesquisando aqui.

 

@Edit:

Independente do resultado do script acima, teste esse tambem:

local stor = {}

function onDeath(cid, corpse, deathList, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if (getPlayerSlotItem(cid, 2).itemid == 2173) then
doCreatureSetDropLoot(cid, false)
doPlayerSetLossSkill(cid, false)
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 10)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
if #stor < 30 then
table.insert(stor, (#stor + 1))
else
for k in pairs (t) do
    t[k] = nil
end
end
return TRUE
end
end
return TRUE
end

Obs: Não deixe de testar os dois códigos. O segundo está mais otimizado, por isso será melhor se ele funcionar logo de primeira. Mas se ele não funcionar, teste o primeiro e diga o resultado.

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

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

Atenciosamente,

Daniel.

Abraços!

Postado
  • Autor

irei ver se funciona ja edito aki..

 

--edit--

funciono não ele fica Infinito ja fis meu char morre 40x '-'

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

 

Projeto/Serviços que desenvolvi durante esse Tempo.

[SERVIDOR] - NTO By Madara Rinnegan - Criado em 2014

Postado

Testou os dois scripts?

Dá algum erro na distro?

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

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

Atenciosamente,

Daniel.

Abraços!

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.7k

Informação Importante

Confirmação de Termo