What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Scarcrow loop Pls

sx06

Member
Joined
Mar 10, 2014
Messages
110
Reaction score
0
Hello, I wonder if someone, or can a plugings scarcrow for loops? Because it really good to be able squeezed planted iris or potatoes all night: D
Thanks ;)
 
I'm using this and it works fine

Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;

namespace YourNamespace
{
    public class YourClass : Core
    {
        public void PluginRun()
        {
            while (true)        
            {
                PlantItemsAtFarm("Potato Eyes","YourCharacterName");
                CollectItemsAtFarm("Potato","Farming: Spend 1 Labor to harvest crops.","YourCharacterName");
                Thread.Sleep(5);
            }
        }
    }
}
 
I'm using this and it works fine

Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;

namespace YourNamespace
{
    public class YourClass : Core
    {
        public void PluginRun()
        {
            while (true)        
            {
                PlantItemsAtFarm("Potato Eyes","YourCharacterName");
                CollectItemsAtFarm("Potato","Farming: Spend 1 Labor to harvest crops.","YourCharacterName");
                Thread.Sleep(5);
            }
        }
    }
}

Nothing wrong with the code but you do realize that the void Thread.Sleep(x) is in ms and not in s or m? A break of 5 ms is basically nothing and will overload your script. You could easily change it to Thread.Sleep(3600) or even Thread.Sleep(54000).
 
Is it me or nested While loop inside another While loop doesn't work? I'm no C# expert and I don't understand why I can't do this.

I tried for a good amount of time to make this work but nested while loop seems to break the plugin and make it stop for no reason. Here's what I got so far

Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;

namespace YourNamespace{
    public class YourClass : Core {
      public void PluginRun() {

      SetPlantAlgoritm(PlantAlgoritm.MaxPerfomance);
      SetPlantMotionType(PlantMotionType.Standart);

      //  Enter all your farm ID here.
      uint[] Farms = new uint[] {
        111,
        222,
        333
      };

      //  Enter the item you want to gather/plant here.
      //  Ideally you always want the big space taking item like trees to go first.
      string[,] Items = new string[,] {
        {
        "Random Tree",
        "Random Sapling",
        "Logging: Spend up to 10 Labor to chop down a tree."
        },
        {
        "RandomItem",
        "Random Seed",
        "Gathering: Spend 1 Labor to gather materials."
        }
      };

      //  Set how much time to wait after each cycle.
      int WaitTime = 7200000;

      //  Don't touch below this.
      int fID;
      bool done = false;
      while (!done) {
        int f = -1;
        while (f++ < Farms.Length) {
          fID = f;
          Log("f:" + f);
          Log("Farm:" + Farms[fID]);
          int i = -1;
          while (i++ < Items.Length) {
            Log("at Farm " + Farms[fID] + " collect " + Items[i, 0] + " with action " + Items[i,2]);
            CollectItemsAtFarm(Items[i, 0], Items[i, 2], Farms[fID]);
            Log("at Farm " + Farms[fID] + " plant " + Items[i, 1]);
            PlantItemsAtFarm(Items[i, 1], Farms[fID]);
          }
        }
        Thread.Sleep(5000);
      }

    }
  }
}
 
Last edited:
Nothing wrong with the code but you do realize that the void Thread.Sleep(x) is in ms and not in s or m? A break of 5 ms is basically nothing and will overload your script. You could easily change it to Thread.Sleep(3600) or even Thread.Sleep(54000).

I thought it was seconds. Thanks for the info, changed to 3600
 
Hi, i need modify : "yourcharractername" ?
and, namespace ? (and if i have 3farm, how make ?)
 
Last edited:
Last question, how it replaced "namespace YourNamespace" for wild plant? everywhere in nature?
 
I have 8x8 +16x16 and this code plant ONLY in my 8x8.. can help me pls?
 
I'm having trouble with planting for some reason nothing i try seems to work. I can gather and harvest fine but it won't replant :S
 
How do I turn that script into a plugin so I can run it?
Start plugin editor, new file, copy paste the script, change the seed into whatever you want, your name = your char name. same at collect items at farm (the name of the full grown seed/spore/whatever). Dont forget that you need the full text from the gathering part for labor ("Gathering: Spend 1 Labor to gather materials.")

finish by pressiiing compile after youve selected a pluginfolder to put it in
 
Start plugin editor, new file, copy paste the script, change the seed into whatever you want, your name = your char name. same at collect items at farm (the name of the full grown seed/spore/whatever). Dont forget that you need the full text from the gathering part for labor ("Gathering: Spend 1 Labor to gather materials.")

finish by pressiiing compile after youve selected a pluginfolder to put it in
Thank you!
 
It work good darkmaka. Just need that :

using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;

namespace YourNamespace
{
public class YourClass : Core
{
public void PluginRun()
{
while (true)
{
PlantItemsAtFarm("Potato Eyes","YourCharacterName");
CollectItemsAtFarm("Potato","Farming: Spend 1 Labor to harvest crops.","YourCharacterName");
Thread.Sleep(5);

PlantItemsAtFarm("Potato Eyes","FamilyCharacterName");
CollectItemsAtFarm("Potato","Farming: Spend 1 Labor to harvest crops.","FamilyCharacterName");
Thread.Sleep(5);
}
}
}
}
}
 
And what do i have to modify to work online on specific farms? More farms per owner, but only allowed to use one
 
Back
Top