Jump to content
NazoX

Duda Caballo

Recommended Posts

Buenas pues, me preguntaba si alguien tiene las misiones del oficial, esas que te pide medalla y subirlo hasta el 20 y todo eso, si nadie las tiene me puede decir como poner en una quest, que tengan que llevar la medalla y eso? gracias de ante mano :V

Share this post


Link to post
Share on other sites

Esto:

quest horse_levelup begin
state training1 begin
when letter begin
q.set_counter(gameforge.horse_levelup._training_1_count, 5-pc.getqf("kill_count"))
end
when 492.kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_levelup._training_1_count, 5-pc.getqf("kill_count"))
end
when enter begin
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._10_makequestbutton)
q.set_title(gameforge.horse_levelup._10_makequestbutton)
q.start()
if not pc.is_mount() then
setstate(failure)
end

end
when button begin
say_title(gameforge.horse_levelup._10_makequestbutton)
say(gameforge.horse_levelup._20_say)
if not pc.is_mount() then
setstate(failure)
end

end
when info begin
say_title(gameforge.horse_levelup._10_makequestbutton)
say(gameforge.horse_levelup._20_say)
if not pc.is_mount() then
setstate(failure)
end

end
when 492.kill with pc.getqf("kill_count") >= 5 begin
setstate(report)
end
when unmount begin
setstate(failure)
end
end
state training2 begin
when letter begin
q.set_counter(gameforge.horse_levelup._training_2_count, 5-pc.getqf("kill_count"))
end
when 494.kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_levelup._training_2_count, 5-pc.getqf("kill_count"))
end
when enter begin
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._30_makequestbutton)
q.set_title(gameforge.horse_levelup._30_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_levelup._30_makequestbutton)
say(gameforge.horse_levelup._40_say)
end
when info begin
say_title(gameforge.horse_levelup._30_makequestbutton)
say(gameforge.horse_levelup._50_say)
end
when 494.kill with pc.getqf("kill_count") >= 5 begin
setstate(report)
end
when unmount begin
setstate(failure)
end
end
state training3 begin
when letter begin
q.set_counter(gameforge.horse_levelup._training_3_count, 10-pc.getqf("kill_count"))
end
when 635.kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_levelup._training_3_count, 10-pc.getqf("kill_count"))
end
when enter begin
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._60_makequestbutton)
q.set_title(gameforge.horse_levelup._60_makequestbutton)
q.start()
if not pc.is_mount() then
setstate(failure)
end
end
when button begin
say_title(gameforge.horse_levelup._60_makequestbutton)
say(gameforge.horse_levelup._70_say)
if not pc.is_mount() then
setstate(failure)
end
end
when info begin
say(gameforge.horse_levelup._80_say)
if not pc.is_mount() then
setstate(failure)
end
end
when 635.kill with pc.getqf("kill_count") >= 10 begin
setstate(report)
end
when unmount begin
setstate(failure)
end
end
state training4 begin
when letter begin
q.set_counter(gameforge.horse_levelup._training_4_count, 10-pc.getqf("kill_count"))
end
when 636.kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_levelup._training_4_count, 10-pc.getqf("kill_count"))
end
when enter begin
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._90_makequestbutton)
q.set_title(gameforge.horse_levelup._90_makequestbutton)
q.start()
if not pc.is_mount() then
setstate(failure)
end
end
when button begin
say_title(gameforge.horse_levelup._90_makequestbutton)
say(gameforge.horse_levelup._100_say)
if not pc.is_mount() then
setstate(failure)
end
end
when info begin
say_title(gameforge.horse_levelup._90_makequestbutton)
say(gameforge.horse_levelup._100_say)
if not pc.is_mount() then
setstate(failure)
end
end
when 636.kill with pc.getqf("kill_count") >= 10 begin
setstate(report)
end
when unmount begin
setstate(failure)
end
end
state training5 begin
when letter begin
q.set_counter(gameforge.horse_levelup._training_5_count, 10-pc.getqf("kill_count"))
end
when 706.kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_levelup._training_5_count, 10-pc.getqf("kill_count"))
end
when enter begin
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._110_makequestbutton)
q.set_title(gameforge.horse_levelup._110_makequestbutton)
q.start()
if not pc.is_mount() then
setstate(failure)
end
end
when button begin
say_title(gameforge.horse_levelup._110_makequestbutton)
say(gameforge.horse_levelup._120_say)
if not pc.is_mount() then
setstate(failure)
end
end
when info begin
say_title(gameforge.horse_levelup._110_makequestbutton)
say(gameforge.horse_levelup._120_say)
if not pc.is_mount() then
setstate(failure)
end
end
when 706.kill with pc.getqf("kill_count") >= 10 begin
setstate(report)
end
when unmount begin
setstate(failure)
end
end
state training6 begin
when letter begin
q.set_counter(gameforge.horse_levelup._training_6_count, 10-pc.getqf("kill_count"))
end
when 2034.kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_levelup._training_6_count, 10-pc.getqf("kill_count"))
end
when enter begin
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin

setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._130_makequestbutton)
q.set_title(gameforge.horse_levelup._130_makequestbutton)
q.start()
if not pc.is_mount() then
setstate(failure)
end
end
when button begin
say_title(gameforge.horse_levelup._130_makequestbutton)
say(gameforge.horse_levelup._140_say)
if not pc.is_mount() then
setstate(failure)
end
end
when info begin
say_title(gameforge.horse_levelup._130_makequestbutton)
say(gameforge.horse_levelup._140_say)
if not pc.is_mount() then
setstate(failure)
end
end
when 2034.kill with pc.getqf("kill_count") >= 10 begin
setstate(report)
end
when unmount begin
setstate(failure)
end
end
state training7 begin
when letter begin
q.set_counter(gameforge.horse_levelup._training_7_count, 20-pc.getqf("kill_count"))
end
when 2108.kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_levelup._training_7_count, 20-pc.getqf("kill_count"))
end
when enter begin
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._150_makequestbutton)
q.set_title(gameforge.horse_levelup._150_makequestbutton)
q.start()
if not pc.is_mount() then
setstate(failure)
end
end
when button begin
say_title(gameforge.horse_levelup._150_makequestbutton)
say(gameforge.horse_levelup._160_say)
if not pc.is_mount() then
setstate(failure)
end
end
when info begin
say_title(gameforge.horse_levelup._150_makequestbutton)
say(gameforge.horse_levelup._160_say)
if not pc.is_mount() then
setstate(failure)
end
end
when 2108.kill with pc.getqf("kill_count") >= 20 begin
setstate(report)
end
when unmount begin
setstate(failure)
end
end
state training8 begin
when letter begin
q.set_counter(gameforge.horse_levelup._training_8_count, 10-pc.getqf("kill_count"))
end
when 1107.kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_levelup._training_8_count, 10-pc.getqf("kill_count"))
end
when enter begin
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._170_makequestbutton)
q.set_title(gameforge.horse_levelup._170_makequestbutton)
q.start()
if not pc.is_mount() then
setstate(failure)
end
end
when button begin
say_title(gameforge.horse_levelup._180_sayTitle)
say(gameforge.horse_levelup._190_say)
if not pc.is_mount() then
setstate(failure)
end
end
when info begin
say_title(gameforge.horse_levelup._180_sayTitle)
say(gameforge.horse_levelup._200_say)
if not pc.is_mount() then
setstate(failure)
end
end
when 1107.kill with pc.getqf("kill_count") >= 10 begin
setstate(report)
end
when unmount begin
setstate(failure)
end
end
state training9 begin
when letter begin
q.set_counter(gameforge.horse_levelup._training_9_count, 20-pc.getqf("kill_count"))
end
when 2203.kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_levelup._training_9_count, 20-pc.getqf("kill_count"))
end
when enter begin
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._210_makequestbutton)
q.set_title(gameforge.horse_levelup._210_makequestbutton)
q.start()
if not pc.is_mount() then
setstate(failure)
end
end
when button begin
say_title(gameforge.horse_levelup._210_makequestbutton)
say(gameforge.horse_levelup._220_say)
if not pc.is_mount() then
setstate(failure)
end
end
when info begin
say_title(gameforge.horse_levelup._210_makequestbutton)
say(gameforge.horse_levelup._220_say)
if not pc.is_mount() then
setstate(failure)
end
end
when 2203.kill with pc.getqf("kill_count") >= 20 begin
setstate(report)
end
when unmount begin
setstate(failure)
end
end
state start begin
when 20349.chat.gameforge.horse_levelup._230_npcChat with horse.get_grade()==2 begin
if horse.get_level()==20 then
say_title(gameforge.horse_levelup._240_sayTitle)
say(gameforge.horse_levelup._250_say)
elseif pc.countitem("50050")<1 then
say_title(gameforge.horse_levelup._240_sayTitle)
say(gameforge.horse_levelup._260_say)
setstate(need_item50050)
elseif get_time() say_title(gameforge.horse_levelup._240_sayTitle)
say(gameforge.horse_levelup._270_say)
elseif horse.get_stamina_pct()<=10 then
say_title(gameforge.horse_levelup._240_sayTitle)
say(gameforge.horse_levelup._280_say)
elseif horse.get_health_pct()<=10 then
say_title(gameforge.horse_levelup._240_sayTitle)
say(gameforge.horse_levelup._290_say)
elseif horse.is_riding()==0 then
say_title(gameforge.horse_levelup._240_sayTitle)
say(gameforge.horse_levelup._300_say)
elseif (horse.get_level()>=11 and horse.get_level()<=19) then
say_title(gameforge.horse_levelup._240_sayTitle)
say(gameforge.horse_levelup._310_say)
if is_test_server() then
pc.setqf("next_time", get_time()+10)
else
pc.setqf("next_time", get_time()+number(16, 32)*60*60)
end
if horse.get_level()==11 then
setstate(training1)
elseif horse.get_level()==12 then
setstate(training2)
elseif horse.get_level()==13 then
setstate(training3)
elseif horse.get_level()==14 then
setstate(training4)
elseif horse.get_level()==15 then
setstate(training5)
elseif horse.get_level()==16 then
setstate(training6)
elseif horse.get_level()==17 then
setstate(training7)
elseif horse.get_level()==18 then
setstate(training8)
elseif horse.get_level()==19 then
setstate(training9)
end
end
end
end
state need_item50050 begin
when login or levelup or enter with pc.countitem("50050") >= 1 begin
set_state(start)
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._320_makequestbutton)
q.set_title(gameforge.horse_levelup._320_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_levelup._320_makequestbutton)
say(gameforge.horse_levelup._330_say)
setstate(start)
q.done()
end
when info begin
say_title(gameforge.horse_levelup._320_makequestbutton)
say(gameforge.horse_levelup._330_say)
setstate(start)
q.done()
end
end
state failure begin
when login or levelup or enter or letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._340_makequestbutton)
q.set_title(gameforge.horse_levelup._340_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_levelup._340_makequestbutton)
say(gameforge.horse_levelup._350_say)
setstate(start)
q.done()
end
when info begin
say_title(gameforge.horse_levelup._340_makequestbutton)
say(gameforge.horse_levelup._350_say)
setstate(start)
q.done()
end
end
state report begin
when letter begin
local v=find_npc_by_vnum(20349)
if 0==v then
else
target.vid("__TARGET__", v, "")
end
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._360_makequestbutton)
q.set_title(gameforge.horse_levelup._360_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_levelup._360_makequestbutton)
say(gameforge.horse_levelup._370_say)
end
when info begin
say_title(gameforge.horse_levelup._360_makequestbutton)
say(gameforge.horse_levelup._370_say)
end
when __TARGET__.target.click begin
target.delete("__TARGET__")
say_title(gameforge.horse_levelup._240_sayTitle)
say(gameforge.horse_levelup._380_say)
setstate(reward)
q.done()
end
end
state reward begin
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_levelup._390_makequestbutton)
q.set_title(gameforge.horse_levelup._400_qSetTitle)
q.start()
end
when button begin
say_title(gameforge.horse_levelup._400_qSetTitle)
if horse.get_level()<=10 then
say(gameforge.horse_levelup._410_say)
elseif horse.get_level()>=20 then
say(gameforge.horse_levelup._420_say)
elseif (horse.get_level()>=11 and horse.get_level()<=19) then
local s=number(1, 2)
if 1>=s then -- 50.00% (1/2)
say(gameforge.horse_levelup._430_say)
pc.setqf("next_time", 0)
elseif 2>=s then -- 50.00% (1/2)
say(gameforge.horse_levelup._440_say)
if pc.countitem("50050")>=1 then
char_log(0, "HORSE_ADVANCE", "BEGIN")
pc.removeitem("50050", 1)
char_log(0, "HORSE_ADVANCE", "DEC 50050 1")
horse.unride()
horse.advance()
horse.ride()
char_log(0, "HORSE_ADVANCE", "INC horse_advance 1")
char_log(0, "HORSE_ADVANCE", "END")
say(string.format(gameforge.horse_levelup._450_say, (horse.get_level())))
if horse.get_level()==20 then
say(gameforge.horse_levelup._460_say)
pc.setqf("next_time", 0)
else
say(gameforge.horse_levelup._470_say)
end
else
say(gameforge.horse_levelup._480_say)
end
end
end
setstate(start)
q.done()
end
end
state __COMPLETE__ begin
when enter begin
q.done()
end
end
end



quest horse_upgrade begin
state start begin
when 20349.chat.gameforge.horse_upgrade2._10_npcChat with horse.get_grade()==1 and horse.get_level()==10 begin
if horse.is_dead() then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._10_say)
elseif pc.level<=34 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._20_say)
elseif horse.get_level()<=9 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._30_say)
elseif pc.countitem("50050")<1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._50_say)
setstate(need_item50050)
elseif pc.countitem("50051")<1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._40_say)
elseif horse.get_level()==10 and not horse.is_dead() and pc.countitem("50050")>=1 and pc.level>=35 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._50_say)
local b= select(gameforge.find_brother_article._90_select, gameforge.find_brother_article._100_select)
if 1==b then
if pc.countitem("50050")>=1 then
pc.removeitem("50050", 1)
setstate(test)
end
elseif 2==b then
say(gameforge.horse_upgrade._60_say)
else
say(string.format(gameforge.horse_upgrade._70_say, b))
end
else
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._80_say)
end
end
end
state need_item50050 begin
when login or levelup or enter with pc.countitem("50050") >= 1 begin
set_state(start)
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade2._100_makequestbutton)
q.set_title(gameforge.horse_upgrade2._100_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade2._100_makequestbutton)
say_reward(gameforge.horse_upgrade._90_sayReward)
setstate(start)
q.done()
end
when info begin
say_title(gameforge.horse_upgrade2._100_makequestbutton)
say_reward(gameforge.horse_upgrade._90_sayReward)
setstate(start)
q.done()
end
when 20349.chat.gameforge.horse_upgrade2._10_npcChat with horse.get_grade()==1 and horse.get_level()==10 begin
if horse.is_dead() then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._10_say)
elseif pc.level<=34 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._20_say)
elseif horse.get_level()<=9 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._30_say)
elseif pc.countitem("50050")<1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._50_say)
elseif pc.countitem("50051")<1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._40_say)
elseif horse.get_level()==10 and not horse.is_dead() and pc.countitem("50050")>=1 and pc.level>=35 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._50_say)
local b= select(gameforge.find_brother_article._90_select, gameforge.find_brother_article._100_select)
if 1==b then
if pc.countitem("50050")>=1 then
pc.removeitem("50050", 1)
setstate(test)
end
elseif 2==b then
say(gameforge.horse_upgrade._60_say)
else
say(string.format(gameforge.horse_upgrade._70_say, b))
end
else
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._80_say)
end
end
end
state test begin
when letter begin
q.set_counter(gameforge.horse_upgrade._test_2015_count, 100-pc.getqf("kill_count"))
end
when 2105.party_kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_upgrade._test_2015_count, 100-pc.getqf("kill_count"))
if get_time()>=pc.getqf("limit_time") then
setstate(failure)
end
end
when 2107.party_kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_upgrade._test_2107_count, 100-pc.getqf("kill_count"))
if get_time()>=pc.getqf("limit_time") then
setstate(failure)
q.done()
end
end
when letter begin
q.set_clock(gameforge.horse_upgrade2.rest_time, pc.getqf("limit_time")-get_time())
end
when enter begin
pc.setqf("limit_time", get_time()+30*60)
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade._100_makequestbutton)
q.set_title(gameforge.horse_upgrade._100_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade._100_makequestbutton)
say_reward(gameforge.horse_upgrade._110_sayReward)
say_reward(gameforge.horse_upgrade2._140_sayReward)
end
when info begin
say_title(gameforge.horse_upgrade._100_makequestbutton)
say_reward(gameforge.horse_upgrade._110_sayReward)
say_reward(gameforge.horse_upgrade2._140_sayReward)
end
when 2105.party_kill with pc.getqf("kill_count") >= 100 and pc.getqf("kill_count") >= 100 and pc.getqf("limit_time")>=get_time() begin
setstate(report)
end
when 2107.party_kill with pc.getqf("kill_count") >= 100 and pc.getqf("kill_count") >= 100 and pc.getqf("limit_time")>=get_time() begin
setstate(report)
end
when 20349.chat.gameforge.horse_upgrade._120_npcChat begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._130_say)
local b= select(gameforge.locale.levelup.prev_quest_go, gameforge.locale.cancel)
if 1==b then
elseif 2==b then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._170_say)
local b= select(gameforge.horse_upgrade2._180_select, gameforge.horse_upgrade2._190_select)
if 1==b then
say_title(gameforge.horse_levelup._240_sayTitle)
say(gameforge.horse_upgrade2._200_say)
setstate(start)
q.done()
elseif 2==b then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._140_say)
else
say(string.format(gameforge.horse_upgrade2._220_say, b))
end
else
say(string.format(gameforge.horse_upgrade2._220_say, b))
end
end
end
state report begin
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade2._230_makequestbutton)
q.set_title(gameforge.horse_upgrade2._230_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade2._230_makequestbutton)
say_reward(gameforge.horse_upgrade2._240_sayReward)
end
when info begin
say_title(gameforge.horse_upgrade2._230_makequestbutton)
say_reward(gameforge.horse_upgrade2._240_sayReward)
end
when 20349.chat.gameforge.horse_upgrade._150_npcChat with horse.get_grade()!=1 begin
setstate(start)
q.done()
end
when 20349.chat.gameforge.horse_upgrade._160_npcChat with horse.get_grade()==1 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._170_say)
if is_test_server() then
pc.setqf("make_time", get_time()+10)
else
pc.setqf("make_time", get_time()+number(8, 16)*60*60)
end
setstate(wait)
end
end
state wait begin
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade._180_makequestbutton)
q.set_title(gameforge.horse_upgrade._180_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade._180_makequestbutton)
say_reward(gameforge.horse_upgrade._190_sayReward)
end
when info begin
say_title(gameforge.horse_upgrade._180_makequestbutton)
say_reward(gameforge.horse_upgrade._190_sayReward)
end
when login with get_time()>=pc.getqf("make_time") begin
setstate(buy)
end
when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()!=1 begin
setstate(start)
q.done()
end
when 20349.chat.gameforge.horse_upgrade._200_npcChat with horse.get_grade()==1 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._210_say)
end
end
state buy begin
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade2._330_makequestbutton)
q.set_title(gameforge.horse_upgrade2._330_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade2._330_makequestbutton)
say_reward(gameforge.horse_upgrade._220_sayReward)
end
when info begin
say_title(gameforge.horse_upgrade2._330_makequestbutton)
say_reward(gameforge.horse_upgrade._230_sayReward)
end
when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()!=1 begin
setstate(start)
q.done()
end
when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()==1 and horse.get_level()!=10 begin
setstate(start)
q.done()
end
when 20349.chat.gameforge.horse_upgrade._240_npcChat with horse.get_grade()==1 and horse.get_level()==10 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._250_say)
local b= select(gameforge.horse_upgrade2._370_select, gameforge.horse_upgrade2._380_select, gameforge.horse_upgrade2._385_select)
if 1==b then
if pc.money>=500000 then
if pc.countitem("50051")>=1 then
char_log(0, "HORSE_UPGRADE", "BEGIN")
pc.changemoney(-500000)
char_log(0, "HORSE_UPGRADE", "DEC money 500000")
pc.removeitem("50051", 1)
char_log(0, "HORSE_UPGRADE", "DEC 50051 1")
horse.unride()
horse.advance()
horse.ride()
char_log(0, "HORSE_UPGRADE", "INC horse_advance 1")
pc.give_item2("50052", 1)
char_log(0, "HORSE_UPGRADE", "INC 50052 1")
char_log(0, "HORSE_UPGRADE", "END")
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._260_say)
setstate(start)
q.done()
else
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._270_say)
end
else
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._280_say)
end
elseif 2==b then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._290_say)
elseif 3==b then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade._300_say)
local b= select(gameforge.locale.guild.yes, gameforge.locale.guild.no)
if 1==b then
setstate(start)
q.done()
elseif 2==b then
else
say(string.format(gameforge.horse_upgrade2._220_say, b))
end
else
say(string.format(gameforge.horse_upgrade2._220_say, b))
end
end
end
state failure begin
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade2._440_makequestbutton)
q.set_title(gameforge.horse_upgrade2._440_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade2._440_makequestbutton)
say_reward(gameforge.horse_upgrade._310_sayReward)
say_reward(gameforge.horse_upgrade2._460_sayReward)
setstate(start)
q.done()
end
when info begin
say_title(gameforge.horse_upgrade2._440_makequestbutton)
say_reward(gameforge.horse_upgrade._310_sayReward)
say_reward(gameforge.horse_upgrade2._460_sayReward)
setstate(start)
q.done()
end
end
state __COMPLETE__ begin
when enter begin
q.done()
end
end
end



quest horse_revive begin
state start begin
when 20349.chat.gameforge.horse_revive._10_npcChat with horse.get_grade()==3 and horse.is_dead() and pc.countitem("50059")<1 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._20_say)
if pc.countitem("50058")>=1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._30_say)
elseif pc.countitem("50057")>=1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._40_say)
end
end
when 20349.chat.gameforge.horse_revive._10_npcChat with horse.get_grade()==3 and horse.is_dead() and pc.countitem("50059")>=1 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._50_say)
wait()
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._60_say)
horse.summon()
wait()
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._70_say)
if pc.countitem("50059")>=1 then
pc.removeitem("50059", 1)
horse.revive()
end
end
when 20349.chat.gameforge.horse_revive._10_npcChat with horse.get_grade()==2 and horse.is_dead() and pc.countitem("50058")<1 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._80_say)
if pc.countitem("50059")>=1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._90_say)
elseif pc.countitem("50057")>=1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._40_say)
end
end

when 20349.chat.gameforge.horse_revive._100_npcChat with horse.get_grade()==2 and horse.is_dead() and pc.countitem("50058")>=1 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._110_say)
wait()
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._60_say)
horse.summon()
wait()
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._70_say)
if pc.countitem("50058")>=1 then
pc.removeitem("50058", 1)
horse.revive()
end
end

when 20349.chat.gameforge.horse_revive._100_npcChat with horse.get_grade()==1 and horse.is_dead() and pc.countitem("50057")<1 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._120_say)
if pc.countitem("50059")>=1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._90_say)
elseif pc.countitem("50058")>=1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._130_say)
end
end
when 20349.chat.gameforge.horse_revive._10_npcChat with horse.get_grade()==1 and horse.is_dead() and pc.countitem("50057")>=1 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._140_say)
wait()
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._60_say)
horse.summon()
wait()
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_revive._70_say)
if pc.countitem("50057")>=1 then
pc.removeitem("50057", 1)
horse.revive()
end
end
end
state __COMPLETE__ begin
when enter begin
q.done()
end
end
end

("next_time")>

 

 

quest horse_upgrade2 begin
state start begin
when 20349.chat.gameforge.horse_upgrade2._10_npcChat with horse.get_grade()==2 and horse.get_level()==20 begin
if horse.is_dead() then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._20_say)
elseif pc.level<=49 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._30_say)
elseif horse.get_level()<=19 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._40_say)
elseif pc.countitem("50050")<1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._50_say)
setstate(need_item50050)
elseif pc.countitem("50052")<1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._60_say)
elseif horse.get_level()==20 and not horse.is_dead() and pc.countitem("50050")>=1 and pc.level>=50 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._70_say)
local b= select(gameforge.find_brother_article._90_select, gameforge.find_brother_article._100_select)
if 1==b then
if pc.countitem("50050")>=1 then
pc.removeitem("50050", 1)
setstate(test)
end
elseif 2==b then
say(gameforge.horse_upgrade2._80_say)
else
say(string.format(gameforge.buy_fishrod._80_say, b))
end
else
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._90_say)
end
end
end
state need_item50050 begin
when login or levelup or enter with pc.countitem("50050") >= 1 begin
set_state(start)
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade2._100_makequestbutton)
q.set_title(gameforge.horse_upgrade2._100_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade2._100_makequestbutton)
say_reward(gameforge.horse_upgrade2._110_sayReward)
setstate(start)
q.done()
end
when info begin
say_title(gameforge.horse_upgrade2._100_makequestbutton)
say_reward(gameforge.horse_upgrade2._110_sayReward)
setstate(start)
q.done()
end
when 20349.chat.gameforge.horse_upgrade2._10_npcChat with horse.get_grade()==2 and horse.get_level()==20 begin
if horse.is_dead() then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._20_say)
elseif pc.level<=49 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._30_say)
elseif horse.get_level()<=19 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._40_say)
elseif pc.countitem("50050")<1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._50_say)
elseif pc.countitem("50052")<1 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._60_say)
elseif horse.get_level()==20 and not horse.is_dead() and pc.countitem("50050")>=1 and pc.level>=50 then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._70_say)
local b= select(gameforge.find_brother_article._90_select, gameforge.find_brother_article._100_select)
if 1==b then
if pc.countitem("50050")>=1 then
pc.removeitem("50050", 1)
setstate(test)
end
elseif 2==b then
say(gameforge.horse_upgrade2._80_say)
else
say(string.format(gameforge.buy_fishrod._80_say, b))
end
else
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._90_say)
end
end
end
state test begin
when letter begin
q.set_counter(gameforge.horse_upgrade2._test_1002_count, 300-pc.getqf("kill_count"))
end
when 1002.party_kill begin
pc.setqf("kill_count", pc.getqf("kill_count")+1)
q.set_counter(gameforge.horse_upgrade2._test_1002_count, 300-pc.getqf("kill_count"))
if get_time()>=pc.getqf("limit_time") then
setstate(failure)
q.done()
end
end
when letter begin
q.set_clock(gameforge.horse_upgrade2.rest_time, pc.getqf("limit_time")-get_time())
end
when enter begin
pc.setqf("limit_time", get_time()+30*60)
pc.setqf("kill_count", 0)
end
when leave begin
q.done()
end
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade2._120_makequestbutton)
q.set_title(gameforge.horse_upgrade2._120_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade2._120_makequestbutton)
say_reward(gameforge.horse_upgrade2._130_sayReward)
say_reward(gameforge.horse_upgrade2._140_sayReward)
end
when info begin
say_title(gameforge.horse_upgrade2._120_makequestbutton)
say_reward(gameforge.horse_upgrade2._130_sayReward)
say_reward(gameforge.horse_upgrade2._140_sayReward)
end
when 1002.party_kill with pc.getqf("kill_count") >= 300 and pc.getqf("limit_time")>=get_time() begin
setstate(report)
end
when 20349.chat.gameforge.horse_upgrade2._150_npcChat begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._160_say)
local b= select(gameforge.locale.levelup.prev_quest_go, gameforge.locale.cancel)
if 1==b then
elseif 2==b then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._170_say)
local b= select(gameforge.horse_upgrade2._180_select, gameforge.horse_upgrade2._190_select)
if 1==b then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._200_say)
setstate(start)
q.done()
elseif 2==b then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._210_say)
else
say(string.format(gameforge.horse_upgrade2._220_say, b))
end
else
say(string.format(gameforge.horse_upgrade2._220_say, b))
end
end
end
state report begin
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade2._230_makequestbutton)
q.set_title(gameforge.horse_upgrade2._230_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade2._230_makequestbutton)
say_reward(gameforge.horse_upgrade2._240_sayReward)
end
when info begin
say_title(gameforge.horse_upgrade2._230_makequestbutton)
say_reward(gameforge.horse_upgrade2._240_sayReward)
end
when 20349.chat.gameforge.horse_upgrade2._250_npcChat with horse.get_grade()!=2 begin
setstate(start)
q.done()
end
when 20349.chat.gameforge.horse_upgrade2._260_npcChat with horse.get_grade()==2 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._270_say)
if is_test_server() then
pc.setqf("make_time", get_time()+10)
else
pc.setqf("make_time", get_time()+number(8, 16)*60*60)
end
setstate(wait)
end
end
state wait begin
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade2._280_makequestbutton)
q.set_title(gameforge.horse_upgrade2._280_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade2._280_makequestbutton)
say_reward(gameforge.horse_upgrade2._290_sayReward)
end
when info begin
say_title(gameforge.horse_upgrade2._280_makequestbutton)
say_reward(gameforge.horse_upgrade2._290_sayReward)
end
when login with get_time()>=pc.getqf("make_time") begin
setstate(buy)
end
when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()!=2 begin
setstate(start)
q.done()
end
when 20349.chat.gameforge.horse_upgrade2._310_npcChat with horse.get_grade()==2 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._320_say)
end
end
state buy begin
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade2._330_makequestbutton)
q.set_title(gameforge.horse_upgrade2._330_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade2._330_makequestbutton)
say_reward(gameforge.horse_upgrade2._340_sayReward)
end
when info begin
say_title(gameforge.horse_upgrade2._330_makequestbutton)
say_reward(gameforge.horse_upgrade2._340_sayReward)
end
when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()!=2 begin
setstate(start)
q.done()
end
when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()==2 and horse.get_level()!=20 begin
setstate(start)
q.done()
end
when 20349.chat.gameforge.horse_upgrade2._350_npcChat with horse.get_grade()==2 and horse.get_level()==20 begin
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._360_say)
local b= select(gameforge.horse_upgrade2._370_select, gameforge.horse_upgrade2._380_select, gameforge.horse_upgrade2._385_select)
if 1==b then
if pc.money>=1000000 then
if pc.countitem("50052")>=1 then
char_log(0, "HORSE_UPGRADE2", "BEGIN")
pc.changemoney(-1000000)
char_log(0, "HORSE_UPGRADE2", "DEC money 1000000")
pc.removeitem("50052", 1)
char_log(0, "HORSE_UPGRADE2", "DEC 50052 1")
horse.unride()
horse.advance()
horse.ride()
char_log(0, "HORSE_UPGRADE2", "INC horse_advance 1")
pc.give_item2("50053", 1)
char_log(0, "HORSE_UPGRADE2", "INC 50053 1")
pc.give_item2("50060", 1)
char_log(0, "HORSE_UPGRADE2", "INC 50060 1")
char_log(0, "HORSE_UPGRADE2", "END")
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._390_say)
setstate(start)
q.done()
else
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._400_say)
end
else
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._410_say)
end
elseif 2==b then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._420_say)
elseif 3==b then
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_upgrade2._430_say)
local b= select(gameforge.locale.guild.yes, gameforge.locale.guild.no)
if 1==b then
setstate(start)
elseif 2==b then
else
say(string.format(gameforge.find_squareguard._70_say, b))
end
else
say(string.format(gameforge.find_squareguard._70_say, b))
end
end
end
state failure begin
when letter begin
setskin(NOWINDOW)
makequestbutton(gameforge.horse_upgrade2._440_makequestbutton)
q.set_title(gameforge.horse_upgrade2._440_makequestbutton)
q.start()
end
when button begin
say_title(gameforge.horse_upgrade2._440_makequestbutton)
say_reward(gameforge.horse_upgrade2._450_sayReward)
say_reward(gameforge.horse_upgrade2._460_sayReward)
setstate(start)
q.done()
end
when info begin
say_title(gameforge.horse_upgrade2._440_makequestbutton)
say_reward(gameforge.horse_upgrade2._450_sayReward)
say_reward(gameforge.horse_upgrade2._460_sayReward)
setstate(start)
q.done()
end
end
state __COMPLETE__ begin
when enter begin
q.done()
end
end
end



quest horse_ride begin
state start begin
when 20349.chat.gameforge.horse_ride._10_npcChat with pc.level>=10 and not pc.is_mount() begin
if get_global_time() - pc.getqf("Reitzeit") < 3600 then
say(gameforge.horse_ride._15_say)
else
local msg =
say_title(gameforge.horse_exchange_ticket._20_sayTitle)
say(gameforge.horse_ride._20_say)
local horse_ticket_vnum = 50083
say(msg)
local s= select(gameforge.locale.quiz_5_3_choice, gameforge.horse_ride._30_select)
if s==1 then
if pc.countitem(horse_ticket_vnum)>0 then
if true == horse.is_summon() then
horse.unsummon()
end

pc.removeitem(horse_ticket_vnum, 1)
pc.mount(20030, 600)
pc.setqf("Reitzeit", get_global_time())
else
say(gameforge.horse_ride._40_say)
end
end
end
end
end
end


("next_time")>
 

Share this post


Link to post
Share on other sites

Esto:

 

quest horse_levelup begin

state training1 begin

when letter begin

q.set_counter(gameforge.horse_levelup._training_1_count, 5-pc.getqf("kill_count"))

end

when 492.kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_levelup._training_1_count, 5-pc.getqf("kill_count"))

end

when enter begin

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._10_makequestbutton)

q.set_title(gameforge.horse_levelup._10_makequestbutton)

q.start()

if not pc.is_mount() then

setstate(failure)

end

 

end

when button begin

say_title(gameforge.horse_levelup._10_makequestbutton)

say(gameforge.horse_levelup._20_say)

if not pc.is_mount() then

setstate(failure)

end

 

end

when info begin

say_title(gameforge.horse_levelup._10_makequestbutton)

say(gameforge.horse_levelup._20_say)

if not pc.is_mount() then

setstate(failure)

end

 

end

when 492.kill with pc.getqf("kill_count") >= 5 begin

setstate(report)

end

when unmount begin

setstate(failure)

end

end

state training2 begin

when letter begin

q.set_counter(gameforge.horse_levelup._training_2_count, 5-pc.getqf("kill_count"))

end

when 494.kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_levelup._training_2_count, 5-pc.getqf("kill_count"))

end

when enter begin

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._30_makequestbutton)

q.set_title(gameforge.horse_levelup._30_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_levelup._30_makequestbutton)

say(gameforge.horse_levelup._40_say)

end

when info begin

say_title(gameforge.horse_levelup._30_makequestbutton)

say(gameforge.horse_levelup._50_say)

end

when 494.kill with pc.getqf("kill_count") >= 5 begin

setstate(report)

end

when unmount begin

setstate(failure)

end

end

state training3 begin

when letter begin

q.set_counter(gameforge.horse_levelup._training_3_count, 10-pc.getqf("kill_count"))

end

when 635.kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_levelup._training_3_count, 10-pc.getqf("kill_count"))

end

when enter begin

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._60_makequestbutton)

q.set_title(gameforge.horse_levelup._60_makequestbutton)

q.start()

if not pc.is_mount() then

setstate(failure)

end

end

when button begin

say_title(gameforge.horse_levelup._60_makequestbutton)

say(gameforge.horse_levelup._70_say)

if not pc.is_mount() then

setstate(failure)

end

end

when info begin

say(gameforge.horse_levelup._80_say)

if not pc.is_mount() then

setstate(failure)

end

end

when 635.kill with pc.getqf("kill_count") >= 10 begin

setstate(report)

end

when unmount begin

setstate(failure)

end

end

state training4 begin

when letter begin

q.set_counter(gameforge.horse_levelup._training_4_count, 10-pc.getqf("kill_count"))

end

when 636.kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_levelup._training_4_count, 10-pc.getqf("kill_count"))

end

when enter begin

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._90_makequestbutton)

q.set_title(gameforge.horse_levelup._90_makequestbutton)

q.start()

if not pc.is_mount() then

setstate(failure)

end

end

when button begin

say_title(gameforge.horse_levelup._90_makequestbutton)

say(gameforge.horse_levelup._100_say)

if not pc.is_mount() then

setstate(failure)

end

end

when info begin

say_title(gameforge.horse_levelup._90_makequestbutton)

say(gameforge.horse_levelup._100_say)

if not pc.is_mount() then

setstate(failure)

end

end

when 636.kill with pc.getqf("kill_count") >= 10 begin

setstate(report)

end

when unmount begin

setstate(failure)

end

end

state training5 begin

when letter begin

q.set_counter(gameforge.horse_levelup._training_5_count, 10-pc.getqf("kill_count"))

end

when 706.kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_levelup._training_5_count, 10-pc.getqf("kill_count"))

end

when enter begin

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._110_makequestbutton)

q.set_title(gameforge.horse_levelup._110_makequestbutton)

q.start()

if not pc.is_mount() then

setstate(failure)

end

end

when button begin

say_title(gameforge.horse_levelup._110_makequestbutton)

say(gameforge.horse_levelup._120_say)

if not pc.is_mount() then

setstate(failure)

end

end

when info begin

say_title(gameforge.horse_levelup._110_makequestbutton)

say(gameforge.horse_levelup._120_say)

if not pc.is_mount() then

setstate(failure)

end

end

when 706.kill with pc.getqf("kill_count") >= 10 begin

setstate(report)

end

when unmount begin

setstate(failure)

end

end

state training6 begin

when letter begin

q.set_counter(gameforge.horse_levelup._training_6_count, 10-pc.getqf("kill_count"))

end

when 2034.kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_levelup._training_6_count, 10-pc.getqf("kill_count"))

end

when enter begin

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

 

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._130_makequestbutton)

q.set_title(gameforge.horse_levelup._130_makequestbutton)

q.start()

if not pc.is_mount() then

setstate(failure)

end

end

when button begin

say_title(gameforge.horse_levelup._130_makequestbutton)

say(gameforge.horse_levelup._140_say)

if not pc.is_mount() then

setstate(failure)

end

end

when info begin

say_title(gameforge.horse_levelup._130_makequestbutton)

say(gameforge.horse_levelup._140_say)

if not pc.is_mount() then

setstate(failure)

end

end

when 2034.kill with pc.getqf("kill_count") >= 10 begin

setstate(report)

end

when unmount begin

setstate(failure)

end

end

state training7 begin

when letter begin

q.set_counter(gameforge.horse_levelup._training_7_count, 20-pc.getqf("kill_count"))

end

when 2108.kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_levelup._training_7_count, 20-pc.getqf("kill_count"))

end

when enter begin

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._150_makequestbutton)

q.set_title(gameforge.horse_levelup._150_makequestbutton)

q.start()

if not pc.is_mount() then

setstate(failure)

end

end

when button begin

say_title(gameforge.horse_levelup._150_makequestbutton)

say(gameforge.horse_levelup._160_say)

if not pc.is_mount() then

setstate(failure)

end

end

when info begin

say_title(gameforge.horse_levelup._150_makequestbutton)

say(gameforge.horse_levelup._160_say)

if not pc.is_mount() then

setstate(failure)

end

end

when 2108.kill with pc.getqf("kill_count") >= 20 begin

setstate(report)

end

when unmount begin

setstate(failure)

end

end

state training8 begin

when letter begin

q.set_counter(gameforge.horse_levelup._training_8_count, 10-pc.getqf("kill_count"))

end

when 1107.kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_levelup._training_8_count, 10-pc.getqf("kill_count"))

end

when enter begin

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._170_makequestbutton)

q.set_title(gameforge.horse_levelup._170_makequestbutton)

q.start()

if not pc.is_mount() then

setstate(failure)

end

end

when button begin

say_title(gameforge.horse_levelup._180_sayTitle)

say(gameforge.horse_levelup._190_say)

if not pc.is_mount() then

setstate(failure)

end

end

when info begin

say_title(gameforge.horse_levelup._180_sayTitle)

say(gameforge.horse_levelup._200_say)

if not pc.is_mount() then

setstate(failure)

end

end

when 1107.kill with pc.getqf("kill_count") >= 10 begin

setstate(report)

end

when unmount begin

setstate(failure)

end

end

state training9 begin

when letter begin

q.set_counter(gameforge.horse_levelup._training_9_count, 20-pc.getqf("kill_count"))

end

when 2203.kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_levelup._training_9_count, 20-pc.getqf("kill_count"))

end

when enter begin

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._210_makequestbutton)

q.set_title(gameforge.horse_levelup._210_makequestbutton)

q.start()

if not pc.is_mount() then

setstate(failure)

end

end

when button begin

say_title(gameforge.horse_levelup._210_makequestbutton)

say(gameforge.horse_levelup._220_say)

if not pc.is_mount() then

setstate(failure)

end

end

when info begin

say_title(gameforge.horse_levelup._210_makequestbutton)

say(gameforge.horse_levelup._220_say)

if not pc.is_mount() then

setstate(failure)

end

end

when 2203.kill with pc.getqf("kill_count") >= 20 begin

setstate(report)

end

when unmount begin

setstate(failure)

end

end

state start begin

when 20349.chat.gameforge.horse_levelup._230_npcChat with horse.get_grade()==2 begin

if horse.get_level()==20 then

say_title(gameforge.horse_levelup._240_sayTitle)

say(gameforge.horse_levelup._250_say)

elseif pc.countitem("50050")<1 then

say_title(gameforge.horse_levelup._240_sayTitle)

say(gameforge.horse_levelup._260_say)

setstate(need_item50050)

elseif get_time() say_title(gameforge.horse_levelup._240_sayTitle)

say(gameforge.horse_levelup._270_say)

elseif horse.get_stamina_pct()<=10 then

say_title(gameforge.horse_levelup._240_sayTitle)

say(gameforge.horse_levelup._280_say)

elseif horse.get_health_pct()<=10 then

say_title(gameforge.horse_levelup._240_sayTitle)

say(gameforge.horse_levelup._290_say)

elseif horse.is_riding()==0 then

say_title(gameforge.horse_levelup._240_sayTitle)

say(gameforge.horse_levelup._300_say)

elseif (horse.get_level()>=11 and horse.get_level()<=19) then

say_title(gameforge.horse_levelup._240_sayTitle)

say(gameforge.horse_levelup._310_say)

if is_test_server() then

pc.setqf("next_time", get_time()+10)

else

pc.setqf("next_time", get_time()+number(16, 32)*60*60)

end

if horse.get_level()==11 then

setstate(training1)

elseif horse.get_level()==12 then

setstate(training2)

elseif horse.get_level()==13 then

setstate(training3)

elseif horse.get_level()==14 then

setstate(training4)

elseif horse.get_level()==15 then

setstate(training5)

elseif horse.get_level()==16 then

setstate(training6)

elseif horse.get_level()==17 then

setstate(training7)

elseif horse.get_level()==18 then

setstate(training8)

elseif horse.get_level()==19 then

setstate(training9)

end

end

end

end

state need_item50050 begin

when login or levelup or enter with pc.countitem("50050") >= 1 begin

set_state(start)

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._320_makequestbutton)

q.set_title(gameforge.horse_levelup._320_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_levelup._320_makequestbutton)

say(gameforge.horse_levelup._330_say)

setstate(start)

q.done()

end

when info begin

say_title(gameforge.horse_levelup._320_makequestbutton)

say(gameforge.horse_levelup._330_say)

setstate(start)

q.done()

end

end

state failure begin

when login or levelup or enter or letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._340_makequestbutton)

q.set_title(gameforge.horse_levelup._340_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_levelup._340_makequestbutton)

say(gameforge.horse_levelup._350_say)

setstate(start)

q.done()

end

when info begin

say_title(gameforge.horse_levelup._340_makequestbutton)

say(gameforge.horse_levelup._350_say)

setstate(start)

q.done()

end

end

state report begin

when letter begin

local v=find_npc_by_vnum(20349)

if 0==v then

else

target.vid("__TARGET__", v, "")

end

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._360_makequestbutton)

q.set_title(gameforge.horse_levelup._360_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_levelup._360_makequestbutton)

say(gameforge.horse_levelup._370_say)

end

when info begin

say_title(gameforge.horse_levelup._360_makequestbutton)

say(gameforge.horse_levelup._370_say)

end

when __TARGET__.target.click begin

target.delete("__TARGET__")

say_title(gameforge.horse_levelup._240_sayTitle)

say(gameforge.horse_levelup._380_say)

setstate(reward)

q.done()

end

end

state reward begin

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_levelup._390_makequestbutton)

q.set_title(gameforge.horse_levelup._400_qSetTitle)

q.start()

end

when button begin

say_title(gameforge.horse_levelup._400_qSetTitle)

if horse.get_level()<=10 then

say(gameforge.horse_levelup._410_say)

elseif horse.get_level()>=20 then

say(gameforge.horse_levelup._420_say)

elseif (horse.get_level()>=11 and horse.get_level()<=19) then

local s=number(1, 2)

if 1>=s then -- 50.00% (1/2)

say(gameforge.horse_levelup._430_say)

pc.setqf("next_time", 0)

elseif 2>=s then -- 50.00% (1/2)

say(gameforge.horse_levelup._440_say)

if pc.countitem("50050")>=1 then

char_log(0, "HORSE_ADVANCE", "BEGIN")

pc.removeitem("50050", 1)

char_log(0, "HORSE_ADVANCE", "DEC 50050 1")

horse.unride()

horse.advance()

horse.ride()

char_log(0, "HORSE_ADVANCE", "INC horse_advance 1")

char_log(0, "HORSE_ADVANCE", "END")

say(string.format(gameforge.horse_levelup._450_say, (horse.get_level())))

if horse.get_level()==20 then

say(gameforge.horse_levelup._460_say)

pc.setqf("next_time", 0)

else

say(gameforge.horse_levelup._470_say)

end

else

say(gameforge.horse_levelup._480_say)

end

end

end

setstate(start)

q.done()

end

end

state __COMPLETE__ begin

when enter begin

q.done()

end

end

end

 

 

 

 

quest horse_upgrade begin

state start begin

when 20349.chat.gameforge.horse_upgrade2._10_npcChat with horse.get_grade()==1 and horse.get_level()==10 begin

if horse.is_dead() then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._10_say)

elseif pc.level<=34 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._20_say)

elseif horse.get_level()<=9 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._30_say)

elseif pc.countitem("50050")<1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._50_say)

setstate(need_item50050)

elseif pc.countitem("50051")<1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._40_say)

elseif horse.get_level()==10 and not horse.is_dead() and pc.countitem("50050")>=1 and pc.level>=35 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._50_say)

local b= select(gameforge.find_brother_article._90_select, gameforge.find_brother_article._100_select)

if 1==b then

if pc.countitem("50050")>=1 then

pc.removeitem("50050", 1)

setstate(test)

end

elseif 2==b then

say(gameforge.horse_upgrade._60_say)

else

say(string.format(gameforge.horse_upgrade._70_say, b))

end

else

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._80_say)

end

end

end

state need_item50050 begin

when login or levelup or enter with pc.countitem("50050") >= 1 begin

set_state(start)

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade2._100_makequestbutton)

q.set_title(gameforge.horse_upgrade2._100_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade2._100_makequestbutton)

say_reward(gameforge.horse_upgrade._90_sayReward)

setstate(start)

q.done()

end

when info begin

say_title(gameforge.horse_upgrade2._100_makequestbutton)

say_reward(gameforge.horse_upgrade._90_sayReward)

setstate(start)

q.done()

end

when 20349.chat.gameforge.horse_upgrade2._10_npcChat with horse.get_grade()==1 and horse.get_level()==10 begin

if horse.is_dead() then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._10_say)

elseif pc.level<=34 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._20_say)

elseif horse.get_level()<=9 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._30_say)

elseif pc.countitem("50050")<1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._50_say)

elseif pc.countitem("50051")<1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._40_say)

elseif horse.get_level()==10 and not horse.is_dead() and pc.countitem("50050")>=1 and pc.level>=35 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._50_say)

local b= select(gameforge.find_brother_article._90_select, gameforge.find_brother_article._100_select)

if 1==b then

if pc.countitem("50050")>=1 then

pc.removeitem("50050", 1)

setstate(test)

end

elseif 2==b then

say(gameforge.horse_upgrade._60_say)

else

say(string.format(gameforge.horse_upgrade._70_say, b))

end

else

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._80_say)

end

end

end

state test begin

when letter begin

q.set_counter(gameforge.horse_upgrade._test_2015_count, 100-pc.getqf("kill_count"))

end

when 2105.party_kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_upgrade._test_2015_count, 100-pc.getqf("kill_count"))

if get_time()>=pc.getqf("limit_time") then

setstate(failure)

end

end

when 2107.party_kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_upgrade._test_2107_count, 100-pc.getqf("kill_count"))

if get_time()>=pc.getqf("limit_time") then

setstate(failure)

q.done()

end

end

when letter begin

q.set_clock(gameforge.horse_upgrade2.rest_time, pc.getqf("limit_time")-get_time())

end

when enter begin

pc.setqf("limit_time", get_time()+30*60)

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade._100_makequestbutton)

q.set_title(gameforge.horse_upgrade._100_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade._100_makequestbutton)

say_reward(gameforge.horse_upgrade._110_sayReward)

say_reward(gameforge.horse_upgrade2._140_sayReward)

end

when info begin

say_title(gameforge.horse_upgrade._100_makequestbutton)

say_reward(gameforge.horse_upgrade._110_sayReward)

say_reward(gameforge.horse_upgrade2._140_sayReward)

end

when 2105.party_kill with pc.getqf("kill_count") >= 100 and pc.getqf("kill_count") >= 100 and pc.getqf("limit_time")>=get_time() begin

setstate(report)

end

when 2107.party_kill with pc.getqf("kill_count") >= 100 and pc.getqf("kill_count") >= 100 and pc.getqf("limit_time")>=get_time() begin

setstate(report)

end

when 20349.chat.gameforge.horse_upgrade._120_npcChat begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._130_say)

local b= select(gameforge.locale.levelup.prev_quest_go, gameforge.locale.cancel)

if 1==b then

elseif 2==b then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._170_say)

local b= select(gameforge.horse_upgrade2._180_select, gameforge.horse_upgrade2._190_select)

if 1==b then

say_title(gameforge.horse_levelup._240_sayTitle)

say(gameforge.horse_upgrade2._200_say)

setstate(start)

q.done()

elseif 2==b then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._140_say)

else

say(string.format(gameforge.horse_upgrade2._220_say, b))

end

else

say(string.format(gameforge.horse_upgrade2._220_say, b))

end

end

end

state report begin

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade2._230_makequestbutton)

q.set_title(gameforge.horse_upgrade2._230_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade2._230_makequestbutton)

say_reward(gameforge.horse_upgrade2._240_sayReward)

end

when info begin

say_title(gameforge.horse_upgrade2._230_makequestbutton)

say_reward(gameforge.horse_upgrade2._240_sayReward)

end

when 20349.chat.gameforge.horse_upgrade._150_npcChat with horse.get_grade()!=1 begin

setstate(start)

q.done()

end

when 20349.chat.gameforge.horse_upgrade._160_npcChat with horse.get_grade()==1 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._170_say)

if is_test_server() then

pc.setqf("make_time", get_time()+10)

else

pc.setqf("make_time", get_time()+number(8, 16)*60*60)

end

setstate(wait)

end

end

state wait begin

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade._180_makequestbutton)

q.set_title(gameforge.horse_upgrade._180_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade._180_makequestbutton)

say_reward(gameforge.horse_upgrade._190_sayReward)

end

when info begin

say_title(gameforge.horse_upgrade._180_makequestbutton)

say_reward(gameforge.horse_upgrade._190_sayReward)

end

when login with get_time()>=pc.getqf("make_time") begin

setstate(buy)

end

when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()!=1 begin

setstate(start)

q.done()

end

when 20349.chat.gameforge.horse_upgrade._200_npcChat with horse.get_grade()==1 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._210_say)

end

end

state buy begin

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade2._330_makequestbutton)

q.set_title(gameforge.horse_upgrade2._330_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade2._330_makequestbutton)

say_reward(gameforge.horse_upgrade._220_sayReward)

end

when info begin

say_title(gameforge.horse_upgrade2._330_makequestbutton)

say_reward(gameforge.horse_upgrade._230_sayReward)

end

when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()!=1 begin

setstate(start)

q.done()

end

when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()==1 and horse.get_level()!=10 begin

setstate(start)

q.done()

end

when 20349.chat.gameforge.horse_upgrade._240_npcChat with horse.get_grade()==1 and horse.get_level()==10 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._250_say)

local b= select(gameforge.horse_upgrade2._370_select, gameforge.horse_upgrade2._380_select, gameforge.horse_upgrade2._385_select)

if 1==b then

if pc.money>=500000 then

if pc.countitem("50051")>=1 then

char_log(0, "HORSE_UPGRADE", "BEGIN")

pc.changemoney(-500000)

char_log(0, "HORSE_UPGRADE", "DEC money 500000")

pc.removeitem("50051", 1)

char_log(0, "HORSE_UPGRADE", "DEC 50051 1")

horse.unride()

horse.advance()

horse.ride()

char_log(0, "HORSE_UPGRADE", "INC horse_advance 1")

pc.give_item2("50052", 1)

char_log(0, "HORSE_UPGRADE", "INC 50052 1")

char_log(0, "HORSE_UPGRADE", "END")

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._260_say)

setstate(start)

q.done()

else

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._270_say)

end

else

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._280_say)

end

elseif 2==b then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._290_say)

elseif 3==b then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade._300_say)

local b= select(gameforge.locale.guild.yes, gameforge.locale.guild.no)

if 1==b then

setstate(start)

q.done()

elseif 2==b then

else

say(string.format(gameforge.horse_upgrade2._220_say, b))

end

else

say(string.format(gameforge.horse_upgrade2._220_say, b))

end

end

end

state failure begin

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade2._440_makequestbutton)

q.set_title(gameforge.horse_upgrade2._440_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade2._440_makequestbutton)

say_reward(gameforge.horse_upgrade._310_sayReward)

say_reward(gameforge.horse_upgrade2._460_sayReward)

setstate(start)

q.done()

end

when info begin

say_title(gameforge.horse_upgrade2._440_makequestbutton)

say_reward(gameforge.horse_upgrade._310_sayReward)

say_reward(gameforge.horse_upgrade2._460_sayReward)

setstate(start)

q.done()

end

end

state __COMPLETE__ begin

when enter begin

q.done()

end

end

end

 

 

 

 

quest horse_revive begin

state start begin

when 20349.chat.gameforge.horse_revive._10_npcChat with horse.get_grade()==3 and horse.is_dead() and pc.countitem("50059")<1 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._20_say)

if pc.countitem("50058")>=1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._30_say)

elseif pc.countitem("50057")>=1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._40_say)

end

end

when 20349.chat.gameforge.horse_revive._10_npcChat with horse.get_grade()==3 and horse.is_dead() and pc.countitem("50059")>=1 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._50_say)

wait()

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._60_say)

horse.summon()

wait()

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._70_say)

if pc.countitem("50059")>=1 then

pc.removeitem("50059", 1)

horse.revive()

end

end

when 20349.chat.gameforge.horse_revive._10_npcChat with horse.get_grade()==2 and horse.is_dead() and pc.countitem("50058")<1 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._80_say)

if pc.countitem("50059")>=1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._90_say)

elseif pc.countitem("50057")>=1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._40_say)

end

end

 

when 20349.chat.gameforge.horse_revive._100_npcChat with horse.get_grade()==2 and horse.is_dead() and pc.countitem("50058")>=1 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._110_say)

wait()

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._60_say)

horse.summon()

wait()

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._70_say)

if pc.countitem("50058")>=1 then

pc.removeitem("50058", 1)

horse.revive()

end

end

 

when 20349.chat.gameforge.horse_revive._100_npcChat with horse.get_grade()==1 and horse.is_dead() and pc.countitem("50057")<1 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._120_say)

if pc.countitem("50059")>=1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._90_say)

elseif pc.countitem("50058")>=1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._130_say)

end

end

when 20349.chat.gameforge.horse_revive._10_npcChat with horse.get_grade()==1 and horse.is_dead() and pc.countitem("50057")>=1 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._140_say)

wait()

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._60_say)

horse.summon()

wait()

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_revive._70_say)

if pc.countitem("50057")>=1 then

pc.removeitem("50057", 1)

horse.revive()

end

end

end

state __COMPLETE__ begin

when enter begin

q.done()

end

end

end

 

 

("next_time")>

 

 

quest horse_upgrade2 begin

state start begin

when 20349.chat.gameforge.horse_upgrade2._10_npcChat with horse.get_grade()==2 and horse.get_level()==20 begin

if horse.is_dead() then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._20_say)

elseif pc.level<=49 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._30_say)

elseif horse.get_level()<=19 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._40_say)

elseif pc.countitem("50050")<1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._50_say)

setstate(need_item50050)

elseif pc.countitem("50052")<1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._60_say)

elseif horse.get_level()==20 and not horse.is_dead() and pc.countitem("50050")>=1 and pc.level>=50 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._70_say)

local b= select(gameforge.find_brother_article._90_select, gameforge.find_brother_article._100_select)

if 1==b then

if pc.countitem("50050")>=1 then

pc.removeitem("50050", 1)

setstate(test)

end

elseif 2==b then

say(gameforge.horse_upgrade2._80_say)

else

say(string.format(gameforge.buy_fishrod._80_say, b))

end

else

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._90_say)

end

end

end

state need_item50050 begin

when login or levelup or enter with pc.countitem("50050") >= 1 begin

set_state(start)

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade2._100_makequestbutton)

q.set_title(gameforge.horse_upgrade2._100_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade2._100_makequestbutton)

say_reward(gameforge.horse_upgrade2._110_sayReward)

setstate(start)

q.done()

end

when info begin

say_title(gameforge.horse_upgrade2._100_makequestbutton)

say_reward(gameforge.horse_upgrade2._110_sayReward)

setstate(start)

q.done()

end

when 20349.chat.gameforge.horse_upgrade2._10_npcChat with horse.get_grade()==2 and horse.get_level()==20 begin

if horse.is_dead() then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._20_say)

elseif pc.level<=49 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._30_say)

elseif horse.get_level()<=19 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._40_say)

elseif pc.countitem("50050")<1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._50_say)

elseif pc.countitem("50052")<1 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._60_say)

elseif horse.get_level()==20 and not horse.is_dead() and pc.countitem("50050")>=1 and pc.level>=50 then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._70_say)

local b= select(gameforge.find_brother_article._90_select, gameforge.find_brother_article._100_select)

if 1==b then

if pc.countitem("50050")>=1 then

pc.removeitem("50050", 1)

setstate(test)

end

elseif 2==b then

say(gameforge.horse_upgrade2._80_say)

else

say(string.format(gameforge.buy_fishrod._80_say, b))

end

else

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._90_say)

end

end

end

state test begin

when letter begin

q.set_counter(gameforge.horse_upgrade2._test_1002_count, 300-pc.getqf("kill_count"))

end

when 1002.party_kill begin

pc.setqf("kill_count", pc.getqf("kill_count")+1)

q.set_counter(gameforge.horse_upgrade2._test_1002_count, 300-pc.getqf("kill_count"))

if get_time()>=pc.getqf("limit_time") then

setstate(failure)

q.done()

end

end

when letter begin

q.set_clock(gameforge.horse_upgrade2.rest_time, pc.getqf("limit_time")-get_time())

end

when enter begin

pc.setqf("limit_time", get_time()+30*60)

pc.setqf("kill_count", 0)

end

when leave begin

q.done()

end

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade2._120_makequestbutton)

q.set_title(gameforge.horse_upgrade2._120_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade2._120_makequestbutton)

say_reward(gameforge.horse_upgrade2._130_sayReward)

say_reward(gameforge.horse_upgrade2._140_sayReward)

end

when info begin

say_title(gameforge.horse_upgrade2._120_makequestbutton)

say_reward(gameforge.horse_upgrade2._130_sayReward)

say_reward(gameforge.horse_upgrade2._140_sayReward)

end

when 1002.party_kill with pc.getqf("kill_count") >= 300 and pc.getqf("limit_time")>=get_time() begin

setstate(report)

end

when 20349.chat.gameforge.horse_upgrade2._150_npcChat begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._160_say)

local b= select(gameforge.locale.levelup.prev_quest_go, gameforge.locale.cancel)

if 1==b then

elseif 2==b then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._170_say)

local b= select(gameforge.horse_upgrade2._180_select, gameforge.horse_upgrade2._190_select)

if 1==b then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._200_say)

setstate(start)

q.done()

elseif 2==b then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._210_say)

else

say(string.format(gameforge.horse_upgrade2._220_say, b))

end

else

say(string.format(gameforge.horse_upgrade2._220_say, b))

end

end

end

state report begin

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade2._230_makequestbutton)

q.set_title(gameforge.horse_upgrade2._230_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade2._230_makequestbutton)

say_reward(gameforge.horse_upgrade2._240_sayReward)

end

when info begin

say_title(gameforge.horse_upgrade2._230_makequestbutton)

say_reward(gameforge.horse_upgrade2._240_sayReward)

end

when 20349.chat.gameforge.horse_upgrade2._250_npcChat with horse.get_grade()!=2 begin

setstate(start)

q.done()

end

when 20349.chat.gameforge.horse_upgrade2._260_npcChat with horse.get_grade()==2 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._270_say)

if is_test_server() then

pc.setqf("make_time", get_time()+10)

else

pc.setqf("make_time", get_time()+number(8, 16)*60*60)

end

setstate(wait)

end

end

state wait begin

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade2._280_makequestbutton)

q.set_title(gameforge.horse_upgrade2._280_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade2._280_makequestbutton)

say_reward(gameforge.horse_upgrade2._290_sayReward)

end

when info begin

say_title(gameforge.horse_upgrade2._280_makequestbutton)

say_reward(gameforge.horse_upgrade2._290_sayReward)

end

when login with get_time()>=pc.getqf("make_time") begin

setstate(buy)

end

when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()!=2 begin

setstate(start)

q.done()

end

when 20349.chat.gameforge.horse_upgrade2._310_npcChat with horse.get_grade()==2 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._320_say)

end

end

state buy begin

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade2._330_makequestbutton)

q.set_title(gameforge.horse_upgrade2._330_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade2._330_makequestbutton)

say_reward(gameforge.horse_upgrade2._340_sayReward)

end

when info begin

say_title(gameforge.horse_upgrade2._330_makequestbutton)

say_reward(gameforge.horse_upgrade2._340_sayReward)

end

when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()!=2 begin

setstate(start)

q.done()

end

when 20349.chat.gameforge.horse_upgrade2._300_npcChat with horse.get_grade()==2 and horse.get_level()!=20 begin

setstate(start)

q.done()

end

when 20349.chat.gameforge.horse_upgrade2._350_npcChat with horse.get_grade()==2 and horse.get_level()==20 begin

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._360_say)

local b= select(gameforge.horse_upgrade2._370_select, gameforge.horse_upgrade2._380_select, gameforge.horse_upgrade2._385_select)

if 1==b then

if pc.money>=1000000 then

if pc.countitem("50052")>=1 then

char_log(0, "HORSE_UPGRADE2", "BEGIN")

pc.changemoney(-1000000)

char_log(0, "HORSE_UPGRADE2", "DEC money 1000000")

pc.removeitem("50052", 1)

char_log(0, "HORSE_UPGRADE2", "DEC 50052 1")

horse.unride()

horse.advance()

horse.ride()

char_log(0, "HORSE_UPGRADE2", "INC horse_advance 1")

pc.give_item2("50053", 1)

char_log(0, "HORSE_UPGRADE2", "INC 50053 1")

pc.give_item2("50060", 1)

char_log(0, "HORSE_UPGRADE2", "INC 50060 1")

char_log(0, "HORSE_UPGRADE2", "END")

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._390_say)

setstate(start)

q.done()

else

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._400_say)

end

else

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._410_say)

end

elseif 2==b then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._420_say)

elseif 3==b then

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_upgrade2._430_say)

local b= select(gameforge.locale.guild.yes, gameforge.locale.guild.no)

if 1==b then

setstate(start)

elseif 2==b then

else

say(string.format(gameforge.find_squareguard._70_say, b))

end

else

say(string.format(gameforge.find_squareguard._70_say, b))

end

end

end

state failure begin

when letter begin

setskin(NOWINDOW)

makequestbutton(gameforge.horse_upgrade2._440_makequestbutton)

q.set_title(gameforge.horse_upgrade2._440_makequestbutton)

q.start()

end

when button begin

say_title(gameforge.horse_upgrade2._440_makequestbutton)

say_reward(gameforge.horse_upgrade2._450_sayReward)

say_reward(gameforge.horse_upgrade2._460_sayReward)

setstate(start)

q.done()

end

when info begin

say_title(gameforge.horse_upgrade2._440_makequestbutton)

say_reward(gameforge.horse_upgrade2._450_sayReward)

say_reward(gameforge.horse_upgrade2._460_sayReward)

setstate(start)

q.done()

end

end

state __COMPLETE__ begin

when enter begin

q.done()

end

end

end

 

 

 

 

quest horse_ride begin

state start begin

when 20349.chat.gameforge.horse_ride._10_npcChat with pc.level>=10 and not pc.is_mount() begin

if get_global_time() - pc.getqf("Reitzeit") < 3600 then

say(gameforge.horse_ride._15_say)

else

local msg =

say_title(gameforge.horse_exchange_ticket._20_sayTitle)

say(gameforge.horse_ride._20_say)

local horse_ticket_vnum = 50083

say(msg)

local s= select(gameforge.locale.quiz_5_3_choice, gameforge.horse_ride._30_select)

if s==1 then

if pc.countitem(horse_ticket_vnum)>0 then

if true == horse.is_summon() then

horse.unsummon()

end

 

pc.removeitem(horse_ticket_vnum, 1)

pc.mount(20030, 600)

pc.setqf("Reitzeit", get_global_time())

else

say(gameforge.horse_ride._40_say)

end

end

end

end

end

end

 

 

 

("next_time")>

 

gracia como siempre feo ^^, por cierto, agregame a skype que no te tengo D:, pd2: no lo he probado pero viniendo de ti, solucionado :v edito :V

edito xd:V 81b533d7701297aae6ca8e74d9d0820d.png

Share this post


Link to post
Share on other sites

Es el mismo que use cuando estaba guiandome con la mision del caballo armado del oficial, pero se habra dañado algun codigo al ponerlo en el spoiler, asi que los pondre en un adjunto

Debes iniciar sesión para ver el contenido del enlace en esta publicación.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...