• 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!

problem charges runes and potions please tfs 0.3.6 versión 8.60

Xanadu123

Member
Joined
May 11, 2014
Messages
46
Reaction score
5
Could someone help me with the Sudden Death Rune charges? They're not showing up full. I actually have 497 Sudden Death Runes in my BP, but when I'm casting them, it only says I have 97. Can someone help me with this problem?
u8p8uq.png
 
Could someone help me with the Sudden Death Rune charges? They're not showing up full. I actually have 497 Sudden Death Runes in my BP, but when I'm casting them, it only says I have 97. Can someone help me with this problem?

My suggestion is to migrate to a recent framework, especially if you use 8.6 protocol which offers many options. TFS 0.3.6 is really outdated, you can see it was released in 2012. [8.60] The Forgotten Server 0.3.6 (Crying Damson) V8 (https://otland.net/threads/8-60-the-forgotten-server-0-3-6-crying-damson-v8.147913/)

At modern TFS, the message probably is generated at actions.cpp, when you use an item through hotkeys it does the following:
C++:
uint16_t subType = item->getSubType();

showUseHotkeyMessage(player, item,
    player->getItemTypeCount(item->getID(), subType != item->getItemCount() ? subType : -1));

And this to count the items inside the container:
C++:
if (item->getID() == itemId) {
    count += countByType(item, subType);
}

So it doesn't count only the used stack, it counts all stacks of the same item type in the player container. In this case the server is probably using the count/subtype of the selected stack instead of counting all stacks of the same item.
 
Back
Top