Jump to content

[PEticion]Quest reset skill


Robert

Recommended Posts


quest skill_reset2 begin

state start begin

when oldwoman.chat."Restablecer habilidades" begin

local cost = 200000 + pc.level * 40

local s = 0

local STAT_RESET_SAY1=

say_title ("Anciana: ")

say ("Hola, has venido al sitio correcto.Tus ojos" )

say ("muestran mucho dolor.Permito a las personas" )

say ("olvidar sus habilidades para que puedan empezar" )

say ("de nuevo.!Quieres olvidar tus habilidades y" )

say ("empezar de nuevo? Cuesta " .. cost .. "Yang.[ENTER]" )

local STAT_RESET_SAY2=

say ("Desea restablecer sus Habilidades?" )

say(STAT_RESET_SAY2)

s = select ( "Resetear Habilidades" , "No restaurar" )

if s==1 then

 

say(STAT_RESET_DETAIL_SAY2)

say ("Despues de resetear tus habilidades" )

say ("Debes desloguear tu cuenta y entrar de nuevo" )

say ("para poder pedir tus habilidades")

s = select ( "Resetear Habilidades" , "No restaurar" ) + 1

end

if s == 2 then

if pc.get_level() < 30 then

if pc.money < cost then

say(locale.oldwoman.not_enough_money)

else

pc.changegold(-cost)

pc.set_skill_group(0)

end

else

say_title("Lo siento")

say("Solo puedo cambiarte tus habilidades")

say("Si eres menor del nivel 30")

say("La única opcion que tienes es utilizar")

say("El reajuste de estado")

say_title("Buena Suerte")

end

end

end

end

end

Link to comment
Share on other sites

quest grandmaster_skills begin
state start begin
when 9006.chat."GrandMaster Skills" begin
	 say_title("Großmeister")
  local seelicount = pc.count_item(50513)
	 if pc.get_skill_group() == 0 then
  say("Du hast keine Fertigkeiten "..pc.get_skill_group())
  return
	 end
	 if get_time() < pc.getqf("next_time") then -- and not is_test_server() then
  if pc.is_skill_book_no_delay() then
	  say("Du hast eine Exo-Rolle Gelesen!")
	  say("Nun kannst du einen weiteren")
	  say("Seelenstein lesen!")
				  say("")
	  wait()
	  say_title("Großmeister")
  else
	  say("Du hast heute Bereits einen Seelenstein gelesen!")
	  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("Du hast keine Fertigkeiten")
  return
	 end
	 say("Fertigkeit Auswählen")
	 say("")
	 local menu_list = {}
	 table.foreach(name_list, function(i, name) table.insert(menu_list, name) end)
	 table.insert(menu_list, "Abbrechen")
	 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+500*(skill_level-30)
	 test_chat("Momentaner Rang: "..cur_alignment)
	 test_chat("Benötigter Rang: "..need_alignment)
	 local title=string.format("%s auf Großmeister  %d lesen", skill_name, skill_level-30+1)
  if pc.count_item(50513) != seelicount then
  say("Stfu Buguser!")
  return
  end
  item.remove()
	 say_title(title)
	 say("Das lesen eines Seelensteines")
	 say("kostet Rangpunke.")
	 say("")
	 if cur_alignment<-19000+need_alignment then
  say_reward("Du hast zu wenig Rang!")
  return
	 end
	 if cur_alignment<0 then
  say_reward(string.format("Benötigter Rang: %d -> %d", need_alignment, need_alignment*2))
  say_reward("Beim klappen des Seelensteins wird dir")
			  say_reward("das doppelte an Rangpunkten abgezoegn!")
  need_alignment=need_alignment*2
	 elseif cur_alignment<need_alignment then
  say_reward(string.format("Benötigter Rang: %d", need_alignment))
  say_reward("Beim klappen des Seelensteins wird dir")
			  say_reward("das doppelte an Rangpunkten abgezoegn!")
	 else
  say_reward(string.format("Benötigter Rang: %d", need_alignment))
	 end
	 say("")
	 local s=select("Lesen", "Abbrechen")
	 if s==2 then
  return
	 end

	 if cur_alignment>=0 and cur_alignment<need_alignment then
  say_title(string.format("%s -Bestätigen", title))
  say("Das Lesen eines Seelensteines kostet Rang,")
  say("wenn du diesen Seelenstein ließt,")
  say("kommst du in -Rang")
  say("Bitte Bestätige das du diesen Seelenstein")
say("wirklich lesen möchtest!")
  say("")
  say_reward("Bestätigen")
  say("")
  say("Bitte gebe 'Trainieren' ein!")
  local s=input()
  if s!="Trainieren" 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("Seelitest1")
	  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 -Erfolgreich", title))
	  if 40 == pc.get_skill_level(skill_vnum) then
   say(string.format("%s Seelitest2.", skill_name))
	  else
   say(string.format("Dein Seelenstein war Erfolgreich!", skill_name, skill_level-30+1+1))
	  end
	  say("")
	  say_reward("Erfolgreich!")
	  say_reward(string.format("Kosten an Rang: %d ", need_alignment))
	  say("")
  else
	  say_title(string.format("%s -Fehlgeschlagen", title))
	  say("Dein Seelenstein hat nicht geklappt.")
	  say("")
	  say_reward("Fehlgeschlagen!")
	  say("")
	  pc.change_alignment(-number(need_alignment/3, need_alignment/2))
  end
	 end
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}
  end
end
end

Sería esto, no me dió tiempo probarla, pero si tiene errores y cuando regrese nadie te ha podido ayudar, pues te ayudo =)

Link to comment
Share on other sites

  • Dilong locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...