lua

  1. A

    Script Npc: doPlayerAddItem

    Hi, im copy a code from npc sell items but if i buy amount less than 20. used 2 slot in inventory and bought four instead of two i bought 10 small healt potion and used 5 slot in bag my question is how can I use only 1 slot. if i bought 2 health in bag appear as 4 Sorry for my bad...
  2. changx

    Lua Attempt to call local 'callback' (a nil value)

    Hello! The first time I used lua, I encountered this mistake and didn't know how to solve it. Thank you for your help. I used torch7 cudnn7 lua5.2 Here's my runtime error /home/jm/torch/install/bin/lua: /home/jm/torch/install/share/lua/5.2/nn/Module.lua:352: attempt to call local 'callback' (a...
  3. V

    Script request

    Good morning, I've tried writing a code, however could not make it work. My codding skills are below basic. I need a script that makes the player say a specific sentence once the monster health hit a certain percentage. For example, if a Juggernaut hits the 30% HP mark, the player will use a...
  4. metiu11

    TFS 0.3.6 Spell transform

    Heyo, I found script, which add effect on player but i want to change lookType, so i edit it like this: local tempo = 60 -- tempo em segundos. local ml = 35 -- quantos ira aumentar o skill de ML local skillfist = 35 -- quantos ira aumentar o skill de Fist local skillsword = 35 -- quantos ira...
  5. V

    Event onStepIn not found in movements

    Hello. I'm trying to create a complete working server with latest content possible. I'm total rookie in terms of coding, so I'm basically learning while working on this project. If you want to contribute PM me. I'm not making server for money, actually I'm not gonna set up server for players...
  6. K

    Increase amount of dropped gold from monsters

    Hello! So basically when for example in mummy.xml file I have: <item id="3031" countmax="100" chance="400" /> <!-- a gold coin --> It drops a random amount of gold. Sometimes 10, 20 and sometimes 100. I want to make it dropping around 60-100 gold, but as I though and tested there is no...
  7. falls13

    help with this script

    I would like to fill the mana of the player who is using the weapon that is with this script. but it is filling that of the target. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)...
  8. M

    Knight Spell REP++

    Hey guys, if someone can help me, how can I make a spell, in which it's only available for either knight or vocation 4-8. I don`t want to write her and activate, I want her to be unique to the character without nothing to activate. Well, when the Knight's health is below 30% his total health, he...
  9. M

    Help I've not located - C++/LUA

    I know it's available in the forum. But I couldn't find... If you find or can do I'll be grateful I USE TFS 0.4 1 - Message before the monster sends spell ---- Like Gaz Haragoth... 2 - Monster Spell Disarm Player weapon, the weapon goes to backpack... 3 - Spell of the character It is not...
  10. Loremaster7

    How to do spell "ultimate explosion" with paralyze?

    "exevo gran mas vis" para "exevo gran mas ina" não funciona o paralyze ... (my distro is The OTX Server Version: (2.X.S - 4) Otserver 7.72) my code: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatFormula(combat...
  11. Loremaster7

    How to create a lever with time? (exausted)

    In my code, clicking on the lever removes a stone, and the stone comes back in 10 seconds, but if you keep clicking on the lever an error occurs, I would need the lever works again only after 10 seconds. if the player clicks before 10 seconds the lever would not perform any function. (my distro...
  12. Snavy

    [TFS 1.3] Script Optimization - Mount taming

    Hello, OT Plebs. I have written a script for taming mounts and I would like to receive some feedback and maybe optimize it [a bit] with your help. Here's the code: <action itemid="13307" script="mounts/tame.lua"/> <action itemid="13538" script="mounts/tame.lua"/> local config = {...
  13. H

    !pvp on/off

    Good evening, can anyone help me? I'm in need of a script for the player to choose whether it wants to be PVP or NOPVP. I tried to use this one ---> TalkAction - !pvp - own world type! : ) (https://otland.net/threads/pvp-own-world-type.31889/) , but it is giving this error: INVALID EVENT...
  14. H

    Lua I Need help in the script

    Hello Guys, someone can help me? function onStepIn (creature, item, position, fromposition) local player = creature:getplayer() if not player then return end if creature:getplayer player:teleportTo(Position(32722, 32242, 8)...
  15. B

    Help with Images in-game Store 11.xx

    Hello community. Anybody knows how to make appear the little image left on Category_Name? The biggest one is showing normally. Please, if someone can help me. Thanks!
  16. Ashtar

    ShadowRealm Hiring Experienced OTC developer

    What are we looking for? We currently look for a serious, trustworthy experienced c++, Lua programmer with proper understanding of OTC functionality with the ability of editing or developing modules, internal functions and visual features. Requierements: 1. Time availability: For us it is...
  17. massuco

    Solved Stackable Manafluids on 7.72 OTHire

    I was trying to make vials stackable on 7.72 and I preferred to add 2 new items, one manafluid and one empty vial and I got this action script that works like a manafluid, all is working good. but... The problem is that player can use mana fluid on each other, how i can make it no usable on...
  18. B

    Lua TFS 1.3 NPC reward for few ingredients

    Hey supprorters, I have dull problem, I just don't know how to connect all 5 requirements for reward in code line I was always editing script that checks if the item count is higher than 0. Now when I want 5 items to get one reward I don't know how to make them all work together and remove them...
  19. S

    Lua new scripts randomly crash server

    Hello, at the beginning I want to apologize to you for my English, I helped translator.. I need help to detect problem of random server crash, i adding 2 new spells and one weapon probably one or all of them is a problem.. all of them use addEvent() storageReseter.lua - used to reset storage...
  20. -vG

    Lua Npc buy with backpack

    Hello people, when buying rune pack he buys only 20 each packet being 100 runes how can I fix it? TFS 0.3.7 version 8.60 lib -> npc.lua function doNpcSellItem(cid, itemid, amount, subType, ignoreCap, inBackpacks, backpack) local amount, subType, ignoreCap, inBackpacks, backpack = amount...
Top