• 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 Creat teleport with action/unique id?

ohman

Member
Joined
Oct 24, 2008
Messages
289
Reaction score
5
Location
Sweden
Code:
teleport = doCreateTeleport(tpID, ushuriel_to_position, ushuriel_in_position)

How to change this from a normal tp to a tp with a action id or a unique id?

Thanks! :)
 
Lua:
teleport = doCreateTeleport(tpID, ushuriel_to_position, ushuriel_in_position)
doSetItemActionId(getTileItemById(pos, tpID).uid, 1337)
 
Still getting error :/


Attempt to index a nil value
stack traceback:
[c]: in funtion 'getTileItemById'
data/creaturesctips/scripts/inquisitionPortals.lua:29: in funtion
<data/creaturesctips/scripts/inquisitionPortals.lua:1>

Hate that I cant copy in my "server window"
 
You need to set that so it's not nil
Lua:
local tpID = 1 --This is the item id of the teleport.

teleport = doCreateTeleport(tpID, ushuriel_to_position, ushuriel_in_position)
doSetItemActionId(getTileItemById(pos, tpID).uid, 1337)

 
function doCreateTeleport returns uid
Lua:
doItemSetAttribute(doCreateTeleport(itemid, toPosition, fromPosition), "aid", 1234)
 
I am trying to create a teleport with an action ID. I use TFS 0.3.6 and there is the function. The teleport is created, but the teleport has not an action id, when I look on it right click.
Neither this code and this below doesn't work.
Code:
doItemSetAttribute(doCreateTeleport(1387, redTpPos, templePos), "actionid", 3351)
Code:
doItemSetAttribute(doCreateTeleport(1387, redTpPos, templePos), "aid", 3351)

Neither this doesn't work:
Code:
    doCreateTeleport(1387, redTpPos, templePos)
    doItemSetAttribute(getTileItemById(templePos, 1387).uid, "actionid", 3351)

I've found a solution. This works:
Code:
doCreateTeleport(1387, redTpPos, templePos)
    doItemSetAttribute(getTileItemById(templePos, 1387).uid, "aid", 3354)
 
Last edited:
I am trying to create a teleport with an action ID. I use TFS 0.3.6 and there is the function. The teleport is created, but the teleport has not an action id, when I look on it right click.
Neither this code and this below doesn't work.
Code:
doItemSetAttribute(doCreateTeleport(1387, redTpPos, templePos), "actionid", 3351)
Code:
doItemSetAttribute(doCreateTeleport(1387, redTpPos, templePos), "aid", 3351)

Neither this doesn't work:
Code:
    local tp = doCreateTeleport(1387, redTpPos, templePos)
    doItemSetAttribute(getTileItemById(templePos, 1387).uid, "actionid", 3351)
What does doCreateTeleport return? Try printing the value.
Code:
print(doCreateTeleport(1387, redTpPos, templePos))
 
Back
Top