bpm91
Advanced OT User
- Joined
- May 23, 2019
- Messages
- 1,046
- Solutions
- 7
- Reaction score
- 177
- Location
- Brazil
- YouTube
- caruniawikibr
In player.cpp
I'm trying to remove storage 30018 which is from promotion, in case the player is rooked, then he can ask for promotion again, could anyone tell me how I can remove storage 30018 if the player has it? If you don't have it, then don't remove any storage.
I'm trying to remove storage 30018 which is from promotion, in case the player is rooked, then he can ask for promotion again, could anyone tell me how I can remove storage 30018 if the player has it? If you don't have it, then don't remove any storage.
LUA:
if (g_config.getBoolean(ConfigManager::ROOK_SYSTEM)) {
if (getVocationId() != VOCATION_NONE) {
if (level <= g_config.getNumber(ConfigManager::ROOK_LEVEL)) {
// reset stats
level = 1;
experience = 0;
healthMax = 150;
manaMax = 0;
capacity = 40000;
manaSpent = 0;
magLevel = 0;
soul = 100;
setVocation(0);
setTown(g_game.map.towns.getTown(g_config.getNumber(ConfigManager::ROOK_TOWN_ID)));
loginPosition = town->getTemplePosition();
// reset skills
for (uint8_t i = SKILL_FIRST; i <= SKILL_LAST; ++i) { //for each skill
skills[i].level = 10;
skills[i].percent = 0;
skills[i].tries = 0;
}
// unlearn all spells
learnedInstantSpellList.clear();
// reset inventory
for (int32_t slot = getFirstIndex(); slot < getLastIndex(); slot++) {
if (inventory[slot]) {
g_game.internalRemoveItem(inventory[slot]);
}
}
}
}
}
}