Taurus
Texass
This piece of syntax is driving me nuts, I've tried every logical way I can think of... too many to post.
Why doesn't the script check the storage value?
Instead it just sends them right thru. (This script is a copy of the poi tible tile script. You can't pass unless you have the item, I'm just trying to make it where you have to have the storage instead.... Like a questdoor but not reliant on actionId.
Should be simple...
Why doesn't the script check the storage value?
LUA:
local destinations = {
[41011] = Position(31809, 32277, 8),
[41010] = Position(31805, 32277, 8),
}
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return false
end
if player:getStorageValue(2213) == 1 then
player:teleportTo(fromPosition)
return true
end
player:teleportTo(destinations[item.uid])
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
return true
end
Instead it just sends them right thru. (This script is a copy of the poi tible tile script. You can't pass unless you have the item, I'm just trying to make it where you have to have the storage instead.... Like a questdoor but not reliant on actionId.
Should be simple...