So I am trying to make a bot application, trying to see how I can do certain things in c#. I am not trying to cheat or so, it is a mobile game that I am running on a emulator. This is not an application that I am trying to sell or in any way profit from, this is simply a task for me to learn how to do these kind of things.
Any how, when I launch the application the memory goes up to 16 mb instantly, also I am trying to make a loop until a stop button has been clicked.
I make functions for every single action and I am using a timer to run all the functions to scan if a pixel gets detected, but the application is running slowly and taking up a lot of memory, I feel like this kind of "looping" is not the proper way to do this kind of action, I have tried the while method as well.
Anybody who is willing to tell me what I am doing?
private void timer1_Tick(object sender, EventArgs e)
{
    if (timer1.Enabled == true)
    {
        // Checking if we entered Dragon's B10
        if (inDungeon == false)
        {
            GoToDungeon();
        }
        // Starting battle
        autoSumPoint = AutoIt.AutoItX.PixelGetColor(2078, 61); // 0xF1EECF
        if (autoSumPoint == 0xF1EECF)
        {
            StartBattle();
        }
        else
        {
            GoToDungeon();
        }
        // Starting auto-play
        autoSumPoint = AutoIt.AutoItX.PixelGetColor(2296, 969); // 0xFFFFFF
        if (autoSumPoint == 0xFFFFFF)
        {
            AutoCheck();
        }
        // Starting battle
        autoSumPoint = AutoIt.AutoItX.PixelGetColor(2755, 489); // 0xF1EECF
        if (autoSumPoint == 0xF1EECF)
        {
            PauseCheck();
        }
        // Checking for defeat
        if (defeatChecked == false)
        {
            DefeatCheck();
        }
        // Checking for defeat
        if (defeatChecked == false)
        {
            DefeatCheck();
        }
        // Checking for victory
        if (victoryChecked == false)
        {
            VictoryCheck();
        }
        // Checking for replay
        autoSumPoint = AutoIt.AutoItX.PixelGetColor(2602, 587); // 0xF3C761
        if (autoSumPoint == 0xF3C761)
        {
            ReplayCheck();
        }
        // Checking for refill
        if (energyRefilled == false)
        {
            RefillCheck();
        }
    }
}