heavens_cave_keyquest={["start"]=0,["blood_for_seon"]=744928930,["check_cooldown"]=865973175,["initialize"]=-670175614,["search_spirit"]=-297258912,["search_spirit_forest"]=-2138973444,["tears_for_seon"]=2090994643,generate_unique_rnd_table= function (SourceListDepth,TargetListDepth)local Rand_List = { } 
local Rand_Number 
local current_length = 1 
local conflict = false 
local i 
repeat 
Rand_Number = math . random ( 1 , SourceListDepth ) 
i = 1 
conflict = false 
while conflict == false begin 
if Rand_List [ i ] == Rand_Number then 
conflict = true 
else 
if i == current_length then 
Rand_List [ i ] = Rand_Number 
current_length = current_length + 1 
conflict = true 
else 
i = i + 1 
end 
end 
end 
until current_length == TargetListDepth + 1 
return Rand_List 
end ,find_tear= function (Identifier)local a 
local c 
local heavens_cave_keyquest_LockTime = 5 
if heavens_cave_keyquest_Lock == true then 
if get_time ( ) - heavens_cave_keyquest_lock_timestamp >= heavens_cave_keyquest_LockTime then 
heavens_cave_keyquest_Lock = false 
end 
else 
target . delete ( "__TEAR" .. Identifier .. "__" ) 
say_title ( gameforge . heavens_cave_keyquest . _150_say_title ) 
say ( gameforge . heavens_cave_keyquest . _160_say ) 
local s = select ( gameforge . heavens_cave_keyquest . _170_1_select , gameforge . heavens_cave_keyquest . _170_2_select , gameforge . heavens_cave_keyquest . _170_3_select ) 
if s == 1 then 
c = pc . getqf ( "tears_collected" ) 
say_title ( gameforge . heavens_cave_keyquest . _150_say_title ) 
say ( gameforge . heavens_cave_keyquest . _180_say ) 
pc . setqf ( "tears_collected" , c + 1 ) 
pc . setqf ( "Tear" .. Identifier .. "Taken" , 1 ) 
pc . give_item2 ( pc . getqf ( "heavens_cave_keyquest_FrozenTear" ) ) 
end 
if s == 2 then 
a = math . random ( 1 , 3 ) 
c = pc . getqf ( "tears_collected" ) 
say_title ( gameforge . heavens_cave_keyquest . _190_say_title ) 
say ( string . format ( gameforge . heavens_cave_keyquest . _200_say , a ) ) 
wait ( ) 
say_title ( gameforge . heavens_cave_keyquest . _190_say_title ) 
say ( gameforge . heavens_cave_keyquest . _210_say ) 
pc . setqf ( "tears_collected" , c + a ) 
pc . setqf ( "Tear" .. Identifier .. "Taken" , 1 ) 
pc . give_item2 ( pc . getqf ( "heavens_cave_keyquest_FrozenTear" ) , a ) 
pc . aggregate_monster ( ) 
end 
if s == 3 then 
heavens_cave_keyquest_lock_timestamp = get_time ( ) 
heavens_cave_keyquest_Lock = true 
target . pos ( "__TEAR" .. Identifier .. "__" , heavens_cave_keyquest_SpiritForestCoordsTempList [ Identifier ] [ 1 ] , heavens_cave_keyquest_SpiritForestCoordsTempList [ Identifier ] [ 2 ] , 62 , gameforge . heavens_cave_keyquest . _150_say_title ) 
end 
end 
return nil 
end }