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

Gathering..

Daphinium

New Member
Joined
Mar 29, 2013
Messages
45
Reaction score
1
So there's all these pant/gather scripts.
Perfectly fine.

NONE of them will JUST gather.. I dont need something that will plant on FARMS. I need something that will gather "illegal" farms.

I plat 1500-2000 seeds at once and i really dont look forward to harvesting it manually.

I labotomized this script trying to get something out of it. Doesnt work. Please help.

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() {
            while (true) {
                
                if (gameState == GameState.Ingame){
                
                    //get Labor points 
                    int labor = me.laborPoints;
                    
                    string item = "Rose"; // PUT WHAT YOU WANT TO GATHER/FARM HERE
                    string seed = "Rose Seed"; // PUT THE ITEM SEED NAME HERE


                    //if Labor > 200
                    if (labor > 200) {
                        
                        //get starting count of seed
                        var itemStart1 = itemCount(seed);
                        var itemStart2 = itemCount(item);
                        
                        Log("------------------------");
                        Log("Character: " + me.name);
                        Log("Total "+ item +": " + itemStart2);
                        Log("Total "+ seed +": " + itemStart1);
                        
                        // PUT CHARACTER 1 NAME HERE
                        if (me.name == "RowdyV"){
                        
                        // PUT FARM IDs HERE, Use scarecrow plugin to get the farm IDs, use the numbers without ", in this case, I'm using 2 16x16, that when they r finished, 
                        // it takes a 5m break and it's already ready for harvest, in case of onions and barleys.
                        uint[] farms = {10909, 7292};
                            
                            foreach (uint farm in farms){
                                
                                Log("Farm: "+farm);
                                CollectItemsAtFarm(item, "Gathering: Spend 1 Labor to gather materials.", farm);
                                CollectItemsAtFarm(item, "Farming: Spend 1 Labor to harvest crops.", farm);
                                PlantItemsAtFarm(seed, farm);
                            }
                            
                        
                            } else if (me.name == "Charactername") { 

                        // PUT FARM IDs HERE, in this case using 1 16x16 and 5 8x8                        
                            uint[] farms = {6252, 18973, 22692, 7270, 6279, 16197};
                            
                            foreach (uint farm in farms){
                                
                                Log("Farm: "+farm);
                                CollectItemsAtFarm(item, "Gathering: Spend 1 Labor to gather materials.", farm);
                                CollectItemsAtFarm(item, "Farming: Spend 1 Labor to harvest crops.", farm);
                                PlantItemsAtFarm(seed, farm);
                            }
                            
                         } else if (me.name == "Charactername") { 
                        
                        // PUT FARM IDs HERE
                         uint[] farms = {18803, 18431};
                            
                            foreach (uint farm in farms){
                                
                                Log("Farm: "+farm);
                                CollectItemsAtFarm(item, "Gathering: Spend 1 Labor to gather materials.", farm);
                                CollectItemsAtFarm(item, "Farming: Spend 1 Labor to harvest crops.", farm);
                                PlantItemsAtFarm(seed, farm);
                            }
                            
                        } 
                        
                        // end else if
                        //else Thread.Abort();
                        
                        //get ending count of seed
                        var itemEnd1 = itemCount(seed);
                        var itemEnd2 = itemCount(item);
                        //get seed used and show in log
                        var used1 = itemStart1 - itemEnd1;
                        var used2 = itemEnd2 - itemStart2;
                        Log("------------------------");
                        Log("Character: " + me.name);
                        Log(item+" Gathered: " + used2);
                        Log(seed+" Used: " + used1);


                        //if Labor < 200 wait 
                    } else {
                        Log("Labor under 200, waiting to regen");
                    }


                    //Jump once  
                    Jump(true);
                    Log("JUMP! JUMP!");
                    Thread.Sleep(500);
                    Jump(false);


                    //Generate random time between 4-5 minutes       
                    Random random = new Random();
                    var mseconds = random.Next(240, 300) * 1000;
                    var seconds = mseconds / 1000;
                    Log("Waiting for " + seconds.ToString() + " seconds");


                    //sleep for random time
                    Thread.Sleep(mseconds);
                }
                else Thread.Sleep(30000);
            }
        }
    }
}
 
Is item string correct? What is plant to collect when fully grown?
Is gather string correct? How much labor it cost to gather?
 
Log("Farm: "+farm);
CollectItemsAtFarm(item, "Gathering: Spend 1 Labor to gather materials.", farm);
CollectItemsAtFarm(item, "Farming: Spend 1 Labor to harvest crops.", farm);
PlantItemsAtFarm(seed, farm);
}


The issue is that it WILL NOT gather outside of a farm. Does collectitemsatfarm(item
Need to be collectallitemsatworld?

I coded WoW profiles. I am very new to AA architecture
 
Ah, yes CollectItemsAtFarm requires plants to be on a farm.
For outside world you'd have to either setup a temporary zone with PolygonZone or directly interact with the doodad.

http://archebuddy.com/API/
 
Back
Top