Stripped ProjectAlchemy Source Code

12/29/2010 08:33 demon17#421
:P Today after i woked up and farmed 1 ninja to lvl 111 ( about half hour.)
I was oppened my net broswer and come to epvp .. I saw someones made some pseudo codes ;))
I tryed to add mining to my bot :P

1st:
I tried to add these
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 
                        } 
                    } 
                } 
        }

but i got 2 errors :P

1: ItemToDrop not a valid .... in this context
2: IsOre not a walid .... in this context ..

What i should do exactly to make work mining?:P

Oelaboela Can you help me ?
Or other Who made it work?


Edit1< The upper code is just an exemple .. I tryed in diferent ways to make it work,,, Where should i need to add codes? Only on Handlers >Bot?

After reading them again . I made an ArrayList for items. Ores
Code:
public static ArrayList ItemsToDrop = new ArrayList() { 1072059, 1072058, 1072057, 1072056, 1072055, 
            1072054, 1072053, 1072052, 1072051, 1072050, 1072049, 1072048, 1072047, 1072046, 1072045, 1072044, 1072043, 1072042, 1072041, 
            1072040, 1072031, 1072029, 1072028, 1072027, 1072026, 1072025, 1072024, 1072023, 1072022, 1072021, 1072020, 1072019, 1072018, 
            1072017, 1072016, 1072015, 1072014, 1072013, 1072012, 1072011, 1072010, };
But now how i asign this to
Code:
public static void ItemtoDrop(Client C) 
        { 
            foreach (Item I in Inventory.Values) 
            { 
                if (Mining) 
                { 
                    if (Program.OresToDrop.Contains(I.ItemID)) 
                    { 
                        ItemsToDrop.Add(I.UID, I);//Adds to a dictionary of items to drop, you could use a list or array for this as well. 
                    } 
                } 
            } 
        }
When i add ^ to the Bot.cs i got an error msg // Inventory
Code:
foreach (Item I in Inventory.Values)
Dose not exist in curent sintax .. How i resolve these ?
12/29/2010 09:33 OELABOELA#422
Quote:
Originally Posted by demon17 View Post
After reading them again . I made an ArrayList for items. Ores
Code:
public static ArrayList ItemsToDrop = new ArrayList() { 1072059, 1072058, 1072057, 1072056, 1072055, 
            1072054, 1072053, 1072052, 1072051, 1072050, 1072049, 1072048, 1072047, 1072046, 1072045, 1072044, 1072043, 1072042, 1072041, 
            1072040, 1072031, 1072029, 1072028, 1072027, 1072026, 1072025, 1072024, 1072023, 1072022, 1072021, 1072020, 1072019, 1072018, 
            1072017, 1072016, 1072015, 1072014, 1072013, 1072012, 1072011, 1072010, };
But now how i asign this to
Code:
public static void ItemtoDrop(Client C) 
        { 
            foreach (Item I in Inventory.Values) 
            { 
                if (Mining) 
                { 
                    if (Program.OresToDrop.Contains(I.ItemID)) 
                    { 
                        ItemsToDrop.Add(I.UID, I);//Adds to a dictionary of items to drop, you could use a list or array for this as well. 
                    } 
                } 
            } 
        }
When i add ^ to the Bot.cs i got an error msg // Inventory
Code:
foreach (Item I in Inventory.Values)
Dose not exist in curent sintax .. How i resolve these ?
Lol, did you even read the c# book? If you did that you would have know the answer :)
12/29/2010 09:37 demon17#423
Quote:
Originally Posted by OELABOELA View Post
Lol, did you even read the c# book? If you did that you would have know the answer :)
lol Guess why i ask ?;))
Can you help me ?
I know where to add the functionality
12/29/2010 10:56 Santa#424
demon17, i would not use that code because it WILL hold up all your other logged accounts.

Try this following Code
NOTE: THIS IS NOT COMPLETE AND WILL NOT WORK IF YOU JUST COPY AND PASTE

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 11:20 demon17#425
Quote:
Originally Posted by StarBucks View Post
demon17, i would not use that code because it WILL hold up all your other logged accounts.

Try this following Code
NOTE: THIS IS NOT COMPLETE AND WILL NOT WORK IF YOU JUST COPY AND PASTE

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.
                   
}
               }
           } 
I know about will not work when c-p only .. But at Drope ores here <--- what i need to add . ??

I need to add the Item ID? or w/e?
12/29/2010 11:50 OELABOELA#426
Quote:
Originally Posted by demon17 View Post
I know about will not work when c-p only .. But at Drope ores here <--- what i need to add . ??

I need to add the Item ID? or w/e?
You didnt even read my tutorial, because you didn't fix the bug i had put it in, its very small. And even when you look at the code you can see it CLEARLY.

And try to look from what class your call IsOre is coming, then put that before it, so you get..
Code:
Handler.IsOre
12/29/2010 12:18 demon17#427
Quote:
Originally Posted by OELABOELA View Post
You didnt even read my tutorial, because you didn't fix the bug i had put it in, its very small. And even when you look at the code you can see it CLEARLY.

And try to look from what class your call IsOre is coming, then put that before it, so you get..
Code:
Handler.IsOre
To be honest i read it for 4-5 times .. but cant understand what is the bug added by you ;))
12/29/2010 16:28 denominator#428
Again where do we find the IDs for different type of ores? I`m assuming it is in the client?
12/29/2010 19:17 OELABOELA#429
Quote:
Originally Posted by denominator View Post
Again where do we find the IDs for different type of ores? I`m assuming it is in the client?
If you mean how we found those IDs? They are found in itemtype.ini somewhere in your conquer folder.
12/29/2010 19:46 pro4never#430
Quote:
Originally Posted by OELABOELA View Post
If you mean how we found those IDs? They are found in itemtype.ini somewhere in your conquer folder.
Itemtype.dat is encrypted but there is a decryptor posted by high6 on here.


Also, i already have an isore method in the damn proxy *sigh* no one seems to look for these things.

Just put in the item id and it returns a bool of if it needs to be dropped. Then you just pass to the drop item packet handler using the items UID. Keep in mind you can't spam drop ( i had it drop 1 item every few seconds) so just do like a lastdropped datetime and be sure to update it when you drop something and check when dropping the new one.
12/29/2010 19:58 OELABOELA#431
Quote:
Originally Posted by pro4never View Post
Itemtype.dat is encrypted but there is a decryptor posted by high6 on here.


Also, i already have an isore method in the damn proxy *sigh* no one seems to look for these things.

Just put in the item id and it returns a bool of if it needs to be dropped. Then you just pass to the drop item packet handler using the items UID. Keep in mind you can't spam drop ( i had it drop 1 item every few seconds) so just do like a lastdropped datetime and be sure to update it when you drop something and check when dropping the new one.
Isnt the part i made good then? And, the guy asked for where we found ID's, and you can just find that in itemtype.ini.
12/29/2010 20:12 denominator#432
IsOre covers Iron, euxenite, copper, and silver ores then? Yeah got an itemtype.dat decryptor already have had it for ages to change most of the stuff in my Pserver lol. Yeah I see IsOre also I DID notice that but I am just asking if it covers ALL ores? Nevermind just decrypted itemtype and see that it covers most of the ores up to rate 5 gold ore I think?
12/29/2010 20:53 Santa#433
Quote:
Originally Posted by pro4never View Post
Itemtype.dat is encrypted but there is a decryptor posted by high6 on here.


Also, i already have an isore method in the damn proxy *sigh* no one seems to look for these things.

Just put in the item id and it returns a bool of if it needs to be dropped. Then you just pass to the drop item packet handler using the items UID. Keep in mind you can't spam drop ( i had it drop 1 item every few seconds) so just do like a lastdropped datetime and be sure to update it when you drop something and check when dropping the new one.
I did see that you had a bool to check if its an ore or not, but that doesn't help much if you want to say, keep gold ores or something. I find it easier and more friendly to just create a list of stuff to keep/drop and check it to that, that way i can change it to what i want.
12/29/2010 21:01 denominator#434
I think it`s designed to keep rate 5 and above gold ores but drop everything else judging on the itemtype and the numbers it refers to :) I guess you could just change the last numbers if you want it to mine all gold ores?
12/29/2010 21:28 gorgone#435
[Only registered and activated users can see links. Click Here To Register...]

here is for u decripted and ordinate :))

here is my miner procedure

public static bool NewMine(Client C)
{
if (C.Mining)
{

foreach (Items.ItemInfo I in C.Inventory.Values)
{
if ((IsOre(I.ID)) && (C.LastJump < DateTime.Now ))
{
Packets.DropItem(C, I.UID);
C.LastJump = DateTime.Now;//Didn't add this before botjail

}

}

}

return true;
}


this is an idea take an use like u want :]