darkfun3 5 Posted May 30, 2014 Share Posted May 30, 2014 quest feggarokouta begin state start begin when 50011.use begin local randi = number(1,22) local prem_item = { [1] = { 71018,1 }, --evlogia [2] = { 71028,1 }, --epi8esi drakou 8eou [3] = { 71027,1 }, --zwh drakoy 8eou [4] = { 71029,1 }, --efiia drakou 8eou [5] = { 50821,1 }, --Elixier der Sonne (S) [6] = { 50822,1 }, --Elixier des Mondes (S) [7] = { 50823,1 }, --Erfahrungsring [8] = { 50825,1 }, --Zauber-Ei [9] = { 50826,1 }, --Leerer Korb [10] = { 50903,1 }, --Regenbogenstein [11] = { 50703,15 }, --Rappen-Siegel [12] = { 27002,120 }, --Segen des Drachen [13] = { 27005,120 }, --Segen des Drachen [14] = { 50704,15 }, --Segen des Drachen [15] = { 71035,1 }, --Segen des Drachen [16] = { 71014,1 }, --Segen des Drachen [17] = { 71050,1 }, --Segen des Drachen [18] = { 71101,1 }, --Segen des Drachen [19] = { 71113,1 }, --Segen des Drachen [20] = { 71108,1 }, --Segen des Drachen [21] = { 71113,1 }, --Segen des Drachen [21] = { 71110,1 }, --Segen des Drachen [22] = { 71142,1 }, --Segen des Drachen } pc.give_item2(prem_item[randi][1],prem_item[randi][2]) pc.give_gold("80000") pc.remove_item("50011") end When you right click on it nothing happens. I have it in the quest folder Thanks in advance Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 up Link to comment Share on other sites More sharing options...
Premium Shogun 4588 Posted May 30, 2014 Premium Share Posted May 30, 2014 You are missing "end" twice at the end Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 quest feggarokouta begin state start begin when 50011.use begin local randi = number(1,22) local prem_item = { [1] = { 71018,1 }, --evlogia [2] = { 71028,1 }, --epi8esi drakou 8eou [3] = { 71027,1 }, --zwh drakoy 8eou [4] = { 71029,1 }, --efiia drakou 8eou [5] = { 50821,1 }, --Elixier der Sonne (S) [6] = { 50822,1 }, --Elixier des Mondes (S) [7] = { 50823,1 }, --Erfahrungsring [8] = { 50825,1 }, --Zauber-Ei [9] = { 50826,1 }, --Leerer Korb [10] = { 50903,1 }, --Regenbogenstein [11] = { 50703,15 }, --Rappen-Siegel [12] = { 27002,120 }, --Segen des Drachen [13] = { 27005,120 }, --Segen des Drachen [14] = { 50704,15 }, --Segen des Drachen [15] = { 71035,1 }, --Segen des Drachen [16] = { 71014,1 }, --Segen des Drachen [17] = { 71050,1 }, --Segen des Drachen [18] = { 71101,1 }, --Segen des Drachen [19] = { 71113,1 }, --Segen des Drachen [20] = { 71108,1 }, --Segen des Drachen [21] = { 71113,1 }, --Segen des Drachen [21] = { 71110,1 }, --Segen des Drachen [22] = { 71142,1 }, --Segen des Drachen } pc.give_item2(prem_item[randi][1],prem_item[randi][2]) pc.give_gold("80000") pc.remove_item("50011") end end end like this? Link to comment Share on other sites More sharing options...
Premium Shogun 4588 Posted May 30, 2014 Premium Share Posted May 30, 2014 yep Link to comment Share on other sites More sharing options...
Former Staff .InyaProduction 1124 Posted May 30, 2014 Former Staff Share Posted May 30, 2014 prem_item[randi][0] prem_item[randi][1] arrays begin at 0 Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4881 Posted May 30, 2014 Bot Share Posted May 30, 2014 prem_item[randi][0] prem_item[randi][1] arrays begin at 0 Well not in lua tables are Index 1 based. Kind regards MartPwnS Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 thank you testing it now Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 still not working when i right click on it. Should i put this quest somewhere else as well or only in the quest folder? Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4881 Posted May 30, 2014 Bot Share Posted May 30, 2014 Keep it in the questfolder and add its name in locale_list or quest_list if not alrdy done. Also make sure you set ITEM_QUEST on the item 50011 in your item_proto.txt Then recompile your quests. Kind regards MartPwnS Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted May 30, 2014 Developer Share Posted May 30, 2014 (edited) prem_item[randi][0] prem_item[randi][1] arrays begin at 0 As Mart said, the first index of a lua table is 1. That means, you don't really need (in this case) to write [idx]. Also, delete the last coma of your table. Another thing you can use is table.getn(prem_item) on the number function, that would mean that the randi variable should be after the table. But that's not really necessary, it's up to you. Edited August 15, 2022 by Metin2 Dev Core X - External 2 Internal when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 i can't get it work Link to comment Share on other sites More sharing options...
luzzo 197 Posted May 30, 2014 Share Posted May 30, 2014 man your item type is wrong for sure! Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 can someone edit this quest so it's working tried everything so far but nothing happens Link to comment Share on other sites More sharing options...
.JαyZoN 41 Posted May 30, 2014 Share Posted May 30, 2014 There are two missing ends, but i think this is not the main problem - there's an error message in your syserr of a channel. (nil value error) Right? Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 i have 5 cores in each channel which core? Link to comment Share on other sites More sharing options...
.JαyZoN 41 Posted May 30, 2014 Share Posted May 30, 2014 Try this; quest feggarokouta begin state start begin when 50011.use begin local randi = number(1,22) local prem_item = { {71018, 1}, --evlogia {71028, 1}, --epi8esi drakou 8eou {71027, 1}, --zwh drakoy 8eou {71029, 1}, --efiia drakou 8eou {50821, 1}, --Elixier der Sonne (S) {50822, 1}, --Elixier des Mondes (S) {50823, 1}, --Erfahrungsring {50825, 1}, --Zauber-Ei {50826, 1}, --Leerer Korb {50903, 1}, --Regenbogenstein {50703, 15}, --Rappen-Siegel {27002, 120}, --Segen des Drachen {27005, 120}, --Segen des Drachen {50704, 15}, --Segen des Drachen {71035, 1}, --Segen des Drachen {71014, 1}, --Segen des Drachen {71050, 1}, --Segen des Drachen {71101, 1}, --Segen des Drachen {71113, 1}, --Segen des Drachen {71108, 1}, --Segen des Drachen {71113, 1}, --Segen des Drachen {71110, 1}, --Segen des Drachen {71142, 1}, --Segen des Drachen } pc.give_item2(prem_item[randi][1], prem_item[randi][2]) pc.give_gold("80000") pc.remove_item("50011") end end end Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 doesn't work nothing happens to the box trying again something happened and the quest was empty even though i saved it Link to comment Share on other sites More sharing options...
Remix 45 Posted May 30, 2014 Share Posted May 30, 2014 (edited) prem_item[randi][0] prem_item[randi][1] arrays begin at 0 Also, delete the last coma of your table. Why? Edited August 15, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 doesn't work Just to mention something no box in the game can be opened not even the box from the reaper that gives75lvl weapons Link to comment Share on other sites More sharing options...
Remix 45 Posted May 30, 2014 Share Posted May 30, 2014 Does the box have the right item type? Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 when using this on another item it works just find tried adding by changin the id and still doesn't work Link to comment Share on other sites More sharing options...
Remix 45 Posted May 30, 2014 Share Posted May 30, 2014 Nobody is able to help you if you don't say which type the box has. Link to comment Share on other sites More sharing options...
.JαyZoN 41 Posted May 30, 2014 Share Posted May 30, 2014 doesn't work Just to mention something no box in the game can be opened not even the box from the reaper that gives75lvl weapons Connect to the database with navicat and look for the item type of value 50011. (18 would be correct) Otherwise try this; quest checkboxreaction begin state start begin when 50011.use begin syschat("50011: OK!") end end end Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 30, 2014 Author Share Posted May 30, 2014 Mondlicht-Schatztruhe type 18 subtype 10 flag 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now