Jump to content

Help with quest


Go to solution Solved by [Pro]Lord,

Recommended Posts

Hi,

I am just learning,

i have this quest to make one hab to G when they reach lvl 20 but the quest dont dissapear when i use it, how i can do for the quest only can use one time.

 

Sorry for my english, ty

 

quest habg begin
    state start begin
        when login or levelup with pc.get_level() >= 20 begin
            set_state(info)
        end -- when
    end
    state info begin
        when letter begin
        send_letter("Poderes G")
    end
        when button or info begin
            MAX_LVL_SKILL = 30
            if pc.get_skill_group() != 0 then
                local skill_list = special.active_skill_list[pc.job+1][pc.get_skill_group()]
                local ret_vnum_list, ret_name_list = {}, {}

                table.foreach(skill_list,
                function(i, skill_vnum)
                local skill_level = pc.get_skill_level(skill_vnum)
                if skill_level >= 17 and skill_level < MAX_LVL_SKILL then
                    table.insert(ret_vnum_list, skill_vnum)
                    local name=locale.GM_SKILL_NAME_DICT[skill_vnum]
                    if name == nil then 
                        name=skill_vnum 
                    end
                        table.insert(ret_name_list, name)
                    end
                end)
                if table.getn(ret_name_list) != 0 then 
                    table.insert(ret_name_list, "Cerrar")
                    say_title("Subir habilidad a G")
                    say("[ENTER]Desaparece tras su uso")
                    local sel = select_table(ret_name_list)
                    if sel != table.getn(ret_name_list) then
                        pc.set_skill_level(ret_vnum_list[sel], MAX_LVL_SKILL)
                    end
                end
            end
        end
    end
end

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.