• 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!

Solved [TFS 1.2] Move itemid to pos

Caduceus

Unknown Member
Joined
May 10, 2010
Messages
321
Solutions
2
Reaction score
24
just a mess around script, but it's gotten personal. I keep getting: attempt to call method 'teleportTo' (a nil value)

Code:
local destination = Position(1065, 996, 8)
function onUse(cid, item, fromPosition, target, toPosition, isHotkey)
local teleportTo = toPosition
    if (target.itemid == 3058 or target.itemid == 3059 or target.itemid == 3065 or target.itemid == 3066) then
        target:teleportTo(destination, false)
        return true
    end
    return false
end
 
just a mess around script, but it's gotten personal. I keep getting: attempt to call method 'teleportTo' (a nil value)

Code:
local destination = Position(1065, 996, 8)
function onUse(cid, item, fromPosition, target, toPosition, isHotkey)
local teleportTo = toPosition
    if (target.itemid == 3058 or target.itemid == 3059 or target.itemid == 3065 or target.itemid == 3066) then
        target:teleportTo(destination, false)
        return true
    end
    return false
end
relocateTo
 
moveTo

Code:
local destination = Position(1065, 996, 8)

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
  if isInArray({3058, 3059, 3065, 3066}, target.itemid) then
    target:moveTo(destination, false)
    return true
  end
  return false
end

Red
 
local destination = Position(1065, 996, 8) function onUse(player, item, fromPosition, target, toPosition, isHotkey) if isInArray({3058, 3059, 3065, 3066}, target.itemid) then target:moveTo(destination, false) return true end return false end

Thanks, this worked like a charm
 

Similar threads

Back
Top