BR

[Encerrado] (Bug) Unique Iten

Por BrunooMaciell, 08 de dez. de 2012 em Tópicos Sem Resposta

bug - poketibia
script
3
796
BrunooMaciellB
08 de dezembro de 2012 às 11:17

Estou com um bug relacionado ao unique iten !!

 

Bug

 

[08/12/2012 10:59:53] [Warning - TalkAction::configureEvent] Duplicate registered talkaction with words: /unban

[08/12/2012 10:59:54] [Warning - Event::loadScript] Event onRemoveItem not found (data/movements/scripts/UniqueItem.lua)

 

 

Script

 

function onAddItem(moveitem, tileitem, position, cid)

if isContainer(moveitem.uid) then

local itens = getItensUniquesInContainer(moveitem.uid)

if #itens >= 1 then

for a = 1, #itens do

local attr = getBallsAttributes(itens[a].uid)

local item = doCreateItemEx(itens[a].itemid)

for a, b in pairs (attr) do

if b then

doItemSetAttribute(item, a, b)

else

doItemEraseAttribute(item, a)

end

end

doPlayerSendMailByName(getCreatureName(cid), item, 1)

doRemoveItem(itens[a].uid, 1)

doPlayerSendTextMessage(cid, 20, "A item in this container is a Unique Item. It was sent to your depot!")

end

end

else

if getItemAttribute(moveitem.uid, "unique") then

local attr = getBallsAttributes(moveitem.uid)

local item = doCreateItemEx(moveitem.itemid)

for a, b in pairs (attr) do

if b then

doItemSetAttribute(item, a, b)

else

doItemEraseAttribute(item, a)

end

end

doPlayerSendMailByName(getCreatureName(cid), item, 1)

doRemoveItem(moveitem.uid, 1)

doPlayerSendTextMessage(cid, 20, "It is a Unique Item, you can't throw away this item! It was sent to your depot!")

end

end

return true

end

 

 

 

Rep++

RoksasR
08 de dezembro de 2012 às 12:04

Seguinte, abre o arquivo talkactions.xml. Aperte CTRL+F e procure por unban, você vai perceber que tem 2 "unbans", apague 1 tag dessa e pronto! Quanto a dúvida doRemoveItem, não lembro como resolve rsrs. Procure ver em movements.xml , procure a tag desse script e veja se ela está toda escrita certinha, nada errado, ou envie ela para nós vermos!

Editado Dezembro 8 por Roksas

5 anos depois...
StigalS
20 de abril de 2018 às 00:49
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.