Premium Juice 526 Posted April 18, 2015 Premium Share Posted April 18, 2015 Hello Community, I got a problem with a simple quest. The Quest should acutally work, but the function "pc.set_skill_level()" is not working for me. Because of that, i tried a different way to levelup a skill through a quest. Here is the Quest: quest grandmaster_stone begin state start begin when 50512.use begin pc.set_skill_level(16, 59) local search_skill_group = BuildSkillList(pc.get_job(), pc.get_skill_group()) local name_list,vnum_list = search_skill_group[2],search_skill_group[1] local skill_available_vnum,skill_available_name = {},{} for a = 1, table.getn(name_list) do if pc.get_skill_level(vnum_list[a]) >= 30 and pc.get_skill_level(vnum_list[a]) <= 39 then table.insert(skill_available_name, name_list[a]) table.insert(skill_available_vnum, vnum_list[a]) end end table.insert(skill_available_name, 'Abbrechen') if table.getn(skill_available_vnum) < 1 then say_title('Regenbogenstein') say('[ENTER]Du besitzt keine Fähigkeiten die du verbessern kannst.[ENTER]') return end say_title('Regenbogenstein') say('[ENTER]Wähle eine Fähigkeit die du verbessern möchtest:[ENTER]') local select_skill = select2(skill_available_name) if skill_available_name[select_skill] == 'Abbrechen' then return end say_title("Regenbogenstein:") say('[ENTER]Möchtest du die Fähigkeit verbessern?[ENTER]') if select('Verbessern','Abbrechen') == 2 then return end chat(''..skill_available_name[select_skill]..' wurde erfolgreich verbessert!') command('setsk '..skill_available_vnum[select_skill]..' '..(pc.get_skill_level(skill_available_vnum[select_skill])+1)..'') item.remove() end end end But the requirement for using the "command" function, you have to have at least low gm rights. Thats why its useless for me. Does somebody know a different way to levelup a skill level? I would be nice if you could help me. Link to comment Share on other sites More sharing options...
Premium MrLibya 558 Posted April 18, 2015 Premium Share Posted April 18, 2015 try quest grandmaster_stone begin state start begin when 50512.use begin local search_skill_group = BuildSkillList(pc.get_job(), pc.get_skill_group()) local name_list,vnum_list = search_skill_group[2],search_skill_group[1] local skill_available_vnum,skill_available_name = {},{} for a = 1, table.getn(name_list) do if pc.get_skill_level(vnum_list[a]) >= 30 and pc.get_skill_level(vnum_list[a]) <= 39 then table.insert(skill_available_name, name_list[a]) table.insert(skill_available_vnum, vnum_list[a]) end end table.insert(skill_available_name, "Abbrechen") if table.getn(skill_available_vnum) < 1 then say_title("Regenbogenstein") say("[ENTER]Du besitzt keine Fähigkeiten die du verbessern kannst.[ENTER]") return end say_title("Regenbogenstein") say("[ENTER]Wähle eine Fähigkeit die du verbessern möchtest:[ENTER]") local select_skill = select2(skill_available_name) if skill_available_name[select_skill] == "Abbrechen" then return end say_title("Regenbogenstein:") say("[ENTER]Möchtest du die Fähigkeit verbessern?[ENTER]") if select("Verbessern","Abbrechen") == 2 then return end chat(""..skill_available_name[select_skill].." wurde erfolgreich verbessert!") pc.set_skill_level(skill_available_vnum[select_skill], (pc.get_skill_level(skill_available_vnum[select_skill])+1)) pc.set_skill_level(16, 59) item.remove() end end end If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Premium Juice 526 Posted April 18, 2015 Author Premium Share Posted April 18, 2015 try quest grandmaster_stone begin state start begin when 50512.use begin local search_skill_group = BuildSkillList(pc.get_job(), pc.get_skill_group()) local name_list,vnum_list = search_skill_group[2],search_skill_group[1] local skill_available_vnum,skill_available_name = {},{} for a = 1, table.getn(name_list) do if pc.get_skill_level(vnum_list[a]) >= 30 and pc.get_skill_level(vnum_list[a]) <= 39 then table.insert(skill_available_name, name_list[a]) table.insert(skill_available_vnum, vnum_list[a]) end end table.insert(skill_available_name, "Abbrechen") if table.getn(skill_available_vnum) < 1 then say_title("Regenbogenstein") say("[ENTER]Du besitzt keine Fähigkeiten die du verbessern kannst.[ENTER]") return end say_title("Regenbogenstein") say("[ENTER]Wähle eine Fähigkeit die du verbessern möchtest:[ENTER]") local select_skill = select2(skill_available_name) if skill_available_name[select_skill] == "Abbrechen" then return end say_title("Regenbogenstein:") say("[ENTER]Möchtest du die Fähigkeit verbessern?[ENTER]") if select("Verbessern","Abbrechen") == 2 then return end chat(""..skill_available_name[select_skill].." wurde erfolgreich verbessert!") pc.set_skill_level(skill_available_vnum[select_skill], (pc.get_skill_level(skill_available_vnum[select_skill])+1)) pc.set_skill_level(16, 59) item.remove() end end end Not working, like i said, the quest function pc.set_skill_level() does not work. Link to comment Share on other sites More sharing options...
OceanusPT 2 Posted April 18, 2015 Share Posted April 18, 2015 U only can use "command" function in a quest if the quest is for GM use. Link to comment Share on other sites More sharing options...
Premium Juice 526 Posted April 20, 2015 Author Premium Share Posted April 20, 2015 U only can use "command" function in a quest if the quest is for GM use. Thats what i allready said. Does somebody know another way? Link to comment Share on other sites More sharing options...
FakedMan 14 Posted April 20, 2015 Share Posted April 20, 2015 Did you modify your game core ? Normally the function work perfectly. It's useless also to put "59", the maximum skill number it's 40. Try to put 40 instead of 59 But normally it's must working because : if (bLev >= 40) m_pSkillLevels[dwVnum].bMasterType = SKILL_PERFECT_MASTER; 1 Link to comment Share on other sites More sharing options...
Ken 905 Posted April 20, 2015 Share Posted April 20, 2015 Did you modify your game core ? Normally the function work perfectly. It's useless also to put "59", the maximum skill number it's 40. Try to put 40 instead of 59 But normally it's must working because : if (bLev >= 40) m_pSkillLevels[dwVnum].bMasterType = SKILL_PERFECT_MASTER; I guess system is use MINMAX for this. You can do /setsk 1 500. (Maximum will be 40) I didn't understand why is the people like do these things Kind Regards Ken Do not be sorry, be better. Link to comment Share on other sites More sharing options...
Premium Juice 526 Posted April 20, 2015 Author Premium Share Posted April 20, 2015 Did you modify your game core ? Normally the function work perfectly. It's useless also to put "59", the maximum skill number it's 40. Try to put 40 instead of 59 But normally it's must working because : if (bLev >= 40) m_pSkillLevels[dwVnum].bMasterType = SKILL_PERFECT_MASTER; Yeah i modify my gamecore, maybe their was some mistake. I know that max is 40, i was just coping this part of code from a old quest for test´s. But thanks for your help 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