Weapon ability send packet???

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
coltain
Grandmaster Poster
Posts: 159
Joined: Tue Mar 20, 2007 7:17 am

Weapon ability send packet???

Post 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?
coltain
Grandmaster Poster
Posts: 159
Joined: Tue Mar 20, 2007 7:17 am

Post by coltain »

some update :)
coltain
Grandmaster Poster
Posts: 159
Joined: Tue Mar 20, 2007 7:17 am

Post 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)
Post Reply