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

["Release"] AutoOpenPurse

Blackclon

New Member
Joined
Sep 24, 2014
Messages
35
Reaction score
0
Just wanted to share this little pice of code with u guys/girls

Code:
           List<Item> InvItems = getInvItems("Priest's Coinpurse");
           foreach (Item InvItem in InvItems)
            {
                while(InvItem.count > 0)
                {
                    Log("#items :" + InvItem.count);
                    InvItem.UseItem(true);
                    while(me.isGlobalCooldown)
                    {
                        Thread.Sleep(50);
                    }
                }   
            }

It just opens all those Purses in ure bag automaticaly. Can be used as an aditional thread in ure grinding bot or standalone.
In this case it justs opens all Priest's Coinpurses but u can open any other to of corse.
 
Can't you just shift-right click the coin purses? It uses them all just like in this script :p.
 
Oh realy?! didnt know that. Well script still does a little more and when included in a grindbot its still better having to do nothing instead of a little but thx gtk :)
 
It doesn't work for me. Can someone send me a code of auto-open Coinspurses pls?

Ty
 
Just posted a slightly more complete version for another post:

Edit: Made it standalone for you ... it might not work as is as i didnt test it, but any corrections should be minor

my routine is:
Code:
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 {
            
	
        private List<uint> _coinpursesList = new List<uint>
        {
            29203, 29204, 29205, 29206, 29207
        };

        public void PluginRun() {
             foreach (
                Item i in
                    me.getItems()
                        .Where(
                            i =>
                                i.place == ItemPlace.Bag && _coinpursesList.Contains(i.id)))
                                //(i.id == 29203 || i.id == 29204 || i.id == 29205 || i.id == 29206 || i.id == 29207)))
            {
                try
                {
                    if (i == null) continue;
                    while (i.count > 0 && me.opPoints > 150 && me.isAlive())
                    {
                        Thread.Sleep(150);
                        i.UseItem();
                        MyWait(200, 500);
                        }
                }
                catch (Exception ex)
                {
                    Log("!!## Processinventory", "GhRider");
                    //LogEx(ex);
                }
            }
        private static void MySleep(int frm, int to)
        {
            var rnd = new Random();
            var wait = rnd.Next(frm, to);
            Thread.Sleep(wait);
        }        
}

it will really just use the items with the id in _coinpurses so anything can be put there ... to use it as AFK routine modify the mysleep line with something like 200000,240000
 
Back
Top