edit : question in brief was that client doesn't update(jump) with general data packet when it receive the server reply which i've solved it using ninja step from proxy to client to update it's position , thanks pro4never and fang
nvm i was dumb , thanks anyway :DQuote:
You cannot force the client to jump via packets. It will only display if sent with another entity's uid.
If you need to re-position the client then you use set position, flash step or hook the jump function in the client itself.
the question wasn't worth it , i was just trying to rush stuff as i was almost about to finish my bot and get it to work :) , and yeah i've used ninja step instead of normal jump thanks buddy :)Quote:
Try not to delete your questions after they've been answered, because other members won't be able find them later on. In summary, it isn't possible to make the character jump unless you hook the client, use an interaction or other type of action packet, or use the path-finding feature (which can be invoked by the server and make the client jump to a destination).
This will update the client screen too.Quote:
You cannot force the client to jump via packets. It will only display if sent with another entity's uid.
If you need to re-position the client then you use set position, flash step or hook the jump function in the client itself.
case "jump":
{
ushort targetX, targetY;
targetX = targetY = 400;
var pkt = new TwoMovement
{
EntityCount = 1,
Facing = client.Entity.Facing,
MovementType = TwoMovement.Jump,
FirstEntity = client.Entity.UID,
X = targetX,
Y = targetY
};
World.SendLocalPacket(client.Entity, pkt.Build(), 0, 16);
client.Entity.X = targetX;
client.Entity.Y = targetY;
World.GetScreen(client);
break;
}
That's a coupled interaction (what I was referring to by "other type of action packet"). It might look really weird if it's like that (like the character is holding hands with an imaginary friend), which is why I didn't mention it. I'm really not certain because I've only seen it when the coupled interaction is undergoing. If you end up trying that... tell me how it looks. I'm kinda interested to know.Quote:
This will update the client screen too.
(You can find the twomovements packet in impulses source)
Here's the code behind the magic. (and no, this isnt a goddamn ninja step - thats gay)
You were saying? :)PHP Code:case "jump":
{
ushort targetX, targetY;
targetX = targetY = 400;
var pkt = new TwoMovement
{
EntityCount = 1,
Facing = client.Entity.Facing,
MovementType = TwoMovement.Jump,
FirstEntity = client.Entity.UID,
X = targetX,
Y = targetY
};
World.SendLocalPacket(client.Entity, pkt.Build(), 0, 16);
client.Entity.X = targetX;
client.Entity.Y = targetY;
World.GetScreen(client);
break;
}
That packet is/was used for moving monsters. No idea what coupled interactions use..Quote:
That's a coupled interaction (what I was referring to by "other type of action packet"). It might look really weird if it's like that (like the character is holding hands with an imaginary friend), which is why I didn't mention it. I'm really not certain because I've only seen it when the coupled interaction is undergoing. If you end up trying that... tell me how it looks. I'm kinda interested to know.
Quote:
That's a coupled interaction (what I was referring to by "other type of action packet"). It might look really weird if it's like that (like the character is holding hands with an imaginary friend), which is why I didn't mention it. I'm really not certain because I've only seen it when the coupled interaction is undergoing. If you end up trying that... tell me how it looks. I'm kinda interested to know.
yeah , it works fine, I usually use it to test hunting and stuff , makes players jump everywhere killing mobs, make the team follow me etc, it works fine tho!Quote:
From what I remember when testing it (I have no clue what Interactions use, that packet I linked is/was used for mobs moving) - It looks perfectly normal and natural like a normal jump. (Could of changed it later clients??)
No idea, opened up the file in notepad - As I said - "(You can find the twomovements packet in impulses source)"Quote:
I don't have the definition of your "TwoMovement" class. What's the packet type in use for it?
Ah ha. Yah, that's the coupled interactions packet, structured like so:Quote:
@Fang, the packet-type is 0x45A (1114)
// Packet Structure:
public ushort Length; // 0 - The length of the packet.
public PacketType Identifier; // 2 - The packet type.
public HoldingHandsAction Action; // 4 - The type of action being performed while holding hands.
public ushort X; // 6 - The x-coordinate of the jump (only used for jumping).
public ushort Y; // 8 - The y-coordinate of the jump (only used for jumping).
private fixed byte _spacer[2]; // 10 - Unknown Space (You're welcome to inform me on what this might be.
public int Amount; // 12 - The amount of people involved with the action.
public int Identity; // 16 - The identity of the player controlling the action.
public int Target; // 20 - The identity of the target player (holding hands with).
Quote:
Action 2 is jump :p
/// <summary> This enumerated type defines the types of interactions that can be executed by the client. </summary>
public enum HoldingHandsAction : ushort
{
WALK_WHILE_HOLDING_HANDS = 1,
JUMP_WHILE_HOLDING_HANDS = 2
}