function OnSceneEnter()
	if s.s01_0202_immortalized_visit==0 then
		Talk("com_s01_0202_01_hero")
	else
		Talk("com_s01_0202_04_hero")
    end
	
    SetMinigameResolver(function()        
        Talk("com_s01_0202_03_hero")
		s.s01_0202_immortalized_solved = 1
		Delete("i_duster")
        Talk("com_s01_0202_02_hero")
    end)    
end


local lastMX, lastMY = GetMousePos()
local i = 0
lastTime = GetTime() 
function OnUpdate()
        if s.s01_0202_immortalized_solved == 1  then    
            return
        end
        i = i + 1 
        local x, y = GetMousePos()
        local selItem = MystInventory:GetActive():GetSelectedItem()
        
        if x~=lastMX and lastMY~=y and IsMouseButtonDown(MB_LEFT) and GetTime() - lastTime >0.1 and  selItem == "i_duster"  then
        lastTime = GetTime() 
        
            s01_0202_immortalized.spr_s01_0202_immortalized_dust_left.self:DrawImage(x-23, y-23, "spr_s01_0202_brush", 3)
            
            if i%3 == 0 then
                PlaySound("snd_s01_0202_clean")
            end
            if s01_0202_immortalized.spr_s01_0202_immortalized_dust_left.self:GetAlphaContent(128) < 0.2  and s.s01_0202_immortalized_solved == 0 then
               Talk("com_s01_0202_03_hero")
               s.s01_0202_immortalized_solved = 1 
               Delete("i_duster")
               Talk("com_s01_0202_02_hero")
            end

            
            
        end

        lastMX, lastMY = GetMousePos()

end

-- Take("i_duster")