Lua:
-- Blue Legs door
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 5787 then
if(isInArray({getPlayerStorageValue(cid, 50019), getPlayerStorageValue(cid, 50020), getPlayerStorageValue(cid, 50021), getPlayerStorageValue(cid, 50022), getPlayerStorageValue(cid, 8266), getPlayerStorageValue(cid, 36203)}, -1) == 1) then
doPlayerSendTextMessage(cid, 22, "No!!")
else
doPlayerSendTextMessage(cid, 22, "You may pass.")
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition, 1)
end
return 1
end
return 0
end
It's letting me pass no matter what, it should only let me pass if all storagevalues are set from the quest which include: 4 amulet pieces, sweaty cyc exchange, koshei amulet use on body.
If I'm reading it correctly it's taking each storage value and comparing it to a value which is [storagevalue - 1 = 0] and if any are =0 then it says No!
But it does not work.
Thanks!
Justin~