Rumor 2605 Posted February 24, 2014 Share Posted February 24, 2014 quest regenbogen begin state start begin when 50512.use begin say_title("Rainbow stone:") if pc.job ==0 then say("Choose your class") local s=select("Arahan","Partisan") if s==1 then pc.set_skill_group(1) pc.set_skill_level(1 ,59) pc.set_skill_level(2 ,59) pc.set_skill_level(3 ,59) pc.set_skill_level(4 ,59) pc.set_skill_level(5 ,59) -- pc.set_skill_level(6 ,59) pc.remove_item(50512, 1) say_yellow("Your skills are now perfect.") end if s==2 then pc.set_skill_group(2) pc.set_skill_level(16 ,59) pc.set_skill_level(17 ,59) pc.set_skill_level(18 ,59) pc.set_skill_level(19 ,59) pc.set_skill_level(20 ,59) -- pc.set_skill_level(21 ,59) pc.remove_item(50512, 1) say_yellow("Your skills are now perfect.") end elseif pc.job ==1 then say("Choose your class") local s=select("Ninja","Archer") if s==1 then pc.set_skill_group(3) pc.set_skill_level(31 ,59) pc.set_skill_level(32 ,59) pc.set_skill_level(33 ,59) pc.set_skill_level(34 ,59) pc.set_skill_level(35 ,59) -- pc.set_skill_level(36 ,59) pc.remove_item(50512, 1) say_yellow("Your skills are now perfect.") end if s==2 then pc.set_skill_group(4) pc.set_skill_level(46 ,59) pc.set_skill_level(47 ,59) pc.set_skill_level(48 ,59) pc.set_skill_level(49 ,59) pc.set_skill_level(50 ,59) -- pc.set_skill_level(51 ,59) pc.remove_item(50512, 1) say_yellow("Your skills are now perfect.") end elseif pc.job ==2 then say("Choose your class") local s=select("Black Magic","Mirage") if s==1 then pc.set_skill_group(5) pc.set_skill_level(76 ,59) pc.set_skill_level(77 ,59) pc.set_skill_level(78 ,59) pc.set_skill_level(79 ,59) pc.set_skill_level(80 ,59) pc.set_skill_level(81, 59) pc.remove_item(50512, 1) say_yellow("Your skills are now perfect.") end if s==2 then pc.set_skill_group(6) pc.set_skill_level(61 ,59) pc.set_skill_level(62 ,59) pc.set_skill_level(63 ,59) pc.set_skill_level(64 ,59) pc.set_skill_level(65 ,59) pc.set_skill_level(66 ,59) pc.remove_item(50512, 1) say_yellow("Your skills are now perfect.") end elseif pc.job ==3 then say("Choose your class") local s=select("Lightning","Dragon") if s==1 then pc.set_skill_group(7) pc.set_skill_level(106 ,59) pc.set_skill_level(107 ,59) pc.set_skill_level(108 ,59) pc.set_skill_level(109 ,59) pc.set_skill_level(110 ,59) pc.set_skill_level(111 ,59) pc.remove_item(50512, 1) say_yellow("Your skills are now perfect.") end if s==2 then --Drachen pc.set_skill_group(8) pc.set_skill_level(91 ,59) pc.set_skill_level(92 ,59) pc.set_skill_level(93 ,59) pc.set_skill_level(94 ,59) pc.set_skill_level(95 ,59) pc.set_skill_level(96 ,59) pc.remove_item(50512, 1) say_yellow("Your skills are now perfect.") end end end end end If the player doesn't reset his skills and choose another sub-class it won't assign their skill levels. It's as if set_skill_group is not working. Should I add the function here to reset skills from skill reset scroll? Link to comment Share on other sites More sharing options...
Aveline™ 554 Posted February 25, 2014 Share Posted February 25, 2014 quest regenbogen begin state start begin when 50512.use begin local data = { [0] = { [1] = {1,2,3,4,5}, [2] = {16,17,18,19,20}, }, [1] = { [1] = {31,32,33,34,35}, [2] = {46,47,48,49,50}, }, [2] = { [1] = {76,77,78,79,80,81}, [2] = {61,62,63,64,65,66}, }, [3] = { [1] = {106,107,108,109,110,111}, [2] = {91,92,93,94,95,96}, }, ["classNames"] = { [0] = {"Arahan","Partisan","Close"}, [1] = {"Ninja","Archer","Close",}, [2] = {"Black Magic","Mirage","Close"}, [3] = {"Lighting","Dragon","Close"}, }, } say_title("Rainbow Stone:") say("") -- say("Choose your class") local s = select_table(data["classNames"][pc.get_job()]) if(s >= table.getn(data["classNames"][pc.get_job()])) then return end pc.set_skill_group(s) for i = 1,table.getn(data[pc.get_job()][s]),1 do pc.set_skill_level(data[pc.get_job()][s][i],59) end pc.remove_item(50512,1) say_yellow("Your skills are now perfect.. ") end end end Regards. 1 Plain logic saves lives. Link to comment Share on other sites More sharing options...
Rumor 2605 Posted February 25, 2014 Author Share Posted February 25, 2014 wow you re-wrote it with the correct spelling from my quest.. excellent job.. thankyou 1 Link to comment Share on other sites More sharing options...
Rumor 2605 Posted February 26, 2014 Author Share Posted February 26, 2014 (edited) quest doesn't work, just does this: SYSERR: Feb 26 04:37:06 :: RunState: LUA_ERROR: [string "regenbogen"]:28: attempt to compare number with nil SYSERR: Feb 26 04:37:06 :: WriteRunningStateToSyserr: LUA_ERROR: quest regenbogen.start click SYSERR: Feb 26 04:37:11 :: RunState: LUA_ERROR: [string "regenbogen"]:28: attempt to compare number with nil SYSERR: Feb 26 04:37:11 :: WriteRunningStateToSyserr: LUA_ERROR: quest regenbogen.start click SYSERR: Feb 26 04:38:04 :: RunState: LUA_ERROR: [string "regenbogen"]:28: attempt to compare number with nil SYSERR: Feb 26 04:38:04 :: WriteRunningStateToSyserr: LUA_ERROR: quest regenbogen.start click SYSERR: Feb 26 04:38:10 :: Analyze: login phase does not handle this packet! header 66 SYSERR: Feb 26 04:38:11 :: Analyze: Handshake phase does not handle packet 66 (fd 34) SYSERR: Feb 26 04:38:21 :: RunState: LUA_ERROR: [string "regenbogen"]:28: attempt to compare number with nil SYSERR: Feb 26 04:38:21 :: WriteRunningStateToSyserr: LUA_ERROR: quest regenbogen.start click Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Evor 72 Posted February 26, 2014 Share Posted February 26, 2014 There is a mistake [1] = {"Ninja","Archer","Close",}, it should be without a comma like: quest regenbogen begin state start begin when 50512.use begin local data = { [0] = { [1] = {1,2,3,4,5}, [2] = {16,17,18,19,20}, }, [1] = { [1] = {31,32,33,34,35}, [2] = {46,47,48,49,50}, }, [2] = { [1] = {76,77,78,79,80,81}, [2] = {61,62,63,64,65,66}, }, [3] = { [1] = {106,107,108,109,110,111}, [2] = {91,92,93,94,95,96}, }, ["classNames"] = { [0] = {"Arahan","Partisan","Close"}, [1] = {"Ninja","Archer","Close"}, -- there was no needed comma [2] = {"Black Magic","Mirage","Close"}, [3] = {"Lighting","Dragon","Close"}, }, } say_title("Rainbow Stone:") say("") -- say("Choose your class") local s = select_table(data["classNames"][pc.get_job()]) if(s >= table.getn(data["classNames"][pc.get_job()])) then return end pc.set_skill_group(s) for i = 1,table.getn(data[pc.get_job()][s]),1 do pc.set_skill_level(data[pc.get_job()][s][i],59) end pc.remove_item(50512,1) say_yellow("Your skills are now perfect.. ") end end end Hope it works! 1 Link to comment Share on other sites More sharing options...
Rumor 2605 Posted February 26, 2014 Author Share Posted February 26, 2014 How did I miss that thanks I'll try it. Link to comment Share on other sites More sharing options...
Rumor 2605 Posted February 27, 2014 Author Share Posted February 27, 2014 still same thing in the quest Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted February 27, 2014 Developer Share Posted February 27, 2014 quest regenbogen begin state start begin when 50512.use begin local sk = special.active_skill_list[pc.get_job()+1][pc.get_skill_group()] for i = 1, table.getn(sk) do if pc.get_skill_level(sk[i]) < 40 then pc.set_skill_level(sk[i], 40) item.remove() syschat("Your skills are now perfect.") end end end end end when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
Former Staff .InyaProduction 1123 Posted February 27, 2014 Former Staff Share Posted February 27, 2014 quest regenbogen begin state start begin when 50512.use begin local sk = special.active_skill_list[pc.get_job()+1][pc.get_skill_group()] for i = 1, table.getn(sk) do if pc.get_skill_level(sk[i]) < 40 then pc.set_skill_level(sk[i], 40) item.remove() syschat("Your skills are now perfect.") end end end end end Dont put the item.remove into the for loop put it after the for loop Link to comment Share on other sites More sharing options...
Rumor 2605 Posted February 27, 2014 Author Share Posted February 27, 2014 huh I don't understand how that is a working quest, it doesn't list the skills at all. What I'm saying is the quest still just says "Choose your skills" and has a button to click that closes the window, you can never choose which skills you want . Link to comment Share on other sites More sharing options...
Former Staff .InyaProduction 1123 Posted February 27, 2014 Former Staff Share Posted February 27, 2014 It will set your skillgroup to perfect master. special.active_skill_list contains an structured array of all skills which get selected by pc.get_job() Link to comment Share on other sites More sharing options...
Rumor 2605 Posted February 27, 2014 Author Share Posted February 27, 2014 I want the players to be able to change to another class and receive full P skills ^^ Link to comment Share on other sites More sharing options...
Evor 72 Posted February 27, 2014 Share Posted February 27, 2014 Try that: quest regenbogen begin state start begin when 50512.use begin local job_name = { [0] = {"Arahan","Partisan"}, [1] = {"Ninja","Archer"}, [2] = {"Black Magic","Mirage"}, [3] = {"Lighting","Dragon"}, } local skill_index = { [0] = { [1] = {1,2,3,4,5}, [2] = {16,17,18,19,20}, }, [1] = { [1] = {31,32,33,34,35}, [2] = {46,47,48,49,50}, }, [2] = { [1] = {76,77,78,79,80,81}, [2] = {61,62,63,64,65,66}, }, [3] = { [1] = {106,107,108,109,110,111}, [2] = {91,92,93,94,95,96}, }, } say_title("Rainbow Stone") say("") say("Choose your class!") local a = select(job_name[pc.get_job()][1], job_name[pc.get_job()][2], "Cancel") if tonumber(a) != 3 or tonumber(a) != 0 then return else say_title("Your skillpath was changed succesfully!") pc.set_skill_group(tonumber(a)) for i=1, table.getn(skill_index[pc.get_job()][tonumber(a)]) do pc.set_skill_level(skill_index[pc.get_job()][tonumber(a)][i],59) end item.remove() say("Now, your skills are on the Perfect Master Level!") say("Good luck!") end end end end Link to comment Share on other sites More sharing options...
Rumor 2605 Posted March 7, 2014 Author Share Posted March 7, 2014 That one just says "Choose your class" and lists the classes.. when I click it, it does nothing.. just closes the popup and the stone stays in the inventory and skills don't change at all. Can you guys test this stuff before you reply Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted March 7, 2014 Developer Share Posted March 7, 2014 Try this: quest regenbogen begin state start begin when 50512.use begin local job_name = {{"Arahan", "Partisan"},{"Ninja","Archer"},{"Black Magic","Mirage"},{"Lighting","Dragon"}} local sk = special.active_skill_list[pc.get_job()+1][pc.get_skill_group()] say_title(item_name(item.vnum)) say"[ENTER]Choose your class!" table.insert(job_name[pc.get_job()+1], "Close") local a = select_table(job_name[pc.get_job()+1]) if a < table.getn(job_name[pc.get_job()+1]) then pc.set_skill_group(a) for i = 1, table.getn(sk) do if pc.get_skill_level(sk[i]) < 40 then pc.set_skill_level(sk[i], 40) end end say("Now, your skills are on the Perfect Master Level![ENTER]Good luck!") pc.remove_item(item.vnum, 1) end end end end when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
Premium Jfirewall 280 Posted March 7, 2014 Premium Share Posted March 7, 2014 quest perfect begin state start begin when 50512.use begin table.foreachi(special.active_skill_list[pc.get_job()+1][pc.get_skill_group()],function(r,skill) pc.set_skill_level(skill,59) end) item.remove() pc.remove_item(50512) say_title("blabla:") say("Now, your skills are on the Perfect Master Level") end end end 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