Serenus_not_First_Introduction=false
Melano_Review_Memory_Triggered=false
function onTalk()
    --一些基础设置
    disableMovement()
    local dialog_choice=1

    --获取是否第一次与其对话
    Serenus_not_First_Introduction=getFlag("Serenus_not_First_Introduction")
    --获取Melano_Review_Memory是否已经被触发过
    Melano_Review_Memory_Triggered=getFlag("Melano_Review_Memory_Triggered")

    --第一次对话仅仅介绍自己
    if Serenus_not_First_Introduction==false then
        say("Serenus_Introduction")
        Serenus_not_First_Introduction=true
        --此时不再是第一次对话
        setFlag("Serenus_not_First_Introduction",true)

    --再次与其对话时出现对话选择项
    else
        --如果Melano_Review_Memory还没有被触发过，则不显示Serenus_UI_2
        if Melano_Review_Memory_Triggered==false then
            dialog_choice=choice("Serenus_UI_1","Serenus_UI_3")
            if dialog_choice==1 then
                say("Serenus_Introduction")
            end
        else
            dialog_choice=choice("Serenus_UI_1","Serenus_UI_2","Serenus_UI_3")
            if dialog_choice==1 then
                say("Serenus_Introduction")
            elseif dialog_choice==2 then
                say("Serenus_Review_Melano")
            end
        end
    end
end

function onEnd()
    enableMovement()
end