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

[Plugin][Example] Simple farm mobs

This is simple example, how you can make farm routines.
This example using: Sorcery (Flamebolt, Freezing arrow), Songcraft(Hummingbird Ditty), Occultism (Hell spear)
Compile this plugin with Visual Studio or build-in editor, place dll somewhere in subfolders of AB Plugins folder and start it.
Dont forget to enable checkbox in your character widget.

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

namespace YourNamespace
{
    public class YourClass : Core
    {
        public static string GetPluginAuthor()
        {
            return "ArcheBuddy";
        }

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

        public static string GetPluginDescription()
        {
            return "Simple mobs farm";
        }
        
        //Try to find best mob in farm zone.
        public Creature GetBestNearestMob(Zone zone)
        {
            Creature mob = null;
            double dist = 999999;
            foreach (var obj in getCreatures())
            {      
                //If creature Npc and we can attack him and creature alive and distance to this creature less than other and creature have 100% hp or creature want to kill out character.
                if (obj.type == BotTypes.Npc && isAttackable(obj) && (obj.firstHitter == null || obj.firstHitter == me) && isAlive(obj) && me.dist(obj) < dist && zone.ObjInZone(obj)
                    && (hpp(obj) == 100 || obj.aggroTarget == me))
                {
                    mob = obj;
                    dist = me.dist(obj);
                }
            }
            return mob;
        }
        
        //Cancel skill if mob which we want to kill already attacked by another player.
        public void CancelAttacksOnAnothersMobs()
        {
            while (true)
            {
                if (me.isCasting && me.target != null && me.target.firstHitter != null && me.target.firstHitter != me)
                    CancelSkill();
                Thread.Sleep(100);
            }
        }  
        
        //Check our buffs
        public void CheckBuffs()
        {  
            if (buffTime("Hummingbird Ditty (Rank 1)") == 0 && skillCooldown("Hummingbird Ditty") == 0)
                UseSkillAndWait("Hummingbird Ditty", true);
        }
        
        public void UseSkillAndWait(string skillName, bool selfTarget = false)
        {
            //wait cooldowns first, before we try to cast skill
            while (me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(50);
            if (!UseSkill(skillName, true, selfTarget))
            {
                if (me.target != null && GetLastError() == LastError.NoLineOfSight)
                {
                    //No line of sight, try come to target.
                    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);
                }
            }      
            //wait cooldown again, after we start cast skill
            while (me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(50);
        }


        public void PluginRun()
        {   
            new Task(() => { CancelAttacksOnAnothersMobs(); }).Start(); //Starting new thread
            RoundZone zone = new RoundZone(me.X, me.Y, 80); //Make new zone where we will farm. Its circle with center where your character stand at this moment with 80m radius.
            SetGroupStatus("autoexp", false); //Add checkbox to our character widget
            while (true)
            {   
                //If autoexp checkbox enabled in widget and our character alive
                if (GetGroupStatus("autoexp") && me.isAlive())
                {
                    CheckBuffs();
                    Creature bestMob = null;
                    //if we have enouth mp and hp, or mobs want to kill us - try to find bestMob.
                    if ((mpp() > 40 && hpp() > 75) || getAggroMobs().Count > 0)
                        bestMob = GetBestNearestMob(zone);    
                    //if mob exists
                    if (bestMob != null) 
                    {
                        try
                        {
                            //while this mob alive and our character alive and checkbox in widget enabled
                            while (bestMob != null && isAlive(bestMob) && isExists(bestMob) && GetGroupStatus("autoexp") && isAlive())
                            {      
                                //if another player attack this mob before our character.
                                if (bestMob.aggroTarget != me && bestMob.firstHitter != null && bestMob.firstHitter != me)
                                {
                                    bestMob = null;
                                    break;
                                }    
                                
                                //if we still dont attack our best mob, but another mob want to kill us
                                if (bestMob.firstHitter == null && getAggroMobs().Count > 0 && bestMob != GetBestNearestMob(zone)) 
                                    bestMob = GetBestNearestMob(zone);
                                
                                //Target our mob, if necessary
                                if (me.target != bestMob)
                                    SetTarget(bestMob);  
                                //Turn to our mob, if necessary
                                if (angle(bestMob, me) > 45 && angle(bestMob, me) < 315)
                                        TurnDirectly(bestMob);
                                
                                if (me.dist(bestMob) < 4 && isAlive(bestMob))
                                    UseSkillAndWait("Hell Spear");
                                UseSkillAndWait("Freezing Arrow");
                                for (int i=0;i<2;i++)
                                    UseSkillAndWait("Flamebolt");
                                   
                                //Small delay, do not load the processor
                                Thread.Sleep(10); 
                            }
                        
                            //Try to pickup drop from mob, if drop available
                            while (bestMob != null && !isAlive(bestMob) && isExists(bestMob) && bestMob.type == BotTypes.Npc && ((Npc)bestMob).dropAvailable && GetGroupStatus("autoexp") && isAlive())
                            {
                                if (me.dist(bestMob) > 3)
                                   ComeTo(bestMob, 1);
                                PickupAllDrop(bestMob);     
                            }
                        } 
                        catch {}
                        
                    }
                }
                //Small delay, do not load the processor
                Thread.Sleep(10);
            }
        }
    }
}

Is it just me or did the code just stop working my plugin stopped working suddenly/
 
Hi. I bought the trial for 1 day and i am having issues.

I copy pasted the first pages script and i the only thing i changed is this


if (me.dist(bestMob) < 4 && isAlive(bestMob))
UseSkillAndWait("Charged Bolt (Rank 13)");
UseSkillAndWait("Toxic Shot (Rank 4)");
UseSkillAndWait("Piercing Shot (Rank 10)");
UseSkillAndWait("Endless Arrows (Rank 1)");
UseSkillAndWait("Endless Arrows (Rank 1)");
UseSkillAndWait("Endless Arrows (Rank 1)");
for (int i=0;i<2;i++)

since i am an archer.

When i enter the game and go to plugin manager all the plugins are on green arrow and nothin happens. I press stop and play again on my script and the logs say "fight.dllUnknown executing error, or plugin was forcibly unloaded.".

I copy pasted the commands in word, i changed the names of the skills, i opened plugin editor in the bot, pasted the commands, i saved it and then press compile and made the dll. I made a folder in the plugins folder of the bot and put it there.
Why is there an error?
Please help. It seems tht everybody can use it and i cant :/
 
Try
Code:
if (mpp() < 50) 
{
	UseSkill("Play Dead");  
	//skill used, we on the ground
  while ((mpp() < 99) && mobsCountThatAttackUs() == 0 && GetGroupStatus("autoexp") && isAlive())   
	  Thread.Sleep(100); //just waiting, while condition true. mpp() 99 - becouse ArcheBuddy can calculate hp\mp inaccuracy
}
the class mobsCountThatAttackUs is changed with mobsCountTargeter()
 
Hmm, can't get it work.

When I start it, it does nothing.
And when I stop it the log says:
"Unknown executing error, or plugin was forcibly unloaded."

Here is what I've done:
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;

namespace Lyeos
{
    public class Cleric : Core
    {
        public static string GetPluginAuthor()
        {
            return "ArcheBuddy";
        }

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

        public static string GetPluginDescription()
        {
            return "Simple mobs farm";
        }
        
        //Try to find best mob in farm zone.
        public Creature GetBestNearestMob(Zone zone)
        {
            Creature mob = null;
            double dist = 999999;
            foreach (var obj in getCreatures())
            {      
                //If creature Npc and we can attack him and creature alive and distance to this creature less than other and creature have 100% hp or creature want to kill out character.
                if (obj.type == BotTypes.Npc && isAttackable(obj) && (obj.firstHitter == null || obj.firstHitter == me) && isAlive(obj) && me.dist(obj) < dist && zone.ObjInZone(obj)
                    && (hpp(obj) == 100 || obj.aggroTarget == me))
                {
                    mob = obj;
                    dist = me.dist(obj);
                }
            }
            return mob;
        }
        
        //Cancel skill if mob which we want to kill already attacked by another player.
        public void CancelAttacksOnAnothersMobs()
        {
            while (true)
            {
                if (me.isCasting && me.target != null && me.target.firstHitter != null && me.target.firstHitter != me)
                    CancelSkill();
                Thread.Sleep(100);
            }
        }  
        
        //Check our buffs
        public void CheckBuffs()
        {  
            if (buffTime("Hummingbird Ditty (Rank 3)") == 0 && skillCooldown("Hummingbird Ditty (Rank 3)") == 0)
                UseSkillAndWait("Hummingbird Ditty (Rank 3)", true);
            if (buffTime("Aranzeb's Boon (Rank 3)") == 0 && skillCooldown("Aranzeb's Boon (Rank 3)") == 0)
                UseSkillAndWait("Aranzeb's Boon (Rank 3)", true);
        }
        
        public void UseSkillAndWait(string skillName, bool selfTarget = false)
        {
            //wait cooldowns first, before we try to cast skill
            while (me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(50);
            if (!UseSkill(skillName, true, selfTarget))
            {
                if (me.target != null && GetLastError() == LastError.NoLineOfSight)
                {
                    //No line of sight, try come to target.
                    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);
                }
            }      
            //wait cooldown again, after we start cast skill
            while (me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(50);
        }


        public void PluginRun()
        {   
            new Task(() => { CancelAttacksOnAnothersMobs(); }).Start(); //Starting new thread
            RoundZone zone = new RoundZone(me.X, me.Y, 80); //Make new zone where we will farm. Its circle with center where your character stand at this moment with 80m radius.
            SetGroupStatus("autoexp", false); //Add checkbox to our character widget
            while (true)
            {   
                //If autoexp checkbox enabled in widget and our character alive
                if (GetGroupStatus("autoexp") && me.isAlive())
                {
                    CheckBuffs();
                    Creature bestMob = null;
                    //if we have enouth mp and hp, or mobs want to kill us - try to find bestMob.
                    if ((mpp() > 40 && hpp() > 75) || getAggroMobs().Count > 0)
                        bestMob = GetBestNearestMob(zone);    
                    //if mob exists
                    if (bestMob != null) 
                    {
                        try
                        {
                            //while this mob alive and our character alive and checkbox in widget enabled
                            while (bestMob != null && isAlive(bestMob) && isExists(bestMob) && GetGroupStatus("autoexp") && isAlive())
                            {      
                                //if another player attack this mob before our character.
                                if (bestMob.aggroTarget != me && bestMob.firstHitter != null && bestMob.firstHitter != me)
                                {
                                    bestMob = null;
                                    break;
                                }    
                                
                                //if we still dont attack our best mob, but another mob want to kill us
                                if (bestMob.firstHitter == null && getAggroMobs().Count > 0 && bestMob != GetBestNearestMob(zone)) 
                                    bestMob = GetBestNearestMob(zone);
                                
                                //Target our mob, if necessary
                                if (me.target != bestMob)
                                    SetTarget(bestMob);  
                                //Turn to our mob, if necessary
                                if (angle(bestMob, me) > 45 && angle(bestMob, me) < 315)
                                        TurnDirectly(bestMob);
                                
                                if (me.dist(bestMob) < 4 && isAlive(bestMob))
                                    UseSkillAndWait("Mirror Light (Rank 1)");
                                    UseSkillAndWait("Starling Strain (Rank 1)");
                                    UseSkillAndWait("Critical Discord (Rank 10)");
                                    
                                    //for (int i=0;i<2;i++)
                                    //UseSkillAndWait("Flamebolt");
                                   
                                //Small delay, do not load the processor
                                Thread.Sleep(10); 
                            }
                        
                            //Try to pickup drop from mob, if drop available
                            while (bestMob != null && !isAlive(bestMob) && isExists(bestMob) && bestMob.type == BotTypes.Npc && ((Npc)bestMob).dropAvailable && GetGroupStatus("autoexp") && isAlive())
                            {
                                if (me.dist(bestMob) > 3)
                                   ComeTo(bestMob, 1);
                                PickupAllDrop(bestMob);     
                            }
                        } 
                        catch {}
                        
                    }
                }
                //Small delay, do not load the processor
                Thread.Sleep(10);
            }
        }
    }
}
 
any1 can tell me how to cahnge in this scrip to turn KS ON ?
 
As darkmaka wrote I have similar prolem. Code seem to mention "autoexp" so i tried to activate that and gps, but that keeps saying its "looking for quests" and im already lvl 38.

But I get same error as darkmaka:
When I start it, it does nothing.
And when I stop it the log says:
"Unknown executing error, or plugin was forcibly unloaded."


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

namespace YourNamespace
{
public class YourClass : Core
{
public static string GetPluginAuthor()
{
return "ArcheBuddy";
}

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

public static string GetPluginDescription()
{
return "Simple mobs farm";
}

//Try to find best mob in farm zone.
public Creature GetBestNearestMob(Zone zone)
{
Creature mob = null;
double dist = 999999;
foreach (var obj in getCreatures())
{
//If creature Npc and we can attack him and creature alive and distance to this creature less than other and creature have 100% hp or creature want to kill out character.
if (obj.type == BotTypes.Npc && isAttackable(obj) && (obj.firstHitter == null || obj.firstHitter == me) && isAlive(obj) && me.dist(obj) < dist && zone.ObjInZone(obj)
&& (hpp(obj) == 100 || obj.aggroTarget == me))
{
mob = obj;
dist = me.dist(obj);
}
}
return mob;
}

//Cancel skill if mob which we want to kill already attacked by another player.
public void CancelAttacksOnAnothersMobs()
{
while (true)
{
if (me.isCasting && me.target != null && me.target.firstHitter != null && me.target.firstHitter != me)
CancelSkill();
Thread.Sleep(100);
}
}

//Check our buffs
public void CheckBuffs()
{
if (buffTime("Double Recurve (Rank 3)") == 0 && skillCooldown("Double Recurve") == 0)
UseSkillAndWait("Double Recurve", true);
}

public void UseSkillAndWait(string skillName, bool selfTarget = false)
{
//wait cooldowns first, before we try to cast skill
while (me.isCasting || me.isGlobalCooldown)
Thread.Sleep(50);
if (!UseSkill(skillName, true, selfTarget))
{
if (me.target != null && GetLastError() == LastError.NoLineOfSight)
{
//No line of sight, try come to target.
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);
}
}
//wait cooldown again, after we start cast skill
while (me.isCasting || me.isGlobalCooldown)
Thread.Sleep(50);
}


public void PluginRun()
{
new Task(() => { CancelAttacksOnAnothersMobs(); }).Start(); //Starting new thread
RoundZone zone = new RoundZone(me.X, me.Y, 80); //Make new zone where we will farm. Its circle with center where your character stand at this moment with 80m radius.
SetGroupStatus("autoexp", false); //Add checkbox to our character widget
while (true)
{
//If autoexp checkbox enabled in widget and our character alive
if (GetGroupStatus("autoexp") && me.isAlive())
{
CheckBuffs();
Creature bestMob = null;
//if we have enouth mp and hp, or mobs want to kill us - try to find bestMob.
if ((mpp() > 40 && hpp() > 75) || getAggroMobs().Count > 0)
bestMob = GetBestNearestMob(zone);
//if mob exists
if (bestMob != null)
{
try
{
//while this mob alive and our character alive and checkbox in widget enabled
while (bestMob != null && isAlive(bestMob) && isExists(bestMob) && GetGroupStatus("autoexp") && isAlive())
{
//if another player attack this mob before our character.
if (bestMob.aggroTarget != me && bestMob.firstHitter != null && bestMob.firstHitter != me)
{
bestMob = null;
break;
}

//if we still dont attack our best mob, but another mob want to kill us
if (bestMob.firstHitter == null && getAggroMobs().Count > 0 && bestMob != GetBestNearestMob(zone))
bestMob = GetBestNearestMob(zone);

//Target our mob, if necessary
if (me.target != bestMob)
SetTarget(bestMob);
//Turn to our mob, if necessary
if (angle(bestMob, me) > 45 && angle(bestMob, me) < 315)
TurnDirectly(bestMob);

if (me.dist(bestMob) < 4 && isAlive(bestMob))
UseSkillAndWait("Shadowplay");
UseSkillAndWait("Charged Bolt");
UseSkillAndWait("Piercing Shot");
UseSkillAndWait("Toxic Shot");
for (int i=0;i<2;i++)
UseSkillAndWait("Endless Arrows");

//Small delay, do not load the processor
Thread.Sleep(10);
}

//Try to pickup drop from mob, if drop available
while (bestMob != null && !isAlive(bestMob) && isExists(bestMob) && bestMob.type == BotTypes.Npc && ((Npc)bestMob).dropAvailable && GetGroupStatus("autoexp") && isAlive())
{
if (me.dist(bestMob) > 3)
ComeTo(bestMob, 1);
PickupAllDrop(bestMob);
}
}
catch {}

}
}
//Small delay, do not load the processor
Thread.Sleep(10);
}
}
}
}
 
Which command should i use to move away from mob to 1m?
 
Here's a revision I quickly put together using SystemShock's post on page 7.

It will use hardtack to regen when below %70 hp and will cast meditate when below %35 mp.
It's a darkrunner rotation, so edit the fields to suit your build.

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

namespace YourNamespace
{
    public class YourClass : Core
    {
        public static string GetPluginAuthor()
        {
            return "ArcheBuddy";
        }

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

        public static string GetPluginDescription()
        {
            return "Simple mobs farm";
        }
        
        //Try to find best mob in farm zone.
        public Creature GetBestNearestMob(Zone zone)
        {
            Creature mob = null;
            double dist = 999999;
            foreach (var obj in getCreatures())
            {      
                //If creature Npc and we can attack him and creature alive and distance to this creature less than other and creature have 100% hp or creature want to kill out character.
                if (obj.type == BotTypes.Npc && isAttackable(obj) && (obj.firstHitter == null || obj.firstHitter == me) && isAlive(obj) && me.dist(obj) < dist && zone.ObjInZone(obj)
                    && (hpp(obj) == 100 || obj.aggroTarget == me))
                {
                    mob = obj;
                    dist = me.dist(obj);
                }
            }
            return mob;
        }
        
        //Cancel skill if mob which we want to kill already attacked by another player.
        public void CancelAttacksOnAnothersMobs()
        {
            while (true)
            {
                if (me.isCasting && me.target != null && me.target.firstHitter != null && me.target.firstHitter != me)
                    CancelSkill();
                Thread.Sleep(100);
            }
        }  
        
        //Check our buffs
        public void CheckBuffs()
        {  
            if (buffTime("Conversion Shield (Rank 3)") == 0 && skillCooldown("Conversion Shield") == 0)
                UseSkillAndWait("Conversion Shield", true);
            if (buffTime("Thwart (Rank 4)") == 0 && skillCooldown("Thwart") == 0)
                UseSkillAndWait("Thwart", true);
        }
         
           public void outOfCombatRegen()
    {
        //Mana Regen
        while(mpp() < 35){
            if(skillCooldown("Meditate") == 0)
                UseSkillAndWait("Meditate");
             while (me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(50);
                
                //Some way of using an item here, UseItem doesn't seem to be able to take a string so I'd have to look into it
        }
        
        //Health Regen
        while(hpp() < 70){
            if(itemCooldown("Hardtack") == 0)
                UseItem("Hardtack");
                //Some way of using an item here, UseItem doesn't seem to be able to take a string so I'd have to look into it
        }
    }
        
        public void UseSkillAndWait(string skillName, bool selfTarget = false)
        {
            //wait cooldowns first, before we try to cast skill
            while (me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(50);
            if (!UseSkill(skillName, true, selfTarget))
            {
                if (me.target != null && GetLastError() == LastError.NoLineOfSight)
                {
                    //No line of sight, try come to target.
                    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);
                }
            }      
            //wait cooldown again, after we start cast skill
            while (me.isCasting || me.isGlobalCooldown)
                Thread.Sleep(50);
        }


        public void PluginRun()
        {   
            new Task(() => { CancelAttacksOnAnothersMobs(); }).Start(); //Starting new thread
            RoundZone zone = new RoundZone(me.X, me.Y, 80); //Make new zone where we will farm. Its circle with center where your character stand at this moment with 80m radius.
            SetGroupStatus("autoexp", false); //Add checkbox to our character widget
            while (true)
            {   
                //If autoexp checkbox enabled in widget and our character alive
                if (GetGroupStatus("autoexp") && me.isAlive())
                {
                    CheckBuffs();
                    outOfCombatRegen();
                    Creature bestMob = null;
                    //if we have enouth mp and hp, or mobs want to kill us - try to find bestMob.
                    if ((mpp() > 40 && hpp() > 75) || getAggroMobs().Count > 0)
                        bestMob = GetBestNearestMob(zone);
                    //if mob exists
                    if (bestMob != null) 
                    {
                        try
                        {
                            //while this mob alive and our character alive and checkbox in widget enabled
                            while (bestMob != null && isAlive(bestMob) && isExists(bestMob) && GetGroupStatus("autoexp") && isAlive())
                            {      
                                //if another player attack this mob before our character.
                                if (bestMob.aggroTarget != me && bestMob.firstHitter != null && bestMob.firstHitter != me)
                                {
                                    bestMob = null;
                                    break;
                                }    
                                
                                //if we still dont attack our best mob, but another mob want to kill us
                                if (bestMob.firstHitter == null && getAggroMobs().Count > 0 && bestMob != GetBestNearestMob(zone)) 
                                    bestMob = GetBestNearestMob(zone);
                                
                                //Target our mob, if necessary
                                if (me.target != bestMob)
                                    SetTarget(bestMob);  
                                //Turn to our mob, if necessary
                                if (angle(bestMob, me) > 45 && angle(bestMob, me) < 315)
                                        TurnDirectly(bestMob);
                                
                                if (me.dist(bestMob) < 4 && isAlive(bestMob))
                                    UseSkillAndWait("Stalker's Mark");
                                UseSkillAndWait("Overwhelm");
                                UseSkillAndWait("Wallop");
                                for (int i=0;i<2;i++)
                                    UseSkillAndWait("Rapid Strike");
                                   
                                //Small delay, do not load the processor
                                Thread.Sleep(10); 
                            }
                        
                            //Try to pickup drop from mob, if drop available
                            while (bestMob != null && !isAlive(bestMob) && isExists(bestMob) && bestMob.type == BotTypes.Npc && ((Npc)bestMob).dropAvailable && GetGroupStatus("autoexp") && isAlive())
                            {
                                if (me.dist(bestMob) > 3)
                                   ComeTo(bestMob, 1);
                                PickupAllDrop(bestMob);     
                            }
                        } 
                        catch {}
                        
                    }
                }
                //Small delay, do not load the processor
                Thread.Sleep(10);
            }
        }
    }
}
I don't know how to code in the slightest so someone may be able to optimize this considerably.


EDIT: Also, just realised that something is occasionally interrupting the meditate cast, not sure how to fix that.
 
Last edited:
any way to add Item(FoodName) at 50% health etc? and if there is how? :) sorry a bit new to this

Edit : i am playining as primaval, is possible to get it to move while attacking, 5m while using "Endless Arrows" etc? again sorry! never really needed to know anything about c+ and so on before now :p
 
Last edited:
any way to add Item(FoodName) at 50% health etc? and if there is how? :) sorry a bit new to this

Edit : i am playining as primaval, is possible to get it to move while attacking, 5m while using "Endless Arrows" etc? again sorry! never really needed to know anything about c+ and so on before now :p




while(hpp() < 50){
if(itemCooldown("Hardtack") == 0)
UseItem("Hardtack");
}

Replace "Hardtack" with your desired food item. Otherwise, on page 3 of this thread System Shock posted a great method for this.
 
Of Course it works why shouldnt it?!
Problem is I get flagged all the time I use it. Which is ok just have to run to the judge once in a while.

I have one problem:
Char waits for something after killing a mob for around 10 secs. Why is that? (even if he still has enough health and mana)

If anyone wants to work with me on this script to improve it (adding waypoints and stuff) feel free to pm me :)
 
Of Course it works why shouldnt it?!
Problem is I get flagged all the time I use it. Which is ok just have to run to the judge once in a while.

I have one problem:
Char waits for something after killing a mob for around 10 secs. Why is that? (even if he still has enough health and mana)

If anyone wants to work with me on this script to improve it (adding waypoints and stuff) feel free to pm me :)

do you remember to click the autoexp thingy? ^^ also check your pm ^^
 
What problem does this game have with channeling spells?

HTML:
if (mpp() < 50) 
{
    UseSkill("Meditate");  
    //skill used, we on the ground
  while ((mpp() < 99) && GetGroupStatus("autoexp") && isAlive())   
      Thread.Sleep(100)

I tried to add tons of stuff to make it work. Check cooldown of the skill and so on and it just doesn't work consistently.

It will cancel meditation so fast, that basically everytime even the first tick will not go through.
 
What problem does this game have with channeling spells?

HTML:
if (mpp() < 50) 
{
    UseSkill("Meditate");  
    //skill used, we on the ground
  while ((mpp() < 99) && GetGroupStatus("autoexp") && isAlive())   
      Thread.Sleep(100)

I tried to add tons of stuff to make it work. Check cooldown of the skill and so on and it just doesn't work consistently.

It will cancel meditation so fast, that basically everytime even the first tick will not go through.


Look again in the code ^^ """" while ((mpp() < 99) && GetGroupStatus("autoexp") && isAlive()) """"" try changing (99) to 50 maybe, and see if that works
 
i tried the only solution i had was to use the UseSkillAndWait instead of UseSkill. Otherwise meditation is immediately canceled and the bot even stands there until 99% mana is regenerated by waiting.
 
Hi;; this plugin works just fine; anyway;; it sometimes oportunate
and event when trying to pick drops
I bet you guys know what ima talk

It's easy to solve this event and have your character not stuck even during whole night

Line~156 looks like
you select and delate
if (me.dist(bestMob) > 3)
ComeTo(bestMob, 1);
PickupAllDrop(bestMob);
}

will be just fine if you place there (~same line)
if (me.dist(bestMob) > 3)
ComeTo(bestMob, 1);
PickupAllDrop(bestMob);
PickupAllDrop(bestMob);
ComeTo(bestMob, 1);
PickupAllDrop(bestMob);
PickupAllDrop(bestMob);
}

EDIT:
Been forget;; you save it and compile to .dll
 
Last edited:
Back
Top