Ir para conteúdo

Pergunta

15 respostass a esta questão

Posts Recomendados

  • 0

desculpe mais nao funfo ;s

 

fiz esse:

function onUse(cid, item, fromPosition, itemEx, toPosition)

if (getPlayerStorageValue(cid, 4766) == EMPTY_STORAGE) then

getPlayerItemCount(cid, 13926, 1)

doCreatureSay(cid, "First afflited addon!", TALKTYPE_ORANGE_1)

doPlayerAddOutfit(cid, 430, 1)

doPlayerAddOutfit(cid, 431, 1)

doPlayerRemoveItem(cid, 13926, 1)

setPlayerStorageValue(cid, 4766, 1)

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)

else

doPlayerSendTextMessage(cid,22,"Voce ja tem este addon.")

end

return true

end

só que se o item tiver no chao, o player ganha o addon e o item nao some, só some se estiver na bp

alguem ajuda com esse problema.. vlw e +rep

Link para o comentário
https://xtibia.com/forum/topic/185230-use-item-ganha-addon/#findComment-1250084
Compartilhar em outros sites

  • 0

Nen sei se essa função funciona...

 

 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

local storage = 4766

local item = 13926

 

if getPlayerStorageValue(cid, storage) == -1 and getPlayerItemCount(cid, item, 1) then

doCreatureSay(cid, "First afflited addon!", TALKTYPE_ORANGE_1)

doRemoveItem(cid,item)

doPlayerAddOutfit(cid, 430, 1)

doPlayerAddOutfit(cid, 431, 1)

else

doPlayerSendTextMessage(cid,22,"Voce ja tem este addon.")

end

end

Link para o comentário
https://xtibia.com/forum/topic/185230-use-item-ganha-addon/#findComment-1250099
Compartilhar em outros sites

  • 0

Nen sei se essa função funciona...

 

 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

local storage = 4766

local item = 13926

 

if getPlayerStorageValue(cid, storage) == -1 and getPlayerItemCount(cid, item, 1) then

doCreatureSay(cid, "First afflited addon!", TALKTYPE_ORANGE_1)

doRemoveItem(cid,item)

doPlayerAddOutfit(cid, 430, 1)

doPlayerAddOutfit(cid, 431, 1)

else

doPlayerSendTextMessage(cid,22,"Voce ja tem este addon.")

end

end

nao funfo tbm, agr nem da bp ele some .-.

Link para o comentário
https://xtibia.com/forum/topic/185230-use-item-ganha-addon/#findComment-1250103
Compartilhar em outros sites

  • 0
function onUse(cid, item, fromPosition, itemEx, toPosition)

local storage = 4766

local item = 13926

 

if getPlayerStorageValue(cid, storage) == -1 and getPlayerItemCount(cid, item, 1) then

doCreatureSay(cid, "First afflited addon!", TALKTYPE_ORANGE_1)

doPlayerRemoveItem(cid, item, 1)

doPlayerAddOutfit(cid, 430, 1)

doPlayerAddOutfit(cid, 431, 1)

setPlayerStorageValue(cid,storage,1)

else

doPlayerSendTextMessage(cid,22,"Voce ja tem este addon ou não tem o item necessário.")

end

end

Editado por Vilden
Link para o comentário
https://xtibia.com/forum/topic/185230-use-item-ganha-addon/#findComment-1250108
Compartilhar em outros sites

  • 0

Nessa parte:

if getPlayerStorageValue(cid, storage) == -1 and getPlayerItemCount(cid, item, 1) then

 

Modifique:

if getPlayerItemCount(cid, item, 1) then

__________________________

Dúvida sanada, tópico movido.

Agradecer não mata.

Editado por Vilden
Link para o comentário
https://xtibia.com/forum/topic/185230-use-item-ganha-addon/#findComment-1250110
Compartilhar em outros sites

  • 0

Nessa parte:

if getPlayerStorageValue(cid, storage) == -1 and getPlayerItemCount(cid, item, 1) then

 

Modifique:

if getPlayerItemCount(cid, item, 1) then

__________________________

Dúvida sanada, tópico movido.

Agradecer não mata.

na hora que vc me passo negocio a luz caiu mals muito obrigado +rep so amanha

Editado por kevin2010
Link para o comentário
https://xtibia.com/forum/topic/185230-use-item-ganha-addon/#findComment-1250168
Compartilhar em outros sites

  • 0

ainda continua o bug ._. , ele da o addon e só é possivel usa 1x, tudo certo até ai, mais se o item tiver no chao, ele da o addon e nao some, só some se estiver na bp

Link para o comentário
https://xtibia.com/forum/topic/185230-use-item-ganha-addon/#findComment-1250180
Compartilhar em outros sites

  • 0

Amigo claro que não continua o bug.. você fez algo errado.. pra começa ele só vai usa

o item se estiver na bp.. se estiver no chão, vai fala que ele não tem o item..

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

local storage = 4766 -- storage pra usa so 1x

local item = 13926 --id do item q vai clica

 

if getPlayerStorageValue(cid, storage) == -1 and getPlayerItemCount(cid, item, 1) then

doCreatureSay(cid, "First afflited addon!", TALKTYPE_ORANGE_1)

doPlayerRemoveItem(cid, item, 1)

doPlayerAddOutfit(cid, 430, 1)

doPlayerAddOutfit(cid, 431, 1)

setPlayerStorageValue(cid,storage,1)

else

doPlayerSendTextMessage(cid,22,"Voce ja tem este addon ou não tem o item necessário.")

end

end

Editado por Vilden
Link para o comentário
https://xtibia.com/forum/topic/185230-use-item-ganha-addon/#findComment-1250260
Compartilhar em outros sites

  • 0

function onUse(cid, item, fromPosition, itemEx, toPosition)

local storage = 4766 -- storage pra usa so 1x

local item = 13926 --id do item q vai clica

 

if getPlayerStorageValue(cid, storage) == -1 and doPlayerRemoveItem(cid, item, 1) then

doCreatureSay(cid, "First afflited addon!", TALKTYPE_ORANGE_1)

doPlayerAddOutfit(cid, 430, 1)

doPlayerAddOutfit(cid, 431, 1)

setPlayerStorageValue(cid,storage,1)

else

doPlayerSendTextMessage(cid,22,"Voce ja tem este addon ou não tem o item necessário.")

end

end

Link para o comentário
https://xtibia.com/forum/topic/185230-use-item-ganha-addon/#findComment-1250912
Compartilhar em outros sites

×
×
  • Criar Novo...