case "/record":
{
if (Recording)
{
Recording = false;
ShowMessage("Finished Recording");
}
else
{
Recording = true;
ActivePath = new Paths();
ActivePath._Map = _Map;
ActivePath.Desc = "Custom";
ActivePath.ID = 0;
ActivePath.myPoints.Add(new MyPoint(0, MakeCoord(X, Y)));
ActivePoint = null;
ShowMessage("Recording path! Jump to add points");
}
if (Recording)
{
if (_autoHunter.Enabled)
{
_autoHunter.Enabled = false;
ShowMessage("Do not record while hunting! Stopped bot");
}
ushort PID = (ushort)(ActivePath.myPoints.Count);
ActivePath.myPoints.Add(new MyPoint(PID, MakeCoord(ToX, ToY)));
ShowMessage("added " + ToX + "," + ToY);
}
}
break;
Code:
public ushort pathX;
public ushort pathY;
public ushort ToX;
public ushort ToY;
private ushort _Map, _X, _Y;
Code:
public ushort X
{
get { return _X; }
set { PrevX = _X; _X = value; }// Form.OutX.Text = Convert.ToString(_X); }
}
public ushort Y
{
get { return _Y; }
set { PrevY = _Y; _Y = value; }// Form.OutY.Text = Convert.ToString(_Y); }
}
public bool Recording = false;
public Paths ActivePath = null;
public MyPoint ActivePoint = null;
public List<Coord> path = new List<Coord>();
public Coord To;
Code:
public List<PathFinderNode> _paths = new List<PathFinderNode>();
public ushort PrevX, PrevY;
public static int pathIndex = 9999999;
public static bool fimPath = true;
Code:
public static MyPoint SetPoint(ushort Id, Coord Where)
{
MyPoint P = new MyPoint(Id, Where);
return P;
}
public static Coord newCoord(ushort X, ushort Y)
{
Coord Z = new Coord();
Z.X = X;
Z.Y = Y;
return Z;
}
public static int Distance(ushort X, ushort Y, ushort ToX, ushort ToY)
{
int XDist = Math.Abs(X - ToX);
int YDist = Math.Abs(Y - ToY);
if (XDist > YDist)
return XDist;
else
return YDist;
}
public static bool VerificaDistancia(Client C, ushort toX, ushort toY)
{
int distan = Distance(C.X, C.Y, toX, toY);
int disMax = 17;
if (distan > disMax)
{
ushort novoX = C.X;
ushort novoY = C.Y;
Random r = new Random();
int imove = r.Next(5, disMax);
if (C.X < toX)
novoX = (ushort)(novoX + imove);
else
novoX = (ushort)(novoX - imove);
if (C.Y < toY)
novoY = (ushort)(novoY + imove);
else
novoY = (ushort)(novoY - imove);
}
return true;
}
public class Paths
{
public ushort ID;
public ushort _Map;
public string Desc;
public List<MyPoint> myPoints = new List<MyPoint>();
}
public static Coord MakeCoord(ushort X, ushort Y)
{
Coord Z = new Coord();
Z.X = X;
Z.Y = Y;
return Z;
}
public struct Coord
{
public ushort X, Y;
}
public class MyPoint
{
public Coord coord;
public ushort Id;
public MyPoint(ushort PID, Coord C)
{
Id = PID;
coord = C;
}
}
The above is all in Client.cs and the code at the bottom is in AutoHunter.cs
#region Public
public List<Coord> path = new List<Coord>();
public Paths ActivePath = null;
public static int pathIndex = 9999999;
public static bool fimPath = true;
public static MyPoint SetPoint(ushort Id, Coord Where)
{
MyPoint P = new MyPoint(Id, Where);
return P;
}
public static Coord newCoord(ushort X, ushort Y)
{
Coord Z = new Coord();
Z.X = X;
Z.Y = Y;
return Z;
}
public class Paths
{
public ushort Id;
public ushort MapId;
public string Desc;
public List<MyPoint> myPoints = new List<MyPoint>();
}
public static Coord MakeCoord(ushort X, ushort Y)
{
Coord Z = new Coord();
Z.X = X;
Z.Y = Y;
return Z;
}
public struct Coord
{
public ushort X, Y;
}
public class MyPoint
{
public Coord coord;
public ushort Id;
public MyPoint(ushort PTID, Coord C)
{
Id = PTID;
coord = C;
}
}
#endregion
I actually don't have any errors except it just doesn't add the point to point and just spews out "added " + ToX + "," + ToY Except ToX and ToY result in 0,0?
Should I add a new class and take the first parts out and add them to a new class? I mean the stuff I added to Client.cs.
My guess would be that your never setting ToX or ToY to your characters cordinates. If your just trying to make a simple path recording system half of that stuff is not needed.
Also i don't understand how your recording new points. If you do "/record" is sets record to true/false and also records a point. Do you do /record for every point you want to add? Maybe i missed it or something but seems like It would be recording it to a new path every other time?
No last time I used it all I had to do was /record then jump to the points and when finished in the little pattern then click /record again and it stops the recording. Then you /ahunt and it starts the hunt in the little pattern you created or at least it used to in AlchemyProxy.
Again, unless I'm missing part of your code, this doesn't record when you jump. This records your current point when you initialize your path recording and goes no further. I don't suggest taking large code snippets from Alchemy unless you fully understand what it all does. Even if you did, it wouldn't take long to clean it up and write it yourself so you are familiar with it.
Nope no code missing that I know of, I have to agree about the taking from Alchemy though, worked pretty well for that but just won't for this and the code was pretty much the same apart from a few things different that I've corrected as best I could so that it doesn't actually throw any errors but I'm assuming it's probably just conflicting somewhere.
I don't know it's 5:31 here so I'm going to get some sleep I think and will have another look tomorrow night after I have got back home. Been getting my *** out of the house rather than just being a boring **** and staying in messing with the computer all the time lol.
Nope no code missing that I know of, I have to agree about the taking from Alchemy though, worked pretty well for that but just won't for this and the code was pretty much the same apart from a few things different that I've corrected as best I could so that it doesn't actually throw any errors but I'm assuming it's probably just conflicting somewhere.
There's your problem right there, you have taken code which you dont understand, changed it to fix things which you thought were broken and have ended up breaking it.
If there was ever an argument for not copying and pasting code this would be it.
2 ways. You can keep track of all entities and whether they are player or npc, or you can do a full name check against the "Guard" names and not whether it contains it.
was ALREADY part of the code before I tried adding the pathfinder >.< WITHOUT it the normal hunt will attack or try to attack guards lol . Jeez I guess nobody has even bothered to look at the V2 of hooking???
While it's not really a big deal.... I feel a lot of sticklers would cringe at the amount of negative logic used in all your checks.
Instead of Not IsPlayer... just do an IsValidMonster check. Negative logic should be avoided in most cases. It causes debugging to be more of a pain and can really confuse you during some late night coding sessions. Plus it's just rather bad form.
While it's not really a big deal.... I feel a lot of sticklers would cringe at the amount of negative logic used in all your checks.
Instead of Not IsPlayer... just do an IsValidMonster check. Negative logic should be avoided in most cases. It causes debugging to be more of a pain and can really confuse you during some late night coding sessions. Plus it's just rather bad form.
If you're talking about a "IsValidMonster" property on the Entity class, I highly disagree. Why would that logic belong to the Entity class? It has absolutely no place there IMO.
Help me to figure it out please !!!?? 03/16/2011 - Aion - 3 Replies How can a gladiator use shield defense + slaughter "bug" , please if any 1 know it tell me or pm in the forum.
here is a video that guy's using it :
YouTube - Aion Gladiator Level 55 Dual Wielding Duels
Please as soon as possible ..
Thanks .
Please Help me i can't figure this out :s 09/30/2010 - Silkroad Online - 3 Replies Hello everyone ,
Please i can't play silkroad on my new laptop , when i lunch silkroad.exe nothing happens for like 30 sec then this message pops up :
http://img833.imageshack.us/img833/5170/errory.pn g
Please help me :s , Sbot doesn't work either , when i press Login the little message appears but it doesn't progress , like if it couldn't connect to the bot server , then a message apears in the bot in red : " Error- failed to connect"
I have Windows 7 on my laptop if that could help.
Anybody figure out . . . 03/18/2010 - Archlord - 9 Replies How to trade unique accessories now, even though they are "bound". Just wondering if it is possible.
could someone figure this out? 12/05/2009 - Grand Chase - 5 Replies YouTube - EXP Hack in progress
this guy seemse to be doing a exp hack and monster lvl hack....
could someone please tell me how to do this?
Let's figure out the +1s 06/18/2006 - Conquer Online 2 - 28 Replies From here on out, everyone please post any statistics they can on +1 drops. This includes item type, dura, sockets, lvl, quality, blessed, etc. Also post the times, we're going to bust down this +1 non-sense.
Thanks for your help,
-einhornchen