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

Rune charges

sebaloko

Member
Joined
Jul 5, 2013
Messages
33
Reaction score
6
Well we have made the runes no stackables via client editting and otdb edditing but we need to add for example 3 charges to the sd is that posible in a simple way?

qGsY4oI.png
have 3 charges in item.xml , but dissapear on 1 use
 
That's for TFS 1.x, no idea what you should do in other distributions. Hope you didn't fuck up the items.xml/.otb tibia.spr/.dat edit also.

In spells.cpp search for
Code:
      int32_t newCount = std::max<int32_t>(0, item->getItemCount() - 1);
      g_game.transformItem(item, item->getID(), newCount);
and REPLACE it with
Code:
       int32_t newCharge = std::max((int32_t)0, ((int32_t)item->getCharges()) - 1);
       g_game.transformItem(item, item->getID(), newCharge);

That should do the trick.
 
That's for TFS 1.x, no idea what you should do in other distributions. Hope you didn't fuck up the items.xml/.otb tibia.spr/.dat edit also.

In spells.cpp search for
Code:
      int32_t newCount = std::max<int32_t>(0, item->getItemCount() - 1);
      g_game.transformItem(item, item->getID(), newCount);
and REPLACE it with
Code:
       int32_t newCharge = std::max((int32_t)0, ((int32_t)item->getCharges()) - 1);
       g_game.transformItem(item, item->getID(), newCharge);

That should do the trick.
Works, amazing! <3
 
Back
Top