<item id="1742" article="a" name="wooden coffin">
<attribute key="type" value="container" />
<attribute key="containerSize" value="6" />
</item>
<action itemid="1742" script="tools/other/wooden_coffin.lua" />
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 1742 then
player:sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT)
return true
end
return false
end
I think you should edit your otb tooHello otlanders,
I need to make a tree that after using it, it opens a container, like a backpack, is there this possibility even though the .dat is not a "container"?
I already have this key in items.xmlitems.xml add
LUA:<attribute key="containerSize" value="24" />
I found the function in the source "luaGameCreateContainer", I will test it and return the result![]()
Solved - TFS [1.x] Is there a networkmessage byte code for opening container in game?
Idea was this: If I use apple tree. Instead of rewarding player with apples or giving him modal window option to take apples or whatever. I create a bag in game and add the apples in it. Then I send the opening bag network message to player. @WibbenZ Once helped me with this network message...otland.net
simmilar topis: Solved - TFS [1.x] Is there a networkmessage byte code for opening container in game? (https://otland.net/threads/tfs-1-x-is-there-a-networkmessage-byte-code-for-opening-container-in-game.238447)
That's what I've done just now and it works:I couldn't do this, could someone experienced help me?
I don't want to do that, because if I don't have to use a custom client, I want to use the native 8.6 clientThat's what I've done just now and it works:
-> Run object builder, open ur tibia.dat & tibia.spr, find ur tree, and enable:
View attachment 85723
Click save on the bottom in the middle section
Click save on the left top corner
-> run item editor, open ur server's items.otb
-> reload items, reload attributes
-> save
-> add container info to items.xml
-> done
IMO It's pointless to use native 8.6.I don't want to do that, because if I don't have to use a custom client, I want to use the native 8.6 client
Thank you for your commitment!
I don't want to do that, because if I don't have to use a custom client, I want to use the native 8.6 client
Thank you for your commitment!
<item id="1742" article="a" name="wooden coffin">
<attribute key="type" value="container" />
<attribute key="containerSize" value="6" />
</item>
<action itemid="1742" script="tools/other/wooden_coffin.lua" />
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 1742 then
player:sendCancelMessage(RETURNVALUE_CANNOTUSETHISOBJECT)
return true
end
return false
end