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 "fred";
}
public static string GetPluginVersion()
{
return "0.1";
}
public static string GetPluginDescription()
{
return "Use loyalty tokens";
}
//Call on plugin start
public void PluginRun()
{
List<Item> inventory = getAllInvItems();
foreach (Item myitem in inventory)
{
if (myitem.name == "Loyalty Token x 1" || myitem.name == "Loyalty Token x 3)
{
var itemcount = itemCount(myitem.name);
while (itemcount > 0)
{
Log("number of " + myitem.name + "(s) = " + itemcount);
UseItem(myitem.name, false);
Thread.Sleep(2000);
itemcount = itemcount - 1;
}
}
}
}
}
}