Jump to content
Maintenance ×
×
×
  • Create New...
  • 0

Simple Quest problem


Juice

Question

  • Premium

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

7 answers to this question

Recommended Posts

  • 0
  • Premium

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

  • 0
  • Premium

 

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

  • 0

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;
  • Love 1
Link to comment
Share on other sites

  • 0
  • Moon

 

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 :D

 

Kind Regards

Ken

Do not be sorry, be better.

Link to comment
Share on other sites

  • 0
  • Premium

 

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


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.