Register for your free account! | Forgot your password?

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

  • 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/08/2010, 03:47   #76
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
No... you should be using a method to accomplish ONLY one thing... in this case finding the monster closest to your character.

Then in the main bot thread check if the returned value is not null and then figure out if you want to either attack that monster or jump to it.


When writing methods they should be accomplishing ONE thing only. Ideally they should only be doing one generic function so that the same method can be used across a number of purposes...

EG: You shouldn't have the distance formula inside each and every method in which you want to use it... you should have it as a separate method so that you can call it from anywhere in the source.


Also keep in mind when creating things the differences between how you set something up...


public/private/protected: This sets the access level basically for the method. Public can be accessed outside of the class in which they reside, private cannot (generally you use a public get/set method to modify it).

static: Means that you cannot create new instances of this object. If you do not have the static keyword then you would be able to create more instances of it by using the new keyword.


ie: Coords are not static... you can have more than 1 coord but for a calculation you generally don't want more than 1 copy of the same calculation system.

Coord C = new Coord(); creates a new coord object... If you didn't do 'new' or assign it to an existing object it wouldn't work because it doesn't know which instance of an object you are referring to.

void/bool/etcetc is the return type. Void means it does NOT return a value, it simply executes a set of instructions. All others need a return type which can be used to initiate values.

IE: our get closest item method returns a ground item... so we can do something like

Items.GroundItem I = Calculations.GetClosestItem(C);

Alternatively you could use boolian logic with a bool return value to do something like...

if(Calculations.OffScreen(C, TargetCoords))
return;


You guys REALLY should be looking at some other guides both on epvp and elsewhere... there are a BUNCH in my siggy and all over the site... Try looking through some C# guides before you continue.
pro4never is offline  
Thanks
1 User
Old 12/08/2010, 03:52   #77
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Ok so leave it as this
Code:
public static Mob GetClosestMonster(Client C)
        {
            Mob ToReturn = null;
            int Dist = 18;
            foreach (Mob M in C.LocalMobs.Values)
             {
                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;
        }
denominator is offline  
Old 12/08/2010, 09:20   #78
 
demon17's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 676
Received Thanks: 109
Hy all
Im just at school and have a borred day except the part of my B-Day :P

I wana ask when someone made the bot able to use /hunt . I realy not need speed attack . only a bot wich can attack the monsters with minim 1.5x normal ( original attack )
I made the source to work for me , but only the /cyc 1=2 works )
I guessing when the part of the nexts are work propely :
- /Record - Sys msg is (jup to add points ) and wont show when i made the path i wana know when path dunction work. can anyone told me where can i see wich of programs work and what effect they have?

- /Mining - I wana make the mining part , anyone have made or has an exemple for how to ? Can you tell me where and what i need to code?
Cuz basicaly after the /mining tag the sistem msg told me [AlchemyProxy]-Mining = True
Functionality is deleted?

- /Looting - For me isnt importand i wana add only the part of loot specifyed item like DragonBall . Mett , GOld ( diferent rates )
I wana use the bot for lvling wariors with almost of my gears lvl 12 ( fixed p2-p3-p4 <--- i just workin on them )

When someone finish 1 of them can he tell me the code and where i need exactly to put?


P4N Ty for easy Guide ... I use Navicat Litle - Meaning is only like a tryal ( works nice i can see what character logged in , what map , which job , profesion
I hate the 6004 i think ) is botjail :P


Is realy easy to host the server , my ping is almost 0031-0036
I tryed at 1 of my friends to connect and he has a 0100 ping .. I think i will not have problems with ping .( the friend is from UK .)

Works prety nice , the Speedhack is dsicconectfull ) 5-15 jumps and after bb )

I gussing when someone can make the hunt work nicely and to tell me , ill be glad . I Use hamachi server to host ,
Today is my Bday so i think ill wont have enought time to study how to code the bot functionality but, ill try .. To night i was rest only 3 hours , cuz i need to woke up earlyer to go school .. 8 hours school and after i have 12-14 hours to code , resolve things :P

Cya all see all again when i go home :P
demon17 is offline  
Old 12/08/2010, 09:27   #79
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
ALL botting functionality is removed. You'll need to code it yourself.

If you took the time to look through some examples I'm positive you'd be able to work up something.

Hint for mining... why not run through items to drop... when the last item was dropped and then call the drop item packet for one of the items in the to drop list?

pro4never is offline  
Old 12/08/2010, 10:29   #80
 
demon17's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 676
Received Thanks: 109
Ok
But not understand anyway .. :P I never learnd propely coding . I know to made some things by my own experiece . w/out learning carefully maybe you can add some exemples? How to :P
demon17 is offline  
Old 12/08/2010, 11:46   #81
 
elite*gold: 0
Join Date: Sep 2008
Posts: 559
Received Thanks: 1,461
Quote:
public partial class Handler
{
public static void COut(string Out)
{
Console.WriteLine(Program.ProxyTitle + " " + Out);
}
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;
}

public static bool IsOre(uint ID)
{
if (ID >= 1072010 && ID <= 1072052)
return true;
else return false;
}
public static Mob GetClosestMonster(Client C)
{
Mob ToReturn = null;
int Dist = 8;
foreach (Mob M in C.LocalMobs.Values)
{
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;
}
public static bool OnScreen(Client C, ushort X, ushort Y)
{
try
{
bool On = false;
if (Math.Abs(C.X - X) < 19)
if (Math.Abs(C.Y - Y) < 19)
On = true;
return On;
}
catch { return false; }
}
public static bool OnScreen(Client C, Coord Where)
{
try
{
bool On = false;
if (Math.Abs(C.X - Where.X) < 19)
if (Math.Abs(C.Y - Where.Y) < 19)
On = true;
return On;
}
catch { return false; }
}

public static int Distance(ushort X, ushort Y, ushort ToX, ushort ToY)
{
int XDist = Math.Abs(X - ToX);
int YDist = Math.Abs(Y - ToY);
if (XDist > YDist)
return XDist;
else
return YDist;
}


public static bool NewBot(Client C)
{
if (C.RunBot)
{
Mob attack = GetClosestMonster(C);
if (attack != null)
{
if (C.LastJump.AddMilliseconds(C.JumpSpeed) < DateTime.Now)
{
Packets.CliJump(attack.X, attack.Y, 156, C);
Handler.Chat(C, " ", 2008);// I Left emty
C.X = attack.X;
C.Y = attack.Y;
C.UpdatedX = C.X;
C.UpdatedY = C.Y;

Calculations.UpdateLocal(C);
C.LastJump = DateTime.Now;
}
else if (C.LastAttack.AddMilliseconds(C.AttackSpeed) < DateTime.Now)
{
Calculations.ShiftTarget(attack);
Packets.AtkServer(C, attack, 2);
C.X = attack.X;
C.Y = attack.Y;
C.UpdatedX = C.X;
C.UpdatedY = C.Y;

Calculations.UpdateLocal(C);

Handler.Chat(C, " " + attack.Name, 2008);// Showing only the name of the animal that is attacked
C.LastAttack = DateTime.Now;
}
}
Monster M = Calculations.ClosestMonster(C);

If(M == null);

{ RandomJump(C) ;//Its same again don't make random jumps ( I don't understand this part)
return true;}

{
int Dist = Calculations.Distance(C.X, C.Y, M.X, M.Y);
If(Dist < 2);
{
if(DateTime.Now > C.LastAttack.AddMilliseconds(C.AttackSpeed))// The speed going ok
{
Packets.SvrAttack(C, M, 2);//Working fine too...No Dc!

}
else
{
if(DateTime.Now > C.LastJump.AddMilliseconds(C.JumpSpeed))//Working good too..
{

}
}
}
}


private static void RandomJump(Client C)
{
throw new NotImplementedException();
}

private static void If(bool p)
{
throw new NotImplementedException();

}
}
}

Nick(oelaboela) lets check this part when u come online...
<Edit> And the searching monster - range is small
vecko12 is offline  
Old 12/08/2010, 13:14   #82
 
elite*gold: 0
Join Date: Feb 2009
Posts: 937
Received Thanks: 393
Can't down Visual Basic or an kind of them says need service packed 3 i try to download says '' u cna download got diffr langauge'' :S
jokerboy123 is offline  
Old 12/08/2010, 14:23   #83
 
demon17's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 676
Received Thanks: 109
Quote:
Originally Posted by vecko12 View Post
}

Nick(oelaboela) lets check this part when u come online...
<Edit> And the searching monster - range is small

I aded these to the Bot.Cs but wont work :P


<Edit> The bot wont work which things i need to modify too?
demon17 is offline  
Old 12/08/2010, 14:34   #84
 
OELABOELA's Avatar
 
elite*gold: 223
Join Date: Dec 2007
Posts: 1,076
Received Thanks: 257
I know what i did wrong, i was attackinging and jumped at the same time. Because of this it just skipped it. I now got it working. But got dcs but ill be working on that.
OELABOELA is offline  
Old 12/08/2010, 14:50   #85
 
demon17's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 676
Received Thanks: 109
Quote:
Originally Posted by OELABOELA View Post
I know what i did wrong, i was attackinging and jumped at the same time. Because of this it just skipped it. I now got it working. But got dcs but ill be working on that.
Would you send me the Bot.cs? your modifyed one i mean
Or paste the code :P fully coppy all pls and sned me a PM or post here , i realy wana try it out
demon17 is offline  
Old 12/08/2010, 16:14   #86
 
elite*gold: 0
Join Date: Feb 2008
Posts: 80
Received Thanks: 2
hello can anyone help me ?? my client bug was stopped at that moment and for 10 sec got dc
neogru is offline  
Old 12/08/2010, 16:24   #87
 
elite*gold: 0
Join Date: Sep 2008
Posts: 559
Received Thanks: 1,461
Quote:
Originally Posted by neogru View Post
hello can anyone help me ?? my client bug was stopped at that moment and for 10 sec got dc
follow pro4never instructions or just go and follow the instructions
vecko12 is offline  
Old 12/08/2010, 16:25   #88
 
demon17's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 676
Received Thanks: 109
Quote:
Originally Posted by vecko12 View Post
follow pro4never instructions or just go and follow the instructions
all the modifyed IPs need to be your Hamaki IP

Program.CS
Code:
public static Dictionary<ushort, ushort> DynaMaps = new Dictionary<ushort, ushort>();
        public static System.Random Rand = new System.Random();
        public static string AuthIp = "208.96.34.46";
        public static string ProxyTitle = "[ProjectAlchemy]";
        public static string Version = "v1.1";
        public static string Username = "root";
        public static string Password = "";
        public static string Host = "alchemy";
        public static DMapServer DmapHandler = new DMapServer();
        public static Dictionary<ushort, Ending> PortBindings = new Dictionary<ushort, Ending>();
        public static ushort AuthPort = 9959;
        public static string ProxyIp = "x.xx.xxx.xxxx";// Need to be your hamachi IP
        public static string GameKey = "DR654dt34trg4UI6";
        public static string GameIp = "";
        public static ushort GamePort = 5816;
        public static bool Debug = false;
        public static Dictionary<Socket, LoginClient> LoginClients = new Dictionary<Socket, LoginClient>();
        public static Dictionary<Socket, Client> GameClients = new Dictionary<Socket, Client>();
        public static Dictionary<uint, LoginClient> AuthdClients = new Dictionary<uint, LoginClient>();
        public static GUI GuiForm;
        public static Thread GuiThread;
        public static ushort TotalOnline = 0;
        static void Main(string[] args)
public static string ProxyIp = "x.xx.xxx.xxxx";// Need to be your hamachi IP

I use XAMPP ( start SQL and Apachy)
I type Localhost/phpadmin
Make new database ( name ; alchemy)
Ip Localhost
The port can be left and test connection
When says connection succesfull pres start
and open DB

GO Bin/ and start the alchemy.exe
change in your Loader.set ( from your conquer folder the ip to you hamachi ip)
FInish
demon17 is offline  
Old 12/08/2010, 17:16   #89
 
OELABOELA's Avatar
 
elite*gold: 223
Join Date: Dec 2007
Posts: 1,076
Received Thanks: 257
Hmm, the problem that i have now that when i let it jump to a item, check if its there and then pick it up. That it says your to long away? P4N , could you help me on this one?
OELABOELA is offline  
Old 12/08/2010, 17:18   #90
 
elite*gold: 0
Join Date: Feb 2009
Posts: 937
Received Thanks: 393
So..which 1 need to download from mysql? i tried first 1 but wont let me downloadxD
jokerboy123 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 05:55.


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.