Ir para conteúdo

Pergunta

Como eu faço pras arrows do meu server vir dentro de uma bag especial a id 9774, vim a bag lotada de arrows?

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

if getPlayerStorageValue(cid, 7998) < 1 then
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a KIT ARROWS.")
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerAddItem(cid, 2544, 100)
    doPlayerSetStorageValue(cid, 7998, 1)
else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end

return TRUE
end
Link para o comentário
https://xtibia.com/forum/topic/233658-questbag/
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

  • 0

Assim ?

function onUse(cid)

	if getPlayerStorageValue(cid, 7998) < 1 then
	    local bag = doPlayerAddItem(cid, 9774, 1)
	    doAddContainerItem(bag, 2544, 2000)
	    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a KIT ARROWS.")
	    doPlayerSetStorageValue(cid, 7998, 1)
	else
	    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
	end

	return true
end

Tópico movido para a seção de dúvidas e pedidos resolvidos. Editado por ScreaM
Link para o comentário
https://xtibia.com/forum/topic/233658-questbag/#findComment-1649844
Compartilhar em outros sites

×
×
  • Criar Novo...