if (C.RunBot && C.NewBot()) // Don't change this. This is Ok. If you have problem here, that means, you have problem in NewBot routine. Unless, if you can use interface for bot class, stick with it.
boolean NewBot(){
// break the task into groups.
// 1. If bot has to wait because of previous action, return true/false (it doesn't really matter, 2ms or 5ms sleep. I believe it is about 10ms for normal pc sleep routine.
// 2. Check for mobs near you.
// 3. If no mob found, move to next location (jump) then return;
// 4. If mob found, check distance
// 5. If inFS and distance < 18, attack then return
If !inFS and distance < 18, jump, then return
}
This is basic idea. As you see, you don't want to do complicate task all once. You can only do 1 task at a time. I hope it helps. P4N already mentioned this earlier post. He pretty much told you all. If you can't understand it, I think you can't really program...
argon any idea what is needed so that the loot will check for other items instead of just picking one item up and jumping to next mob? I`m guessing I need a for loop or a while loop?
argon any idea what is needed so that the loot will check for other items instead of just picking one item up and jumping to next mob?
Again, if you want to add item picking logic. It has to be broken into task. You duplicate mob hunting logic. Just replace mob with item You can't pick up item and jump to next mob. That is bad logic. SIMPLICITY is the key. Remember 1 task at a time. Pickup item then return
I have been trying to make correctcoord packet working. I kind of lost here. If you can show me how i will appreciate it Here is my problem. I am sending jump pack (137) followed by correctcoord. First jump has timestamp + 2000 and next has correct one. However, I am not getting 108 from server but only 137. After 7 jumps, I get dced. Actually, the server said 4 jumps. It means my correctcoord is not working.
That's because I never said you need to SEND correct coords, I said you need to send a certain type of invalid packet that causes the SERVER to send the 108 packet. That's the one you want to find.
Everytime i try to run /speed jumps lower than 800 I get and 10010 error packet ( invalid jump )
anyone can helpme?
public static Mob GetClosestMonster(Client C)
{
Mob ToReturn = null;
int Dist = 18;
if (C.InFatalStrike)
{
Dist = 18;
}
else
{
Dist = 18;
}
foreach (Mob M in C.LocalMobs.Values)
{
if (Calculations.Distance(C.X, C.Y, M.X, M.Y) < Dist)
{
ToReturn = M;
Dist = Calculations.Distance(C.X, C.Y, M.X, M.Y);
if (Dist < 2)
break;
}
}
return ToReturn;
}
public static void NewBot(Client C)
{
if (C.RunBot)
{
Mob Attack = GetClosestMonster(C);
if (Attack != null)
{
if (C.LastJump.AddMilliseconds(C.JumpSpeed) < DateTime.Now)
{
Packets.CliJump(Attack.X, Attack.Y, 156, C);
Handler.Chat(C, " ", 2008);
C.X = Attack.X;
C.Y = Attack.Y;
C.UpdatedX = C.X;
C.UpdatedY = C.Y;
Calculations.UpdateLocal(C);
C.LastJump = DateTime.Now;
}
else if (C.LastAttack.AddMilliseconds(C.AttackSpeed) < DateTime.Now)
{
Calculations.ShiftTarget(Attack);
Packets.AtkServer(C, Attack, 2);
C.X = Attack.X;
C.Y = Attack.Y;
C.UpdatedX = C.X;
C.UpdatedY = C.Y;
Calculations.UpdateLocal(C);
Handler.Chat(C, " " + Attack.Name, 2008);
C.LastAttack = DateTime.Now;
}
}
Mob M = GetClosestMonster(C);
if (M == null)
{
RandomJump(C);
}
int Dist = Calculations.Distance(C.X, C.Y, M.X, M.Y);
if (Dist < 2)
{
if (DateTime.Now > C.LastAttack.AddMilliseconds(C.AttackSpeed))
{
Packets.AtkServer(C, M, 2);
}
else
{
if (DateTime.Now > C.LastJump.AddMilliseconds(C.JumpSpeed))
;
if (C.InFatalStrike && DateTime.Now > C.FatalStrikeActivated.AddSeconds(58))
{
C.InFatalStrike = false;
if (!C.Hunting)
return;
}
}
}
}
}
private static void RandomJump(Client C)
{
Random random = new Random();
Coord XY = new Coord();
XY.X = (ushort)(C.X + random.Next(-18, 18));
XY.Y = (ushort)(C.Y + random.Next(-18, 18));
if (Calculations.ValidDmap(C.StaticMap, XY.X, XY.Y))
{
Packets.CliJump(XY.X, XY.Y, 156, C);
Packets.Jump(C, XY.X, XY.Y, 137);
Packets.CliJump(XY.X, XY.Y, 156, C);
C.X = XY.X;
C.Y = XY.Y;
C.UpdatedX = XY.X;
C.UpdatedY = XY.Y;
System.Threading.Thread.Sleep(C.JumpSpeed);
C.LastJump = DateTime.Now;
}
}
}
}
Its fully working but I need some help to clear the code and to solve the invalid jump ( 10010) when I try to run at faster speeds.
Also I cant make the hunt to stop , what code I need to insert in order to make it stop if hunt=false?
Everytime i try to run /speed jumps lower than 800 I get and 10010 error packet ( invalid jump )
anyone can helpme?
public static Mob GetClosestMonster(Client C)
{
Mob ToReturn = null;
int Dist = 18;
if (C.InFatalStrike)
{
Dist = 18;
}
else
{
Dist = 18;
}
foreach (Mob M in C.LocalMobs.Values)
{
if (Calculations.Distance(C.X, C.Y, M.X, M.Y) < Dist)
{
ToReturn = M;
Dist = Calculations.Distance(C.X, C.Y, M.X, M.Y);
if (Dist < 2)
break;
}
}
return ToReturn;
}
public static void NewBot(Client C)
{
if (C.RunBot)
{
Mob Attack = GetClosestMonster(C);
if (Attack != null)
{
if (C.LastJump.AddMilliseconds(C.JumpSpeed) < DateTime.Now)
{
Packets.CliJump(Attack.X, Attack.Y, 156, C);
Handler.Chat(C, " ", 2008);
C.X = Attack.X;
C.Y = Attack.Y;
C.UpdatedX = C.X;
C.UpdatedY = C.Y;
Calculations.UpdateLocal(C);
C.LastJump = DateTime.Now;
}
else if (C.LastAttack.AddMilliseconds(C.AttackSpeed) < DateTime.Now)
{
Calculations.ShiftTarget(Attack);
Packets.AtkServer(C, Attack, 2);
C.X = Attack.X;
C.Y = Attack.Y;
C.UpdatedX = C.X;
C.UpdatedY = C.Y;
Calculations.UpdateLocal(C);
Handler.Chat(C, " " + Attack.Name, 2008);
C.LastAttack = DateTime.Now;
}
}
Mob M = GetClosestMonster(C);
if (M == null)
{
RandomJump(C);
}
int Dist = Calculations.Distance(C.X, C.Y, M.X, M.Y);
if (Dist < 2)
{
if (DateTime.Now > C.LastAttack.AddMilliseconds(C.AttackSpeed))
{
Packets.AtkServer(C, M, 2);
}
else
{
if (DateTime.Now > C.LastJump.AddMilliseconds(C.JumpSpeed))
;
if (C.InFatalStrike && DateTime.Now > C.FatalStrikeActivated.AddSeconds(58))
{
C.InFatalStrike = false;
if (!C.Hunting)
return;
}
}
}
}
}
private static void RandomJump(Client C)
{
Random random = new Random();
Coord XY = new Coord();
XY.X = (ushort)(C.X + random.Next(-18, 18));
XY.Y = (ushort)(C.Y + random.Next(-18, 18));
if (Calculations.ValidDmap(C.StaticMap, XY.X, XY.Y))
{
Packets.CliJump(XY.X, XY.Y, 156, C);
Packets.Jump(C, XY.X, XY.Y, 137);
Packets.CliJump(XY.X, XY.Y, 156, C);
C.X = XY.X;
C.Y = XY.Y;
C.UpdatedX = XY.X;
C.UpdatedY = XY.Y;
System.Threading.Thread.Sleep(C.JumpSpeed);
C.LastJump = DateTime.Now;
}
}
}
}
Its fully working but I need some help to clear the code and to solve the invalid jump ( 10010) when I try to run at faster speeds.
Also I cant make the hunt to stop , what code I need to insert in order to make it stop if hunt=false?
Lol you use ninja ?
I suggest you to try to set those speeds when FS is on ..
[RELEASE(SOURCE CODE)]-- KabBOT2 v1 Full Source(vb6) 10/07/2011 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 106 Replies I've been meaning to post this for awhile but I pretty much forgot about it. I've been getting quite a few requests for it so I decided to finally get around to posting it.
#1. So here you go, Just have or Download Visual Basic 6, you need to update it to VbRuntime 6 Service Pack 6.
#2. Run the file name KabBOT.vbp.
#3. Enjoy.
100% Virus Free VirusTotal.com report.
VirusTotal - Free Online Virus, Malware and URL Scanner
[RELEASE] [OPEN SOURCE] CE 5.5 Pointer to AutoIt Source-Code 02/13/2011 - AutoIt - 6 Replies Habe heute erst gemerkt, dass es hier eine AutoIt Sektion gibt xD also poste ich mal mein Programm mit rein.
Funktionsweise:
1. in CE Rechtsklick auf den Pointer und auf "Copy" klicken
2. in meinem Programm auf "Code generieren" klicken
3. In euer Scite gehen und einfügen
Hier ist der Source Code vom Programm: