deusx
Member
- Joined
- Feb 1, 2010
- Messages
- 206
- Reaction score
- 5
Ok so here is something you can use while waiting for Godot (Sida's plugin) 
It requires user customization, but it should work
This is FARM CART ONLY plugin
What you need to EDIT:
- Line 66 edit the name of your mount
- Line 74 edit X, Y, Z and angle of spot you want to summon your cart to (UseItem Method (UInt32, Double, Double, Double, Int32, Boolean, Double)). You need to edit 111.11, 222.22, 333.33 to X, Y, Z coordinates where you want to summon your cart to, and 44 to angle you want your cart to be facing.
- Line 83 edit the name of your trade pack here, and everywhere else where it says "Name Of Your Pack"
- Line 102 edit the name of your gold trader NPC here - this was my workaround for when we get stuck mid way due to collision with other carts and stuff the char dont leave vehicle
- Line 110 edit the ID of your trade pack here, and everywhere else where it says "me.getEquipedItem(99999)"
- Line 142 edit the ID of your trade pack crafting RECIPE here
What you need to MAKE:
- Plugin needs to be in folder called SimpleFarmCart, /plugins/SimpleFarmCart
- GPS route from your recall point to crafting workbench called goToWorkbench.db3, containing end point called "workbench", ideally placed between workbench and place you want to summon your farm cart, in line of sight of both
- GPS route from point you summoned cart to gold trader called goToGoldTrader.db3, containing end point called "goldtrader"
This plugin uses Recall to go back after trade run, I assume the run will take more than 30 minutes (all of mine does). If you want some other means of going back after trade run, check other trade run plugins it should be easy to add code
This plugin can't use Fuel
There is no anti-stuck logic. Make sure you make GPS route not to collide with objects/lamposts/etc. When collides with other carts/public transportation carriage it will just wait a bit, then resume assuming the object we collided with will move. Resuming route will be buggy until this gets fixed: https://www.thebuddyforum.com/arche...eveloper-forum/182617-gps-route-resuming.html

It requires user customization, but it should work
This is FARM CART ONLY plugin
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 DefaultNameSpace{
public class DefaultClass : Core
{
private Gps gps;
public static string GetPluginAuthor()
{
return "Deusx";
}
public static string GetPluginVersion()
{
return "1.0.0.0";
}
public static string GetPluginDescription()
{
return "Simple Farm Cart Plugin";
}
private DoodadObject getBestDoodadForPack()
{
foreach (var d in getDoodads())
{
if (d.phaseId == 8264 && d.uniqOwnerId == me.uniqId)
return d;
}
return null;
}
private int getBestDoodadWithPackCount()
{
int result = 0;
foreach (var d in getDoodads())
{
if (d.phaseId == 8265 && d.uniqOwnerId == me.uniqId)
result++;
}
return result;
}
private DoodadObject getBestDoodadWithPack()
{
foreach (var d in getDoodads())
{
if (d.phaseId == 8265 && d.uniqOwnerId == me.uniqId)
return d;
}
return null;
}
public void GoToWorkbench()
{
gps = new Gps(this);
gps.LoadDataBase(Application.StartupPath + "pluginsSimpleFarmCartgoToWorkbench.db3");
var myMount = getMount();
if (myMount == null)
{
UseItem("Buckskin Lilyut Horse"); //EDIT HERE FOR YOUR MOUNT NAME
Thread.Sleep(2000);
}
SitToMount();
gps.GpsMove("workbench");
Thread.Sleep(2000);
DespawnMount();
Thread.Sleep(1000);
UseItem(36293, 111.11, 222.22, 333.33, 0, true, 44); //EDIT HERE FOR CART SPAWN POINT AND ROTATION
Thread.Sleep(6000);
BindSlave();
Thread.Sleep(1000);
UseSkill("Owner's Mark");
Thread.Sleep(1000);
DiscardSlave();
Thread.Sleep(1000);
}
public void getPackIn()
{
var d = getBestDoodadForPack();
while (isAlive() && d != null)
{
CraftItems("Name Of Your Pack", 1); //EDIT HERE NAME OF YOUR TRADE PACK
Thread.Sleep(5000);
ComeTo(d, 2.5);
Thread.Sleep(1000);
UseDoodadSkill(15307, d, true);
Thread.Sleep(1000);
d = getBestDoodadForPack();
}
CraftItems("Name Of Your Pack", 1);
Thread.Sleep(5000);
Thread.Sleep(1000);
BindSlave();
}
public void getPackOut()
{
var d2 = getBestDoodadWithPack();
foreach (var obj in getCreatures())
{
if (obj.name == "Name Of Gold Seller") //EDIT HERE NAME OF GOLD SELLER
{
UseSkill("Owner's Mark");
Thread.Sleep(1000);
DiscardSlave();
}
}
Thread.Sleep(1500);
SellBackpack(true);
Thread.Sleep(1500);
if(me.getEquipedItem(99999) == null) //EDIT HERE ID OF YOUR TRADE PACK
{
while (d2 != null)
{
ComeTo(d2, 2.3);
Thread.Sleep(1000);
if (me.getEquipedItem(99999) == null)
UseDoodadSkill(15309, d2, true);
Thread.Sleep(1500);
if (me.getEquipedItem(99999) != null)
SellBackpack(true);
Thread.Sleep(1500);
d2 = getBestDoodadWithPack();
}
}
DespawnSlave();
}
public void PluginRun()
{
while(true)
{
if (me.getEquipedItem(99999) != null && gameState == GameState.Ingame)
{
Thread.Sleep(1000);
BindSlave();
Thread.Sleep(1000);
gps = new Gps(this);
gps.LoadDataBase(Application.StartupPath + "pluginsSimpleFarmCartgoToGoldTrader.db3");
gps.GpsMove("goldtrader");
getPackOut();
UseSkill("Recall");
}
int PackCount = maxItemsWeCanCraft(9999) ; //EDIT HERE ID OF YOUR PACK CRAFTING *SPELL*
if (PackCount > 2 && me.getEquipedItem(99999) == null && gameState == GameState.Ingame)
{
GoToWorkbench();
getPackIn();
gps = new Gps(this);
gps.LoadDataBase(Application.StartupPath + "pluginsSimpleFarmCartgoToGoldTrader.db3");
gps.GpsMove("goldtrader");
getPackOut();
UseSkill("Recall");
Thread.Sleep(120000); //sometimes i have awfuly long loading screens but the bot still detects game state to ingame somehow, you can set this to less
}
}
}
public void PluginStop()
{
}
}
}
What you need to EDIT:
- Line 66 edit the name of your mount
- Line 74 edit X, Y, Z and angle of spot you want to summon your cart to (UseItem Method (UInt32, Double, Double, Double, Int32, Boolean, Double)). You need to edit 111.11, 222.22, 333.33 to X, Y, Z coordinates where you want to summon your cart to, and 44 to angle you want your cart to be facing.
- Line 83 edit the name of your trade pack here, and everywhere else where it says "Name Of Your Pack"

- Line 102 edit the name of your gold trader NPC here - this was my workaround for when we get stuck mid way due to collision with other carts and stuff the char dont leave vehicle
- Line 110 edit the ID of your trade pack here, and everywhere else where it says "me.getEquipedItem(99999)"

- Line 142 edit the ID of your trade pack crafting RECIPE here
What you need to MAKE:
- Plugin needs to be in folder called SimpleFarmCart, /plugins/SimpleFarmCart
- GPS route from your recall point to crafting workbench called goToWorkbench.db3, containing end point called "workbench", ideally placed between workbench and place you want to summon your farm cart, in line of sight of both
- GPS route from point you summoned cart to gold trader called goToGoldTrader.db3, containing end point called "goldtrader"
This plugin uses Recall to go back after trade run, I assume the run will take more than 30 minutes (all of mine does). If you want some other means of going back after trade run, check other trade run plugins it should be easy to add code
This plugin can't use Fuel
There is no anti-stuck logic. Make sure you make GPS route not to collide with objects/lamposts/etc. When collides with other carts/public transportation carriage it will just wait a bit, then resume assuming the object we collided with will move. Resuming route will be buggy until this gets fixed: https://www.thebuddyforum.com/arche...eveloper-forum/182617-gps-route-resuming.html
Last edited: