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

    TFS 1.X+ [Problem] Query Player Containers - NO WORK

    Hey guys. How are things? I currently have a problem, and I'm a little lost trying to solve it. The problem is Casting some rune, or even buying something from any NPC. Although I have several backpacks inside my main backpack, if the main backpack is full, it ignores additional backpacks and...
  2. Schlangemann

    LUA Monster onDeath give storage id to party

    TFS 1.4 Hi! I am trying to make a boss give storage id to all party members who have damaged it when it dies. I am using a variation of Slavi's code from this post Lua - onKill players on party sharing xp to get task counted...
  3. wizinx

    TFS 1.X+ funcion add outfit and addon in shop.lua otclient

    Hello, I installed the otclient shop, but the function of adding the outfits and addon are not finished, anyone with a good heart who knows?, thanks -- BETA VERSION, net tested yet -- Instruction: -- creaturescripts.xml <event type="extendedopcode" name="Shop" script="shop.lua" /> -- and...
  4. R

    Problem with npc quest based on keywords (lua understanding)

    Hi I'm trying to understand lua to edit properly in the server, tfs 1.5, windows, 8.0 client with orts2 datapack. Is it possible someone help me understand why this rookgard quest is not working? (present for legion helmet in seymour npc, the following is its lua script. local boxKeyword =...
  5. M

    Lua [HELP] Fishing Script

    Hi, I found a fishing script here on the forum, I'm using an OTX2 engine. The script does not work, an error appears in the console as below in the picture. How to fix it? local config = { [1] = {item = {1294, 1}, chance = 25000, fishing = 0, quest = {enable = false, storage = nil}}...
  6. potinho

    Lua [TFS 0.X] Action who remove storage and set new one

    I'm working on a new system, and I'd like to ask for some help. I have an item that sets a storage for the player. But I will need something different: I need another item that I create to remove this storage and add a new one. can you help me? actual script: local storage = 9870 function...
  7. potinho

    TFS 0.X [LUA] Info command - attempt to index a boolean value

    I have a command on my server that brings information about monsters like health, EXP and loot. It works fine, but today I saw it reporting errors on the console. Could you help me to fix it and, if necessary, improve it? Error: [Error - TalkAction Interface]...
  8. potinho

    TFS 0.X [LUA]Boss Room

    Hello how are you? I have this script that I copied from anihilator and I'm using it as a boss room, it works great for 4 players. However, I would like to increase the number of tiles, but it would still be possible to enter the room with any amount of players (4 or more), could you help me to...
  9. Raikou

    Lua Spell buff animation

    I got the following working code for a spell that buffs critical skills. My (luxury) problem is that the animation to show that the buff is active on the person, is in my eyes not the greatest. Though I can't think of another way. Is there a better way to show that the character is buffed...
  10. G

    Save config lua, to json. and upload json when login to server.

    Hey, i need save configs (config name: "hp" "antyrsik" "pvpmode") to others characters. For ed/ek etc. And when i loggin to EK, lua automatically upload info from json.
  11. Raikou

    Get skill within a Spell

    Hello all, I got a very basic problem/annoyance. Within a spell I want to get the players skill lvl. I tried several variations of something like below but i keep getting nill/nothing. function onCastSpell(creature, var, player) -- seems i cant get player here? local skill =...
  12. A

    Custom Spell Programmer- Paid Job

    Hello Comunity! I am looking forwards to create new custom spells for my OT Custom Server and i need someone who knows how to do that. This OT Server is based on a fantasy world i've been building up for my fantasy novels for more than 12 Years, and i want to create a full magic enviroment and...
  13. Sunwave

    help metatable in lua

    I'm working with metatables and I need help, I have a table inside this metatable and I wanted to insert values into them and return this table, but when I create the metatable these values are 0 function Teste(cid) local player = Player(cid) if not player then return end local t...
  14. volcomfaria

    Lua How to format gold coins

    Hey guys! I wanted to know how I could format a quantity of gold coins and show a message with the amount separating the "kk", "k", "gold coins". Exemple: number: 1255100 The message that will appear : "1kk, 255k and 100 gold coins." I've been trying for a while but with no success. Thanks...
  15. potinho

    Lua [TFS 0.X]Skill Scroll - Skill booster

    I would like a script (action) that, when I use the item, the skill rate (skills axe, sword, club, distance, shield, fist and magic level) would be "x" times faster for "x" time. can you help me?
  16. potinho

    Lua [TFS 0.X] Frag Reward Problem

    Hello everyone, everything good? I'm using the frag reward system from the topic below, but when I killed a player my console showed an error and the reward (heart with ID 5280) was not delivered. https://otland.net/threads/frag-reward-trophy-heart-both-you-choose.147873/ frag reward.lua...
  17. volcomfaria

    Lua how to add the weight of all items

    Hey guys! I would like to know how to add the weight of all items. Can someone help me? In case I'm trying to do in this script: function onUse(player, item, fromPosition, target, toPosition, isHotkey) local items = {} if player:getVocation():getId() == 1 then items =...
  18. potinho

    Lua [TFS 0.3.7] Mana rune Show healing quantity

    Hello guys, i want to do something on my server: when i use UH rune, it shows quantity of healing (in the case bellow 2748), i want to mana rune shows too. ultimate healing rune.lua local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)...
  19. potinho

    Lua [TFS 0.3.7] NPC that sells item for different coin.

    I have a custom coin on my server (ID 5263) i want to create a NPC who sell some stuffs by this coin. IDs of some those itens: 5271, 5272, 5273, etc.
  20. potinho

    Lua [TFS 0.3.7] Item that completely fills mana and life

    Hello everyone, everything good? I need a script to put in an item (action on use) that fully completes a player's mana and life (like the new tibia foods). can you help me?
Back
Top