Stripped ProjectAlchemy Source Code

01/20/2011 21:37 Warlax#766
still waiting on ur contribution boys :)
01/20/2011 21:40 demon17#767
So I need to make a dictionary where the bot will save temporary ( meaning till i close client or re-record the path ) all the jump-arriving possitions .. where the bot will return the character when no monster in area .
Code:
case "/record":
                        {
                            if (C.Recording)
                            {
                                C.Recording = false;
                                Chat(C, "Finished Recording", 2011);
                            }
                            else
                            {
                                C.Recording = true;
                                C.ActivePath = new Path();
                                C.ActivePath.MapID = C.Map;
                                C.ActivePath.Desc = "Custom";
                                C.ActivePath.ID = 0;
                                C.ActivePath.Points.Add(new Point(0, MakeCoord(C.X, C.Y)));
                                C.ActivePoint = null;
                                Chat(C, "Recording path! Jump to add points", 2011);
                            }
                            break;}
This is my /Record Path , how i asign a dictionary to it?
01/20/2011 21:52 darkopp#768
CAN ANY 1 Make Video "HOW TO MAKE IT PROXY AND WITH SCRIPTS IF CAN"
01/20/2011 22:09 pro4never#769
I'm bored so here's some code ideas

C.Recording = true;
C.Path = new List<Coord>();
C.PathIndex = 0;
C.Path.Add(new MakeCoord(C.X, C.Y));


Then in receiving jump packet do

if (C.Recording == true)
C.Path.Add(new MakeCoord(C.X, C.Y));

In your path finding code do something like...

if(Distance to C.Path[C.PathIndex] < 7)
//path found, move to next one
if(C.PathIndex + 1< C.Path.Count)
C.PathIndex++;
else
{
C.Path = C.Path.Reverse();
C.PathIndex = 1;
}
Coord To = Calculations.PullClosest(MakeCoord(C.X, C.Y), C.Path[C.PathIndex]);
Jump or shift to the pulled coord

or something like that...



That's the ABSOLUTE simplest way to code it. Keep in mind pull closest will be a method pulling all possible coords near you that are valid and then checking their distance vs target and returning the closest one. Assuming no large obstacles it will return the most efficient coord to move to each time.


TEACHING MOMENT:

Keep in mind when working with enumerated elements in a list or an array, the .count will ALWAYS be greater then your current index value as they start at 0, not 1!


Pulling element 1 means you are actually pulling the second element in a list/array.

List<int> A = new List<int>{5, 4, 3, 2, 1, 0};

Console.WriteLine(A[0]);

This will produce the output '5'

Alternatively doing A[1] would be '4' and so on.
01/20/2011 22:18 Warlax#770
Quote:
Originally Posted by demon17 View Post
So I need to make a dictionary where the bot will save temporary ( meaning till i close client or re-record the path ) all the jump-arriving possitions .. where the bot will return the character when no monster in area .
Code:
case "/record":
                        {
                            if (C.Recording)
                            {
                                C.Recording = false;
                                Chat(C, "Finished Recording", 2011);
                            }
                            else
                            {
                                C.Recording = true;
                                C.ActivePath = new Path();
                                C.ActivePath.MapID = C.Map;
                                C.ActivePath.Desc = "Custom";
                                C.ActivePath.ID = 0;
                                C.ActivePath.Points.Add(new Point(0, MakeCoord(C.X, C.Y)));
                                C.ActivePoint = null;
                                Chat(C, "Recording path! Jump to add points", 2011);
                            }
                            break;}
This is my /Record Path , how i asign a dictionary to it?
lol who u steal that code off then. can tell u aint written it else u would spot the list that is already in place. plus u dont want a dictionary, else u wouldnt know the order, well, lol not unless u set all the keys to ints, but lol, then surely u would just simply use an array/list.

interestingly that code looks like its been designed to record multiple paths tho, not just simply one . . .
01/20/2011 22:21 demon17#771
Quote:
Originally Posted by Warlax View Post
lol who u steal that code off then. can tell u aint written it else u would spot the list that is already in place. plus u dont want a dictionary, else u wouldnt know the order, well, lol not unless u set all the keys to ints, but lol, then surely u would just simply use an array/list.

interestingly that code looks like its been designed to record multiple paths tho, not just simply one . . .
Only few words for you :
Go away and get a new life .. Thats not helpfull what you do here
01/20/2011 22:25 pro4never#772
Quote:
Originally Posted by Warlax View Post
lol who u steal that code off then. can tell u aint written it else u would spot the list that is already in place. plus u dont want a dictionary, else u wouldnt know the order, well, lol not unless u set all the keys to ints, but lol, then surely u would just simply use an array/list.

interestingly that code looks like its been designed to record multiple paths tho, not just simply one . . .
It's actually based off how I originally had my paths (I did a dict<int, point> which was pointless and had a server list of paths that they could select from)

Chances are they saw the methods I left in the source and build off that.

The new one I posted using lists would be FAR better.
01/20/2011 22:50 [GM]#773
Quote:
Originally Posted by Warlax View Post
lol who u steal that code off then. can tell u aint written it else u would spot the list that is already in place. plus u dont want a dictionary, else u wouldnt know the order, well, lol not unless u set all the keys to ints, but lol, then surely u would just simply use an array/list.

interestingly that code looks like its been designed to record multiple paths tho, not just simply one . . .
look at me iam warlax [Only registered and activated users can see links. Click Here To Register...]
i will be trolling until someone break my curse :bandit:
01/20/2011 23:36 OELABOELA#774
Can we stop trolling for a sec, and only come to this thread to make actually questions about the object? Ok.
01/20/2011 23:45 [GM]#775
Quote:
Originally Posted by OELABOELA View Post
Can we stop trolling for a sec, and only come to this thread to make actually questions about the object? Ok.
actually it was stopped yesterday but thanks to warlax he started the flame war again
01/20/2011 23:48 OELABOELA#776
Quote:
Originally Posted by [GM] View Post
actually it was stopped yesterday but thanks to warlax he started the flame war again

Can't you just stop then? Fock off c mon.. This thread got spammed by shitty flame wars the last few days, you guys didn't even notice my proxy is public do you?
01/20/2011 23:54 [GM]#777
sry mate, ur thread didn't get approved yet?
01/20/2011 23:58 OELABOELA#778
Quote:
Originally Posted by [GM] View Post
sry mate, ur thread didn't get approved yet?
Nope it isnt.
01/21/2011 00:00 [GM]#779
Quote:
Originally Posted by OELABOELA View Post
Nope it isnt.
if u got the botjail command, then count me in :)
01/21/2011 00:12 OELABOELA#780
Quote:
Originally Posted by [GM] View Post
if u got the botjail command, then count me in :)
I've got a stable proxy that makes 3 kills each second in fs. with a non-dcing speedhack. So.. kinda use-able isnt it?