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

    Lua TFS 0.3.6 pass all array variables as a one param through doRemoveItem TFS function.

    Oh, thanks. But I formed wrong my qustion. If you could help me, I would be glad forever... I have an array: local t = { ['Orc'] = { {pos = {x = 950, y = 1063, z = 7}, id = 1037}, {pos = {x = 951, y = 1063, z = 7}, id = 1037} }, ['Troll'] = { {pos = {x...
  2. waqmaz

    Lua TFS 0.3.6 pass all array variables as a one param through doRemoveItem TFS function.

    Following your code I wrote what I wanted yesterday and it works very well. I can easy get an index of an arrau, using function onUse by putting item.uid like: local t = { [4767] = {}, [4768] = {}, [4769] = {} } function onUse(cid, item, fromPosition, itemEx, toPosition) --...
  3. waqmaz

    Lua onUse. Elseif doesn't work for items of the same itemid and diffrent uid.

    thanks, it works, but i am not sure it is the only correct way. i remember that " 4767-4768" was working to while tried to and there are even examples like: <action itemid="7588-7591;8472-8473;7618;7620;8704" event="script" value="liquids/potions.lua"/>
  4. waqmaz

    Lua onUse. Elseif doesn't work for items of the same itemid and diffrent uid.

    Thanks, but I've registered it this way: <action uniqueid="4767-4768" event="script" value="ravageSystem.lua" />
  5. waqmaz

    Lua onUse. Elseif doesn't work for items of the same itemid and diffrent uid.

    Yes, but it doesn't work. In RME my two items are 4768 and 4767.I've logged as a GM and i see the same in game. :(
  6. waqmaz

    Lua onUse. Elseif doesn't work for items of the same itemid and diffrent uid.

    Hello. Can someone explain, why it doesn't work? function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == 10351 and item.uid == 4767 then print(item.uid) elseif item.itemid == 10351 and item.uid == 4768 then print(item.uid) end return true...
  7. waqmaz

    Lua TFS 0.3.6 pass all array variables as a one param through doRemoveItem TFS function.

    i did 2 examples of tables, the for loops are named to which one they use, but this is an easy way to do this Men, You are a genius! That's exactly, what I wanted! Thanks! I learn much from Your posts everyday! Thanks again! Big Thanks! A few changes and it works perfectly!:)
  8. waqmaz

    Lua TFS 0.3.6 pass all array variables as a one param through doRemoveItem TFS function.

    hello. yes, I "want to make a table with several items / different amounts of each item, and remove all of them with the associated quantity". Ofcourse, it can be done like this: local itemsID = { [1] = { item = 2471, amount = 10}, [2] = { item = 2130, amount = 5}, } please, help me loop...
  9. waqmaz

    Lua TFS 0.3.6 pass all array variables as a one param through doRemoveItem TFS function.

    Hello. I've been coding since a few days in lua. I've wrote simple functions: local itemsID = { [1] = { 2471, 2130}, -- [2] = { 5456, 777, 1148}, } local quantity = { [1] = { 1, 2}, -- [2] = { 100, 50, 2}, } local function getItem(nr) for i = 1, #itemsID[nr] do...
  10. waqmaz

    Compiling How to start server using source files? TFS 0.3.6

    Hello. I've just compiled source server on Windows. How can I start the server? It is a little noobish question, but I do not see anything like a server icon or something. I've tried to click "Run" using DEV C++ (ctrl + F10) but the console opens and closes. Thanks.
  11. waqmaz

    Lua Boss stage. Like World of Warcraft's bosses

    thank, but does ragiaz work on tfs 0.3.6?
  12. waqmaz

    Lua Boss stage. Like World of Warcraft's bosses

    Thanks, you're talking about onThink from creatureScripts, don't you? Because there is one from globalevents.
  13. waqmaz

    Lua Boss stage. Like World of Warcraft's bosses

    Hello. I am trying to make a boss with stages. 1. First stage: If it has <= 75% HP, then it is immune for 10 seconds and heals HP. 2. Second Stage: If it has <= 50% HP then it is immune for 5 seconds and it is casting AOE spells. 3. 3th stage: At <= 25% HP it is 200% faster and 50% stronger 4 ...
  14. waqmaz

    Lua Pass return false through function doesn't work.

    Cool! You've saved my life!
  15. waqmaz

    Lua Pass return false through function doesn't work.

    I solved my problem: if check(cid) == false then print('function check returned false, works!') end
  16. waqmaz

    Lua Pass return false through function doesn't work.

    Hello there. The script works, but "return false" doesn't prevent onCombat function. local function check(cid) if isPlayer(cid) then return false end return true end I want the function above to prevent the built-in game function onCombat below: function onCombat(cid...
  17. waqmaz

    Lua CreatureScripts functions like onCombat or onStatsChange

    Thank You so much. Will try it after job. It will really help me making scripts, I think.
  18. waqmaz

    Lua CreatureScripts functions like onCombat or onStatsChange

    I wrote that from memory just to show you what I mean. Forgot about "function". But you know what I mean, yes? :)
  19. waqmaz

    Lua CreatureScripts functions like onCombat or onStatsChange

    Hello. I would like to know how does function params really works. I have some problems. Lets say we have onCombat function: function onCombat(cid, target) -- cid = getCreatureTarget(cid) -- target = getCreatureTarget(target ) if isPlayer(target) then doCreatureSay(cid...
  20. waqmaz

    Lua TFS 0.3.6 If party is created, do something

    if there is no free slot in a leader's backpack or there is no item's cap, "you cannot create a party".
Back
Top