Get all mails:
Planting and gathering on your scarecrow:
Reaction for some events:
All that you need to reenter game world - make plugin with code like:
Dont forget change game world name and specify character number
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;
namespace DefaultNamespace{
public class DefaultClass : Core
{
public void PluginRun()
{
RequestMailList();
foreach (var mail in getMails())
{
mail.OpenMail();
if (!mail.isSent)
{
mail.ReceiveGoldFromMail();
foreach (var item in mail.getItems())
mail.ReceiveItemFromMail(item);
mail.DeleteMail();
}
Thread.Sleep(1000);
}
}
}
}
Planting and gathering on your scarecrow:
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;
namespace YourNamespace{
public class YourClass : Core
{
public void PluginRun()
{
PlantItemsAtFarm("Cedar sapling","YourCharacterName");
CollectItemsAtFarm("Cedar tree","Logging: Spend up to 10 Labor to chop down a tree.","YourCharacterName");
//Same but in random zone
RoundZone z = new RoundZone(me.X,me.Y,25);
PlantItemsInZone("Cedar sapling", z);
CollectItemsInZone("Cedar tree","Logging: Spend up to 10 Labor to chop down a tree.",z);
}
}
}
Reaction for some events:
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;
namespace YourNamespace{
public class YourClass : Core
{
public void keyDown(Keys k, bool isControl, bool isShift, bool isAlt)
{
if (isControl && k == Keys.R)
{
//ctrl-R pressed
}
}
public void targetChanged(Creature obj, Creature obj2)
{
//obj select obj2
}
public void PluginRun()
{
onTargetChanged += targetChanged;
onKeyDown += keyDown;
while (true)
Thread.Sleep(1000);
}
}
}
All that you need to reenter game world - make plugin with code like:
Dont forget change game world name and specify character number
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;
namespace RelogNamespace
{
public class RelogClass : Core
{
public void PluginRun()
{
while (true)
{
if (gameState == GameState.ServerSelect)
{
//Find our game world
var myWorld = getWorlds().Find(w => w.name == "Orchidna");
if (myWorld == null || (myWorld != null && !myWorld.EnterGameServer()))
{
Log("Invalid game world name or error while we try to enter game server!");
return;
}
//Wait while we enter game world
while (gameState != GameState.CharacterSelect)
Thread.Sleep(500);
//Get our character (in this example first character from all that you have on this game world
var chararcters = myWorld.getCharacters();
if (chararcters.Count == 0 || (chararcters.Count > 0 && !chararcters[0].EnterGame()))
{
Log("No characters on this world or error while we try to enter game!");
return;
}
}
Thread.Sleep(1000);
}
}
}
}
Last edited: