Sorry about not being clear :)Quote:
sorry now is clear wht u mean .. :))
sometimes i don t understood clearly wht mates ur write ^.^ i used a dictionary of items dorped by mine and items that i can t take from ground becouse are items locked (other player kills them and drop it) all this dictionary are don t loot item and i cleaning from my item grounds ( if u loook my Filter ground items function)
I don't use random jump. I refined a spiral hunting path from current location and jump one point to another. It is so basic at the moment. After I implement all the functionality, I am planning to improve it. Anyway, I can give you pseudo code for random jump.Quote:
anyone can share the RandomJump code?
is a particualar send pack in cyrcle handler.cs in packet folderQuote:
Sorry about not being clear :)
Did you anything about detecting end of XP cycle? Somehow, Client.InXp is always true and not gets reset. i should put some debugging point to see if there is any change in server packet.
1.Quote:
Hy I wana ask some things like :
1) How can i add the Monk XP skill to auto activate?
-Where exactly
-what is the skill ID
-How I implement it
2) How can i add the Loot Costum item ( Mean /loot " " )<("Metoer" < with id)
-Where
-How
Cuz i start to be lazzy to stop every time when 1 met is dropped
[I know no one wana help each others ( i mean no one wana send me a code wich i can place in bot.cs or no one help me to make it work) , for this i will be glad when someone post some pseudo codes ..]
There is a status update subtype that the server sends controling how much xp time you have left. I thought I had it handled in proxy already but it's possible it changed. Basically you wanna do if it's < something Xp mode = false. As for fatal strike just do if fatal activated is greater than say 58 seconds you turn off fatal strike cause it will stop soon on its own.Quote:
Sorry about not being clear :)
Did you anything about detecting end of XP cycle? Somehow, Client.InXp is always true and not gets reset. i should put some debugging point to see if there is any change in server packet.
for max hp you have to calculate it using your equipped items and your character's stats (job, str, vit, spi, dex and equipped items using an itemtype.dat and the + bonuses file)Quote:
P4N,
I am trying to find char's max HP. Char info in Handler only gives current HP. Do you know which packet gives that information?
BTW, I think I am done with looting and dropping normal items. Thanks to P4N and gorgone :) I am trying to implement autopot function. If anyone is in this process, let's share basic ideas. I am trying to maintain at least 50% of max HP. If it goes below, use pot. If you run out of pot, start picking up pots (maybe upto 5 in inventory). Let's see how it goes.
That could be tq and their not allowing itemtype.dat hacks to detect item quality. Is it a non weapon based item? If so it's probably defaulting to the "normal" version of the item whereQuote:
As PxN said, NEW ground id is generated by server when item is dropped even with same item. You can't see real UID until the item is in your inventory. I tried to avoid using current method that uses time. I optimized handler routine to check around char to make reasonable guess that the item dropped is yours.
BTW, thanks P4N to confirming this :)
Also, I found something strange about ID and I don't know how it is happening. In my inventory, ID was 136003 and when it was dropped it became 136005. So, LastDroppedID == I.ID checking logic was failing. So, it went into picking up/dropping loop again..... Any explaination? I might change the code to check that item is being dropped by char and that item is around char.
private static void RandomJump(Client C)
{
Random random = new Random();
Coord XY = new Coord();
XY.X = (ushort)(C.X + random.Next(-C.[COLOR="Red"]Step_random_jump[/COLOR], C.[COLOR="red"]Step_random_jump[/COLOR]));
XY.Y = (ushort)(C.Y + random.Next(-C.[COLOR="red"]Step_random_jump[/COLOR], C.[COLOR="red"]Step_random_jump[/COLOR]));
if (Calculations.ValidDmap(C.StaticMap, [COLOR="Red"]Z[/COLOR].X, [COLOR="red"]Z[/COLOR].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;
}
}
public static bool 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))
return true;
}
}
}
}
case "/hunt":
{
if (!C.RunBot)
C.RunBot = true;
UpdateStats(C);
C.Hunting = !C.Hunting;
Chat(C, "Hunting = " + C.Hunting, 2011);
break;
}
ty so muchQuote:
if (Calculations.ValidDmap(C.StaticMap, Z.X, Z.Y))
ValidMap what do ? cheak if is possibile move on this coordinate on determinate map... so change Z with XY and all be fine u can jump ^^