Bom galera tenho um servidor 8;54 do antio Empire que montei do zero.
Já arrumei exatos 80% em processo geral e existe um script que ta me matando aqui os neuronios.
Bem o script que tenho praticamente motando é o seguinte, o usuario bota os itens corretos no recipiente e ele ganha um addon, o addon eu determino por lugar.
O script montado eh este:
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
E quando adiciono este script, nao acontece simplismente nada, nao da mensagem de erro nem da sucesso.
Fuçando achei um script parecido, mais ele da addon, outfit, da tudo... acho correto dizer que algumas funções se melhor adaptadas no script acima darão certo!
function onUse(cid, item, frompos, item2, topos)
piece1pos = {x=299, y=439, z=8, stackpos=1}
piece2pos = {x=299, y=440, z=8, stackpos=1}
helmetpos = {x=299, y=439, z=8, stackpos=1}
getpiece1 = getThingfromPos(piece1pos)
getpiece2 = getThingfromPos(piece2pos)
if item.uid == 6667 and item.itemid == 1945 and getpiece1.itemid == 2342 and getpiece2.itemid == 2147 then
doRemoveItem(getpiece1.uid,1)
doRemoveItem(getpiece2.uid,1)
doCreateItem(2343,1,helmetpos)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 6667 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendTextMessage(cid,22,"Sorry not possible.")
end
return 1
end
Acho que é só usar as funções corretas da debaixo no de cima pra arrumar
So que nao manjo mto de script pra fazer sozinho