I tested a bit more with the Buff/Debuff packet and here are my final results:
BYTE[1] Cmd
BYTE[2] Length
BYTE[4] Serial of player
BYTE[2] Icon Number to show
BYTE[2] 0x1 = Show, 0x0 = Remove. On remove byte, packet ends here.
BYTE[2] Icon Number to show.
BYTE[2] 0x1 = Show
BYTE[4] 00000000
BYTE[2] Time in seconds (simple countdown without automatic remove)
BYTE[4] 00000000
BYTE[4] Cliloc ID of title of icon.
BYTE[4] Cliloc ID of description for example 1049644 (no custom description packet ends here)
BYTE[6] 000000000000
BYTE[len(str)*2] Unicode String ("\t"+str) (To seperate the entrys add "\t")
And here a simple testfunction:
Code:
function buff(who,iconnumber)
var packet:=CreatePacket(0xDF,MSGLEN_VARIABLE);
packet.setint32(3,who.serial);
packet.setint16(7,iconnumber);
packet.setint16(9,0x1);//0x1==show/0x0=remove->end packet
//packet.sendpacket(who);
//return;
packet.setint16(15,iconnumber);
packet.setint16(17,0x1);//0x1==show/0x0=remove
packet.setint16(23,0);//time in sec (simple clientside countdown without removing it automatic)
packet.setint32(28,1075655);//cliloc 1
packet.setint32(32,1075818);//cliloc 2
var str:="\t+20\t+10\t+10\t+10\t+10"; //+20physik resist,+10fire/cold/poison/energy
packet.SetUnicodeString(43,CAscZ(str),1);
packet.sendpacket(who);
endfunction
List of iconnumbers (source of names:
http://update.uo.com/design_523.html)
Code:
//1001: Dismount
//1002: Disarm
//1005: Nightsight
//1006: Death Strike
//1007: Evil Omen
//1008: ? GumpID 0x7556
//1009: ? GumpID 0x753A
//1010: Divine Fury
//1011: Enemy Of One
//1012: Stealth
//1013: Active Meditation
//1014: Blood Oath caster
//1015: Blood Oath curse
//1016: Corpse Skin
//1017: Mindrot
//1018: Pain Spike
//1019: Strangle
//1020: Gift of Renewal
//1021: Attune Weapon
//1022: Thunderstorm
//1023: Essence of Wind
//1024: Ethereal Voyage
//1025: Gift Of Life
//1026: Arcane Empowerment
//1027: Mortal Strike
//1028: Reactive Armor
//1029: Protection
//1030: Arch Protection
//1031: Magic Reflection
//1032: Incognito
//1033: Disguised
//1034: Animal Form
//1035: Polymorph
//1036: Invisibility
//1037: Paralyze
//1038: Poison
//1039: Bleed
//1040: Clumsy
//1041: Feeble Mind
//1042: Weaken
//1043: Curse
//1044: Mass Curse
//1045: Agility
//1046: Cunning
//1047: Strength
//1048: Bless
[edit: Fixed the second Cliloc description]