• 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 doTransformItem on position?

Nekiro

Legendary OT User
TFS Developer
Joined
Sep 7, 2015
Messages
2,759
Solutions
127
Reaction score
2,279
Hello, im creating script for my custom ots and I have problem I dont know how to use function:
Code:
doTransformItem
on position. I mean i want to transfer item from position x = 1, y = 1, z = 1 to other id.
Because my script work like that: something happen, players got teleported and then item resets.
 
If I understand correctly,
doTransformItem(thing.uid, itemid, count)
Or
doTransformItem(getThingPosition(thing).uid, itemid, count)
?
 
If I understand correctly,
doTransformItem(thing.uid, itemid, count)
Or
doTransformItem(getThingPosition(thing).uid, itemid, count)
?

Yeah, but I want to transform specific item on tile for ex. {x = 883, y = 816, z = 9}
Because I have 5 items with same id.
 
Code:
  if getTopCreature(tile1).uid ~= 0 then
        if getTileItemById(lever2, 1946).uid  then
        doTeleportThing(getTopCreature(tile1).uid, dungeonpos)
        doSendMagicEffect(dungeonpos, CONST_ME_TELEPORT)
       --- HERE levers should get transformed to old id.
      end
end
 
Code:
local pos = {x = 1000, y = 1000, z = 7}
doTransformItem(getTileItemById(pos, 1946).uid, 1945)
Assuming it's a normal lever, otherwise (1946 = current | 1945 = after)
That is what i was looking for! Thank you.
 
Back
Top