I'm trying to make a Auto open coinspurse while afk but I don't know why it doesn't open coinpurses. Can someone help me please?
Here is the code:
Here is the code:
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 YourNamespace {
public class DefaultClass: Core {
public void PluginRun() {
while (true) {
//get Labor points
int labor = me.laborPoints;
//if Labor > 10
if (labor > 10) {
UseItem(34007); //Use Merchant's Coinpurse
Log("Opening");
//if Labor < 10 wait
} else {
Log("Labor under 10, waiting to regen");
System.Random RandNum = new System.Random();
int waitTime;
waitTime = RandNum.Next((1000*60)*1, (1000*60)*2);
Log("Waiting for " + waitTime / 1000 + "seconds");
Thread.Sleep(waitTime);
UpdateNoAfkState();
Turn(0.5);
}
}
}
}
}