Jump to content

Problem with a quest


Recommended Posts

Hello, I have this quest, which gives level 249 at the creation of the character. 

The problem is that after 1 or 2 hours, or maybe after a reboot, some players get level 1, with no points at status, or with reseted skills.

Why?

Spoiler

quest lvl_125 begin
        state start begin
        when login with pc.get_level() <= 249 begin
        local lvl = 250
        if pc.get_level() <= 250 then
        while pc.get_level() < lvl do
        pc.give_exp2(pc.get_next_exp())
        end
        end
        end
        end
        end

 

Link to comment
Share on other sites

Please do not kill lua.

  • pc.set_level(amount) already you have this in source

Not tested, only write fast, but need to work this fucking shit.

--[[
###########################
# Quest: Login set level  #
###########################
]]
quest start_login_ begin
    state start begin
--[[@vegasfunctest286
		function test_set_level_(exp)
			while pc.get_level() ~= test[i] do
				pc.give_exp2(pc.get_next_exp2() / exp[i]) end	end
  ]]
		when login with pc.getqf("used_quest") < 1 and pc.get_level() == 1 begin
			local pLevel = 105 -- Level what you want to start
			
			pc.set_level(pLevel)
			pc.setqf("used_quest", 1)
			syschat(string.format("<Debug> Succes set level: %d", pLevel))	
		end
	end
end

 

  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.