Stripped ProjectAlchemy Source Code

12/14/2010 09:18 pro4never#241
Quote:
Originally Posted by zap_xlib View Post
Thank you very much!. I`m still stuck at the Login Port and Game Port fields in the Loaderset which seem to not connect in many combinations. I got a unique Hamachi IP though, which i don`t think is causing the problem... Any suggestions would be greatly appreciated!.
Set them to whatever you are using in the proxy settings file.
12/14/2010 09:48 zap_xlib#242
Quote:
Originally Posted by pro4never View Post
Set them to whatever you are using in the proxy settings file.
I tried the ones in this: (Program.cs)

public static ushort AuthPort = 9959;
public static string ProxyIp = "5.177.91.98";
public static string GameKey = "DR654dt34trg4UI6";
public static string GameIp = "";
public static ushort GamePort = 5816;
public static bool Debug = false;

and then several combinations of these:

PortBindings.Add(5001, new Ending(AuthIp, 9959));
PortBindings.Add(5002, new Ending(AuthIp, 9960));
PortBindings.Add(5003, new Ending(AuthIp, 9958));

Yet, i`m only getting

[ProjectAlchemy] Server refused connection!
[ProjectAlchemy] Server refused connection!
[ProjectAlchemy] Server refused connection!
[ProjectAlchemy] Server refused connection!
Auth server packet of type: 23782
Auth server packet of type: 23782
[ProjectAlchemy] Server refused connection!

No clue how to get it right...
12/14/2010 10:44 Warlax#243
Quote:
Originally Posted by zap_xlib View Post
Hi pro4never,

I have done everything as you guided.

Installed XAMPP, Set up MySQL, Executed the SQL file in Navicat, changed the IP in Debug/Settings and also in Program.cs to my Hamachi IP. How do i go from here?.

I am using mono as an alternative to dotnet. I`m stuck somewhere...

I have downloaded the latest COLoader. But it has no loaderset file. It would be great if you could point it out with a link. Also, should i re-compile the project using Microsoft VS Express or can it also be compiled with mono?. (in which case, i should dispose mono and download Microsoft .net and VS Express).

I am attaching an image of how far i had been able to set up the proxy. Anticipating your help.

Thank you!.
lol why would u ever want to use mono for anything? its so shit
12/14/2010 14:35 zap_xlib#244
Quote:
Originally Posted by Warlax View Post
lol why would u ever want to use mono for anything? its so shit
Yes... i first thought more shit like .net, Service packs, windows installer, etc can be avoided with this one shit... ;)

I never revert back to old stuff without finding a solution to the current stuff... My Loaderset.txt is as below:

[Loader]
IPAddress=5.1xx.xx.xx
LoginPort=9958
GamePort=5816
Website=http://www.google.com

I would like to include a query as to weather my understanding of the concept is right or not:

I Created Hamachi network, used the IP to fill out settings.txt and used the same in loaderset.txt.

one question... Should i add at least 1 client in the Hamachi network or is it fine if there are 0 members?.

Any help will be appreciated.
12/14/2010 15:49 OELABOELA#245
Hmm, weird. The items in the C.grounditems dissapear within a second. Maybe thats why my looting isnt working perfect.
12/14/2010 16:20 zap_xlib#246
Cool... finally, i managed to login!... yay!... Damn, but i struggle to remember what i changed and where i changed. But i`m going to screenshot all i did as i got the worst memory.

Now, to play with some code... :D (Though hope to stay without getting DCed as it`s hard to login again).
12/14/2010 17:10 OELABOELA#247
Quote:
Originally Posted by zap_xlib View Post
Cool... finally, i managed to login!... yay!... Damn, but i struggle to remember what i changed and where i changed. But i`m going to screenshot all i did as i got the worst memory.

Now, to play with some code... :D (Though hope to stay without getting DCed as it`s hard to login again).
Okay, if you archieved something post it here! its fun to have some more people discover stuff :)

<Edit>flash step(156) is range 7 right? And normal jump 19?
12/14/2010 17:16 zap_xlib#248
Quote:
Originally Posted by OELABOELA View Post
Okay, if you archieved something post it here! its fun to have some more people discover stuff :)

<Edit>flash step(156) is range 7 right? And normal jump 19?
Sure thing!... I just noticed that my skill gets activated automatically. I tried using the /loot all, and other commands. Nothing worked. I guess i need to use them in the NewBot().

I tried /goto x y and got success, "valid coords" in console.

Now, how do i execute the code within the NewBot() thread? What should i type in chat to activate contents in Bot.cs?

I will be glad to share what i discover!.

Thank you in advance!.
12/14/2010 17:21 zap_xlib#249
Ok, i guess i have to include a Case statement in the command.cs. I`ll try that and see if it works... Thanks anyways!.
12/14/2010 18:24 OELABOELA#250
Uhm, lets start with this code for ya.
Code:
 public static Mob GetClosestMonster(Client C)
        {
            Mob ToReturn = null;
            int Dist = 7;
            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;
        }
You can use it like:
Code:
Mob iwanttoattack = GetClosestMonster(C);
Packets.atkServer(C,attack,2);
//Note, this is pseudo code, you MUST change some stuff
12/14/2010 18:40 zap_xlib#251
Quote:
Originally Posted by OELABOELA View Post
Uhm, lets start with this code for ya.
Code:
 public static Mob GetClosestMonster(Client C)
        {
            Mob ToReturn = null;
            int Dist = 7;
            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;
        }
You can use it like:
Code:
Mob iwanttoattack = GetClosestMonster(C);
Packets.atkServer(C,attack,2);
//Note, this is pseudo code, you MUST change some stuff
Cool thanks bro!. But, i have to use Calculations.Distance as Just Distance alone isn`t working for me...
12/14/2010 18:45 stickray#252
Quote:
Originally Posted by OELABOELA View Post
Hmm, weird. The items in the C.grounditems dissapear within a second. Maybe thats why my looting isnt working perfect.
Approved, yes its somehow tricky, aslong as your not on that item it shoes up, but when you lets say and updatelocals the item disapears <.<

well after you jumped on it you can make some "tries" to pick it up..
12/14/2010 19:03 OELABOELA#253
Quote:
Originally Posted by stickray View Post
Approved, yes its somehow tricky, aslong as your not on that item it shoes up, but when you lets say and updatelocals the item disapears <.<

well after you jumped on it you can make some "tries" to pick it up..
Yea, my looting is working. As long as it wont update the items :)

<Edit>
Just found out how to fix it, PM me if you want a solution!
12/14/2010 20:30 pro4never#254
Quote:
Originally Posted by zap_xlib View Post
I tried the ones in this: (Program.cs)

public static ushort AuthPort = 9959;
public static string ProxyIp = "5.177.91.98";
public static string GameKey = "DR654dt34trg4UI6";
public static string GameIp = "";
public static ushort GamePort = 5816;
public static bool Debug = false;

and then several combinations of these:

PortBindings.Add(5001, new Ending(AuthIp, 9959));
PortBindings.Add(5002, new Ending(AuthIp, 9960));
PortBindings.Add(5003, new Ending(AuthIp, 9958));

Yet, i`m only getting

[ProjectAlchemy] Server refused connection!
[ProjectAlchemy] Server refused connection!
[ProjectAlchemy] Server refused connection!
[ProjectAlchemy] Server refused connection!
Auth server packet of type: 23782
Auth server packet of type: 23782
[ProjectAlchemy] Server refused connection!

No clue how to get it right...
Settings.txt in your debug folder over writes whatever is in the actual source code for ip/game listener/port... Make sure you've changed that.

Quote:
Originally Posted by OELABOELA View Post
Okay, if you archieved something post it here! its fun to have some more people discover stuff :)

<Edit>flash step(156) is range 7 right? And normal jump 19?
Flash step does not move you at all. Anything sent to the client is for effect ONLY and doesn't move you.

You should never be sending 156 to server at all. Only receiving it as confirmation of some of your fatal strike attacks (it won't send for every attack or you will crash lol)

Quote:
Originally Posted by OELABOELA View Post
Uhm, lets start with this code for ya.
Code:
 public static Mob GetClosestMonster(Client C)
        {
            Mob ToReturn = null;
            int Dist = 7;
            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;
        }
You can use it like:
Code:
Mob iwanttoattack = GetClosestMonster(C);
Packets.atkServer(C,attack,2);
//Note, this is pseudo code, you MUST change some stuff
No wonder your not attacking mobs for full screen... that method will only pull mobs within a range of 7...



You guys need to learn how distance works..


FULL SCREEN = 18 dist (use to pull local objects, max jump dist, max fs dist)

Teleport packet = 7 dist (you guys aren't using it anyways so I don't see a point but w/e. Doing higher than 7 dist is instant dc with this method of movement)

Attack dist = 2 or 1 depending on wep (1h/2h) or skills.


Adjust your method of botting according to how you are performing actions.

If, for example, you are using teleport packets to move around and you pull a target you want to attack which is more than 7 coords away... simply find the best possible coord to go to using pull weights and move there. Assuming there are no large blockages of coords you should get there nearly instantly (as you can send teleport packet something like 1 per 50ms without dcing)


As for local objects being removed... make sure when you call updatelocals you are only removing things if they are over 18 dist from yourself and that you are NEVER changing your X/Y without actually moving there (That should be reserved for final movements sent to server only... if not you will throw off your bot nearly instantly)
12/14/2010 21:07 OELABOELA#255
Quote:
Originally Posted by pro4never View Post
Settings.txt in your debug folder over writes whatever is in the actual source code for ip/game listener/port... Make sure you've changed that.



Flash step does not move you at all. Anything sent to the client is for effect ONLY and doesn't move you.

You should never be sending 156 to server at all. Only receiving it as confirmation of some of your fatal strike attacks (it won't send for every attack or you will crash lol)



No wonder your not attacking mobs for full screen... that method will only pull mobs within a range of 7...



You guys need to learn how distance works..


FULL SCREEN = 18 dist (use to pull local objects, max jump dist, max fs dist)

Teleport packet = 7 dist (you guys aren't using it anyways so I don't see a point but w/e. Doing higher than 7 dist is instant dc with this method of movement)

Attack dist = 2 or 1 depending on wep (1h/2h) or skills.


Adjust your method of botting according to how you are performing actions.

If, for example, you are using teleport packets to move around and you pull a target you want to attack which is more than 7 coords away... simply find the best possible coord to go to using pull weights and move there. Assuming there are no large blockages of coords you should get there nearly instantly (as you can send teleport packet something like 1 per 50ms without dcing)


As for local objects being removed... make sure when you call updatelocals you are only removing things if they are over 18 dist from yourself and that you are NEVER changing your X/Y without actually moving there (That should be reserved for final movements sent to server only... if not you will throw off your bot nearly instantly)
i know, but this is my full method:
Code:
 public static Mob GetClosestMonster(Client C)
        {
            Mob ToReturn = null;
            int Dist = 7;
            if (C.InFatalStrike)
            {
                Dist = 17;
            }
            else
            {
                Dist = 7;
            }
            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;
        }
But i assume he didnt had a working Infatalstrike, so i removed some parts :)