function onTalk()
    
    disableMovement()

    setFlag("silence", true)

    

    playSound("event:/grog_greenside/greenknowledge_get")

    setFlag("flash", true)

    wait(0.5)

    setFlag("display_"..arguments, true)

    wait(1)

    while true do
        if getFlag("confirm") then

            setFlag("display_"..arguments, false)

            wait(1)

            return
        end
        wait(0.1)
    end

end

function onEnd(room, wasSkipped)
    enableMovement()
    setFlag("silence", false)
    setFlag("display_"..arguments, false)
    setFlag("get_"..arguments, true)
end
