All I did was edit the previous gift retrievals from tictoc and DerpProgrammer to get the name db name of the gift. I am still looking on the ID to the Silverleaf box, I can't seem to retrieve with this code
That line only returns Patron Diadem Clock : 8000016 - If anyone wants to share let me know.
Anyways here's the code to get the Diadem's every hour
Code:
foreach (var i in getScheduleItems())
{
while(true)
{
Log (i.db.name + " : " + i.db.id );
Anyways here's the code to get the Diadem's every hour
Code:
using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using ArcheBuddy.Bot.Classes;
namespace DiademRetriever{
public class DefaultClass : Core
{
public static string GetPluginAuthor()
{
return "tictoc/DerpProgrammer";
}
public static string GetPluginVersion()
{
return "1.0";
}
public static string GetPluginDescription()
{
return "Diadem Retriever";
}
//Call on plugin start
public void PluginRun()
{
ClearLogs();
while (gameState != GameState.Ingame)Thread.Sleep(10000);
while (gameState == GameState.Ingame || gameState == GameState.LoadingGameWorld)
{
foreach (var i in getScheduleItems())
{
if (i != null)
{
if (i.db.name == "Patron Diadem Clock" && i.remainTime == 0 && i.totalReceivedCount < 2)
{
i.Claim();
Log ("Claimed Diadem: " + i.totalReceivedCount.ToString());
Thread.Sleep(1000);
}
if (i.db.name == "Patron Diadem Clock") Log("Waiting " + (i.remainTime / 60).ToString() + " minutes to get the next Diadem");
Thread.Sleep(i.remainTime*1000);
}
Thread.Sleep(1000);
}
}
}
//Call on plugin stop
public void PluginStop()
{
}
}
}