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

[Plugin] Extractor - Extract Archeum from Gear

tictoc

Member
Joined
Sep 21, 2012
Messages
380
Reaction score
5
This is an example how to extract/disenchant gear ("Apprentice's Quake Vambraces"):

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 Extractor {
    public class Extractor : Core
   {
       public static string GetPluginAuthor()
       {
           return "tictoc";
       }

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

       public static string GetPluginDescription()
       {
           return "Extractor - Extract Archeum from Gear";
       }

       //Call on plugin start
       public void PluginRun()
       {    
           List<Item> inventory = getAllInvItems();
           foreach (Item myitem in inventory)
           {
               if (myitem.name == "Apprentice's Quake Vambraces")
               {
                   Log("Extract Item: " + myitem.name);   
                   myitem.Disenchant();   
                   Thread.Sleep(2000);
               }
           }
       }
       //Call on plugin stop
       public void PluginStop()
       {
       }
   }
}
 
Make it like traveller, wher you have a list, and you check each for disenchant, or dis all. would be neat

sorry i would do it myself but i am not a clever man.
 
So while this is a handy plugin. How would i make it loop while i had, say multiple c racked chaos lunafrost? (it won't let me say the c word. puts * instead)
 
Last edited:
Yes I did. the problem is that while the vambraces take up one slot each the Lunafrost's are stacked. It breaks down one in the stack then stops. If I seperate them out into individual slots THEN it breaks all of them down that are individual slots. If any are still left in a stack it ignores all but one then terminates then I have to either spam the bot with mouse clicks OR break them down into singles....Anyone but me think of a stripper with this bot? ;)
 
no idea for sure but you probably need to just make it recheck items in inventory on each round with a while statement or something maybe?
the foreach only checks one item which it did the de on but then you need to recheck inventory and have it do it again right since it thinks it already de'ed all of them since there stacked and only shows one of them in the inventory?
while (1)
{
List<Item> inventory = getAllInvItems();
foreach (Item myitem in inventory)
{
if (myitem.name == "Apprentice's Quake Vambraces")
{
Log("Extract Item: " + myitem.name);
myitem.Disenchant();
Thread.Sleep(2000);
}
}
}
??? no idea for sure if this would work but you see what i am getting at at least with it?
 
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 Extractor {
    public class Extractor : Core
   {
       public static string GetPluginAuthor()
       {
           return "tictoc";
       }

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

       public static string GetPluginDescription()
       {
           return "Extractor - Extract Archeum from Gear";
       }

       //Call on plugin start
       public void PluginRun()
       {    
           List<Item> inventory = getAllInvItems();
           foreach (Item myitem in inventory)
           {   
               if (myitem.name == "*****ed Chaos Lunafrost")
               {                               
                   var itemcount = itemCount(myitem.name);
                   while (itemcount > 0){
                        Log("number of " + myitem.name + "(s) = " + itemcount);
                        Log("Extract Item: " + myitem.name);   
                        myitem.Disenchant();   
                        Thread.Sleep(2000);
               }                             
           }
           }
       }
       //Call on plugin stop
       public void PluginStop()
       {
       }
   }
}

OK. So I got it to loop like this BUT how do I get it to refresh the count and eventually end?
 
seeing as how you count the items with
var itemcount = itemCount(myitem.name);
can you try this to see if it works
after thread.sleep(2000);
add this line
itemcount = itemcount - 1;
which should subtract one from your count var and you may want to name it something else if itemCount is build in method or whatever as it might not care about case for commands not sure on that.
I am not even sure if thats how you subtract one from a var but you get the idea? and if it works can you show us what finished code looks like please.
 
Last edited:
Ever feel like your having a serious derp day? That's me today. thanks for the advice Fredgsanford. I'll give that a try asap and get back to ya on that.
 
Is there a way to loop this with crafting the vambraces, for example, to continuously craft them and conserve archeum? What I mean is, it would craft one vabrace, break it down, and craft it again.
 
Hey Fred. Just got the chance to try it, one of my guild mates crafts those *****ed lunafrosts, and it works great. Thanks a ton for the help.
 
Back
Top