• 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. X

    Different starting level, health, mana, and townID based on player vocation

    When I first tried this I got this error on line 13: local vocation_id = player:getVocation():getBase():getId() With getBase() as a NULL value. So I just removed the getBase() part and it appears to be working! Thank you so much for the help, I appreciate it so much :)
  2. X

    Different starting level, health, mana, and townID based on player vocation

    Thank you for this. However, I think I'm still getting interference from the config.php part of my website, and it automatically start players with the stats in there. $config['player'] = array( 'base' => array( 'level' => 1, 'health' => 155...
  3. X

    Different starting level, health, mana, and townID based on player vocation

    function onLogin(player) local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!" if player:getLastLoginSaved() <= 0 then loginStr = loginStr .. " Please choose your outfit." player:sendOutfitWindow() else if loginStr ~= "" then...
  4. X

    Different starting level, health, mana, and townID based on player vocation

    Hello, I am using TFS 1.2 and I am wondering how I can add a script that can start players at level one but have them spawn in different areas based on their chosen vocation. I also want to scale health, mana and cap per vocation separately and want each vocation to start with different amounts...
  5. X

    C++ Monsters killed by other monsters don't drop loot

    Yeah my bad I just copied the link wrong, but its the exact same one you posted so anyone who really cares can just click on the one literally right above. Anyways, yeah I know how what to expect from the support board and request board but I guess I assumed it was an error and not intentionally...
  6. X

    C++ Monsters killed by other monsters don't drop loot

    Is it supposed to be this way? I swear I remember monsters accidentally killing each other in real Tibia and being able to go open the corpse and grab loot...but w/e it is what it is. Also, my monsters.cpp does not have the same line that you linked in forgottenserver/monster.cpp at...
  7. X

    C++ Monsters killed by other monsters don't drop loot

    Hmmm I've gone through this line by line and I can't seem to find where the problem is. I'm going to post that bool for Creature:dropcorpse and hopefully someone can point out the issue because I am stuck Dx bool Creature::dropCorpse(Creature* lastHitCreature, Creature* mostDamageCreature, bool...
  8. X

    C++ Monsters killed by other monsters don't drop loot

    Alright forget the /summon part altogether, my bad for including that example as it is making things confusing for the reader. The problem is with normal, regular, monsters that are placed in Remere's OR created by /m. I'll give another example to show my point, and I'll also provide my /summon...
  9. X

    C++ Monsters killed by other monsters don't drop loot

    Thanks for the reply. I will post my /summon when I get home, but that's besides the point. Say I'm just playing as a regular player, not a God or GM, and I'm fighting a dragon and an elf at the same time. Eventually the dragon will kill the elf with firewave or some other AOE and the elf won't...
  10. X

    C++ Monsters killed by other monsters don't drop loot

    As the title says. Just in case that's not clear enough, I'll give some examples: I /summon a trainer. I /m a whole bunch of wolves, and one demon. The "wild" wolves and demon all attack my trainer and eventually the demon will inevitably use GFB and kill all of the wolves. Even if I set the...
  11. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    I understand, thank you. I will test when I get home!
  12. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Thank you for your reply! Changing "0" to "player yes? I will try it thank you. Just curious, what does the zero mean in the first place? I've never see that in the variables before.
  13. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    So the script provided by @Itutorial works awesome, however the player is not being recognized as the killer, so when a monster is killed with this weapon, no exp is earned. The game is treating it the same way it would when a monster steps on a jungle maw or a neutral magic field -- it dies...
  14. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    I cannot thank you enough. Thank you for your help and patience! I am learning but I just started :)
  15. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Thanks! That did remove the error, but the damage numbers are still not appearing. The monster's health bar just magically disappears :eek:
  16. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Hmm an error this time: Attempt to perform arithmetic on global 'dmgamount' (a nil value)
  17. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Hmm so like this? (last part of the script): dmg_amount = math.random(dmg_min, dmg_max) heal_amount = (config.percent_heal_health / 100) * dmg_amount target = Creature(variantToNumber(var)) player:addHealth(heal_amount) doTargetCombatHealth(0, target, COMBAT_HEALING, -dmgamount...
  18. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Hey so there's no more error in the console, and it works...kind of. So it heals the user (good) and does damage to the target (good) but no damage numbers appear xD I think because we are using a negative addHealth function so it's just subtracting the monster's HP and not actually dealing...
  19. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Hey thanks for your answer! I will check it when I get home from work. I see you changed target = variantToNumber(var) to target = Creature(variantToNumber(var)) I'll let you know if a new error pops up.
  20. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Been over 24 hrs, bumping this cuz I can't seem to resolve the errors I'm getting on my own. Thanks
Back
Top