How are you creating these items?
From a script?
Can you post your data/talkactions/scripts/create_item.luaJust normal with /i
Can you post your data/talkactions/scripts/create_item.lua
local invalidIds = {
1, 2, 3, 4, 5, 6, 7, 10, 11, 13, 14, 15, 19, 21, 26, 27, 28, 35, 43
}
function onSay(player, words, param)
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
local split = param:splitTrimmed(",")
local itemType = ItemType(split[1])
if itemType:getId() == 0 then
itemType = ItemType(tonumber(split[1]))
if not tonumber(split[1]) or itemType:getId() == 0 then
player:sendCancelMessage("There is no item with that id or name.")
return false
end
end
if table.contains(invalidIds, itemType:getId()) then
return false
end
local count = tonumber(split[2])
if count then
if itemType:isStackable() then
count = math.min(10000, math.max(1, count))
elseif not itemType:isFluidContainer() then
count = math.min(100, math.max(1, count))
else
count = math.max(0, count)
end
else
if not itemType:isFluidContainer() then
count = 1
else
count = 0
end
end
local result = player:addItem(itemType:getId(), count)
if result then
if not itemType:isStackable() then
if type(result) == "table" then
for _, item in ipairs(result) do
item:decay()
end
else
result:decay()
end
end
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
end
return false
end
these are used for fluid names (at least some of the ones you mentioned)heyo
as the title says
I cannot create any item from 30001 to 30100
what im doing wrong?
im using tfs 1.3
thanks
these are used for fluid names (at least some of the ones you mentioned)
this commit changed that
Use ids under 100 for fluid names (#3252) · otland/forgottenserver@5eca49a
There is no point to use ids after 30000 (which are hardcoded) if we can use numbers from 0 to 100, like vanilla is doing it :) This is partial fix to #3084github.com
Just curious: are there even so many items in tibia?
What is the latest item id known by us?
Have you found a fix for it? I'm running into the same problemheyo
as the title says
I cannot create any item from 30001 to 30100
what im doing wrong?
im using tfs 1.3
thanks
nopeHave you found a fix for it? I'm running into the same problem
Alright thanksnope
I think that range was used for fluid types, here's an exempt from a 8.6 items.xml file (the ID's were probably just moved further up at some point)forgottenserver/src/items.cpp at master · otland/forgottenserver
A free and open-source MMORPG server emulator written in C++ - otland/forgottenservergithub.com
Those IDs are reserved? Couldn’t tell you why, but these lines are the problem.
<item id="20001" name="water"/>
<item id="20002" name="blood"/>
<item id="20003" name="beer"/>
<item id="20004" name="slime"/>
<item id="20005" name="lemonade"/>
<item id="20006" name="milk"/>
<item id="20007" name="manafluid"/>
<item id="20010" name="lifefluid"/>
<item id="20011" name="oil"/>
<item id="20013" name="urine"/>
<item id="20014" name="coconut milk"/>
<item id="20015" name="wine"/>
<item id="20019" name="mud"/>
<item id="20021" name="fruit juice"/>
<item id="20026" name="lava"/>
<item id="20027" name="rum"/>
<item id="20028" name="swamp"/>
<item id="20035" name="tea"/>
<item id="20043" name="mead"/>
Someone else pointed it out earlier in the thread, I just skipped over it. Though it’s probably a good idea to open a PR to remove those lines since the IDs were already changed.I think that range was used for fluid types, here's an exempt from a 8.6 items.xml file (the ID's were probably just moved further up at some point)
XML:<item id="20001" name="water"/> <item id="20002" name="blood"/> <item id="20003" name="beer"/> <item id="20004" name="slime"/> <item id="20005" name="lemonade"/> <item id="20006" name="milk"/> <item id="20007" name="manafluid"/> <item id="20010" name="lifefluid"/> <item id="20011" name="oil"/> <item id="20013" name="urine"/> <item id="20014" name="coconut milk"/> <item id="20015" name="wine"/> <item id="20019" name="mud"/> <item id="20021" name="fruit juice"/> <item id="20026" name="lava"/> <item id="20027" name="rum"/> <item id="20028" name="swamp"/> <item id="20035" name="tea"/> <item id="20043" name="mead"/>
Oh, same, didn't read it either I just remembered there was a range for liquid types at one pointSomeone else pointed it out earlier in the thread, I just skipped over it.
Though it’s probably a good idea to open a PR to remove those lines since the IDs were already changed.