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

lua

  1. Lurk

    TFS 0.X player dying and reseting to level 1

    Hello, I was using this script function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true then if (getPlayerSlotItem(cid, 2).itemid == 10134) then pos = getCreaturePos(cid) doCreatureSetDropLoot(cid, false) doPlayerSetLossPercent(cid, experience, 0)...
  2. M

    Lua help me script

    function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerVocation(cid) == 5 then doPlayerAddItem(cid, 3966) doPlayerAddItem(doPlayerAddItem(cid, 2275) doPlayerSendTextMessage(cid,19,"XD") doSendAnimatedText(getThingPos(cid), "Yeah Exp With I...
  3. Lurk

    TFS 0.X Always war shield

    hello, I want everyone in my server to always have the shield emblem on their character (that one of guild wars) and I know that adding this on my login.lua if getPlayerGuildId(cid) > 0 then local guild = getPlayerGuildId(cid) doGuildAddEnemy(guild, enemy, 0, WAR_GUILD)...
  4. thalmonn

    Help to translate this code!

    Hello folks! I'm not a expert on dev otserver, so in this moment i'm trying to "convert" this code to a new version. This script is write to work on tfs 0.4 (i think) on a otserver 7.92. I need to convert him to a tfs 1.2 params, to do the same thing as the original version. I need to run it on...
  5. Lurk

    TFS 0.X hundred of onCreatureLeave messages on console

    each second there's at least 30, listing npcs and monsters, there's also "Monster: monstername not found in the friendList." [19:24:33.332] Monster: Cond Jumy not found in the friendList. [19:24:33.332] onCreatureLeave - Cond Jumy I'm trying this TFS 1.X+ - tfs 1.2 how can i create a crash log...
  6. Lurk

    Lua Npc can only but 30 at a time

    Hello, I have a tfs 0.4 server and whenever a player has excessive items in containers (bcakpacks) and sell more than 40 at a time to a npc it will causes lag, probably because it has to check every slot in the player backpack idk, is there a way to limit the amount of itens the npc can buy at a...
  7. Znote

    [TFS 1.3] [Revscriptsys] Free Lua scripting service - Post your requests! Let's learn it together!

    What is revscriptsys? Revscriptsys is a new way to register your scripts in an easy drag and drop way without the need to register it with xml. Basically you just place your .lua file into data/scripts/ or any subfolder according to your taste, except for monster files, they go into...
  8. V

    Lua.hpp Error in Visual Studio 2017

    http://prntscr.com/op5cl0 So everything worked fine - compiling was working without any issues until now. I don't really know what to do with this error. Can anyone explain me what to do? I'm kinda lost. :(
  9. kuhi

    Lua onKill not working with test script?

    I'm trying to make an onKill event script just for learning: function onKill(cid, target, lastHit) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "On script") return true end It's very simple, and I don't know why it's not working... no errors in console neither other...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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)...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Back
Top