Stripped ProjectAlchemy Source Code

12/14/2010 22:06 macavladu#256
Anyway dude , FS pwns atm , just need a path system or something and would work awesome , FS speeds looks like CoGenius' one
12/14/2010 22:22 tkblackbelt#257
Hey I keep getting failed to connect to game server, I have mt hamachi ip in and database setup, so I'm not sure whats wrong heres a pic

[Only registered and activated users can see links. Click Here To Register...]
12/14/2010 22:24 OELABOELA#258
Quote:
Originally Posted by macavladu View Post
Anyway dude , FS pwns atm , just need a path system or something and would work awesome , FS speeds looks like CoGenius' one
Thank you :) I hope you like being in my comodo group.
12/14/2010 22:54 stickray#259
I fixed my Looting today too :) I just wrote up the whole Item part and made for it another Thread wich runs alongside the RunBot.. So if item found, disable Hunting and do Looting :)

Stresstested also, 2k on Warrior still not a hung up :P

Thanks pro for the basics! And thx this tread aswell...
12/14/2010 23:42 OELABOELA#260
Quote:
Originally Posted by stickray View Post
I fixed my Looting today too :) I just wrote up the whole Item part and made for it another Thread wich runs alongside the RunBot.. So if item found, disable Hunting and do Looting :)

Stresstested also, 2k on Warrior still not a hung up :P

Thanks pro for the basics! And thx this tread aswell...
Nice, do you have a speedhack already?


<Edit>
Lololololol, 4rd video!
12/14/2010 23:43 zap_xlib#261
Hi,

Can anyone help me with this:

Quote:
Items.GroundItem I = GetClosestItem(C);
ux1 = I.X;
uy1 = I.Y;
Coord XY = newCoord((ushort)ux1, (ushort)uy1);
System.Threading.Thread.Sleep(1000);
if (Calculations.ValidDmap(C.StaticMap, XY.X, XY.Y))
{
Console.WriteLine("Valid Coord!");
C.InGoTo = true;
C.To = XY;
}
What do i need to append or change in this code for my character to move to an item on ground?. This code just picks up the item at (0,0) w.r.t char.

It would be great if anyone could help me!.

Thank you!.
12/14/2010 23:50 clarkkenth2005#262
p4n im noob at programming but i want to learn from you? and im eager to learn pls help... i installed everything what u said on your step by step... and one thing i cant do is how to start to run this proxy what is the 1st thing to do? to run this source of yours...im easy to learn I dont know the 1st thing shall i do... after installing all the necessary stuff? e.x like where to write the code??? and what shall i open to write the code? pls help.... i join elitepvpers and i member of it since feb.. 2006
12/15/2010 00:09 OELABOELA#263
Do something with Jump function. Its in jump.cs
12/15/2010 00:31 zap_xlib#264
Quote:
ux = rand.Next(5);
uy = rand.Next(5);
Items.GroundItem I = GetClosestItem(C);
ux1 = I.X;
uy1 = I.Y;

Coord XY = newCoord((ushort)ux1, (ushort)uy1);
if (Calculations.ValidDmap(C.StaticMap, XY.X, XY.Y))
{
Console.WriteLine("Valid Coord!");
C.InGoTo = true;
//C.To = XY;
//Packets.CliJump((ushort)(I.X + ux), (ushort)(I.Y + uy), 156, C);
Packets.CliJump(XY.X, XY.Y, 156, C);
System.Threading.Thread.Sleep(500);
Packets.PickItem(C, I);
}
I even tried jump and clijump... It never jumps. But only picks up once in about 5 or 6 times and also only picks up the items i drop from my inventory just under my char. Hope there`s a solution...
12/15/2010 00:41 zap_xlib#265
Quote:
Originally Posted by zap_xlib View Post
I even tried jump and clijump... It never jumps. But only picks up once in about 5 or 6 times and also only picks up the items i drop from my inventory just under my char. Hope there`s a solution...
Maybe, i`ll try the functions in Distance.cs... Hope something would work and i can work my way from there...
12/15/2010 01:43 zap_xlib#266
Damn!... just got BotJailed :(. I knew i would if i dropped an item while jumping and i wan`t even using the bot!!!. :(
12/15/2010 02:03 zap_xlib#267
Quote:
Originally Posted by tkblackbelt View Post
Hey I keep getting failed to connect to game server, I have mt hamachi ip in and database setup, so I'm not sure whats wrong heres a pic

[Only registered and activated users can see links. Click Here To Register...]
My LoaderSet.txt had:

LoginPort = 5001
GamePort = 5000

In Settings.txt, remove the password "july30" and leave it blank. I can see you have installed Hamachi, Navicat and Xaamp. So, you should be fine!.

Just try to login 10 times or 15 times. If in any attempt you get logged in, then you shouldn`t have any problem troubleshooting...
12/15/2010 02:05 tkblackbelt#268
Quote:
Originally Posted by zap_xlib View Post
My LoaderSet.txt had:

LoginPort = 5001
GamePort = 5000

In Settings.txt, remove the password "july30" and leave it blank. I can see you have installed Hamachi, Navicat and Xaamp. So, you should be fine!.

Just try to login 10 times or 15 times. If in any attempt you get logged in, then you shouldn`t have any problem troubleshooting...
Holy sweet thnx so much I got in now I can try and add some code for botting. :)
12/15/2010 02:39 pro4never#269
Quote:
Originally Posted by zap_xlib View Post
Hi,

Can anyone help me with this:



What do i need to append or change in this code for my character to move to an item on ground?. This code just picks up the item at (0,0) w.r.t char.

It would be great if anyone could help me!.

Thank you!.
Sounds to me like the drop item packet has changed. Try reading different offsets to find the one that now coresponds with item x/y (print it to console is the easiest way)

items should NEVER be at 0/0, if they are the packet is being read incorrectly.

Quote:
Originally Posted by clarkkenth2005 View Post
p4n im noob at programming but i want to learn from you? and im eager to learn pls help... i installed everything what u said on your step by step... and one thing i cant do is how to start to run this proxy what is the 1st thing to do? to run this source of yours...im easy to learn I dont know the 1st thing shall i do... after installing all the necessary stuff? e.x like where to write the code??? and what shall i open to write the code? pls help.... i join elitepvpers and i member of it since feb.. 2006

The project file is always what you open. It will easily show you all related .cs files and let you edit them/compile/debug the program.

Quote:
Originally Posted by OELABOELA View Post
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 :)
Again.. why are you using 7 distance at all? If you are using jump packets you can jump up to 18 distance. You don't need to be in fatal strike to get to mobs that far away. You should ALWAYS be reading the ENTIRE screen for items/mobs. Then simply using your preferred method of transport to get there (teleport across a few diff coords OR jump directly to where you want to go)

@ the video.

Looks like you guys got hunting working quite nicely ^^ Gratz.

Now you just need to sort out other features and looting/dropping properly.

NOTE: the ignore loot was never finished in this version... You'll have an issue cause ground items and inventory items use different uids... meaning you drop an item from your inventory using its uid... but you can't simply ignore that uid for new looting cause it's not using a ground uid (frustrating!)

The work-around I did for that was to set a "last dropped" date time and then read incoming ground item packets to check for items being added to the floor and check the static id vs static id of last item I dropped + when the last dropped item was... then simply assume that the last dropped item of that type (assuming within like... half a second or so) was the one I dropped and ignore it/add to a list of items to NOT loot)

You then need to remove those items NOT to loot after a minute or two (cause uids are re-used!... fun xD)

Basically a proper loot system and sorting out times between diff actions is a pain.


NOTE: Thread.Sleep freezes the entire thread until the time has elapsed... I don't recommend using it often lol.

I've not looked into it but a possible method of doing things would be a timer based action system (after hearing so many horror stories about old 5017 lotf I've mostly avoided timers) but if you resricted their usage and added some basic logic you could do a fairly sexy logic system.

IE:
Action in progress (true when timer running, false when no action of same type is running)

Queue of future actions (handle things in order)

Main processing thread: use the bot thread... always try to avoid using multiple threads or freezing up other main threads (such as processing threads lol!)



Damn... I really wish I didn't have exams... I wanna write my Dynamic Action Queue system for my pserver... it would be so sexy to use for AI logic (basically a queue that auto sorts itself by when the next action occurs... IE: add an item using a delay time value and subtype (and optional packet information) and the queue would auto sort itself so that the next item to be pulled is always the next expire time.
12/15/2010 03:06 zap_xlib#270
Thanks, pro4never!... I was actually wanting to get a glimpse of how to make my char move at least an inch... Now, that i`m in jail, i don`t have to worry... In jail, i dropped some normal stuff while trying a long jump and got bot jailed again... :D

Besides, i was wondering from where you should be calling the NewBot(). I placed it as a Case under Cmd switch. But, i`m not able to make it loop, as i feel the control breaks no matter how many indefinite loops i put my code into.

Example: If i code it to hit monsters and get close to a mob of 3 monsters and type "/Bot", the char attacks all the 3 Mobs and after that, the loop breaks, even though it`s within an infinite loop. I also tried using Jump() and CliJump(). But, unable to get it to jump or teleport...