|
You last visited: Today at 23:17
Advertisement
Stripped ProjectAlchemy Source Code
Discussion on Stripped ProjectAlchemy Source Code within the CO2 Bots & Macros forum part of the Conquer Online 2 category.
02/07/2011, 17:46
|
#901
|
elite*gold: 0
Join Date: Dec 2010
Posts: 33
Received Thanks: 0
|
Anyone knows a fast and stable config of speed/hitstokill values ?
|
|
|
02/08/2011, 02:27
|
#902
|
elite*gold: 0
Join Date: Dec 2010
Posts: 33
Received Thanks: 0
|
case "/hunt":
{
if (!C.RunBot)
C.RunBot = true ;
UpdateStats(C);
C.Hunting = !C.Hunting;
Chat(C, "Hunting = " + C.Hunting, 2011);
break;
}
Why it isnt stopping hunting? anybody can helpme fix this?
|
|
|
02/08/2011, 02:51
|
#903
|
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
|
It`s not a problem with the case.
Code:
public static bool NewBot(Client C)
{
if (C.RunBot)
{
if (!C.Hunting)
return true;
If you have a hunting system in place already then you need to return true after the if Hunting statement
|
|
|
02/08/2011, 03:05
|
#904
|
elite*gold: 0
Join Date: Dec 2010
Posts: 33
Received Thanks: 0
|
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;
}
}
}
}
It doesnt stop hunting...if i enter this i got error at return
if (!C.Hunting)
return true; ,
|
|
|
02/08/2011, 03:12
|
#905
|
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
|
Code:
public static void NewBot(Client C)
Should be
Code:
public static bool NewBot(Client C)
Besides that seems to be a different code to what I have or at least slightly different. A suggestion if like me you are unsure of C# would be
HTML Code:
http://cw-network.info/ebooks/6057-10-days-to-learn-visual-c-2010.html
|
|
|
02/08/2011, 03:17
|
#906
|
elite*gold: 0
Join Date: Dec 2010
Posts: 33
Received Thanks: 0
|
Can you share your code? i appreciate
|
|
|
02/08/2011, 03:19
|
#907
|
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
|
Not my code to share besides I said it`s only slightly different to what you have otherwise it`s virtually identical.
|
|
|
02/08/2011, 03:38
|
#908
|
elite*gold: 0
Join Date: Dec 2010
Posts: 33
Received Thanks: 0
|
so the difference is one is bool other is void
how to make the hunting stop in my code ( void ) ? anyone?
|
|
|
02/08/2011, 03:40
|
#909
|
elite*gold: 0
Join Date: Aug 2006
Posts: 45
Received Thanks: 6
|
Hmm. I will try to share something here.
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...
|
|
|
02/08/2011, 03:47
|
#910
|
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
|
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?
|
|
|
02/08/2011, 03:52
|
#911
|
elite*gold: 0
Join Date: Aug 2006
Posts: 45
Received Thanks: 6
|
Quote:
Originally Posted by denominator
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
|
|
|
02/08/2011, 05:10
|
#912
|
elite*gold: 0
Join Date: Aug 2006
Posts: 45
Received Thanks: 6
|
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.
Thanks
|
|
|
02/08/2011, 06:30
|
#913
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
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.
|
|
|
02/08/2011, 09:52
|
#914
|
elite*gold: 0
Join Date: Dec 2010
Posts: 33
Received Thanks: 0
|
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?
|
|
|
02/08/2011, 13:46
|
#915
|
elite*gold: 0
Join Date: Aug 2010
Posts: 676
Received Thanks: 109
|
Quote:
Originally Posted by caio bola
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 ..
[FS came]
/update 11 2072012001
/speed attack 60
/speed jump 80
/speed update 80
/hitstokill 1
works nice when FS is ON.. so when fatalstrike is activated i can run faster speeds ..
|
|
|
Similar Threads
|
[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:
|
All times are GMT +1. The time now is 23:18.
|
|