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

Recent content by pinata

  1. P

    Nostalrius 7.7

    I think this line: if (itemType.weaponType != WEAPON_NONE || itemType.stopTime || itemType.decayTime) So weapons, shields, ammo, and stuff like rings that expire go into bags I believe.
  2. P

    Nostalrius 7.7

    It's in the source code in the MonsterType::createLoot method in monsters.cpp: if (itemType.weaponType != WEAPON_NONE || itemType.stopTime || itemType.decayTime) { includeBagLoot = true; if (g_game.internalAddItem(bagContainer, item) != RETURNVALUE_NOERROR) {...
  3. P

    Nostalrius 7.7

    Again, awesome. I was able to get that behavior by overriding onWalkComplete inside the monster class to call doAttacking while gaining distance and not fleeing.
  4. P

    Nostalrius 7.7

    Thanks for clearing those cases up. One last question. Is it possible for the melee attacks and spells to happen on separate intervals in the 2000ms case? As in, melee -> spell -> melee -> spell. Instead of: melee + spell -> idle -> melee + spell. Here's my method for calculating the...
  5. P

    Nostalrius 7.7

    Awesome work. I got similar behavior by setting earliestAttackTime = 0 when the goes monster from distance to melee range. The idea being that: if between attacks the creature is able to reach melee range within the 1 second interval, then it gets an extra attack. If it's not too much, I wonder...
  6. P

    Nostalrius 7.7

    I'm sorry if I'm going about things the wrong way. I just started looking at the OT stuff about a month ago and so I have very little understanding of the culture here on the boards clearly.
  7. P

    Nostalrius 7.7

    I just implemented it. It looks very similar to what I saw in the video. I also looked at what OTHire has for that function. It seems there's a variable spell interval that is different based on: If the creature is fleeing: 1 sec else If the target is in melee range: 2 seconds else (the...
  8. P

    Nostalrius 7.7

    You could try moving the for loop in Monster::doAttacking like this: if (OTSYS_TIME() >= earliestAttackTime) { if(!isFleeing()) { updateLook = true; if (Combat::closeAttack(this, attackedCreature, FIGHTMODE_BALANCED)) { egibleToDance =...
  9. P

    Nostalrius 7.7

    I just wanted to make sure anyone coming in would understand that it was correct. Honestly, if I were just coding it myself I'd use rand() as well, but the nice thing about using the uniform_random function is that the intent is clear, and it's kind of self documenting in that anyone can look up...
  10. P

    Nostalrius 7.7

    I believe the function in theforgottenserver is inclusive: https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution
  11. P

    Nostalrius 7.7

    I looked into it this morning. The fix is to change: if (normal_random(0, spellBlock.chance) == 0 && (master || health > mType->info.runAwayHealth || normal_random(1, 3) == 1)) to: if (uniform_random(0, spellBlock.chance) == 0 && (master || health > mType->info.runAwayHealth ||...
Back
Top