Em LUA, o sinal de diferença é '~='.
flw
apocarai me ajuda ae!
function onUse(cid, item, fromPosition, itemEx, toPosition)
local leverpos1 = {x=455, y=1388, z=11, stackpos=1}
local lever1 = getThingfromPos(leverpos1)
local leverpos2 = {x=453, y=1371, z=11, stackpos=1}
local lever2 = getThingfromPos(leverpos2)
local wallpos1 = {x=458, y=1386, z=11, stackpos=1}
local wallpos2 = {x=459, y=1386, z=11, stackpos=1}
local wall1 = getThingfromPos(wallpos1)
local wall2 = getThingfromPos(wallpos2)
if(item.actionid == 20950) then
if(item.itemid == 1945) then
doTransformItem(item.uid,item.itemid+1)
elseif(item.itemid == 1946) then
doTransformItem(item.uid,item.itemid-1)
end
if (item.actionid == 20950 and
lever1.itemid ~= 1946 and
lever2.itemid ~= 1946 and
wall1.itemid == 0 and
wall2.itemid == 0) then
doCreateItem(1304,1,wallpos1)
doCreateItem(1304,1,wallpos2)
elseif (item.actionid == 20950 and
lever1.itemid ~= 1945 and
lever2.itemid ~= 1945 and
wall1.itemid == 1304 and
wall2.itemid == 1304) then
doPlayerSendTextMessage(cid,22, "You flipped all the levers! Continue on!")
doRemoveItem(wall1.uid,1)
doRemoveItem(wall2.uid,1)
else
doPlayerSendTextMessage(cid,22, "All fourteen levers have to be pulled to remove stones.")
end
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return TRUE
end
Não está funcionando, eu quero que se as 2 alavancas não estiverem viradas pra um lado a pedra fique, caso contrário ela suma. Eu coloquei diferente pois as vezes alguém pode deixar alguma coisa em cima ou algum fogo de algum monstro ou veneno sei lah, dai o script não vai reconhecer a alavanca e não vai funcionar, por isso pensei em por difenrente.
Valeu!
EDIT
Aparentemente já resolvi o meu problema.
Obrigado!
Mais de 80 quests incluindo POI, Epic Mystical Quest, Labyrinth Quest (prêmio 5 dias de vip), Blue Legs Quest, Firewalker Quest, Inquisition, Annihilator, Arena Svargrond, Arena Zao Island, Mines, DH, Demon Oak.. todas 100%!