local cur_t = get_global_time ( ) - 60 * 60 * 9 
local today_date = cur_t - math . mod ( cur_t , 86400 ) 
local last_checked_date = pc . getqf ( "last_checked_date" ) 
if today_date ~= last_checked_date then 
pc . setqf ( "last_checked_date" , today_date ) 
pc . setqf ( "today_item7_1_checked" , 0 ) 
end 
if pc . count_item ( 31036 ) > 0 then 
local today_item7_1_checked = pc . getqf ( "today_item7_1_checked" ) 
if today_item7_1_checked >= 10 then 
say_title ( mob_name ( 20001 ) ) 
say ( gameforge . main_quest_lv94 . _1000_say ) 
else 
if number ( 1 , 100 ) <= 70 then 
pc . remove_item ( 31036 , 1 ) 
local today_item7_1_checked = pc . getqf ( "today_item7_1_checked" ) 
pc . setqf ( "today_item7_1_checked" , today_item7_1_checked + 1 ) 
local total_item7_1_checked = pc . getqf ( "total_item7_1_checked" ) 
pc . setqf ( "total_item7_1_checked" , total_item7_1_checked + 1 ) 
local remain = 30 - pc . getqf ( "total_item7_1_checked" ) 
if remain < 0 then 
remain = 0 
end 
q . set_counter_value ( remain ) 
if pc . getqf ( "total_item7_1_checked" ) >= 30 then 
say_title ( mob_name ( 20001 ) ) 
say ( gameforge . main_quest_lv94 . _1010_say ) 
set_state ( "state7_4" ) 
else 
say_title ( mob_name ( 20001 ) ) 
say ( string . format ( gameforge . main_quest_lv94 . _980_say , 30 - pc . getqf ( "total_item7_1_checked" ) ) ) 
end 
else 
pc . remove_item ( 31036 , 1 ) 
say_title ( mob_name ( 20001 ) ) 
say ( gameforge . main_quest_lv94 . _990_say ) 
end 
end 
else 
say_title ( mob_name ( 20001 ) ) 
say ( gameforge . main_quest_lv94 . _1040_say ) 
end 
