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

Gatherer Base

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 Gatherer{
    public class Gatherer : Core
    {
        public static string GetPluginAuthor()
        {
            return "2face";
        }

        public static string GetPluginVersion()
        {
            return "1.0.0.0";
        }

        public static string GetPluginDescription()
        {
            return "Gather Plugin";
        }  

        public List<DoodadObject> doodList = new List<DoodadObject>(); 
        public List<String> gatherTypes = new List<String>(); 
        public bool isRunning = false;   
        public Thread mainThread;
        //Call on plugin start
        public void PluginRun()
        {     
            Log("Done1");  
            //printDoods();
            //Log("dooddist " + getClosestDood().dist(me));
            //moveToDood(getClosestDood());        
            gatherTypes.Add("Chop Tree");   
            gatherTypes.Add("Mine Ore");
            //printDoods();     
            isRunning  = true;   
                
            Start();    
            Log("Nope");

        }         
        
        public void Start(){   
            while(isRunning){
                Thread.Sleep(500);
                try{
                    DoodadObject dood = getClosestDood();   
                    if(dood != null){
                        Log("name " + dood.name ); 
                        UseSkill("Dash");
                        moveToDood(dood);   
                    } 
                    Log("Check");
                }catch(Exception e){
                    Log(e.ToString());
                }   
            }


        }
        
        public void getDoodType(DoodadObject dood){      
            printDoodInfo(dood);
            Log("doodtype: " + dood.phaseId);
        }
        
        public void printDoodInfo(DoodadObject dood){
            Log("name: " + dood.name + " dist: " + dood.dist(me));
        }
        
        public void moveToDood(DoodadObject dood){
            if(dood == null) return;
            Log("Move To: " + dood.name + " dist: " + me.dist(dood));
            //printDoodInfo(dood);
            while(dood.dist(me) >= 3){   
                ComeTo(dood, 2);
                Thread.Sleep(50);
            }
            useDoodad(dood);
        }
        
        public Skill getDoodadSkill(DoodadObject dood){   
            Skill skill = null; 
            if(dood != null){
                foreach(var obj in dood.getUseSkills()){
                    skill = obj;    
                }
            }
            return skill;
        }
        
        public void useDoodad(DoodadObject dood){    
            if(dood != null){   
                Skill skill = getDoodadSkill(dood);    
                if(skill != null){
                    Log(skill.name + " " + dood.name);
                    while(dood != null && dood.dist(me) <= 3){
                        if(UseDoodadSkill(skill.id, dood, true, 0) == true){ 
                            Log("Gathered: " + dood.name);    
                            dood.Dispose();
                            dood = null;
                        }
                        Thread.Sleep(50);
                    }   
                } 
            }
        }
        
        public String hasGatherType(DoodadObject dood){
            Skill skill = getDoodadSkill(dood);       
            return "";
        }
        
        public DoodadObject getClosestDood(){
            DoodadObject dood = null;
            double dist = 9999999999;
            
            doodList    = getDoodads();
            Skill skill = null;
            if(doodList.Count > 0){
                //printDoods();
                foreach(var obj in doodList){
                    skill = getDoodadSkill(obj);
                    if(skill != null ){  
                        if(skill.name == "Chop Tree" || skill.name == "Mine Ore"){
                            if(me.dist(obj) < dist && obj.growthTime <= 0 && obj.uniqOwnerId == 0){
                                dood = obj;
                                dist = me.dist(obj);
                            }        
                        }
                    }

                } 
            }
  
            Log("TEST");   
            if(dood != null){    
                return dood;
            }
            return null;
        }

        public void printDoods(){
            updateDoodads(); 
            Skill skill  = null;    
            String sName = "";
            foreach(var obj in doodList){
                Log("---");                                        
                skill = getDoodadSkill(obj);  
                if(skill != null){
                    sName = skill.name;  
                }else{
                    sName = "";              
                }
                
                Log(obj.name + " Time: " + obj.growthTime + " skill: " + sName);
                Log("Type: " + obj.type + "dist: " + me.dist(obj));    
                Log("ownerId: " + obj.uniqOwnerId); 
            }
        }

        public void updateDoodads(){
            doodList = getDoodads();
        }
        //Call on plugin stop
        public void PluginStop()
        {
        }
    }
}


Added sprint skill to use when going to node mate, works for me so try it.

Thank you so much!!! You are an angel! Were you able to get it to stop by passing 'Fortuna' nodes by any chance?
 
Darn. It seems so botty to just skip the fortunas. But I am thankful to have this regardless!

If anyone knows how to add a glider option ontop of the sprint option Elusiven has already provided that would be sweet too! Toon gets stuck on trees and rocks at times only able to get by glider! =D
 
yes, it skips fortunas. But this is the good bot though. .thank you 2face :)
 
Darn. It seems so botty to just skip the fortunas. But I am thankful to have this regardless!

If anyone knows how to add a glider option ontop of the sprint option Elusiven has already provided that would be sweet too! Toon gets stuck on trees and rocks at times only able to get by glider! =D

Exactly this.

Glider+getting fortunas would make this hella sweet.
 
question to Out: Is there a better way to navigate around the map?? I'm trying to gather in mine but there is a lot of hills etc, and you the bot gets stuck very often when it goes up. Any possibility to record path or maybe waypoint after waypoint?
 
question to Out: Is there a better way to navigate around the map?? I'm trying to gather in mine but there is a lot of hills etc, and you the bot gets stuck very often when it goes up. Any possibility to record path or maybe waypoint after waypoint?

This would be awesome. Noticed the same problem sometimes with the leveling bot getting stuck auto running in a wall jumping instead of walking around objects.
 
an awesome system would be to create something that works on tiles. So you can record a path with tiles, and then the system would scan the recorded path and where is a tree/rock or any wall etc it would mark it and avoid automatically. mminion bot for eso has this feature and its pretty damn good.
 
an awesome system would be to create something that works on tiles. So you can record a path with tiles, and then the system would scan the recorded path and where is a tree/rock or any wall etc it would mark it and avoid automatically. mminion bot for eso has this feature and its pretty damn good.
Problem that ArcheAge containst more than 20000 doodads, and no information about their width\heigth\radius\patency
 
unfortunately the bot gets stuck alot trying to run up hills and it also trys to steal other peoples veins when they are being mined, apart from that and the fortuna issue it isnt too bad
 
Yeah it is a fantastic bot, again, ty OP. I wish it just did the gliding and fortunas =D
 
Can someone add a simple combat script to kill any mobs at the node when we reach it?
 
is there any additional commands to get the fortunas? I am sorry I am bad at programming
 
guys which code do you use? V1 V2 or V3 ? I get " error CS0101:" when i try to enter this script :(

EDIT: working after the update!

Is there any chance to include fortuna veins to this script? that would be awesome! :cool:
 
Last edited:
guys which code do you use? V1 V2 or V3 ? I get " error CS0101:" when i try to enter this script :(

EDIT: working after the update!

Is there any chance to include fortuna veins to this script? that would be awesome! :cool:

I use V1. It works well.
 
Back
Top