tryHello, help me with a script of a floor that asks you to have these items 37420 on and that you need a Storage and level 250 to transport you
ItemID: 37420
Level: 250
Storage: 284701
View attachment 57400
local config = {
TILE_ACTION_ID = 12345,
ITEMID = 37420,
LEVEL = 200,
STORAGE = 284701
}
local me = MoveEvent('scriptNameHere')
function me.onStepIn(player, item, position, fromPosition)
local itemCount = player:getItemCount(config.ITEMID)
if not itemCount or itemCount == 0 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required item.')
player:teleportTo(fromPosition)
return true
end
if player:getLevel() < config.LEVEL then...
tryHello, help me with a script of a floor that asks you to have these items 37420 on and that you need a Storage and level 250 to transport you
ItemID: 37420
Level: 250
Storage: 284701
View attachment 57400
local config = {
TILE_ACTION_ID = 12345,
ITEMID = 37420,
LEVEL = 200,
STORAGE = 284701
}
local me = MoveEvent('scriptNameHere')
function me.onStepIn(player, item, position, fromPosition)
local itemCount = player:getItemCount(config.ITEMID)
if not itemCount or itemCount == 0 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required item.')
player:teleportTo(fromPosition)
return true
end
if player:getLevel() < config.LEVEL then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to be atleast level ' .. config.LEVEL)
player:teleportTo(fromPosition)
return true
end
if player:getStorageValue(config.STORAGE) <= 0 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required storage.')
player:teleportTo(fromPosition)
return true
end
-- Success, do something.
position:sendMagicEffect(CONST_ME_TELEPORT)
return true
end
me:aid(config.TILE_ACTION_ID)
me:register()
I'm missing the coordinate hahaha, can you help me?try
Lua:local config = { TILE_ACTION_ID = 12345, ITEMID = 37420, LEVEL = 200, STORAGE = 284701 } local me = MoveEvent('scriptNameHere') function me.onStepIn(player, item, position, fromPosition) local itemCount = player:getItemCount(config.ITEMID) if not itemCount or itemCount == 0 then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required item.') player:teleportTo(fromPosition) return true end if player:getLevel() < config.LEVEL then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to be atleast level ' .. config.LEVEL) player:teleportTo(fromPosition) return true end if player:getStorageValue(config.STORAGE) <= 0 then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required storage.') player:teleportTo(fromPosition) return true end -- Success, do something. position:sendMagicEffect(CONST_ME_TELEPORT) return true end me:aid(config.TILE_ACTION_ID) me:register()
missing the coordinate? whatI'm missing the coordinate hahaha, can you help me?
{x = 32962, y = 31499, z = 7}
can it be placed to take you to another place? that takes you to this position {x = 32962, y = 31499, z = 7}missing the coordinate? what
can it be placed to take you to another place? that takes you to this position {x = 32962, y = 31499, z = 7}
local config = {
TILE_ACTION_ID = 12345,
ITEMID = 37420,
LEVEL = 200,
STORAGE = 284701,
DESTINATION = Position(32962, 31499, 7)
}
local me = MoveEvent('scriptNameHere')
function me.onStepIn(player, item, position, fromPosition)
local itemCount = player:getItemCount(config.ITEMID)
if not itemCount or itemCount == 0 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required item.')
player:teleportTo(fromPosition)
return true
end
if player:getLevel() < config.LEVEL then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to be atleast level ' .. config.LEVEL)
player:teleportTo(fromPosition)
return true
end
if player:getStorageValue(config.STORAGE) <= 0 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required storage.')
player:teleportTo(fromPosition)
return true
end
position:sendMagicEffect(CONST_ME_TELEPORT)
player:teleportTo(config.DESTINATION)
return true
end
me:aid(config.TILE_ACTION_ID)
me:register()
Bro can it be placed that can be passed only with the item placed as in the photo?Lua:local config = { TILE_ACTION_ID = 12345, ITEMID = 37420, LEVEL = 200, STORAGE = 284701, DESTINATION = Position(32962, 31499, 7) } local me = MoveEvent('scriptNameHere') function me.onStepIn(player, item, position, fromPosition) local itemCount = player:getItemCount(config.ITEMID) if not itemCount or itemCount == 0 then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required item.') player:teleportTo(fromPosition) return true end if player:getLevel() < config.LEVEL then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to be atleast level ' .. config.LEVEL) player:teleportTo(fromPosition) return true end if player:getStorageValue(config.STORAGE) <= 0 then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required storage.') player:teleportTo(fromPosition) return true end position:sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(config.DESTINATION) return true end me:aid(config.TILE_ACTION_ID) me:register()
TryBro can it be placed that can be passed only with the item placed as in the photo?
local config = {
TILE_ACTION_ID = 12345,
ITEMID = 37420,
LEVEL = 200,
STORAGE = 284701,
DESTINATION = Position(32962, 31499, 7)
}
local me = MoveEvent('scriptNameHere')
function me.onStepIn(player, item, position, fromPosition)
local armor = player:getSlotItem(CONST_SLOT_ARMOR)
if not armor or armor:getId() ~= config.ITEMID then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required item.')
player:teleportTo(fromPosition)
return true
end
if player:getLevel() < config.LEVEL then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to be atleast level ' .. config.LEVEL)
player:teleportTo(fromPosition)
return true
end
if player:getStorageValue(config.STORAGE) <= 0 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required storage.')
player:teleportTo(fromPosition)
return true
end
position:sendMagicEffect(CONST_ME_TELEPORT)
player:teleportTo(config.DESTINATION)
return true
end
me:aid(config.TILE_ACTION_ID)
me:register()
Try
Lua:local config = { TILE_ACTION_ID = 12345, ITEMID = 37420, LEVEL = 200, STORAGE = 284701, DESTINATION = Position(32962, 31499, 7) } local me = MoveEvent('scriptNameHere') function me.onStepIn(player, item, position, fromPosition) local armor = player:getSlotItem(CONST_SLOT_ARMOR) if not armor or armor:getId() ~= config.ITEMID then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required item.') player:teleportTo(fromPosition) return true end if player:getLevel() < config.LEVEL then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to be atleast level ' .. config.LEVEL) player:teleportTo(fromPosition) return true end if player:getStorageValue(config.STORAGE) <= 0 then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You don\'t have the required storage.') player:teleportTo(fromPosition) return true end position:sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(config.DESTINATION) return true end me:aid(config.TILE_ACTION_ID) me:register()
> Teleportvengoth.lua [error]
^ ...rgottenserver/data/scripts/movements/Teleportvengoth.lua:16: ')' expected near 'pass'
local config = {
TILE_ACTION_ID = 52640,
ITEMID = 37420,
LEVEL = 250,
STORAGE = 284723,
DESTINATION = Position(33650, 31444, 10)
}
local me = MoveEvent('scriptNameHere')
function me.onStepIn(player, item, position, fromPosition)
local armor = player:getSlotItem(CONST_SLOT_ARMOR)
if not armor or armor:getId() ~= config.ITEMID then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need burial shroud to pass.')
player:teleportTo(fromPosition)
return true
end
if player:getLevel() < config.LEVEL then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to be level ' .. config.LEVEL)
player:teleportTo(fromPosition)
return true
end
if player:getStorageValue(config.STORAGE) <= 0 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to kill Thaian.')
player:teleportTo(fromPosition)
return true
end
position:sendMagicEffect(CONST_ME_TELEPORT)
player:teleportTo(config.DESTINATION)
return true
end
me:aid(config.TILE_ACTION_ID)
me:register()
Works fine over here.Post automatically merged:
Lua:> Teleportvengoth.lua [error] ^ ...rgottenserver/data/scripts/movements/Teleportvengoth.lua:16: ')' expected near 'pass'
file.
Lua:local config = { TILE_ACTION_ID = 52640, ITEMID = 37420, LEVEL = 250, STORAGE = 284723, DESTINATION = Position(33650, 31444, 10) } local me = MoveEvent('scriptNameHere') function me.onStepIn(player, item, position, fromPosition) local armor = player:getSlotItem(CONST_SLOT_ARMOR) if not armor or armor:getId() ~= config.ITEMID then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need burial shroud to pass.') player:teleportTo(fromPosition) return true end if player:getLevel() < config.LEVEL then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to be level ' .. config.LEVEL) player:teleportTo(fromPosition) return true end if player:getStorageValue(config.STORAGE) <= 0 then player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to kill Thaian.') player:teleportTo(fromPosition) return true end position:sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(config.DESTINATION) return true end me:aid(config.TILE_ACTION_ID) me:register()
local config = {
TILE_ACTION_ID = 52640,
ITEMID = 37420,
LEVEL = 250,
STORAGE = 284723,
DESTINATION = Position(33650, 31444, 10)
}
local me = MoveEvent('scriptNameHere')
function me.onStepIn(player, item, position, fromPosition)
local armor = player:getSlotItem(CONST_SLOT_ARMOR)
if (not armor) or (armor:getId() ~= config.ITEMID) then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need burial shroud to pass.')
player:teleportTo(fromPosition)
return true
end
if player:getLevel() < config.LEVEL then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to be level ' .. config.LEVEL)
player:teleportTo(fromPosition)
return true
end
if player:getStorageValue(config.STORAGE) <= 0 then
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'You need to kill Thaian.')
player:teleportTo(fromPosition)
return true
end
position:sendMagicEffect(CONST_ME_TELEPORT)
player:teleportTo(config.DESTINATION)
return true
end
me:aid(config.TILE_ACTION_ID)
me:register()