• 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 0.X Request: Cancel trade

marek12

Available for sprite works
Joined
Apr 8, 2020
Messages
398
Solutions
4
Reaction score
394
Hello guys, does anyone know how I can make an item on map untradable?
I just want an item on the map that no one can move/take.
I already know how to make an item unmovable but people can still trade this item and this way move it/take it so is there a way to refuse trades?
Using TFS 0.4
Post automatically merged:

anyone please?

I know it may be done with creaturescript, I know there is a lot of nice and clever people who can explain how to make it work :)
 
Last edited:
 
nope. I found a creature script which work when I set XXX action ID but it only makes the item non movable, people can still trade the item and pick it up this way.
Post automatically merged:

This one may work but the bad thing is it block every item with this ID. I got on my map a mercenary sword and if I do this script it will make every mercenary sword non tradable even if it is not intended to.
 
Has the ancient knowledge been lost? 😟

I accomplish this feat by putting another item on top, a custom item, 100% transparent that does onLook passthrough. Pretty much every OT that had in-game donor shop back in the day did the same.

I enhanced mine with script where if CM tried to /r the tile to get to the item underneath, the tile would /r the item below it before removal returned, and would log the action. I had to expose an interface to onRemoveTileItem though, which is dangerous.
 
the itemid is 1548 btw

be careful with it because it also blocks stepping on the tile
you can press V to highlight items in RME (the floor with it will be marked)
 
Has the ancient knowledge been lost? 😟

I accomplish this feat by putting another item on top, a custom item, 100% transparent that does onLook passthrough. Pretty much every OT that had in-game donor shop back in the day did the same.

I enhanced mine with script where if CM tried to /r the tile to get to the item underneath, the tile would /r the item below it before removal returned, and would log the action. I had to expose an interface to onRemoveTileItem though, which is dangerous.
that's almost exacly what I mean. but does your way work that if someone look at the item it shows the real item name or the "transparent" thing id?
Post automatically merged:

the itemid is 1548 btw

be careful with it because it also blocks stepping on the tile
you can press V to highlight items in RME (the floor with it will be marked)
I know about this one. but it doesnt work the way I want :/
Post automatically merged:

also I am pretty much sure this can be made in creature script. without using any transparent items on top. just block trades with items with actionID XX. but I have no idea how to do this.
 
the itemid is 1548 btw

be careful with it because it also blocks stepping on the tile
you can press V to highlight items in RME (the floor with it will be marked)

Ours was some id in the 4000 range. It was most definitely not a default thing. You could step on it. you could see the item underneath, but all click-drags and anything grabbing the item by that same interface (as a trade would), would grab the immobile tile and return not possible.
 
okay guys. I have figured this out. Thanks for help anyways! :D
Post automatically merged:

I made it without any additional items on top by adding function
if item.actionid == 100 then
 
0.4 has onLook creaturescript, you can get item pos
then you can get item from same tile using stackpos that is pos.stackpos + 1

I don't know if returning true/false can disable original look message
 
You can use this item id 8047 it will show the real item name/attributes on look
or you can add to the script above on link this line
Lua:
if item.actionid == xxxx then
or
Lua:
if item.uid == xxxx then
or maybe this
Lua:
local itemPosition = {x=123, y=123, z=7, stackpos=1}
local getItem = getThingFromPos(itemPosition)
if getItem.itemid == xxx then
and this too
Lua:
local getItem = getTileItemById({x=123, y=123, z=7}, YOURITEMID)
if(getItem .itemid ~= 0) then

Edit : Didn't notice you figured it out while I was writing the reply.
 
I have already sorted this out guys. thank you :D
Post automatically merged:

You can use this item id 8047 it will show the real item name/attributes on look
or you can add to the script above on link this line
Lua:
if item.actionid == xxxx then
or
Lua:
if item.uid == xxxx then
or maybe this
Lua:
local itemPosition = {x=123, y=123, z=7, stackpos=1}
local getItem = getThingFromPos(itemPosition)
if getItem.itemid == xxx then
and this too
Lua:
local getItem = getTileItemById({x=123, y=123, z=7}, YOURITEMID)
if(getItem .itemid ~= 0) then

Edit : Didn't notice you figured it out while I was writing the reply.
thanks anyways for trying :)
 
Back
Top