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

Search results

  1. Crevasse

    Feature Monster Skill Advancement System

    A huge thank you to Evil Hero for pointing out a serious oversight in my coding. Here are the corrections that need to be made to the code so that the skill increase is only affecting each specific, individual monster, and not affecting the skill of the entire MonsterType class. First, in...
  2. Crevasse

    Feature Monster Skill Advancement System

    I see what you’re saying. Let me do some more testing to see if that’s actually happening, and I’ll update here with what I find and if it needs to be fixed.
  3. Crevasse

    Feature Monster Skill Advancement System

    A great question. I tested this with prints already to confirm that the stat is only changing for the individual monster. Think of it like any other attribute on a monster, like HP: If you attack one dragon and his attribute "currentHealth" changes, the current health for all dragons does not...
  4. Crevasse

    Feature Monster Skill Advancement System

    Ohh ok I totally misunderstood you. I thought you were jumping in to explain a separate feature that also increased the defense attribute. You're just saying that the monsters' "skill" should be part of the formulas that determine the monsters defense as well as damage. Yes, that is already...
  5. Crevasse

    Feature Monster Skill Advancement System

    Great, so it is what I understood, thank you. In that case, NO CHANGES NEED TO BE MADE for Sabrehaven.
  6. Crevasse

    Feature Monster Skill Advancement System

    Yes, that's what I mean when I said: So, I guess I realized I'm not actually sure when the monster's defense increases. I assumed it increased at the same time that their fist fighting increased, but maybe it increases as the monster takes hits? I guess I'll have to rely on @kay to confirm...
  7. Crevasse

    Feature Monster Skill Advancement System

    Good point Kay, I totally forgot about defense. I'll write that up and post it here. Also true. For anyone who cares to make theirs as accurate as possible, here are the very few monsters that aren't set at 100, and here is what they are set at: blacksheep 0 chicken 0 dog 0...
  8. Crevasse

    Feature Monster Skill Advancement System

    In Sabrehaven nothing needs to be changed for that, the distro already includes that function. In TFS 1.5 you would need to either change the minimum creature think interval to allow it to go lower than 1 second, or re-work the function for how the game determines when a monster can cast its...
  9. Crevasse

    Feature Monster Skill Advancement System

    I'm not sure exactly what you mean by "double hit." In old Tibia, monsters had no cooldown between spells, that is why a hunter could shoot 2x in a very short period of time. Is this what you mean?
  10. Crevasse

    Feature Monster Skill Advancement System

    I'm not going to convert this to 0.4. I've never worked with 0.4 and don't plan on doing so anytime soon. A direct copy and paste to 1.5 is not going to work, monster melee attacks are not handled the same way as Nostalrius (combat.cpp). A quick look makes me think it might be handled in...
  11. Crevasse

    Feature Monster Skill Advancement System

    It's common knowledge at this point that monsters in oldschool Tibia had a melee skill that would actually train and level up as they fought. I've never seen anyone write/share code for this, so I'd like to share mine. This is written for/implemented in Sabrehaven (Nostalrius), but could likely...
  12. Crevasse

    Lua How to make trap damage blocked by armor?

    I haven't tested what @highsanta suggested, it should work, but it would be really messy to add all of that stuff about declaring local combats. If you want to retain your current script structure without having a whole bunch of different local combats declared, you can make a small source edit...
  13. Crevasse

    Lua Function Condition Suppressions in Lua

    Pretty straightforward, here is a method to manage condition suppressions in Lua. I have seen this come up before in threads in the past, and it doesn't seem like anyone's posted the answer here and from what I can tell all TFS and TFS-based distros dont come with this. Anyways, here it is: To...
  14. Crevasse

    C++ Creatures don't re-appear when invisible condition ends [Nostalrius/Sabrehaven]

    There is definitely something wrong with the invisible condition when it's applied through the monster's XML file in the generic format. I tested some prints in various source files, but I couldn't figure it out. bool ConditionInvisible::startCondition(Creature* creature) { if...
  15. Crevasse

    C++ [Nostalrius] Order of events in combat.cpp

    Can't edit my original post, but this is a cleaner version of the final code I posted (bool Combat::CombatHealthFunc): bool Combat::CombatHealthFunc(Creature* caster, Creature* target, const CombatParams& params, CombatDamage* data) { assert(data); CombatDamage damage = *data; if...
  16. Crevasse

    C++ [Nostalrius] Order of events in combat.cpp

    You are basically correct in your assessment of what is happening: the two events are occurring in the wrong order. After reviewing the call stack with many prints, here is a solution that I tested and found to be working without any issues: As you pointed out, the area effect from the spell is...
  17. Crevasse

    [Sabrehaven] No green skull in party

    The problem isn't that function, but it is in the same file (player.cpp). The problem is in the "isPartner" bool: bool Player::isPartner(const Player* player) const { // Check if the 'player' is a player or not, if the current player is not in a party, // or if 'player' is the same as...
  18. Crevasse

    [Sabrehaven] NPC script - String to PlayerName

    Some overcomplication going on here. No need for testing with "Topic=1,"X X X" or whatever. OP you're on the right track: In behaviourdatabase.h: BEHAVIOUR_TYPE_MESSAGE_PLAYERNAME, // return the player's name Then in behaviourdatabase.cpp: } else if (identifier == "playername") { node...
  19. Crevasse

    Solved C++ issue: Adding percent skill attribute to items (SOLVED)

    Here is your problem: int32_t Player::getDefaultSkills(skills_t skill) const { switch (skill) { case SKILL_SWORD: return getSkillLevel(SKILL_SWORD); default: return 0; } } You're making it so the game is evaluating the modified skill every time, that's why you're seeing...
  20. Crevasse

    Lua Buy more than 100 items from an NPC

    All of this fancy loop stuff is great and I'm sure there's a way to get it to work with player:addItemEx(), but why not just use the built in loop included in the player:addItem() function? If you don't care about excess items going on the ground, then just do this: function doNpcSellItem(cid...
Back
Top