Cornwallis
Member
- Joined
- Jan 3, 2010
- Messages
- 480
- Reaction score
- 16
I think it has to do with the storage value. Currently I have the storage set as 15000 value 15000 and it teleports me through the 15001 action id, but won't let me through 15000.
HTML:
local t = {
[{15000, {x = 988, y = 1005, z = 8}}] = "",
[{15001, {x = 1152, y = 988, z = 10}}] = ""
}
function onStepIn(creature, item, position, fromPosition)
local player = Player(creature)
if not Player(player) then
return false
end
for k, v in pairs(t) do
if item.actionid == k[1] and player:getStorageValue(15000) >= item.actionid then
player:teleportTo(k[2], false)
player:sendTextMessage(MESSAGE_INFO_DESCR, v)
return true
else
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have not made it to this dungeon yet.")
player:teleportTo(fromPosition, false)
return false
end
end
end