• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[TFS 1.4 - RevScript] Yalahar Mechanisms

Goo Goo

Member
Joined
Apr 20, 2010
Messages
42
Reaction score
10
Tested on TFS 1.4

data/scripts/actions
Lua:
local mechs = {
[7001] = {toPos={x=2708, y=1015, z=7}, text="Entered Ghouls."},
[7002] = {toPos={x=2701, y=1015, z=7}, text="Entered Skeletons."},
[7003] = {toPos={x=2657, y=1098, z=5}, text="Entered the Arena Quarter."},
[7004] = {toPos={x=2662, y=1098, z=5}, text="Entered the Inner City."},
[7005] = {toPos={x=2672, y=1059, z=5}, text="Entered the Alchemist Quarter."},
[7006] = {toPos={x=2672, y=1062, z=5}, text="Entered the Inner City."},
[7007] = {toPos={x=2704, y=1039, z=5}, text="Entered the Cemetery Quarter."},
[7008] = {toPos={x=2704, y=1043, z=5}, text="Entered the Inner City."},
[7009] = {toPos={x=2802, y=1100, z=5}, text="Entered the Sunken Quarter."},
[7010] = {toPos={x=2797, y=1100, z=5}, text="Entered the Inner City."},
[7011] = {toPos={x=2785, y=1149, z=5}, text="Entered the Factory Quarter."},
[7012] = {toPos={x=2782, y=1146, z=5}, text="Entered the Inner City."},
[7013] = {toPos={x=2761, y=1167, z=5}, text="Entered the Trade Quarter."},
[7014] = {toPos={x=2761, y=1164, z=5}, text="Entered the Inner City."}
}

local mechanism = Action()
function mechanism.onUse(player, item, fromPosition, target, toPosition, isHotkey)
  local mechUid = mechs[item.uid]
  if mechUid then
    player:sendTextMessage(MESSAGE_STATUS_SMALL, mechUid.text)
    player:getPosition():sendMagicEffect(CONST_ME_POFF)
    player:teleportTo(mechUid.toPos)
    player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
  end
  return true
end
for k, v in pairs(mechs) do
  mechanism:uid(k)
end
mechanism:uid()
mechanism:register()
Just change the [UID's], coordinates, and text to suit your needs. Also, be sure to set the unique id in RME.OT001_FR1.gif
 
Back
Top