• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC NPCs and Stackable Items

kends

jijiji
Joined
Jun 7, 2008
Messages
21
Reaction score
1
Location
venezuela
Hi.

My NPC's don't buy stackable items, like Potions, Runes and Creature Products.
When I try to sell, for example, 100 sandcrawler shell, a cancel message is shown:

code:
You do not have this object

Someone know how I can solve this problem?
Doesn't matter if the fix is in sources or in LUA. Please help

Thanks!


Edition

I already tried this source edition:

Code:
li.itemId = intValue;
const ItemType& it = Item::items[li.itemId];

if(readXMLInteger(tmpNode, "subtype", intValue))
li.subType = intValue;
else
{
if(it.stackable)
li.subType = 1;
else if(it.isFluidContainer() || it.isSplash())
li.subType = 0;
}
 
try modules.lua callbackOnSell, remove the subType check
Code:
if(item.id == itemid[B] and item.subType == subType[/B])
 
Back
Top