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

Search results

  1. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Hmm an error this time: Attempt to perform arithmetic on global 'dmgamount' (a nil value)
  2. 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...
  3. 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...
  4. 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.
  5. 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
  6. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Hey @Itutorial that script gave me a similar error: Lua Script Error: [Weapon Interface] data/weapons/scripts/thunder hammer.lua: onUseWeapon data/weapons/scripts/thunder hammer.lua:34 attempt to index global 'target' (a number value) stack traceback [C]: in function '_index'...
  7. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    K I just left home I will try it soon when I get back, thanks for the continued help~~
  8. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    I edited too slow xD yes I did, read the above edit :X
  9. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Edit: I forgot, there was errors. The weapon does not attack at all if I use that script, I get the following error: Lua Script Error: [Weapon Interface] data/weapons/scripts/thunder hammer.lua:onUseWeapon data/weapons/scripts/thunder hammer.lua:25 attempt to call global 'getPlayerSkillLevel'...
  10. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    @Il Knight your script does heal...but it has the same problem as the one @Xeraphus gave: Even if I set chance to 100 OR remove the math.random function completely, it still does not heal every time. Even if I set the heal% to 100, it still does not heal every time. Is there a storage problem...
  11. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Thanks for the quick reply again. I actually tried the same thing (removing the math.random function and the chance local cfg) but I still get the same issue...it heals but not every turn. Even when I deal like 70 damage it should heal by 7, but it does nothing. There's no pattern either...
  12. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    @Itutorial Thanks for the reply I will try it when I get home! @Xeraphus I fixed my issue with healing it works now, I was making a silly error in the weapon script. However I am having troubles changing the lifesteal script so that it heals every turn, what do I need to change? edit...
  13. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Thanks for the reply @Xeraphus! I will check this when I get off work! @Xeraphus I tried the script and It doesn't appear to be working (yes I added the event in creaturescript.xml) The only thing I changed was the weapon ID: local cfg = { weaponId = 2421, chance = 10, percent = 10...
  14. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    Thanks @Il Knight that makes sense. I will test it as soon as I get off work and let you know.
  15. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    That works thanks! It does damage and heals the attacker. Now how do I make the healing a % of the damage dealt?
  16. X

    Solved Lifesteal Melee Weapon [TFS 1.2]

    As the title suggests, I have been trying to create a script for a melee weapon that damages a monster/player each turn, AND heals the user for a percentage of the damage dealt. I've seen the different threads about "vampriric spell" and "vampiric touch" (Spell - +[Creaturescript] Vampiric...
  17. X

    Lua Spell Scroll Script (error) [OTX3] *solved*

    Ahhh right! Man you are the best thanks a ton!!
  18. X

    Lua Spell Scroll Script (error) [OTX3] *solved*

    Perfect. Works awesome. Hmmm I'm having trouble sending the message though... player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have learned the spell ' .. spellName() .. '.') I'm getting an error, it can't callback to the spell name. What do I need to add?
  19. X

    Lua Spell Scroll Script (error) [OTX3] *solved*

    Yep LOL that worked fine. I can't believe I didn't realize that, I already read someone else's post who made that same mistake xDD thanks man! Another question if I may, can I add this line to remove the scroll? item:remove(1)
  20. X

    Lua Spell Scroll Script (error) [OTX3] *solved*

    I do indeed have the source, I compiled it myself! However my file is called "luascript.cpp" and it's pretty big, idk which part I need to look at. @Xeraphus, the script you made removed the error, but it still doesn't fully work. When I use the scroll, I get the blue shimmer effect, and if I...
Back
Top