can someone give me a working hunt/looting code? :(
great now problem is solved,Quote:
I believe it predefined constant. Try it define as 18. So random number will be generated from -18 to 18.
while ([COLOR="Red"]this.RunBot && Handler.NewBot(this)[/COLOR])
because void specifies that the method does not return a value, and bool is used to declare variables to store the Boolean values, true and false.Quote:
great now problem is solved,
but i got another problem, since i changed this line:
public static bool NewBot(Client C)
to this:
public static void NewBot(Client C)
as P4N said
now this line in Client.cs
is underlined red and says that i can't use && between bool and voidCode:while ([COLOR="Red"]this.RunBot && Handler.NewBot(this)[/COLOR])
so what should i do now? :confused:
i know sir, so if i use bool i get an error, and if i use void i get another errorQuote:
because void specifies that the method does not return a value, and bool is used to declare variables to store the Boolean values, true and false.
If you don't want NewBot to return anything, then while loop should be likeQuote:
great now problem is solved,
but i got another problem, since i changed this line:
public static bool NewBot(Client C)
to this:
public static void NewBot(Client C)
as P4N said
now this line in Client.cs
is underlined red and says that i can't use && between bool and voidCode:while ([COLOR="Red"]this.RunBot && Handler.NewBot(this)[/COLOR])
so what should i do now? :confused:
Can you please stop posting WHOLE attack sources, because there will come some noobs that try to compile it and go complain that it wont work (These are noobs with like +1 gear, IE:They know more then the average)Quote:
i know sir, so if i use bool i get an error, and if i use void i get another error
iam using ur old hunting method btw which is in here:
[Only registered and activated users can see links. Click Here To Register...]
but i get alot of errors, if u updated it, it would be nice if you realese it
ty
Now it works like a charm. Thanks for the function. I think this could be my last question on hunting bot. How do I know the item is not lootable since the dropped is not yours? I think I am going to set tryCount for the GroundItem. If tryCount > 1 then I will skip.Quote:
Ok, autopot again. For who didn't work on this feature yet, I am adding a bonus here. iteminfo data[64] is item count. Well, ItemInfo doesn't have this information. Then we need to populate :)
Since I located pots in my inventory. I need to use it. Does UseItem() posted at the beginning work? I guess I will find out soon.
worked like a charm ty, but its dcing after like 3-4 monstersQuote:
If you don't want NewBot to return anything, then while loop should be like
while (this.RunBot)
{
NewBot(this);
...
}
What things you added to your bot?Quote:
worked like a charm ty, but its dcing after like 3-4 monsters
and it don't stop hunting when i press /hunt again, it only says hunting = true but it don't stop
this is the command of huntingQuote:
What things you added to your bot?
For stop hunting you need to type /hunt
=true ( hunt is on , will attack monsters)
=false(hunt is off , wont attack monsters)
case "/hunt":
{
if (!C.RunBot)
C.RunBot = true;
UpdateStats(C);
C.Hunting = !C.Hunting;
Chat(C, "Hunting = " + C.Hunting, 2011);
break;
}
For me the speed rates are average . I can use 50 at all but to get stable i use :Quote:
this is the command of hunting
but it doesn't stop hunting + it attacks so fast and dcs even when i make the speed of jumping/attacking 100Code:case "/hunt": { if (!C.RunBot) C.RunBot = true; UpdateStats(C); C.Hunting = !C.Hunting; Chat(C, "Hunting = " + C.Hunting, 2011); break; }
u can use this RandomJump its working great with meQuote:
For me the speed rates are average . I can use 50 at all but to get stable i use :
attack 50 ( In Bird i need to put it to 60 to get it stable )
jump 100
update 100
pothp 350
hitstokill 1
I never hunt with bot w/out FS . Attacks to fast and get DC
I hit mobs buy my hand and after I FS comes i try to get an amount of ks near to 80+ ti unlimited fs .
But i not have a rand jump in my source . so i need to jump sometimes
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;
}
}
Quote:
u can use this RandomJump its working great with me
PHP Code: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;
}
}