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

Recent content by lhc00

  1. L

    Lua Function doPlayerSetExtraAttackSpeed(cid, speed)

    Thx, It worked :D
  2. L

    Lua Function doPlayerSetExtraAttackSpeed(cid, speed)

    I tried with TFS 0.3.6pl1 and it gives errors when compiling, but i just change: LuaInterface to LuaScriptInterface and it works =) but when I log in it crash =/, can someone help with that?
  3. L

    Lua in pairs

    I will try explain with this example: i have this script: function onUse(cid, item, pos, itemEx, topos) x = 0 k = 1 local bakados = { --HERE-- [{6278}] = {2666, 10, 5097, 2, 8846, 3}, [{2379}] = {2666, 100} } big_pos =...
  4. L

    Lua in pairs

    I would like to know if there is some way to do i jump to next value in "in pairs": local thing = { [1234] = {1, 2, 3, 4}, [1236] = {1, 2, 3, 6} } for i, v in pairs(thing) do print(i, v[i-1233]) -- end E.g: in this script, it will print : "1234, 1 1236...
  5. L

    Lua Increase player hunger

    I would like to know how to do the food( from getPlayerFood) reduces faster than normal Thx ^_^
  6. L

    Lua Remove a Player Item

    I would like to know how do i remove a item from the player, but i need remove just the item with a given attribute E.g: the player has two items with the same ID but with different ActionID, the player should lose just the item with a given action ID Thx by the attention ^_^
  7. L

    Lua Execute something every week

    I would like to know how do i execute something every week, can i do that with onTimer? Thx by the help ^_^
  8. L

    Lua Get quotient in LUA

    I would like to know how to get the quotient of a operation, there is any function for this? Thank you ^_^ Edit: I've got it, thx anyway xD
  9. L

    Lua Problem with NPC

    I have a problem with a NPC, when i type on tibia the number that the NPC asks, it gives this error: "can't compare nil with number", or something like that, i don't know where is the error. Here is the script: local keywordHandler = KeywordHandler:new() local npcHandler =...
  10. L

    Lua Npc get a number from player

    I think the problem is that the npc is getting the value before the player type the value, Someone knows how to make the npc wait for an answer?
  11. L

    Lua Npc get a number from player

    The problem is that shouldn't return nil, i typed on tibia a number, and the console is saying that is nil, here is the part of the code: if talkState[talkUser] == 2 then num = tonumber(msg) if num > 0 then...
  12. L

    Lua Npc get a number from player

    I've tried to use tonumber(msg) but it didn't work, the error that is showed on the console is: attempt to compare number with nil I've tried remove tonumber, and the error was: attempt to compare number with string O.o
  13. L

    Lua Npc get a number from player

    I would like to know how do I make a npc that can receive a number of the player and execute the code based on the number. E.g: The player type a number, and the number typed will be the ActionID of the item that will be given to the player. I've tried the old method of versions before 8.4...
  14. L

    Lua Create Item with ActionID

    Thx, helped a lot ^_^ Edit: Anyone knows how to check the player's items, and remove the one that have an especific ActionID or UniqueID?
  15. L

    Lua Create Item with ActionID

    Someone knows how to create a item with a ActionID, I've tried this, but it did'nt work: doItemSetAttribute(doPlayerAddItem(cid, 6092), aid, 100) Thx again ^_^
Back
Top