# Forum > Diablo 2 Resurrected > Diablo 2 Resurrected Bots and Programs >  [Release] ChickenBuddy - Simple chicken hack

## Dragonef22

// Does not work with current patch

----------


## mouN

Nice little share  :Smile:

----------


## xblade2k7

and auto HP/mana potion not possible?

----------


## eternity666

just says not in game, doesn't work.

----------


## verto0

Doesnt work after game update todat, NOT IN A GAME, how to fix it?

----------


## xblade2k7

source code plz.

----------


## eternity666

Doesn't work

----------


## Dragonef22

// Does not work with current patch

----------


## crayfish14

can you share the source for this please?

----------


## redmoonmerchant

Any update on new patch? Thanks my loading screen blows…

----------


## eternity666

> can you share the source for this please?


part of the source


```
public frmMain()
        {
            this.InitializeComponent();
        }

        // Token: 0x0600001C RID: 28 RVA: 0x00002790 File Offset: 0x00000990
        private void cmdStartStop_Click(object sender, EventArgs e)
        {
            bool flag = !Versioned.IsNumeric(this.txtCloseGameAt.Text);
            if (flag)
            {
                Interaction.MsgBox("Enter a valid number", MsgBoxStyle.OkOnly, null);
            }
            else
            {
                bool flag2 = Operators.CompareString(this.cmdStartStop.Text, "Start", false) == 0;
                if (flag2)
                {
                    this.cmdStartStop.Text = "Stop";
                    this.cmdStartStop.BackColor = Color.Firebrick;
                    this.txtCurrentLife.Text = "";
                    this.txtMaxLife.Text = "";
                    this.txtLifePercent.Text = "";
                    this.tmrChicken.Enabled = true;
                }
                else
                {
                    this.cmdStartStop.Text = "Start";
                    this.cmdStartStop.BackColor = Color.Lime;
                    this.tmrChicken.Enabled = false;
                    this.txtCurrentLife.Text = "";
                    this.txtMaxLife.Text = "";
                    this.txtLifePercent.Text = "";
                }
            }
        }

        // Token: 0x0600001D RID: 29 RVA: 0x000028B0 File Offset: 0x00000AB0
        private void tmrChicken_Tick(object sender, EventArgs e)
        {
            bool flag = Process.GetProcessesByName("D2R").Count<Process>() == 0;
            if (flag)
            {
                this.txtCurrentLife.Text = "Game not found";
                this.txtMaxLife.Text = "Game not found";
                this.txtLifePercent.Text = "Game not found";
            }
            else
            {
                GameData gameData = new GameData(Process.GetProcessesByName("D2R").ElementAt(0));
                bool flag2 = gameData.mapSeed == 0;
                if (flag2)
                {
                    this.txtCurrentLife.Text = "Not in a Game";
                    this.txtMaxLife.Text = "Not in a Game";
                    this.txtLifePercent.Text = "Not in a Game";
                }
                else
                {
                    int num = Conversions.ToInteger(gameData.getStatValue(6));
                    int num2 = Conversions.ToInteger(gameData.getStatValue(7));
                    double num3 = Math.Round((double)num / (double)num2, 2) * 100.0;
                    this.txtCurrentLife.Text = num.ToString();
                    this.txtMaxLife.Text = num2.ToString();
                    this.txtLifePercent.Text = num3.ToString();
                    bool flag3 = num3 < (double)int.Parse(this.txtCloseGameAt.Text);
                    if (flag3)
                    {
                        this.cmdStartStop.PerformClick();
                        while (Process.GetProcessesByName("D2R").Count<Process>() > 0)
                        {
                            try
                            {
                                Process.GetProcessesByName("D2R").ElementAt(0).Kill();
                            }
                            catch (Exception ex)
                            {
                            }
                        }
                    }
                }
            }
        }
```

----------

