Stripped ProjectAlchemy Source Code

12/28/2010 21:52 gorgone#406
yeap i think same denominator :) mine is the best way to find goods items, but i love mine in tc mine sad many pkers but is sooo funny !!
12/28/2010 22:01 denominator#407
Try using /dcplayers in TC mine hahahaha it gets really annoying haha. Always relogging lmao.
12/28/2010 22:10 demon17#408
Lol i wasnt able to make mining work .. lmao ... ;)) But i farmed up 5 ninjas ...
But i wana start to mine .. My laptop suport up to 6-7 clients opens , But also i can make it to 8-9 disabling some programs. I also have my Bros Computer near me .. 4 clients ;))
So anyway , i wana make it work .. :P ,
But still cant :P
12/28/2010 22:12 gorgone#409
hihihi anyway is so fun with this pro4never proxy much ideas around same job Amazing !!
12/29/2010 01:29 denominator#410
Again pseudo-codes are much needed :) I know where to put the codes now but I am absolutely clueless as to what to put >.< I have had a look at the hunting bot part and tried to get an understanding as to how it works and then have tried to get my head around something simple such as mining but damn >.<

All we need to do is get the bot to search our inventory and if the ores are in there to drop them, I assume that for different ores we need to add extra to

Code:
public static bool IsOre(uint ID)
        {
            if (ID >= 1072010 && ID <= 1072052)
                return true;
            else return false;
        }
And also if that`s the case then where to find ore IDs? Sorry I should realistically know most of this because of messing with pservers but I forgot >.<
12/29/2010 01:41 Santa#411
Denominator,

I felt it easier to add the items that you want to keep (or drop, which ever is shorter) to a dictionary, whether you load them from a file or not, and then just check each item in the inventory with those items, if it contains it then drop. Realistically you shouldn't drop ores everyone X mins on the minute, you should do like NextDrop = Rand(180000, 720000) and then have a check
if (LastDrop.addmilleseconds(NextDrop) < TimeNow)
if(Orestodrop.contain(i.uid)
drop(Client);

Of course there should be some more checks but that is how i would do it
12/29/2010 01:42 Santa#412
#request Delete, Double posted
12/29/2010 05:10 denominator#413
Thank you :)
12/29/2010 05:22 Santa#414
Has anyone else finished "Pullweights"? If you have, have you noticed that it doesn't find the most direct path? This is what it is doing to me.

[Only registered and activated users can see links. Click Here To Register...]

I'm going from the Farthest side of BI down to the portal, once there, go back.
12/29/2010 05:29 Santa#415
#Request Delete, AGAIN. My internet is being really stupid, specially sense it posted it AGAIN minutes later.
12/29/2010 05:40 OELABOELA#416
Quote:
Originally Posted by StarBucks View Post
Has anyone else finished "Pullweights"? If you have, have you noticed that it doesn't find the most direct path? This is what it is doing to me.

I'm going from the Farthest side of BI down to the portal, once there, go back.
May i ask, what kind of jumps are you using to jump the path? Like what combination (NORMAL 137-CLI 156) Because im trying it to, and somehow when i jump with 137, and clijump with 156 after it, it just DOESN't update/move. It's just moving at 1 position.




<Edit>
Ill throw you guys a 'bone' about mining.

Okay lets see, i will explain how you need to make this mining function.

Firstly thanks to P4N his base, all the items we mine will be added to an inventory array. We could maybe check if there is a ore in it and make it drop. We will be doing that by this:
Code:
 foreach (Items.ItemInfo invenitem in C.Inventory.Values)
            {
             //Do stuff here
            }
As you can see it will go through every Item in the inventory now(That's hold by the Client) and this way we can do something with 'invenitem' like getting the UID!
Let's try that out!
Code:
 if (Handler.IsOre(invenitem.ID))
{
//Yea yeah, we coming there
}
It will now check if the item is an ore, and if so we could do some actions with it. Maybe dropping?
Let's see how that works.
Code:
Packets.DropItem(C, invenitem.UID);
That's the code to drop the item. But the problem is now, if we are going to mine, and we have already some ores in inventory it will spam this packet and after all get you INSTANTLY botjailed.
So what we gotta do now is, add somekind of waittime. We will do that like this:
Code:
 if (C.LastDropped.AddMilliseconds(1000) < DateTime.Now)
                    {
                              Packets.DropItem(C, invenitem.UID);
                    }
Yea, now it will drop an item every second. That's pretty normal and will not get you botjailed ever.



Okay, now we have handled all the parts it will after all make a mining drop function. I made it already for you guys, but i wouldn't leech this without reading above, because you will not learn from that and if you have read above you will see that i made somekind of anti-leech in there.
Code:
foreach (Items.ItemInfo inventitemin C.Inventory.Values)
            {
                if (Handler.IsOre(inventitem.ID))
                {
                    if (C.LastDropped.AddMilliseconds(1000) < DateTime.Now)
                    {
                        Packets.DropItem(C, inventitem.ID);
                        C.LastDropped = DateTime.Now;

                    }
                }

            }
12/29/2010 05:47 Santa#417
Well im not doing this on retail, don't wanna waste 15 accounts getting banned, so im learning on a 5065 binary server. For normal jump i just use 133, which would be 137 for you. And for the client packet I'm using 86 every 9 jumps or so cause i couldn't get Correct cords(108) to work.

Pm me your msn.

edit

I read your above post about mining. I'm not sure but it seems that your dropping section isn't as efficient as it could be. You should check the time BEFORE you shuffle through all the items in your inventory.

I personally made mine thread/client so i didn't have to worry about freezing other clients.
Not really sure about the pros/cons of thread/client but its working out fine for me so far, but I'm not planning on running more than my personal accounts.

Things like dropping items and all that stuff is far easier because you don't have to worry about holding up other clients.

My(basic) Mining.
Sorts through items in inventory, if ores to drop contains the value, add to drop list.
PHP Code:
public static void ItemtoDrop(Client C)
        {
            foreach (
Item I in Inventory.Values)
            {
                if (
Mining)
                {
                    if (
Program.OresToDrop.Contains(I.ItemID))
                    {
                        
ItemsToDrop.Add(I.UIDI);//Adds to a dictionary of items to drop, you could use a list or array for this as well.
                    
}
                }
            }
        } 
Drops all the ores in the dictionary.
PHP Code:
        public static void DropItem(Client C)
        {
                foreach (
Item I in ItemsToDrop.Values)
                {
                    while (
true)
                    {
                        if (
LastDropped.AddMilliseconds(200) < TimeNow)//loops till this is true.
                        
{
                            
LastDropped TimeNow;
                            
//send drop item packet
                            
Inventory.Remove(I.UID);
                            
ItemsToDrop.Remove(I.UID);
                            break;
//breaks while loop
                        
}
                    }
                }
        } 
This is the code that would be in my NewBot bool

PHP Code:
if (Mine)
            {
                if (
LastDropped.AddMinutes(2) < TimeNow)
                {
                    
MessagetoAll(Name": Dropping Ores"2005);
                    
ItemtoDrop(C);
                    if (
ItemsToDrop.Count 0)
                        
DropItem(C);
                    else 
LastDropped TimeNow;//So it doesn't continue to spam my functions, seems like a waste of time. 
                
}
            } 
I don't recommend you to C/p this into your proxy because this will freeze up other clients unless its thread /client
12/29/2010 06:19 denominator#418
So give or take it should look like this? Just a yes or no will be a good answer lol.

Code:
foreach (Items.ItemInfo invenitem in C.Inventory.Values)
                {
                    //Do stuff here
                }
                if (Handler.IsOre(invenitem.ID))
                {
                    //Yea yeah, we coming there
                }
                if (C.LastDropped.AddMilliseconds(1000) < DateTime.Now)
                {
                    Packets.DropItem(C, invenitem.UID);
                }
            }
12/29/2010 06:37 Santa#419
Quote:
Originally Posted by denominator View Post
So give or take it should look like this? Just a yes or no will be a good answer lol.

Code:
foreach (Items.ItemInfo invenitem in C.Inventory.Values)
                {
                    //Do stuff here
                }
                if (Handler.IsOre(invenitem.ID))
                {
                    //Yea yeah, we coming there
                }
                if (C.LastDropped.AddMilliseconds(1000) < DateTime.Now)
                {
                    Packets.DropItem(C, invenitem.UID);
                }
            }
No.

PHP Code:
           if(C.LastDropped.AddMilliseconds(1000) < DateTime.Now)
           {
               foreach (
Items.ItemInfo invenitem in C.Inventory.Values)
               {
                   if (
Handler.IsOre(invenitem.ID))
                   {
                       
//Drop ores here
                       //May as well break the loop.
                   
}
               }
           } 
12/29/2010 06:50 denominator#420
Well it`s 5:49am here now so I am going to get some sleep and have another looky at this tomorrow :)