[HELP] Moving packets and identifying mobs

07/27/2013 11:23 Vanapapi#1
Hi, I have two questions.

1) How to send a moving packet to silkroad with 0x7021? Do I have to use pk(warp) codes or can I use a formula of some sort? (A formula with X cords and Y cords to xSector,ySector,xOffset,yOffset or something like that)
Two threads I found:
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

2)How to get mob ID's(or list of mobs) around me so I can select them with something like [0x7045]. The last 2 bytes seem to repeat, but how can I get the first two?
6c 78 b6 02 (mangyang)

EDIT: Found the same ting from zbot source, but thanks anyway. For other newbies like me, the zbot source code is good to find things out.
08/26/2013 19:32 tarekwiz#2
umm .. i did some code for ya cuz i dont have time to explain it . i think its kinda easy
P.S its written in C#
Code:
public static void WalkTo(long X, long Y, short Z)
        {
            long xPos = 0;
            long yPos = 0;

            if (X > 0 && Y > 0)
            {
                xPos = (X % 192) * 10;
                yPos = (Y % 192) * 10;
            }
            else if (X < 0 && Y < 0)
            {
                xPos = (192 + (X % 192)) * 10;
                yPos = (192 + (Y % 192)) * 10;
            }
            else if (X < 0 && Y > 0)
            {
                xPos = (192 + (X % 192)) * 10;
                yPos = (Y % 192) * 10;
            }
            else if (X > 0 && Y < 0)
            {
                xPos = (X % 192) * 10;
                yPos = (192 + (Y % 192)) * 10;
            }

            byte xSector = (byte)((X - xPos / 10) / 192 + 135);
            byte ySector = (byte)((Y - yPos / 10) / 192 + 92);

            xPos = (X - ((xSector - 0x87) * 0xC0)) * 0x0A;
            yPos = (Y - ((ySector - 0x5C) * 0xC0)) * 0x0A;

            Packet p_Writer = new Packet(Proxy_Test.Opcodes.Opcode.CLIENT_MOVEMENT);
            if (xSector == 1)
            {
                ySector++;	

                //Recalculate X, Y coordinates
                xPos = (X - ((xSector - 0x87) * 0xC0)) * 0x0A;
                yPos = (Y - ((ySector - 0x5C) * 0xC0)) * 0x0A;

                p_Writer.WriteByte(1);

                p_Writer.WriteByte(1);
                p_Writer.WriteByte(128);

                p_Writer.WriteShort((short)xPos);
                p_Writer.WriteShort(Z);
                p_Writer.WriteShort((short)yPos);
            }
            else
            {
                p_Writer.WriteByte(1);

                p_Writer.WriteByte(xSector);
                p_Writer.WriteByte(ySector);

                p_Writer.WriteShort((short)xPos);
                p_Writer.WriteShort(Z);
                p_Writer.WriteShort((short)yPos);
            }


            Proxy.SendAgent(p_Writer);
        }
11/12/2013 18:42 Skullsoil#3
GL