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

Ghetto Plant/Move

amazingnessn

New Member
Joined
May 23, 2014
Messages
69
Reaction score
0
delay value = seconds to wait between checks, & # of plants to wait for before moving.

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

namespace DefaultNameSpace{
   public class DefaultClass : Core
   {
       public static string GetPluginAuthor()
       {
           return "amazingnessn";
       }
       public static string GetPluginVersion()
       {
           return "1.0.0.0";
       }
       public static string GetPluginDescription()
       {
           return "Ghetto Plant Move - quicky & dirty method of moving between plants as your bot plants.";
       }
       public void PluginRun()
       {   
           int delay = 2;  
           int maths = delay - 1;
           ClearLogs();
           List<long> last4 = new List<long>();
           while (true) {   
           List<long> lastplanted = new List<long>();
           foreach (var d in getDoodads()) {   
                   if (d.uniqOwnerId == me.uniqId){  
                   var derp = d.plantTime; 
                   lastplanted.Add(derp);
                }
           }
           long max = lastplanted.Max();
           last4.Add(max);
           if (last4.Count > delay) { last4.Clear(); }
           if (last4.Count < delay || last4[0] == last4[maths]) { Log(DateTime.Now.ToString("h:mm:ss tt") + " - Waiting for more plants."); }           
           else {
                foreach (var d in getDoodads()) {
                    if (d.uniqOwnerId == me.uniqId && d.plantTime == max) {              
                        Log("Moving to next plant.");
                        MoveTo(d.X, d.Y, d.Z);                         
                    }
                }
           }            
            Thread.Sleep(delay * 1000);           
        }    
       }
       public void PluginStop()
       { 
           Log("Plugin Stopped");
       }
   }
}
 
12:26:11 πμ: c:\Users\7life\Desktop\arch\Plugins\test\nonstopNew.cs(99,153) : error CS0104: 'SortOrder' is an ambiguous reference between 'System.Windows.Forms.SortOrder' and 'ArcheBuddy.Bot.Classes.SortOrder'
12:26:11 πμ: c:\Users\7life\Desktop\arch\Plugins\test\nonstopNew.cs(99,163) : error CS0117: 'System.Windows.Forms.SortOrder' does not contain a definition for 'Asc'
 
12:26:11 πμ: c:\Users\7life\Desktop\arch\Plugins\test\nonstopNew.cs(99,153) : error CS0104: 'SortOrder' is an ambiguous reference between 'System.Windows.Forms.SortOrder' and 'ArcheBuddy.Bot.Classes.SortOrder'
12:26:11 πμ: c:\Users\7life\Desktop\arch\Plugins\test\nonstopNew.cs(99,163) : error CS0117: 'System.Windows.Forms.SortOrder' does not contain a definition for 'Asc'
That's not this plugin.
 
sry my editor some times stacks and needs reboot to start working ok
 
got a question here, how do i set it on autorun? everytime i got disconnected (coz of bad internet connection), the autorun is always missing even though i put a check on it in autorun on plugins
 
got a question here, how do i set it on autorun? everytime i got disconnected (coz of bad internet connection), the autorun is always missing even though i put a check on it in autorun on plugins

That's something to do with Archebuddy itself not the plugin
 
Back
Top