Page 1 of 1

Weapon ability send packet???

Posted: Sat Oct 27, 2007 8:56 am
by coltain
Some information:

Code: Select all

Packet 0xD7
{
  Length variable
  SubCommandOffset 8
  SubCommandLength 1
}

SubPacket 0xD7
{
  SubCommandID 0x19
  ReceiveFunction spec_combat:HandleSpecCombat
   SendFunction    spec_combat:HandleSpecCombatSend
}
PACKET:
Packet ID: 0xD7
Packet Name: Generic AOS Commands
Packet Size: Variable
Sent By: Both
Submitted: MuadDib

Packet Breakdown
BYTE[1] cmd
BYTE[2] size
BYTE[4] PlayerID
BYTE[2] SubCommand message

SubCommand 0x19: Combat Book Abilities
BYTE[4] 00 00 00 00 = Unknown. Always like this in all my testing
BYTE[1] The ability "number" used
BYTE[1] 0A

Recive Function works ok

I want to change an ability that weapon has default set in ability book.

I tried some but I don`t know how to handle subcommands, looking at packet 0xD7 breakdown subcommand message is 2 byte part, according to subcommand breakdown it is 6 byte...

And I still don`t know what to sen to client to force ability book to show chosen type of ability

I wrote for testing:

Code: Select all

 exported function HandleSpecCombatSend(character, byref packet )

    var send1:="00000000";
    var send2:="1D";   //nature force
    var send3:="0A";

    var pakiet := CreatePacket(0xD7,6);
    pakiet.setint32(25,send1);  //0x19
    pakiet.setint8(26,send2);
    pakiet.setint8(27,send3);
    pakiet.sendpacket(character);

    return 1;

endfunction
Can anybody help me with that?

Posted: Sat Oct 27, 2007 1:45 pm
by coltain
some update :)

Posted: Sun Oct 28, 2007 5:30 am
by coltain
I tried to send the packet while equping item, but it doesn`t work.

Some more questions:
1. PlayerID means player.serial ???
2. Does smoebody has an example script how to send packet (with a subcommand)