Register for your free account! | Forgot your password?

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

  • 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 03/28/2011, 19:52   #1126
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
So just thought I'd leave this link here for people who were interested...


Posted code to make this log python npc scripts and sob/npc locations to a database for use with private servers (IE: My hellmouth source)





There's a ton of stuff you can use proxies like this for, not just botting :P.

Just posting that cause I remembered that someone msg'd me ages ago on youtube asking for it.
pro4never is offline  
Old 03/28/2011, 19:58   #1127
 
Real~Death's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 1,272
Received Thanks: 246
Quote:
Originally Posted by pro4never View Post
So just thought I'd leave this link here for people who were interested...


Posted code to make this log python npc scripts and sob/npc locations to a database for use with private servers (IE: My hellmouth source)





There's a ton of stuff you can use proxies like this for, not just botting :P.

Just posting that cause I remembered that someone msg'd me ages ago on youtube asking for it.
you should post that link on the main page

but nice share
Real~Death is offline  
Old 04/15/2011, 16:19   #1128
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Ok so the loot system should be similar to the hunt system which is great BUT it loots only when it feels like it and that could be because it left clicks to an area rather than actually looting? I still have a similar issue to what I had before that being if a mob drops more than one item the looting system picks only one item up rather than all the items before continuing onto the next mob?

Code:
public class Looting
        {
            
            public static Items.GroundItem GetClosestItem(Client C)
            {
                Items.GroundItem I = null;
                int Dist = 7;
                foreach (Items.GroundItem Item in C.GroundItems.Values)
                {

                    if (Calculations.Distance(C.X, C.Y, Item.X, Item.Y) < Dist)
                    {
                        I = Item;
                        Dist = Calculations.Distance(C.X, C.Y, I.X, I.Y);
                    }

                }
                return I;
            }
            public static bool OnScreen(Client C, ushort X, ushort Y)
            {
                try
                {
                    bool On = false;
                    if (Math.Abs(C.X - X) < 7)
                        if (Math.Abs(C.Y - Y) < 7)
                            On = true;
                    return On;
                }
                catch { return false; }
            }
            public static void startLooting(Client C)
            {
                Items.GroundItem itemloot = GetClosestItem(C);

                if (itemloot isnot null)
                {
                    ushort jumpToX = itemloot.X;
                    ushort jumpToY = itemloot.Y;

                    int dist2 = Calculations.Distance(C.X, C.Y, jumpToX, jumpToY);
                    if (dist2 > 1)
                    {
                        if (C.LastJump.AddMilliseconds(C.JumpSpeed) < DateTime.Now)
                        {

                            if (Calculations.ValidDmap(C.StaticMap, jumpToX, jumpToY))
                                if (OnScreen(C, itemloot.X, itemloot.Y))
                                {
                                    C.X = itemloot.X;
                                    C.Y = itemloot.Y;
                                    C.Jumping = true;
                                    C.LastLoot = DateTime.Now;
                                    C.LastJump = DateTime.Now;
                                    Packets.CliJump(itemloot.X, itemloot.Y, 156, C);
                                    Packets.Jump(C, itemloot.X, itemloot.Y, 137);
                                    Packets.PickItem(C, itemlooty);
                                    Calculations.UpdateLocal(C);
                                }
                            if (C.LastLoot.AddMilliseconds(C.LootSpeed) < DateTime.Now)
                                if (OnScreen(C, itemloot.X, itemloot.Y))
                                {


                                    C.X = itemloot.X;
                                    C.Y = itemloot.Y;
                                    C.Jumping = false;
                                    C.LastLoot = DateTime.Now;
                                    C.LastJump = DateTime.Now;
                                    Packets.CliJump(itemloot.X, itemloot.Y, 156, C);
                                    Packets.Jump(C, itemloot.X, itemloot.Y, 137);
                                    Packets.PickItem(C, itemlooty);
                                    Calculations.UpdateLocal(C);

                                }
                        }
                    }
                }
            }
        }
Copy and paste of this code will result in errors so don`t copy and paste then ask why it is giving errors because it WILL give errors!
denominator is offline  
Thanks
1 User
Old 04/16/2011, 06:34   #1129
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Enums are ******* fantastic to control bot actions.


I just started coding my own Monster AI system for my current private server source project and a very similar thing could easily be applied to a proxy bot.


Linq = my new overlord when it comes to simply pulling and sorting possible targets and a billion other things.


assign a simple "BotCurrentAction" enum, code a few basic checks + delays and you can do a **** nice bot.

Personally I'd set up a simple BotAction enum using something like...

Idle
MoveToTarget (uses a simple uid Target system so applies to both items AND monsters)
Attack (again, simple uid target system to pull from a simple map system
Loot (should be in range)

Then just switch between them based on conditions. You can code some very simple checks to determine which mode should be selected and then do something like...

switch(BotMode)
{
case HuntAction.Attack
{
if(Target < 1)
{
BotMode = HuntAction.Idle;//searches for a new valid target (item or mob)
break;
}
ILocatableObject tryTarget = Map.Search(target);//again this is using a theoretical map interface system where all map objects inherit ILocatableObject
if(tryTarget == null)
{
BotMode = HuntAction.Idle;
break;
}
int Dist = Calculations.Distance(user.X, user.Y, tryTarget.X, tryTarget.Y)
if(Dist <= AttackRange)
{
///attack code
}
else
{
BotMode = HuntAction.MoveToTarget;
}
}


etc...

And ****... I should never post coding advice while drunk off my ***.
pro4never is offline  
Thanks
1 User
Old 04/16/2011, 17:32   #1130
 
elite*gold: 0
Join Date: Dec 2007
Posts: 1,326
Received Thanks: 539
iam trying to add a button to the GUI to set my speeds without writing them ingame
and the code is like:
PHP Code:
        private void button1_Click(object senderEventArgs e)
        {
             
C.UpdateSpeed 100;
             
C.JumpSpeed 100;
             
C.AttackSpeed 60;
        } 
but it says "The name 'C' does not exist in the current context" anyone can help?
[GM] is offline  
Old 04/17/2011, 00:34   #1131
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Hmm if I add the loot code back into the hunt code then I`m sure it will loot again albeit just picking one item up? Right now it`s separate from the hunt code and does not seem to do anything >.< The only thing that is failing is the loot, everything else is fine. Well the bot jumps into the monster rather than next to it but I can live with that.
denominator is offline  
Old 04/17/2011, 01:05   #1132
 
elite*gold: 0
Join Date: Dec 2007
Posts: 1,326
Received Thanks: 539
maybe because u coded it like:
My Coords = Mob Coords
[GM] is offline  
Old 04/17/2011, 01:47   #1133
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by [GM] View Post
iam trying to add a button to the GUI to set my speeds without writing them ingame
and the code is like:
PHP Code:
        private void button1_Click(object senderEventArgs e)
        {
             
C.UpdateSpeed 100;
             
C.JumpSpeed 100;
             
C.AttackSpeed 60;
        } 
but it says "The name 'C' does not exist in the current context" anyone can help?
Because C is never defined... you have TWO things defined...

object sender

and

EventArgs e

There is no Client C or w/e.


Ideally what I would do is in your gui create something like...

public Player Owner;

And on form creation accept a new param Player and assign Owner to it.

Then you can do Owner.Variables = blablabla from inside the forum.



If that makes no sense... here's an example from the multi version proxy we worked on.


Code:
public Listener User;
        public ProxyBot(Listener owner)
        {
            Control.CheckForIllegalCrossThreadCalls = false;
            InitializeComponent();
            User = owner;
        }
Note: Unless you do all sorts of cross thread handling to invoke things... you'll want to disable that checking. If not none of your cross thread calls will get through (the Winform should be on its own thread... which will mean it fails to communicate with anything on other threads... IE: the user)

Then when creating an instance of ProxyBot (it's just the gui created for every character that logs in on this proxy we made) I would do some extra lovely inheritance so that the bot itself can easily control the window... to do that do something inside the player/character/user class or w/e you wanna call it and add

public ProxyBot GUIWindow;

When creating it do something like...

user.ProxyBot = new ProxyBot(user);

and start up the new winform. Now you can do stuff like...

user.GUIWindow.Textbox1.Text = "blahhh";

It's just a simple way to interact between the two different things.
pro4never is offline  
Thanks
1 User
Old 04/17/2011, 02:29   #1134
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Ok so loot sort of works but still it only picks one item up, turns out it MUST be in the hunt code rather than anywhere else, I have come across something strange and can not remember it doing this before but when my char goes into Cyclone he stops attacking until I manually hit the mob then he continues?

Any help on why cyclone cancels the bot until I manually have to hit mob for it to continue would be welcomed
denominator is offline  
Old 04/19/2011, 04:23   #1135
 
elite*gold: 0
Join Date: Apr 2011
Posts: 5
Received Thanks: 0
hi guys, I'm not new to programming but
I am to all of these proxies and VPNs etc.

I'm sure I could contribute in the coding but first I need to get the proxy going
I followed the steps in first post, was easy cause is very detailed
but now I'm stuck, i just want to be logged to CO with the proxy in use
so I can try adding basic functionality.
the command prompt says "[P.A.]ready to accept connections".
I've tried using CO loader with the hamachi IP of the proxy
but i can never log to CO.

could someone please tell me the next step to log CO with the proxy or detail me the hamachi step?
or a link that explains it.

thank you kindly
pyralis is offline  
Old 04/19/2011, 15:55   #1136
 
OELABOELA's Avatar
 
elite*gold: 223
Join Date: Dec 2007
Posts: 1,076
Received Thanks: 257
If you are past that part, it will be easy. At the beginning someone else helped me at connecting, and after all i was one of the guys that made a actual bot that was working.. lol?
OELABOELA is offline  
Old 04/19/2011, 17:16   #1137
 
elite*gold: 0
Join Date: Apr 2011
Posts: 5
Received Thanks: 0
I've been browsing the programming forum but I still couldn't find info on it
could someone tell me the steps in hosting the proxy with hamachi?

btw there are many hard coded strings in the code, do I need to modify those too for the first run?
I mean these: public static string ProxyIp = "5.1.98.6";

thanks a lot

*edit, Ill keep checking the older post in this thread, lots of information in it
although not many got stuck where i did
thank you for pm ill try that now
pyralis is offline  
Old 04/19/2011, 17:41   #1138
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Hope my message helps you pyralis Also it`s unstable to log in at times so just as long as you get a bar that actually shows then you know it will eventually log in. If you get NO loading bar that appears then it`s probably the ports that need changing from 5002 to 5001 or vice versa.
denominator is offline  
Thanks
1 User
Old 04/19/2011, 18:13   #1139
 
elite*gold: 0
Join Date: Apr 2011
Posts: 5
Received Thanks: 0
thank you denominator, it worked

what are all those storekeepers in TC lol

is it normal to have to do many log attempts?
the bar would half load and then dc but i just kept on logging and it worked

thank you very much
pyralis is offline  
Old 04/19/2011, 18:17   #1140
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
You`re very welcome I have not logged into Conquer for a few days so I`m not sure lol. Yes it can be quite normal it depends on your computer and your ISP.
denominator is offline  
Thanks
1 User
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 02:03.


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.