Jump to content

Is the 50513 quest workign with lycan wolf ?


Recommended Posts

Hi metin2dev community , i was wondering if somebody withs skills, know about this quest is working with the wolf character ?

or its just for the basic PJ

Thank you very much

 

quest soul_stone begin
    state start begin
	when 50513.use begin
	    say_title("Skill Training")
		-- Bug Fix Piedras almas	
		if pc.count_item(71054) >= 1 then
		say("I'm sorry as long as you have a kingdom change")
		say("In inventory, you will not be able to read this item ")
		say("Leave it in the warehouse.")
		return
		end
		if pc.count_item(71048) >= 1 then
		say("Sorry, as long as you have a sex change item")
		say("In inventory, you will not be able to read this item ")
		say("Leave it in the warehouse.")
		return
		end
		if pc.count_item(71002) >= 1 then
		say("I'm sorry, as long as you have a magic change")
		say("In inventory, you will not be able to read this item ")
		say("Leave it in the warehouse.")
		return
		end	
		if pc.count_item(71003) >= 1 then
		say("Sorry, as long as you have a magic reset")
		say("In inventory, you will not be able to read this item ")
		say("Leave it in the warehouse.")
		return
		end			
		-- Bug Fix Piedras almas		
	   if pc.get_skill_group() == 0 then
		say("You have no skills to improve "..pc.get_skill_group())
		return
	    end
		
	    if get_time() < pc.getqf("next_time") then 
		if pc.is_skill_book_no_delay() then
		    say ( "With this stone you can" ) 
		    say ( "improve your skills." ) 
		    wait()
		    say_title ( "What skill do you want to train " ) 
		else
		    say ( "You have to wait a day to read one again" ) 
			say ( "or should you read an exorcism scroll" )
			say ( "to be able to continue with perfection training" )
		    return
		end
	    end

	    local result = training_grandmaster_skill.BuildGrandMasterSkillList(pc.get_job(), pc.get_skill_group())

	    local vnum_list = result[1]
	    local name_list = result[2]

	    if table.getn(vnum_list) == 0 then
		say ( "There are no skills that can be improved." ) 
		return
	    end

	    say ( "select the skill you want to perfect" ) 
	    say("")

	    local menu_list = {}
	    table.foreach(name_list, function(i, name) table.insert(menu_list, name) end)
	    table.insert(menu_list, "Cancel") 

	    local s=select_table(menu_list)
	    if table.getn(menu_list) == s then
		return
	    end

	    local skill_name=name_list[s]
	    local skill_vnum=vnum_list[s]
	    local skill_level = pc.get_skill_level(skill_vnum)
	    local cur_alignment = pc.get_real_alignment()
	    local need_alignment = 1000+800*(skill_level-30)

	    test_chat("Current rank: "..cur_alignment)
	    test_chat("You need more rank: "..need_alignment)

	    local title = string . format ( "%s Level:  %d de Perfection" , skill_name , skill_level - 30 + 1 ) 

	    say_title(title)
	    say ( "You are in the process of perfecting a skill." ) 
	    say ( "Remember you must have negative karma points. " ) 
	    say("")

	    if cur_alignment<-19000+need_alignment then
		say_reward ( "Your Karma points are too low to continue." ) 
		return
	    end

	    if cur_alignment<0 then
		say_reward ( string . format ( "Karma Points: %d -> %d" , need_alignment , need_alignment * 2 ) ) 
		say_reward ( "Stay within those limits for the best chance of success." ) 
		need_alignment=need_alignment*2
	    elseif cur_alignment<need_alignment then
		say_reward ( string . format ( "Karma Points Needed: %d" , need_alignment ) ) 
		say_reward ( "In any case, your points will be reduced." ) 
	    else
		say_reward ( string . format ( "Karma Points Needed: %d" , need_alignment ) ) 
	    end
	    say("")

	    local s = select ( "Accept" , "Cancel" ) 
	    if s==2 then
		return
	    end


	    if cur_alignment>=0 and cur_alignment<need_alignment then
		say_title ( string . format ( "%s Estado" , title ) ) 
		say ( "You have very little rank'." ) 
		say ( "to read the skill stone," ) 
		say ( "You need a higher number of rank." ) 
		say ( "are you sure you want to read it anyway?." ) 
		say("")
		say_reward ( "Write YES" ) 
		say("")
		say ( "It's serious ... you want to do it?:" ) 
		local s=input()
		if s!="YES" then
		    return
		end
	    end

	    if get_time() < pc.getqf("next_time") then -- and not is_test_server() then
		if pc.is_skill_book_no_delay() then
		    pc.remove_skill_book_no_delay()
		else
		    say ( "[d: remaining" ) 
		    return
		end
	    end

	    pc.setqf("next_time", get_time()+time_hour_to_sec(number(8, 12)))

	    if need_alignment>0 then
		if pc.learn_grand_master_skill(skill_vnum) then
		    pc.change_alignment(-need_alignment)


		    say_title ( string . format ( "%s Completed" , title ) ) 
		    if 40 == pc.get_skill_level(skill_vnum) then
			say(string.format("%s It was already perfect", skill_name))
		    else
			say ( string . format ( "[°ª¯Åµ¥¯Å]You went up %s Al %d Level." , skill_name , skill_level - 30 + 1 + 1 ) ) 
		    end
		    say("")
		    say_reward ( "Perfection Training Successfully!" ) 
		    say_reward ( string . format ( "Lost rank: %d " , need_alignment ) ) 
		    say("")
		else
		    say_title ( string . format ( "%s in progress" , title ) ) 
		    say ( "What a salty day of mine." ) 
		    say("")
		    say_reward ( "Failed perfection training." ) 
		    say("")
		    pc.change_alignment(-number(need_alignment/3, need_alignment/2))
		end
	    end

	    item.remove()
	end
	function BuildGrandMasterSkillList(job, group)
	    GRAND_MASTER_SKILL_LEVEL = 30
	    PERFECT_MASTER_SKILL_LEVEL = 40

	    local skill_list = special.active_skill_list[job+1][group]
	    local ret_vnum_list = {}
	    local ret_name_list = {}

	    -- test_chat(string.format("job=%d, group=%d", job, group))

	    table.foreach(skill_list, 
	    function(i, skill_vnum) 
		local skill_level = pc.get_skill_level(skill_vnum)

		-- test_chat(string.format("[%d]=%d", skill_vnum, skill_level))
		if skill_level >= GRAND_MASTER_SKILL_LEVEL and skill_level < PERFECT_MASTER_SKILL_LEVEL 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)
	    return {ret_vnum_list, ret_name_list}


	    --return {ret_vnum_list, ret_name_list}
	end
    end
end

 

 

Edited by SDlongju2
Link to comment
Share on other sites

  • Replies 0
  • 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.