Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Bots & Macros
You last visited: Today at 07:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Stripped ProjectAlchemy Source Code

Discussion on Stripped ProjectAlchemy Source Code within the CO2 Bots & Macros forum part of the Conquer Online 2 category.

Reply
 
Old 12/07/2010, 21:17   #31
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by denominator View Post
Nevermind I got it loaded up lol.

Is it just me or does Conquer have a problem loading up most of the time with this? I did something simple and now can lvl waterelf with watertaoists

I assume Distance is a bit of a giveaway? Regardless it gives an error "Cannot convert type 'uint' to 'AlchemyProxy.Mob'" I tried googling for that error as well but according to Google "uint" doesn`t seem to exist o.0
ushort, uint, ulong, short, int, long are all numeric types that do not contain decimals which can hold different ranges of numbers.


Mob is NOT a simple number. It's a class which holds all sorts of information on the monster. In order to compare distances you must run a calculation to find how far away the monster is... aka the 'distance' method which takes 4 parameters. Starting x/y and target x/y.

Keep in mind that the furthest you can jump/fatal strike is 18, furthest you can shift is 7 and normal melee attacks are 1-2 range.

Quote:
Originally Posted by janvier123 View Post
Reportet at 12.07.2010 - 2:50 PM
-multiple post (please use the "Edit-Button")
Please read the

and by a Guardian ... bad karma

As korv said to you in my pserver tracking thread, I'm allowed to make multiple posts if I want to seeing as they tend to contain large amounts of information/updates.

If you don't like the release then stop trolling and get out of my thread

<edit>

Added guide to first post on how to set up.. and seeing as I'm putting off studying, lets go over some BASICS of how to code in some minor bot functionality.



Lesson 1:

Think logically and break things down into their most basic steps!


-What methods do we need for our bot?
That depends on what we want it to do but the main actions we want to take are...

-Looting
-Attacking
-Moving
-Dropping

That covers 99 pct of botting functionality correct? Before we can code anything into the bot we need to be able to perform these actions in controlled circumstances... any logic behind WHEN to execute them comes much later.

Well for looting we already have a packet for it coded into the source!

Packets.PickItem(Client, GroundItem);

Ok so to call this we need to know who is looting what item... Well that's easy enough seeing as our client thread already has a client object calling it right? Well we need to know about the ground item we want to try to loot... We can only loot something when we are standing on top of it... which will always be the closest item would it not? So why don't we write a method to pull the closest item?

But wait! How do we know which is closest? Well... there's already a handy Distance method in the source: Handler.Distance(X1, Y1, X2, Y2)... ok well how can we use that to figure out which item is closest? How do we know where items are in the game? Easy! We already have a dicitonary being updated to add/remove local items to our client... This is contained as a dictionary known as GroundItems in the client object which holds a key of the item uid and a value of the item struct (which contains the x/y info!)

So... to determine which is the closest item we should be running through local items to determine which is lowest... correct?

Ok well we can easily run through each item in the collection using the foreach loop!

foreach(GroundItem I in Client.GroundItems.Values)//we use values because we are not concerned with the keyvalue pairing of uid/item struct!
{
//code
}

ok so that's all well and good but how do we properly write this and determine which is closest?

Well we are going to write a method which returns the closest item!

WOAH! A method?! that sounds hard!

No, not really. Think of it like a handy math equation which you can simply just enter in values and get a result from... in this case we are going to need an input value of our client and we want a return value of the closest item correct? well that means we want the return type to be a GroundItem object.

Code:
public static Items.GroundItem GetClosestItem(Client C)
{
Items.GroundItem I = null;
//code
return I;
}
This code will return a null reference exception if you try to actually use the object returned... because it has no value! I'm doing that for a reason. It means if there are no items in range it will return a null value and we can perform other actions (such as no items in range = kill shit!)

So now all we need to do is plug in our distance calculation and determine if the new item being checked is closer than the previous item right?

Code:
 public static Items.GroundItem GetClosestItem(Client C)
        {
            Items.GroundItem I = null;
            int Dist = 19;
            foreach (Items.GroundItem Item in C.GroundItems.Values)
            {
                if (Distance(C.X, C.Y, Item.X, Item.Y) < Dist)
                {
                    I = Item;
                    Dist = Distance(C.X, C.Y, I.X, I.Y);
                }
            }
            return I;
        }
WOAH! You added some new shit!! What does it mean?!

Well... all we are doing is setting an initial item distance. The furthest item we would like to pull is a distance of 18 (aka off screen). No such objects SHOULD be in the collection as we are calling the updatelocal method to remove anything offscreen any time we move but it's always better to be safe than sorry... besides we want a value to compare it against!

So now all we do is run our distance calculation and check if it's closer than the last item checked... If so we update the item to return and change the distance. If not we never update distance and the next item is checking distance vs the original 18 dist (so you won't actually receive the closest item)

And there you have.. a very simple method of finding the closest item to yourself and also an explanation of what many of the methods in the source do.

You could now modify it to return the... closest rare item... closest money... closest gear item or anything you like by adding 1 more check before you update distance/item to return.

This exact same idea can be applied to things like monsters as well!

It's all very simple stuff.. Hopefully this little guide/explanation will help some ppl get a start on it.
pro4never is offline  
Thanks
3 Users
Old 12/07/2010, 22:08   #32
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
So the "foreach" is wrong? Because that`s the only thing I have a red squiggle under.
denominator is offline  
Old 12/07/2010, 22:12   #33
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by denominator View Post
So the "foreach" is wrong? Because that`s the only thing I have a red squiggle under.
How are you writing it?

If you are using a dictionary you need to either A: use a keyvaluepair<value, value> to loop through (cause... it's a dicitonary, they are paired lol!) or you need to iterate through either keys or values.

IE:

foreach(KeyValuePair<uint, Items.GroundItem> I in Client.GroundItems)
{
if(blabla I.Value.X, I.Value.Y)blablabloa
}

OR

foreach(Items.GroundItem I in Client.GroundItems.Key)
blabla calcs

Note: you can also break out of a loop as soon as you reach certain conditions using break;


Conditions might include a closest item with a distance of 0... or a mob distance of 2 or less.
pro4never is offline  
Old 12/07/2010, 22:16   #34
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Ok I put this in Distance.cs

Code:
public static Mob GetClosestMonster(Client C)
        {
            Mob ToReturn = null;
            int Dist = 18;
            foreach (Mob M in C.LocalMobs.Keys)
             {
                if (Distance(C.X, C.Y, M.X, M.Y) < Dist)
                {
                    ToReturn = M;
                    Dist = Distance(C.X, C.Y, M.X, M.Y);
                    if (Dist < 2)
                        break;
                }
            }
            return ToReturn;
        }
Foreach gives the error of uint problem
denominator is offline  
Old 12/07/2010, 22:26   #35
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by denominator View Post
Ok I put this in Distance.cs

Code:
public static Mob GetClosestMonster(Client C)
        {
            Mob ToReturn = null;
            int Dist = 18;
            foreach (Mob M in C.LocalMobs.Keys)
             {
                if (Distance(C.X, C.Y, M.X, M.Y) < Dist)
                {
                    ToReturn = M;
                    Dist = Distance(C.X, C.Y, M.X, M.Y);
                    if (Dist < 2)
                        break;
                }
            }
            return ToReturn;
        }
Foreach gives the error of uint problem
Change Keys to Values.

Keys = the uid for the monster and values is the actual monster struct.


Think of it like a filing system... Everything has a key value (unique, no two entries can have the same). When you want to find something, you look up the key and the object associated with it is returned.

In this case the value is the monster struct and the key is the UID of the mob. As such you could do something like...


Client.LocalMonsters[300000] to pull the monster with UID 300,000 (assuming such a monster existed)
pro4never is offline  
Thanks
1 User
Old 12/07/2010, 22:34   #36
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Thank you I am going to read over these little tuts for a long time because this kind of thing does interest me as does the private servers I really want to get a good understanding of it all. I still can`t believe I actually got the thing to run lol.

Oh that`s something I wanted to ask, if only I am using the source for myself do I need to worry about password decryption?
denominator is offline  
Old 12/07/2010, 22:37   #37
 
demon17's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 676
Received Thanks: 109
Quote:
Originally Posted by denominator View Post
Thank you I am going to read over these little tuts for a long time because this kind of thing does interest me as does the private servers I really want to get a good understanding of it all. I still can`t believe I actually got the thing to run lol.

Oh that`s something I wanted to ask, if only I am using the source for myself do I need to worry about password decryption?
nice for you , i wanst able to run it .. At connecting to account server ... the client froze
demon17 is offline  
Old 12/07/2010, 22:42   #38
 
elite*gold: 0
Join Date: Sep 2008
Posts: 559
Received Thanks: 1,461
Quote:
Originally Posted by demon17 View Post
nice for you , i wanst able to run it .. At connecting to account server ... the client froze
Working fine for me... I can help you... U have team viewer?
vecko12 is offline  
Old 12/07/2010, 22:43   #39
 
demon17's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 676
Received Thanks: 109
i can download it and instal fast :P
demon17 is offline  
Old 12/07/2010, 22:44   #40
 
elite*gold: 0
Join Date: Sep 2008
Posts: 559
Received Thanks: 1,461
Quote:
Originally Posted by demon17 View Post
i can download it and instal fast :P
Sure... Then send me the ID and pass here or in p. message
vecko12 is offline  
Old 12/07/2010, 22:48   #41
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by denominator View Post
Thank you I am going to read over these little tuts for a long time because this kind of thing does interest me as does the private servers I really want to get a good understanding of it all. I still can`t believe I actually got the thing to run lol.

Oh that`s something I wanted to ask, if only I am using the source for myself do I need to worry about password decryption?
Password decryption is never an issue really.

I only enabled it

#1: because I know how to do it already from writing it in my pserver where it's actually needed

and

#2: hosting a public free proxy comes with risks to myself, knowing who is using the proxy is a bit of a safety net incase tq were to try to take some form of legal action against me (unlikely but better safe than sorry).

I removed it because releasing a proxy which has the built in capability to log all username/password/server and the gear/money/cp of ppl using it to ppl on a hacking forum is ASKING for ppl to start spamming ppl to use their 'awesome proxy' so that they can hack people.

I only logged because it would be kinda stupid for me not to keep some kind of an eye on who was using the proxy.
pro4never is offline  
Thanks
2 Users
Old 12/07/2010, 22:51   #42
 
elite*gold: 0
Join Date: Sep 2008
Posts: 559
Received Thanks: 1,461
Quote:
Originally Posted by pro4never View Post
Password decryption is never an issue really.

I only enabled it

#1: because I know how to do it already from writing it in my pserver where it's actually needed

and

#2: hosting a public free proxy comes with risks to myself, knowing who is using the proxy is a bit of a safety net incase tq were to try to take some form of legal action against me (unlikely but better safe than sorry).

I removed it because releasing a proxy which has the built in capability to log all username/password/server and the gear/money/cp of ppl using it to ppl on a hacking forum is ASKING for ppl to start spamming ppl to use their 'awesome proxy' so that they can hack people.

I only logged because it would be kinda stupid for me not to keep some kind of an eye on who was using the proxy.
Right!
vecko12 is offline  
Old 12/07/2010, 22:52   #43
 
demon17's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 676
Received Thanks: 109
nice but i guss when you can help us 2 to make the hunt workin , i not need speed hack or others , I wana only hunt to lvl my wariors

I send you the pas and what is needed
demon17 is offline  
Old 12/07/2010, 22:58   #44
 
OELABOELA's Avatar
 
elite*gold: 223
Join Date: Dec 2007
Posts: 1,076
Received Thanks: 257
Quote:
Originally Posted by pro4never View Post
ushort, uint, ulong, short, int, long are all numeric types that do not contain decimals which can hold different ranges of numbers.


Mob is NOT a simple number. It's a class which holds all sorts of information on the monster. In order to compare distances you must run a calculation to find how far away the monster is... aka the 'distance' method which takes 4 parameters. Starting x/y and target x/y.

Keep in mind that the furthest you can jump/fatal strike is 18, furthest you can shift is 7 and normal melee attacks are 1-2 range.




As korv said to you in my pserver tracking thread, I'm allowed to make multiple posts if I want to seeing as they tend to contain large amounts of information/updates.

If you don't like the release then stop trolling and get out of my thread

<edit>

Added guide to first post on how to set up.. and seeing as I'm putting off studying, lets go over some BASICS of how to code in some minor bot functionality.



Lesson 1:

Think logically and break things down into their most basic steps!


-What methods do we need for our bot?
That depends on what we want it to do but the main actions we want to take are...

-Looting
-Attacking
-Moving
-Dropping

That covers 99 pct of botting functionality correct? Before we can code anything into the bot we need to be able to perform these actions in controlled circumstances... any logic behind WHEN to execute them comes much later.

Well for looting we already have a packet for it coded into the source!

Packets.PickItem(Client, GroundItem);

Ok so to call this we need to know who is looting what item... Well that's easy enough seeing as our client thread already has a client object calling it right? Well we need to know about the ground item we want to try to loot... We can only loot something when we are standing on top of it... which will always be the closest item would it not? So why don't we write a method to pull the closest item?

But wait! How do we know which is closest? Well... there's already a handy Distance method in the source: Handler.Distance(X1, Y1, X2, Y2)... ok well how can we use that to figure out which item is closest? How do we know where items are in the game? Easy! We already have a dicitonary being updated to add/remove local items to our client... This is contained as a dictionary known as GroundItems in the client object which holds a key of the item uid and a value of the item struct (which contains the x/y info!)

So... to determine which is the closest item we should be running through local items to determine which is lowest... correct?

Ok well we can easily run through each item in the collection using the foreach loop!

foreach(GroundItem I in Client.GroundItems.Values)//we use values because we are not concerned with the keyvalue pairing of uid/item struct!
{
//code
}

ok so that's all well and good but how do we properly write this and determine which is closest?

Well we are going to write a method which returns the closest item!

WOAH! A method?! that sounds hard!

No, not really. Think of it like a handy math equation which you can simply just enter in values and get a result from... in this case we are going to need an input value of our client and we want a return value of the closest item correct? well that means we want the return type to be a GroundItem object.

Code:
public static Items.GroundItem GetClosestItem(Client C)
{
Items.GroundItem I = null;
//code
return I;
}
This code will return a null reference exception if you try to actually use the object returned... because it has no value! I'm doing that for a reason. It means if there are no items in range it will return a null value and we can perform other actions (such as no items in range = kill shit!)

So now all we need to do is plug in our distance calculation and determine if the new item being checked is closer than the previous item right?

Code:
 public static Items.GroundItem GetClosestItem(Client C)
        {
            Items.GroundItem I = null;
            int Dist = 19;
            foreach (Items.GroundItem Item in C.GroundItems.Values)
            {
                if (Distance(C.X, C.Y, Item.X, Item.Y) < Dist)
                {
                    I = Item;
                    Dist = Distance(C.X, C.Y, I.X, I.Y);
                }
            }
            return I;
        }
WOAH! You added some new shit!! What does it mean?!

Well... all we are doing is setting an initial item distance. The furthest item we would like to pull is a distance of 18 (aka off screen). No such objects SHOULD be in the collection as we are calling the updatelocal method to remove anything offscreen any time we move but it's always better to be safe than sorry... besides we want a value to compare it against!

So now all we do is run our distance calculation and check if it's closer than the last item checked... If so we update the item to return and change the distance. If not we never update distance and the next item is checking distance vs the original 18 dist (so you won't actually receive the closest item)

And there you have.. a very simple method of finding the closest item to yourself and also an explanation of what many of the methods in the source do.

You could now modify it to return the... closest rare item... closest money... closest gear item or anything you like by adding 1 more check before you update distance/item to return.

This exact same idea can be applied to things like monsters as well!

It's all very simple stuff.. Hopefully this little guide/explanation will help some ppl get a start on it.
Thank you for this method P4N! I got some base ready, but when i let it jump, and after att, It just doesnt update the positon (on my screen) but the server position does!
I use this as my update
Code:
 if (C.LastUpdate.AddMilliseconds(C.UpdateSpeed) < DateTime.Now)
               {
                   if (C.Xatting != 0)
                   {
                       C.X = (ushort)C.Xatting;
                       C.UpdatedX = C.X;
                   }
                   if (C.Yatting != 0)
                   {
                       C.Y = (ushort)C.Yatting;
                       C.UpdatedY = C.Y;
                   }
                   Calculations.UpdateLocal(C);
                   C.LastUpdate = DateTime.Now;

               }
(the xatting and yatting are from when i jump to a monster. It will attack on that position to.)

What must i do to get it like, working to jump/walk to the monster?


PS:Im so fucking excited about making this proxy. I really thank you P4N
OELABOELA is offline  
Old 12/07/2010, 22:59   #45
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Ahhh cool so then I won`t need to bother with it Only me going to use mine, less people using the longer it might stay on for lol.
denominator is offline  
Reply


Similar Threads Similar Threads
[RELEASE(SOURCE CODE)]-- KabBOT2 v1 Full Source(vb6)
10/07/2011 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 106 Replies
I've been meaning to post this for awhile but I pretty much forgot about it. I've been getting quite a few requests for it so I decided to finally get around to posting it. #1. So here you go, Just have or Download Visual Basic 6, you need to update it to VbRuntime 6 Service Pack 6. #2. Run the file name KabBOT.vbp. #3. Enjoy. 100% Virus Free VirusTotal.com report. VirusTotal - Free Online Virus, Malware and URL Scanner
[RELEASE] [OPEN SOURCE] CE 5.5 Pointer to AutoIt Source-Code
02/13/2011 - AutoIt - 6 Replies
Habe heute erst gemerkt, dass es hier eine AutoIt Sektion gibt xD also poste ich mal mein Programm mit rein. Funktionsweise: 1. in CE Rechtsklick auf den Pointer und auf "Copy" klicken 2. in meinem Programm auf "Code generieren" klicken 3. In euer Scite gehen und einfügen Hier ist der Source Code vom Programm:



All times are GMT +1. The time now is 07:15.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.