local maindialog = 0 
local storymode = 0 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _030_say ) 
repeat 
if pc . getqf ( "know_sura" ) == 1 then 
maindialog = select ( gameforge . ghost_story . _060_npcChat , gameforge . ghost_story . _080_npcChat , gameforge . ghost_story . _120_npcChat , gameforge . ghost_story . _160_npcChat , gameforge . ghost_story . _200_npcChat , gameforge . ghost_story . _240_npcChat , gameforge . ghost_story . _280_npcChat ) 
if maindialog == 1 then 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _070_say ) 
wait ( ) 
elseif maindialog == 2 then 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _090_say ) 
wait ( ) 
elseif maindialog == 3 then 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _130_say ) 
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat ) 
if storymode == 2 then 
return 
end 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _140_say ) 
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat ) 
if storymode == 2 then 
return 
end 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _150_say ) 
wait ( ) 
elseif maindialog == 4 then 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _170_say ) 
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat ) 
if storymode == 2 then 
return 
end 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _180_say ) 
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat ) 
if storymode == 2 then 
return 
end 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _190_say ) 
wait ( ) 
elseif maindialog == 5 then 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _210_say ) 
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat ) 
if storymode == 2 then 
return 
end 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _220_say ) 
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat ) 
if storymode == 2 then 
return 
end 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _230_say ) 
wait ( ) 
elseif maindialog == 6 then 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _250_say ) 
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat ) 
if storymode == 2 then 
return 
end 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _260_say ) 
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat ) 
if storymode == 2 then 
return 
end 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _270_say ) 
wait ( ) 
else 
say ( gameforge . ghost_story . _290_say ) 
end 
else 
maindialog = select ( gameforge . ghost_story . _060_npcChat , gameforge . ghost_story . _040_npcChat ) 
if maindialog == 1 then 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _070_say ) 
wait ( ) 
local subdialog1 = select ( gameforge . ghost_story . _080_npcChat ) 
if subdialog1 == 1 then 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _090_say ) 
pc . setqf ( "know_sura" , 1 ) 
wait ( ) 
end 
else 
say_title ( gameforge . ghost_story . _010_sayTitle ) 
say ( gameforge . ghost_story . _050_say ) 
maindialog = 7 
end 
end 
until maindialog == 7 
return 
