function doCopyItem(item, attributes)
local attributes = attributes or false
local ret = doCreateItemEx(item.itemid, item.type)
if(attributes) then
if(item.actionid > 0) then
doSetItemActionId(ret, item.actionid)
end
end
if(isContainer(item.uid) == TRUE) then
for i = (getContainerSize(item.uid) - 1), 0, -1 do
local tmp = getContainerItem(item.uid, i)
if(tmp.itemid > 0) then
doAddContainerItemEx(ret, doCopyItem(tmp, true).uid)
end
end
end
return getThing(ret)
end
Made my test char from your name as you may have noticed the other char name is LegendI have same issue, I didn't try to fix yet since I am testing scripts in-game one by one and didn't reach Quests/NPC part.
So I hope someone have posted a solution by the time I reach these parts, Thanks.
Great, This is my name since I started Tibia and I never changed it but I decided to quit game-playing and try to host my own server since I played tons of different servers/styles specially PVP/War ones.Made my test char from your name as you may have noticed the other char name is Legend
Great, This is my name since I started Tibia and I never changed it but I decided to quit game-playing and try to host my own server since I played tons of different servers/styles specially PVP/War ones.
Anyways good luck with your server, I hope TFS 1.3 will be stable with 0.4 scripts because I am using old function names and just adding/editing missing ones to compat.lua.
We can also help each other since we are working on different servers, as I see you are doing Evolution or some custom server and I am working on real map server/low EXP/long story custom quests.
Add my discord if you needed so.
LegenD#9189
function doCopyItem(item, attributes)
local attributes = attributes or false
local ret = doCreateItemEx(item.itemid, item.type)
if(attributes) then
if(item.actionid > 0) then
doSetItemActionId(ret, item.actionid)
end
end
if(isContainer(item.uid) == TRUE) then
for i = (getContainerSize(item.uid) - 1), 0, -1 do
local tmp = getContainerItem(item.uid, i)
if(tmp.itemid > 0) then
doAddContainerItemEx(ret, doCopyItem(tmp, true).uid)
end
end
end
return getThing(ret)
end
it will solve itglobal.lua
item:clone() should work the same way.For quest chest add this toLua:function doCopyItem(item, attributes) local attributes = attributes or false local ret = doCreateItemEx(item.itemid, item.type) if(attributes) then if(item.actionid > 0) then doSetItemActionId(ret, item.actionid) end end if(isContainer(item.uid) == TRUE) then for i = (getContainerSize(item.uid) - 1), 0, -1 do local tmp = getContainerItem(item.uid, i) if(tmp.itemid > 0) then doAddContainerItemEx(ret, doCopyItem(tmp, true).uid) end end end return getThing(ret) end
it will solve it
That one works properly but now it just saysitem:clone() should work the same way.
without the item name05:23 You have found .
It may have something to do with where you're pulling the name from in the script. Idk what your script looks like tho.That one works properly but now it just says without the item name
Yeah done fixed it just by changingIt may have something to do with where you're pulling the name from in the script. Idk what your script looks like tho.
EDIT: Btw if you guys run into other bugs that you cannot figure out it may be a good option to post it as an issue on Nekiro's repo. I'm sure he will look over his issues section and he will most likely create the best fix possible for his repo, instead of you having to pull from an outdated version of tfs to make it work.
to.. result ..
.. itemType:getName()