say ( gameforge . pony_levelup . _790_makequestbutton ) 
if horse . get_level ( ) >= 11 then 
say ( gameforge . pony_levelup . _800_say ) 
elseif ( horse . get_level ( ) >= 1 and horse . get_level ( ) <= 10 ) then 
local s = number ( 1 , 2 ) 
if 1 >= s then 
say ( gameforge . pony_levelup . _810_say ) 
pc . setqf ( "next_time" , 0 ) 
elseif 2 >= s then 
say ( gameforge . pony_levelup . _820_say ) 
if pc . countitem ( "50050" ) >= 1 then 
char_log ( 0 , "PONY_ADVANCE" , "BEGIN" ) 
pc . removeitem ( "50050" , 1 ) 
char_log ( 0 , "PONY_ADVANCE" , "DEC 50050 1" ) 
horse . unride ( ) 
horse . advance ( ) 
horse . ride ( ) 
char_log ( 0 , "PONY_ADVANCE" , "INC horse_advance 1" ) 
char_log ( 0 , "PONY_ADVANCE" , "END" ) 
say ( string . format ( gameforge . pony_levelup . _830_say , ( horse . get_level ( ) ) ) ) 
if horse . get_level ( ) == 10 then 
say ( gameforge . pony_levelup . _840_say ) 
pc . setqf ( "next_time" , 0 ) 
else 
say ( gameforge . pony_levelup . _850_say ) 
end 
else 
say ( gameforge . pony_levelup . _860_say ) 
end 
end 
end 
setstate ( "start" ) 
q . done ( ) 
