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

SafeMiner Release - I_ShaunY_I & Sintal1ty

Sintal1ty

New Member
Joined
Jun 7, 2012
Messages
74
Reaction score
1
Disclaimer, I didn't test this at all just coded it and compiled it here you go I_ShaunY_I.
Edited: Version 1.0.0.2 // Forgot to start checkBuffs and prepareforCombat functions and changed your if statement to only check if the target is with in 20m before fighting it, the rest is useless since we already know the target is aggro from the first if statement
Code:
using System;
using System.Drawing;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
using System.Windows.Forms;
using System.Threading.Tasks;
using System.Net;
using System.IO;
using System.Text;
using System.ComponentModel;

namespace SafeMiner{
    public class SafeMiner : Core
   {
       public static string GetPluginAuthor()
       {
           return "I_ShaunY_I / Sintal1ty";
       }

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

       public static string GetPluginDescription()
       {
           return "SafeMiner for Sorcery & Witchcraft based classes";
       }
       private Gps gps;
        
        public void PluginRun()
       {                      
           gps = new Gps(this); 
           gps.LoadDataBase(Application.StartupPath + "\\Plugins\\SafeMiner\\SafeMiner.db3");     
           gps.GpsMove("Mine"); 
            List<Creature> mobs = getAggroMobs();      
            RoundZone z = new RoundZone(me.X,me.Y,40); 
           while(true)
           {                                                                     
            if(getAggroMobs().Count > 0)
            {  
             prepareForCombat () ;
             checkBuffs();                  
              if (dist(me.target) <= 20) // Works just fine  
                /* if (dist(me.target) <= 20 && skillCooldown("Enervate") == 0 && getAggroMobs().Count >= 0 && skillCooldown("Earthen Grip") != 0) 
                    another change this really isn't needed */ 

                                // Code by sintal1ty special bubble trap fun!
                                if (skillCooldown("Bubble Trap") == 0 && skillCooldown("Flamebolt") == 0 && dist(me.target) <= 16 && hpp(me.target) >= 50)  
                                {    
                                    if((hpp() < 80) && (skillCooldown("Enervate") == 0) && (skillCooldown("Earthen Grip") == 0))
                                    {
                                    UseSkillAndWait("Enervate");
                                    Thread.Sleep(250);
                                    UseSkillAndWait("Earthen Grip");
                                    Thread.Sleep(50);
                                    }
                                    Thread.Sleep(1000);
                                    UseSkillAndWait("Flamebolt");
                                    Thread.Sleep(1000);
                                    UseSkillAndWait("Bubble Trap");
                                    Log("Used: Flamebolt , Bubble Trap Combo - Waiting 4 seconds for fall damage");                                 
                                    Thread.Sleep(3500); 
                                }                               
                                // Heal combo :: sintal1ty
                                if((hpp() < 75) && (skillCooldown("Enervate") == 0) && (skillCooldown("Earthen Grip") == 0))
                                {
                                        Thread.Sleep(1000);
                                    UseSkillAndWait("Enervate");
                                    Thread.Sleep(250);
                                    UseSkillAndWait("Earthen Grip");
                                    Thread.Sleep(50);
                                }
                                    
                                if (skillCooldown("Freezing Arrow") ==0)
                                    // Cast "Freezing Arrow" if not on cooldown
                                {
                                    UseSkillAndWait("Freezing Arrow");
                                    Log("Used: Freezing Arrow");  
                                    Thread.Sleep(100);
                                 } 
                                for(int i = 0; i < 2; i++)
                                    UseSkillAndWait("Flamebolt");
                                Thread.Sleep(10);
                                }          
                 }
               CollectItemsInZone("Fortuna Vein","Mining: Spend up to 20 Labor to extract ore.",z);   
               CollectItemsInZone("Iron Vein","Mining: Spend up to 10 Labor to extract ore.",z);      
        }    
        
            // Prepare for combat cast Magic Circle < 17 yards
             public void prepareForCombat ()
            {
                while(dist(me.target) >= 21)
                    ComeTo(me.target, 17);
                if(skillCooldown("Magic Circle") == 0 && dist(me.target) <= 20)
                    {
                    UseSkillAndWait("Magic Circle");
                    Thread.Sleep(100);
                    }
            }
            
            // Check buffs function
            public void checkBuffs ()
            {
            if(buffTime("Magic Defense Boost") == 0 && skillCooldown("Purge") == 0)
                UseSkillAndWait("Purge", true);
            if(skillCooldown("Insulating Lens") == 0)
                UseSkillAndWait("Insulating Lens", true);
            }
            
            // Skill function credit Out
            public void UseSkillAndWait (string skillName, bool selfTarget = false)
            {

            while(me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(50);
            if(!UseSkill(skillName, true, selfTarget))
                {
                if(me.target != null && GetLastError() == LastError.NoLineOfSight)
                    {
                    if(dist(me.target) <= 5)
                        ComeTo(me.target, 2);
                    else if(dist(me.target) <= 10)
                        ComeTo(me.target, 3);
                    else if(dist(me.target) < 20)
                        ComeTo(me.target, 8);
                    else
                        ComeTo(me.target, 8);
                    }
                }
            while(me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(50);
            }
            //Call on plugin stop
            public void PluginStop()
            {
            }
        }
    }
 
Last edited:
Alot removed some code related to the use of int yes and changed the while loop to always true since you have no interest in running to a safe spot in gps anymore since your fighting.

You left the bottom if( yes > 100) in the code even though you weren't technically trying to use it. you forgot to remove it along with the int yes and int Continue =1

Then I added in some of my combat routine things from my dagger spell routines that I made from the first week of playing. Hope it works out for you. I know my routines were really good when I was grinding till I started writing fishing code.
 
Alot removed some code related to the use of int yes and changed the while loop to always true since you have no interest in running to a safe spot in gps anymore since your fighting.

You left the bottom if( yes > 100) in the code even though you weren't technically trying to use it. you forgot to remove it along with the int yes and int Continue =1

Then I added in some of my combat routine things from my dagger spell routines that I made from the first week of playing. Hope it works out for you. I know my routines were really good when I was grinding till I started writing fishing code.
That's because he highly modified my script ^^. He added a very good defense/battle mechanism. Still using the same method to mine which is sadly bad (since it's a copy of mine and mine sucked lol). Regardless good job.
 
That's because he highly modified my script ^^. He added a very good defense/battle mechanism. Still using the same method to mine which is sadly bad (since it's a copy of mine and mine sucked lol). Regardless good job.

lol dont flatter yourself, this was a copy of 3 jammed into one with added pieces from myself... nonetheless its a step up from yours
 
I can't make this script do anything.. when I start it it just stands there looking :P
 
Hi, how do this work? Do I go to mining location and just start the plugin and it runs around mining nodes? Does it fight when monsters aggro?
 
Hi, how do this work? Do I go to mining location and just start the plugin and it runs around mining nodes? Does it fight when monsters aggro?

I think you make a path then place it in the proper folder and run this plugin and it will run the path and grab veins along the path and fight mobs as necessary.

Edit:

Even after that it just stands around. Log kicks out "Success 96 points and 95 links loaded". :confused:
 
Last edited:
Back
Top