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

NotPanda's Mining

NotPanda

New Member
Joined
Jun 12, 2015
Messages
33
Reaction score
0
[Plugin] NotPanda's Mining

Hey guys, another quick script I use that you all might want.

Farms iron veins and fortuna veins.


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 NotPandaMiner{
    public class Farmer : Core
    {
        public static string GetPluginAuthor()
        {
            return "NotPanda";
        }
        
        public static string GetPluginVersion()
        {
            return "1.0.0.0";
        }
        
        public static string GetPluginDescription()
        {
            return "NotPanda's Miner";
        }
        //Call on plugin start
        public void PluginRun()
        {       
                ClearLogs();     
            Log("[INFO] Starting Miner");  
            while(me.laborPoints > 200){
            DoodadObject _doodad = getNearestMiningNode();
            if(_doodad != null){
                List<Skill> _skill = _doodad.getUseSkills();                            
                try{
                    Log("[INFO] Harvesting " + _doodad.name + " : " + _doodad.id);
                                    UseDoodadSkill(_skill[0].id,_doodad, true, 1);
                                } catch{
                }
                Thread.Sleep(500 + (int)me.castEndTime);
            }             
        }   
        }  
    public DoodadObject getNearestMiningNode(){
        DoodadObject nearestDoodad = null;
        foreach(var _doodad in getDoodads().Where(x => x.name.Contains("Iron Vein") || x.name.Contains("Fortuna")).ToList()){
            if(nearestDoodad == null){
                nearestDoodad = _doodad;
            } else if(me.dist(_doodad) < me.dist(nearestDoodad)){
                nearestDoodad = _doodad;
            }
        }
        return nearestDoodad;
    }        
        //Call on plugin stop
        public void PluginStop()
        {
        }
    }
}
 
Last edited:
Compiling error

Code:
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,90) : error CS1026: ) expected
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,90) : error CS1525: Invalid expression term '=>'
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,93) : error CS1002: ; expected
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,119) : error CS1002: ; expected
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,119) : error CS1525: Invalid expression term ')'
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,129) : error CS1002: ; expected
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,129) : error CS1525: Invalid expression term ')'
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,130) : error CS1002: ; expected
 
Compiling error

Code:
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,90) : error CS1026: ) expected
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,90) : error CS1525: Invalid expression term '=>'
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,93) : error CS1002: ; expected
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,119) : error CS1002: ; expected
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,119) : error CS1525: Invalid expression term ')'
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,129) : error CS1002: ; expected
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,129) : error CS1525: Invalid expression term ')'
00:24:27: c:\Users\Hadouken\Desktop\Neuer Ordner (3)\Plugins\Mining\Mining.cs(46,130) : error CS1002: ; expected
Fixed. It was an old one i copied
 
Dxshade i don't see how you could add that since it in its current form doesn't even use a moveto the node so i am thinking its use is to just mine a spot close to you? Also if its not right near you I am not even sure how he gets it to the mining node without a moveto to do so?
 
It's actually pretty good. Only issues I have is that some people use dash and get there fast and it's still moving to the node that is already being mined. Would be cool if it could switch and move to another node that is currently not being mined.
And sometimes running into a stone wall.. but it jumps back and tries to walk around, but sometimes it doesn't exactly work.
 
Last edited:
Back
Top