Jump to content

TheMadNurse

Inactive Member
  • Posts

    3
  • Joined

  • Last visited

  • Feedback

    0%

About TheMadNurse

Informations

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

TheMadNurse's Achievements

Newbie

Newbie (1/16)

  • Reacting Well
  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. I simply asked something more than what Syreldar showed me, storing values in more than one table, because I need to include a lot of values, just to have the data as clear as possible. It's not a problem if anyone from you can't afford that last my request, your support was enought helpful for me anyway. I'll follow Syreldar's function like this way: local table = { x1, x2, x3, ---table_1 y1, y2, y3 ---table_2 z1, z2, z3 ---table_3 etc... } Tne two-return in the function I posted was simply an example to show you what I meant, I wrote that it was obviously wrong, and the "range of values" was referred to the other users who replied to me with that solution, including range of values (e.g.: item.get_vnum() >= x1 and item.get_vnum() <= x2). Don't worry, I know how to lua code just as you all do, I could not be expert as you, but I developed a lot of usefull systems and I know what I'm doing too. By the way, thank you all again, expecially to Syreldar.
  2. Thank you! Your reply suits my request, but I need a way to manage different tables in order to make the function data sheet as clear as possible, like this way: function CanTakeItem(vnum_item) local table_1 = {x1, x2, x3} local table_2 = {y1, y2, y3} return table_is_in(table_1, vnum_item) return table_is_in(table_2, vnum_item) end But it obviously is wrong. I don't need range of values, but specified values. Is the multiple "for index = 1, table.getn(table) do" for each table choice the only option ? Like this way: function CanTakeItem(vnum_item) local table_1 = {x1, x2, x3} for index_1 = 1, table.getn(table_1) do if vnum_item == table_1[index_1] then return true else return false end end local table_2 = {y1, y2, y3} for index_2 = 1, table.getn(table_2) do if vnum_item == table_2[index_2] then return true else return false end end end when vnum_NPC.take with name_quest.CanTakeItem(item.get_vnum()) == true begin Thank you in advance again!
  3. Hello! I need a function to use for: when vnum_NPC.take with item.get_vnum() == vnum_item begin that makes as short as possible the when-begin clause, because I need to include a lot of item values for the item.get_vnum() function. The function has to return a group of items divided into various arrays (e.g.: local name_item_group_1 = {vnum_item_1, 2 , 3, etc...}) for the various sub types of items (e.g.: swords, daggers, bows, etc...). The result has to look like that: when vnum_NPC.take with new_function() begin and not when vnum_NPC.take with item.get_vnum() == vnum_item_1 or item.get_vnum() == vnum_item_2 or item.get_vnum() == vnum_item_3 or etc... begin Thank you in advance!
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.