Opa, Jhon sempre ajudando em!
Pow cara obrigadão msm!!
Testei aqui com um recipiente só e não deu, necessitava apenas do sniper gloves.
Fiz o procedimento e coloqeui o ID na pedra, mais ele não faz nada
function onUse(cid, item, fromPosition, itemEx, toPosition)
local lugaritem1 = {x=211, y=220, z=11, stackpos=1}
local itemid1 = 5893 -- id item 1
local quantRemov1 = 2
local lugaritem2 = {x=211, y=211, z=11, stackpos=1}
local itemid2 = 5894 -- id item 2
local quantRemov2 = 10
local lugaritem3 = {x=211, y=223, z=11, stackpos=1}
local itemid3 = 5913 -- id item 3
local quantRemov3 = 5
local lugaritem4 = {x=211, y=224, z=11, stackpos=1}
local itemid4 = 5914 -- id item 4
local quantRemov4 = 5
if (getPlayerStorageValue(cid, 15000) <= 0) then
if (getThingfromPos(lugaritem1).id == itemid1 and getThingfromPos(lugaritem2).id == itemid2 and getThingfromPos(lugaritem3).id == itemid3 and getThingfromPos(lugaritem4).id == itemid4) then
doRemoveItem(getThingfromPos(lugaritem1).uid, quantRemov1)
doRemoveItem(getThingfromPos(lugaritem2).uid, quantRemov2)
doRemoveItem(getThingfromPos(lugaritem3).uid, quantRemov3)
doRemoveItem(getThingfromPos(lugaritem4).uid, quantRemov4)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You now have a Barbarian addon!.")
doPlayerAddOutfit(cid, 147, 1)
doPlayerAddOutfit(cid, 143, 1)
setPlayerStorageValue(cid, 15000, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"The items are not in the correct positions.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Have you done this quest.")
end
return true
end
Testei também com 4 recipientes, igual o que vc postou aqui e ainda não executa nada...
Colei a linha no Actions.xml tbm!
function onUse(cid, item, fromPosition, itemEx, toPosition)
local lugaritem1 = {x=211, y=220, z=11, stackpos=1} -- lugar item 1
local itemid1 = 5893 -- id item 1
local quantRemov1 = 2 -- qauntidade a remover do item1
local lugaritem2 = {x=211, y=211, z=11, stackpos=1} -- lugar item 2
local itemid2 = 5894 -- id item 2
local quantRemov2 = 10
local lugaritem3 = {x=211, y=223, z=11, stackpos=1} -- lugar item 3
local itemid3 = 5913 -- id item 3
local quantRemov3 = 5
local lugaritem4 = {x=211, y=224, z=11, stackpos=1} -- lugar item 4
local itemid4 = 5914 -- id item 4
local quantRemov4 = 5
if (getPlayerStorageValue(cid, 15000) <= 0) then
if (getThingfromPos(lugaritem1).id == itemid1 and getThingfromPos(lugaritem2).id == itemid2 and getThingfromPos(lugaritem3).id == itemid3 and getThingfromPos(lugaritem4).id == itemid4) then
doRemoveItem(getThingfromPos(lugaritem1).uid, quantRemov1)
doRemoveItem(getThingfromPos(lugaritem2).uid, quantRemov2)
doRemoveItem(getThingfromPos(lugaritem3).uid, quantRemov3)
doRemoveItem(getThingfromPos(lugaritem4).uid, quantRemov4)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"You now have a Barbarian addon!.")
doPlayerAddOutfit(cid, 147, 1) -- 1 é igual ao first addon, se 2 = second, se 3 = full addon
doPlayerAddOutfit(cid, 143, 1) -- o 146 e o 143, são o numero do outfit do barbarian male e female.
setPlayerStorageValue(cid, 15000, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Os itens nao estao nas posiçoes corretas.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Voce ja fez esta quest.")
end
return true
end
E também no Actions.xml tanto:
<action itemid="7762" script="addonbarbarian1.lua" />
Quanto:
<action actionid="2012" event="script" value="addonbarbarian1.lua"/>