• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

C++ ItemDecay (expire items)

beenii

Well-Known Member
Joined
Jul 26, 2010
Messages
586
Solutions
1
Reaction score
58
hi, I am trying to create the items that expire in tibia rl.
Example:
Code:
17:50 You see a temple teleport scroll that will expire in 3 days and 8 hours.
It weighs 1.20 oz.
If the item is not used, it disappears.

i have to edit this function?
Code:
int LuaScriptInterface::luaItemDecay(lua_State* L)
{
    // item:decay()
    Item* item = getUserdata<Item>(L, 1);
   
    if (item) {
        g_game.startDecay(item);
        pushBoolean(L, true);
    } else {
        lua_pushnil(L);
    }
    return 1;
}

currently when you leave the game, the decay stops
 
Back
Top