Stripped ProjectAlchemy Source Code

01/02/2011 18:22 gorgone#466
thx mate i m guess, we ll make a good job
01/02/2011 18:56 pro4never#467
Quote:
Originally Posted by OELABOELA View Post
Yea but what i still don't get, how did you manage to get your Dmap loaded to your picturebox? I can't seem to get it working properly..
Again, he's using pre-converted png pictures, not the dmaps themselves.


I think I started to reply lastnigth but never actually posted lol!

Dmaps don't contain any actual picture data so you'd need to be writing a program to draw an image based on the coord data and access level/height of each coord. Generally you would assign a color based on each value and then write it to an image (IE: the converter included in elite-coemu source to convert dmap data to png). Keep in mind this is RAW data so each coord is literally 1 pixel (useful... but small lol)

You'll then want a way to zoom around this without worrying about losing your coordinate information. I've never really done hardly anything with graphics or even windows forms so sadly I can't help you guys much here.
01/02/2011 19:06 OELABOELA#468
Quote:
Originally Posted by pro4never View Post
Again, he's using pre-converted png pictures, not the dmaps themselves.


I think I started to reply lastnigth but never actually posted lol!

Dmaps don't contain any actual picture data so you'd need to be writing a program to draw an image based on the coord data and access level/height of each coord. Generally you would assign a color based on each value and then write it to an image (IE: the converter included in elite-coemu source to convert dmap data to png). Keep in mind this is RAW data so each coord is literally 1 pixel (useful... but small lol)

You'll then want a way to zoom around this without worrying about losing your coordinate information. I've never really done hardly anything with graphics or even windows forms so sadly I can't help you guys much here.
And how did Korvacs it, if you can see this picture:
[Only registered and activated users can see links. Click Here To Register...]
He did actually get it into the program, and i believe without to much effort.
01/02/2011 21:07 pro4never#469
Quote:
Originally Posted by OELABOELA View Post
And how did Korvacs it, if you can see this picture:
[Only registered and activated users can see links. Click Here To Register...]
He did actually get it into the program, and i believe without to much effort.
Yupp that's exactly it.

Accessible = white
unaccessible = black

Different heights = blue/red

Simple stuff but it takes some real work. First you have to setup the proper binary reader to read the dmap file (not difficult) and then translate the 'pixel' information you are reading into a viewable png map. Personally I don't have any real experience drawing a png from scratch using C# lol!
01/02/2011 23:06 OELABOELA#470
Quote:
Originally Posted by pro4never View Post
Yupp that's exactly it.

Accessible = white
unaccessible = black

Different heights = blue/red

Simple stuff but it takes some real work. First you have to setup the proper binary reader to read the dmap file (not difficult) and then translate the 'pixel' information you are reading into a viewable png map. Personally I don't have any real experience drawing a png from scratch using C# lol!
Me neither, but its a huge step, and im willing to try it.

<Edit>
Im using this code
Code:
using (BinaryReader Reader = new BinaryReader(File))
            {
                int count = 0;
                int _width = 0;
                int _height = 0;
                //List<Tile> Tiles;
                //Tile Tiles = new Tile();
                //List<Tile> Tiles = new List<Tile>();
                File.Seek(8, SeekOrigin.Begin);

                _width = Reader.ReadInt32(); _height = Reader.ReadInt32();

                Tiles = new Tile[_width * _height];

                byte Data = Reader.ReadByte();

                for (ushort y = 0; y < _height; y++)
                {
                    for (ushort x = 0; x < _width; x++)
                    {
                        switch (count)
                        {
                            case 0:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.First)); break;
                            case 1:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Second)); break;
                            case 2:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Third)); break;
                            case 3:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Fourth)); break;
                            case 4:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Fifth)); break;
                            case 5:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Sixth)); break;
                            case 6:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Seventh)); break;
                            case 7:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Eighth)); count = 0; Data = Reader.ReadByte(); break;
                        }
                    }
                }
            }
And my only problem is...
Code:
Cannot implicitly convert type 'AlchemyProxy.GUI.Tile[]' to 'System.Collections.Generic.List<AlchemyProxy.GUI.Tile>'
And i've been using several things to try it like..
Code:
List<Tile> Tiles;
Tile Tiles = new Tile();
List<Tile> Tiles = new List<Tile>();
It''s my only problem left i think. If this is done i could start at making the .png..
01/03/2011 03:22 pro4never#471
Quote:
Originally Posted by OELABOELA View Post
Me neither, but its a huge step, and im willing to try it.

<Edit>
Im using this code
Code:
using (BinaryReader Reader = new BinaryReader(File))
            {
                int count = 0;
                int _width = 0;
                int _height = 0;
                //List<Tile> Tiles;
                //Tile Tiles = new Tile();
                //List<Tile> Tiles = new List<Tile>();
                File.Seek(8, SeekOrigin.Begin);

                _width = Reader.ReadInt32(); _height = Reader.ReadInt32();

                Tiles = new Tile[_width * _height];

                byte Data = Reader.ReadByte();

                for (ushort y = 0; y < _height; y++)
                {
                    for (ushort x = 0; x < _width; x++)
                    {
                        switch (count)
                        {
                            case 0:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.First)); break;
                            case 1:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Second)); break;
                            case 2:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Third)); break;
                            case 3:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Fourth)); break;
                            case 4:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Fifth)); break;
                            case 5:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Sixth)); break;
                            case 6:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Seventh)); break;
                            case 7:
                                Tiles[x * _width + y] = new Tile(GetBool(Data, BitValues.Eighth)); count = 0; Data = Reader.ReadByte(); break;
                        }
                    }
                }
            }
And my only problem is...
Code:
Cannot implicitly convert type 'AlchemyProxy.GUI.Tile[]' to 'System.Collections.Generic.List<AlchemyProxy.GUI.Tile>'
And i've been using several things to try it like..
Code:
List<Tile> Tiles;
Tile Tiles = new Tile();
List<Tile> Tiles = new List<Tile>();
It''s my only problem left i think. If this is done i could start at making the .png..
Cannot implicitly convert type 'AlchemyProxy.GUI.Tile[]' to 'System.Collections.Generic.List<AlchemyProxy.GUI. Tile>'

Your problem is you are using an array in 1 example and a list in the other... they are not the same.

Chose one and stick with it.


Tiles = new Tile[_width * _height];

That's an array... somewhere along the line though you are having Tiles or something you are comparing it against be a list


The way I would do it is as follows...

WidthCount = ReadFromFile
HeightCount = ReadFromFile

That way you have the height/width information...

Now setup a dictionary or some data structure to hold the data. Personally I'd make a coordinate object (holds X/Y) and use that as the key value for the dictionary (or a paired list... SOMETHING to hold where and value together)


public class Coord
{
public ushort X, Y;
public Coord(ushort _X, ushort _Y)
{
this.X = _X;
this.Y = _Y;
}
}


Then do your reading loops and add the values to your dictionary.

IE:

for(int X = 0; X < WidthCount; X++)
{
for(int Y = 0; X < HeightCount; Y++)
{
AllCoords.Add(new Coord(X, Y), ReadValueForThisCoord);
}
}

Something like that would work and then you have a data structure holding each coordinate (X/Y) with a value (I'd read hight/accessability into perhaps a CoordData class but w/e you want would be fine)


Once you get this data structure you have to draw it as a picture. Once you do that you can work on overlaying other images
IE: Color coded pixels/blocks for user, other players, monsters, ground items and that sort of thing (overlay for map)
01/03/2011 03:27 OELABOELA#472
Quote:
Originally Posted by pro4never View Post
Cannot implicitly convert type 'AlchemyProxy.GUI.Tile[]' to 'System.Collections.Generic.List<AlchemyProxy.GUI. Tile>'

Your problem is you are using an array in 1 example and a list in the other... they are not the same.

Chose one and stick with it.


Tiles = new Tile[_width * _height];

That's an array... somewhere along the line though you are having Tiles or something you are comparing it against be a list


The way I would do it is as follows...

WidthCount = ReadFromFile
HeightCount = ReadFromFile

That way you have the height/width information...

Now setup a dictionary or some data structure to hold the data. Personally I'd make a coordinate object (holds X/Y) and use that as the key value for the dictionary (or a paired list... SOMETHING to hold where and value together)


public class Coord
{
public ushort X, Y;
public Coord(ushort _X, ushort _Y)
{
this.X = _X;
this.Y = _Y;
}
}


Then do your reading loops and add the values to your dictionary.

IE:

for(int X = 0; X < WidthCount; X++)
{
for(int Y = 0; X < HeightCount; Y++)
{
AllCoords.Add(new Coord(X, Y), ReadValueForThisCoord);
}
}

Something like that would work and then you have a data structure holding each coordinate (X/Y) with a value (I'd read hight/accessability into perhaps a CoordData class but w/e you want would be fine)


Once you get this data structure you have to draw it as a picture. Once you do that you can work on overlaying other images
IE: Color coded pixels/blocks for user, other players, monsters, ground items and that sort of thing (overlay for map)
It's 3:26 AM here, im starting to get tired. Ill work on it uhm... today? We'll see how this will pack out.








<Edit>
It's finally working, my program gets a big laggy because of it, but thats because it draws some things every some ms.. so i need to make a delay on that.

My question (Hell yea, a new one) is, what if you normal jump in cyclone, do you need to do that in a special way? Because when i have it on, and i let the bot jump like 5-6 times it dcs because of invalid jump (Still at 800ms with attack 400ms) So... WTH is going on ?
01/04/2011 17:50 gorgone#473
solved the problem of coordinate CO conquer in cartesian map thx to pronever again for give me the idea of paper !!

x1 = xo+ (float)(Owner.X * Math.Cos(o) - Owner.Y * Math.Sin(o));
y1 = yo+ (float)(Owner.X * Math.Sin(o) + Owner.Y * Math.Cos(o));


x1,y1 are cartesian coordinates X e Y are conquer coordinate o is the angle in view of map and xo yo are the origin of minimap plain !

ihihihi so easy now that i know and i made a class with work on matrix for nothing ahahah

but anyway the work is done here we go over, on monk attacks and each kind class attack skill to kill monster !
01/04/2011 18:21 kivu94#474
please host bot !
01/04/2011 18:23 demon17#475
Quote:
My question (Hell yea, a new one) is, what if you normal jump in cyclone, do you need to do that in a special way? Because when i have it on, and i let the bot jump like 5-6 times it dcs because of invalid jump (Still at 800ms with attack 400ms) So... WTH is going on ?
I use your source ( an old one ) so i can tell you how i do fast moving w/out getting dc .. after every 2-3 jumps i let about 1-2 seconds depends what ping i had .

While I botting ( farming my noobs .. ) I not use Cyc and DH cuz i not have random jump implemented or a specified spot where the bot to handle the char . So i use w/out speeds ... I can use speedhack when i am at birdmans or in a map where the spawns are 1 near other .. not more than distance 6 .

So when you want to use speed hack to go from x - y . and thats req more than 2 jumps take a rest at every 2 jumps , That problem wasn't resolved by P4N , I remember while he was host the full bot . i was tryin' to go and after every 2 jumps i was needed to stop for 1-2 seconds at every 2 jumps.
01/04/2011 18:25 kivu94#476
please host not!
01/04/2011 18:26 kivu94#477
host bot!
01/04/2011 18:29 demon17#478
Quote:
host bot!
Quote:
please host not!

Stop Blameing and flaming in this forum ..
Hard Works .. Still under development Its ok to keep it private
01/04/2011 23:12 denominator#479
Few questions why does it jump to the last char logged on all the time? Even when writing this it will jump back to the last char that I logged on >.<

Code:
public static bool MineBot(Client C)
        {
            if (C.Mining)
            {
                if (C.LastDropped.AddMilliseconds(1000) < DateTime.Now)
                {
                    foreach (Items.ItemInfo I in C.Inventory.Values)
                    {
                        if (Handler.IsOre(I.ID))
                        {
                            C.LastDropped = DateTime.Now;
                            Packets.DropItem(C, I.UID);
                            break;
                        }
                    }
                }
            }
        }
I tried using this and got an error which I expected to get I am guessing MineBot needs to be defined but where do I define it? I got it to work on my network so my other comps can use just the loader instead of having to have the source on all my comps lol.

And has anybody found a way to make it a little more stable to log on and stay logged on?
01/04/2011 23:38 OELABOELA#480
Quote:
Originally Posted by denominator View Post
Few questions why does it jump to the last char logged on all the time? Even when writing this it will jump back to the last char that I logged on >.<

Code:
public static bool MineBot(Client C)
        {
            if (C.Mining)
            {
                if (C.LastDropped.AddMilliseconds(1000) < DateTime.Now)
                {
                    foreach (Items.ItemInfo I in C.Inventory.Values)
                    {
                        if (Handler.IsOre(I.ID))
                        {
                            C.LastDropped = DateTime.Now;
                            Packets.DropItem(C, I.UID);
                            break;
                        }
                    }
                }
            }
        }
I tried using this and got an error which I expected to get I am guessing MineBot needs to be defined but where do I define it? I got it to work on my network so my other comps can use just the loader instead of having to have the source on all my comps lol.

And has anybody found a way to make it a little more stable to log on and stay logged on?

1. How you mean jump back to the last char logged on?
2. Remove 'static' if its just in your bot.cs
3. No, and i think its just your net doing it, because sometimes i instantly logg, and sometimes i cant event logg(this is when my net is unstable)