PI
dúvida

VIP Amulet

Por pinheirog3, 20 de dez. de 2012 em Scripts

queria ajuda nesse item
resolvido
7
1.3k
pinheirog3P
20 de dezembro de 2012 às 13:49

Tipo no meu servidor tem um item vip : "You see a VIP amulet (protection all +15%, speed +20)"

eu queria colocar ele pra ser infinito, que ao morrer não perdia nada, igual o amulet of loss , mas porem infinito. alguem pode me ajudar nisso ? como eu faço. quando morre está perdendo o Vip Amulet.

 

obrigado

abrass

DinoAdminD
20 de dezembro de 2012 às 13:51

poderia postar o Script do Amulet?

pinheirog3P
20 de dezembro de 2012 às 13:54

function onEquip(cid, item, slot)

if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then

if isSorcerer(cid) or isDruid(cid) then

doPlayerAddMagLevel(cid, 10)

elseif (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196 and isPaladin(cid) or isKnight(cid)) then

doPlayerAddSkill(cid, 2, 10, 1)

doPlayerAddSkill(cid, 3, 10, 1)

doPlayerAddSkill(cid, 4, 10, 1)

doPlayerAddSkill(cid, 5, 10, 1)

end

return true

end

return true

end

 

function onDeEquip(cid, item, slot)

if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then

if isSorcerer(cid) or isDruid(cid) then

doPlayerRemoveMagLevel(cid, -10)

elseif (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196 and isPaladin(cid) or isKnight(cid)) then

doPlayerRemoveSkill(cid, 2, -10, 1)

doPlayerRemoveSkill(cid, 3, -10, 1)

doPlayerRemoveSkill(cid, 4, -10, 1)

doPlayerRemoveSkill(cid, 5, -10, 1)

end

return true

end

return true

end

DinoAdminD
20 de dezembro de 2012 às 13:59

1°: Quando for postar script use spoiler ou code ([ spoiler] txt [ /spoiler] [ CODE]txt [ /CODE])

Amigo Tente Assim:

 

 

 

function onEquip(cid, item, slot)

if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then

if isSorcerer(cid) or isDruid(cid) then

doPlayerAddMagLevel(cid, 10)

elseif (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196 and isPaladin(cid) or isKnight(cid)) then

doPlayerAddSkill(cid, 2, 10, 1)

doPlayerAddSkill(cid, 3, 10, 1)

doPlayerAddSkill(cid, 4, 10, 1)

doPlayerAddSkill(cid, 5, 10, 1)

end

return true

end

return true

end

 

function onDeEquip(cid, item, slot)

if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196) then

if isSorcerer(cid) or isDruid(cid) then

doPlayerRemoveMagLevel(cid, -0)

elseif (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196 and isPaladin(cid) or isKnight(cid)) then

doPlayerRemoveSkill(cid, 2, -0, 1)

doPlayerRemoveSkill(cid, 3, -0, 1)

doPlayerRemoveSkill(cid, 4, -0, 1)

doPlayerRemoveSkill(cid, 5, -0, 1)

end

return true

end

return true

end

 

 

 

(Nao testei)

Editado Dezembro 20 por DinoAdmin

pinheirog3P
20 de dezembro de 2012 às 14:02

Consegui abri sim, obrigado

Editado Dezembro 20 por pinheirog3

Yan OliveiraY
20 de dezembro de 2012 às 14:06

Dúvida Resolvida!

 

Movido.

Editado Dezembro 20 por Yan18

Yan OliveiraY
20 de dezembro de 2012 às 14:07

Tópico movido para a seção de dúvidas e pedidos resolvidos.