Use Item Ganha Addon

oktober15
em Scripts

oktober15

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 03/02/09Posts: 134Char no Tibia: Knight sparxzin

Queria um script que ao player der use em tal item, ganhase tal addon, mais nao o addon completo

+rep

http://malera-war.servegame.com - ONLINE!! - Global 9.8x all features & custom

 

28/03/2014 - Reinauguração

 

 

Novo servidor 9.83, com otimo sistema de pvp e novidades unicas, vale a pena conferir, servidor diferenciado e de qualidade!

 

AnneMotta

o choro pode durar uma noite mas a alegria vem pela manha ♪
avatar
Banidos
Banidos

INFOS

Grupo: BanidosRegistrado: 22/01/12Posts: 842Char no Tibia: Stephan

edited ------------------

 

meu script tava extremamente errado, um tempo sem mexer com isso por isso retirei. sorry.

RIP AnneMotta 21/01/2012 - 15/01/2014

Liga das lendas: RUSHEI B1 DE AWP

owi6giO.png

oktober15

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 03/02/09Posts: 134Char no Tibia: Knight sparxzin

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

http://malera-war.servegame.com - ONLINE!! - Global 9.8x all features & custom

 

28/03/2014 - Reinauguração

 

 

Novo servidor 9.83, com otimo sistema de pvp e novidades unicas, vale a pena conferir, servidor diferenciado e de qualidade!

 

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

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

Atenciosamente, Vilden.

oktober15

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 03/02/09Posts: 134Char no Tibia: Knight sparxzin

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

http://malera-war.servegame.com - ONLINE!! - Global 9.8x all features & custom

 

28/03/2014 - Reinauguração

 

 

Novo servidor 9.83, com otimo sistema de pvp e novidades unicas, vale a pena conferir, servidor diferenciado e de qualidade!

 

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597
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

Atenciosamente, Vilden.

kevin2010

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 27/05/11Posts: 48Char no Tibia: Johnmatador

como coloco para usar varias vez

assinaturar.jpg

Kevin Zika

 

Eu Sou Quem Eu Sou Se Nao Gosto De Quem Eu Sou Poblema Seu _)_

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

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.

Atenciosamente, Vilden.

kevin2010

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 27/05/11Posts: 48Char no Tibia: Johnmatador

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

assinaturar.jpg

Kevin Zika

 

Eu Sou Quem Eu Sou Se Nao Gosto De Quem Eu Sou Poblema Seu _)_

oktober15

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 03/02/09Posts: 134Char no Tibia: Knight sparxzin

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

http://malera-war.servegame.com - ONLINE!! - Global 9.8x all features & custom

 

28/03/2014 - Reinauguração

 

 

Novo servidor 9.83, com otimo sistema de pvp e novidades unicas, vale a pena conferir, servidor diferenciado e de qualidade!

 

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

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

Atenciosamente, Vilden.

oktober15

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 03/02/09Posts: 134Char no Tibia: Knight sparxzin

continua sim, refiz, conferi tudo que vc mando, e ainda continua, se der use com o item no chao ele nao some e da o addon.

http://malera-war.servegame.com - ONLINE!! - Global 9.8x all features & custom

 

28/03/2014 - Reinauguração

 

 

Novo servidor 9.83, com otimo sistema de pvp e novidades unicas, vale a pena conferir, servidor diferenciado e de qualidade!

 

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

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

Atenciosamente, Vilden.

oktober15

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 03/02/09Posts: 134Char no Tibia: Knight sparxzin

Agora sim hehe, tudo certinho, vlw msm, e 2+rep pra vc

http://malera-war.servegame.com - ONLINE!! - Global 9.8x all features & custom

 

28/03/2014 - Reinauguração

 

 

Novo servidor 9.83, com otimo sistema de pvp e novidades unicas, vale a pena conferir, servidor diferenciado e de qualidade!

 

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

Movido.

Atenciosamente, Vilden.