Пример #1
0
        // something about repulation, current hp/mana, stats
        public static byte[] SendSpawnStats(Character ch)
        {
            Packet p = new Packet(200);
            p.WriteShort(ch.Level);
            p.WriteShort(ch.Strength);
            p.WriteShort(ch.Stamina);
            p.WriteShort(ch.Dexterity);
            p.WriteShort(ch.Energy);
            p.WriteHexString("01 01 01 01"); // unknown :(, maybe base stats?: D
            p.WriteShort(ch.MaxMana);
            p.WriteShort(ch.CurrentMana);
            p.WriteInt(ch.MaxHp);
            p.WriteInt(ch.CurrentHp);
            p.WriteLong(ch.CurrentExp); // cur exp
            p.WriteHexString("00 00 00 00 00 00 00 00"); // curxp to next training
            p.WriteLong(1200000); // exp to level
            p.WriteHexString("00 00 00 00 00 00 00 00"); // xp to next training
            p.WriteHexString("00 00");
            p.WriteHexString("04 00 00 00");
            p.WriteHexString("00 00");
            p.WriteHexString("08 00 00 00");
            p.WriteShort(ch.StatPoint); // stat points
            p.WriteHexString("6B 00 00 00"); // total trainings?
            p.WriteShort(ch.TrainingPoint); // current trainings
            p.WriteHexString("7C 00"); // damage from stats
            p.WriteHexString("C5 00 00 00"); // total damage (from items, skills etc)
            p.WriteHexString("11 00"); // defence from stats
            p.WriteHexString("12 00 00 00"); // total defence (from items, skills etc)
            p.WriteHexString("13 00"); // attack rating from stats
            p.WriteHexString("14 00 00 00"); // total attack rating (from items, skills etc)
            p.WriteHexString("07 00"); // attack range or speed
            p.WriteHexString("0B 0B"); // animation speed (the speed hax thingy in xiah 2827)
            p.WriteHexString("0B"); // movement speed, from shoes ^_ ^
            p.WriteHexString("00 00 00 00 00");
            p.WriteInt(ch.Money);
            p.WriteHexString("02 00");  // Critical
            p.WriteHexString("1A 00");
            p.WriteInt(ch.Fame);
            p.WriteShort(ch.FiveElementPoint); // five element points (unused)
            p.WriteInt(ch.CurrentFEExp); // current fe experience
            p.WriteHexString("02 00 00 00"); // fe experience to point, 40000 each level
            p.WriteHexString("00 00 00 00"); // that other five element skill experience :S
            p.WriteHexString("00 00"); // fire fe level
            p.WriteHexString("00 00"); // water fe level
            p.WriteHexString("00 00"); // wood fe level
            p.WriteHexString("00 00"); // steel fe level
            p.WriteHexString("00 00"); // soil fe level
            p.WriteByte(ch.Rebirth); // rebirths
            p.WriteInt(ch.RepulationPoint); // Repulation points, the points near stat ones :U

            return p.GetWrittenBuffer(PacketIds.SendSpawnStats);
        }
Пример #2
0
 public static byte[] SendUnSealPet(Pet pet)
 {
     Packet p = new Packet(200);
     p.WriteHexString("00");
     p.WriteInt(pet.PetID);
     p.WriteInt(pet.OwnerID);
     p.WriteInt(pet.MapID);
     p.WriteByte(pet.PetType);
     p.WriteString(pet.Name);
     p.WriteShort(pet.Level);
     p.WriteShort((short)pet.Position.X);
     p.WriteShort((short)pet.Position.Y);
     p.WriteHexString("4E 4E");
     p.WriteHexString("01 78 02 4E C6 00");
     p.WriteInt(pet.MaxHealth);
     p.WriteInt(pet.CurHealth);
     p.WriteShort(pet.Damage);
     p.WriteShort(pet.Defense);
     p.WriteShort(pet.AttackRating);
     p.WriteHexString("01 00 09 00 00 00 00 00 25 32 00 00 01");
     p.WriteLong(pet.CurrentExperience);
     p.WriteLong(pet.NegativeExperience);
     p.WriteLong(pet.ExperienceToLevel + pet.NegativeExperience);
     p.WriteByte(pet.Evolution);
     p.WriteByte(pet.Wildness);
     p.WriteByte(Convert.ToByte(pet.IsLegendary));
     p.WriteHexString("00 00 00 00");
     p.WriteHexString("00 00 00 00 00 00 00 00");
     return p.GetWrittenBuffer(PacketIds.SendUnSealPet);
 }
Пример #3
0
        public static byte[] SendPlayerPet(Character ch)
        {
            Packet p = new Packet(200);
            Pet pet = ch.Pet;
            p.WriteInt(ch.CharacterId);
            if (pet != null)
            {
                p.WriteHexString("01");
                p.WriteInt(pet.PetID);
                p.WriteInt(pet.OwnerID);
                p.WriteInt(pet.MapID);
                p.WriteByte(pet.PetType);
                p.WriteString(pet.Name);
                p.WriteShort(pet.Level);
                p.WriteShort(pet.Position.X);
                p.WriteShort(pet.Position.Y);
                p.WriteHexString("38 D7 03 96 04 38 CE 00");
                p.WriteInt(pet.TotalHealth);
                p.WriteInt(pet.CurHealth);
                p.WriteShort(pet.TotalDamage);
                p.WriteShort(pet.TotalDefense);
                p.WriteShort(pet.TotalAttackRating);
                p.WriteHexString("01 00 09 00 00 00 00 00 56 2A 00 00 01 ");
                p.WriteLong(pet.CurrentExperience);
                p.WriteLong(pet.NegativeExperience);
                p.WriteLong(pet.ExperienceToLevel + pet.NegativeExperience);
                p.WriteByte(pet.Evolution);
                p.WriteByte(pet.Wildness);
                p.WriteByte(Convert.ToByte(pet.IsLegendary));
                p.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00");
                p.WriteHexString("00 00 00 00 00 00 00 00 00 00");
            }
            else
                p.WriteHexString("00"); // no pet

            return p.GetWrittenBuffer(PacketIds.SendPetOnLogin);
        }
Пример #4
0
 public static byte[] SendPetStats(Pet pet)
 {
     Packet p = new Packet(200);
     p.WriteHexString("00");
     p.WriteInt(pet.PetID);
     p.WriteInt(pet.OwnerID);
     p.WriteInt(pet.MapID);
     p.WriteByte(pet.PetType);
     p.WriteString(pet.Name);
     p.WriteShort(pet.Level);
     p.WriteShort(pet.Position.X);
     p.WriteShort(pet.Position.Y);
     p.WriteHexString("00");
     p.WriteShort(pet.Position.X);
     p.WriteShort(pet.Position.Y);
     p.WriteHexString("00 8B 00");
     p.WriteInt(pet.TotalHealth);
     p.WriteInt(pet.CurHealth);
     p.WriteShort(pet.TotalDamage);
     p.WriteShort(pet.TotalDefense);
     p.WriteShort(pet.TotalAttackRating);
     p.WriteHexString("00 00 04 04 00 00 00 00 83 4E 00 00 01");
     p.WriteLong(pet.CurrentExperience);
     p.WriteLong(pet.NegativeExperience);
     p.WriteLong(pet.ExperienceToLevel + pet.NegativeExperience);
     p.WriteByte(pet.Evolution);
     p.WriteByte(pet.Wildness);
     p.WriteByte(Convert.ToByte(pet.IsLegendary));
     p.WriteHexString("00 00 00 00 00 00 00 00 00 00");
     return p.GetWrittenBuffer(PacketIds.SendPetStats);
 }
Пример #5
0
 public static byte[] SendPetLeveled(Pet pet)
 {
     Packet p = new Packet(200);
     p.WriteInt(pet.OwnerID);
     p.WriteInt(pet.PetID);
     p.WriteByte(pet.Level);
     p.WriteShort(pet.TotalDamage);
     p.WriteShort(pet.TotalDefense);
     p.WriteShort(pet.TotalAttackRating);
     p.WriteHexString("00 00");
     p.WriteInt(pet.MaxHealth);
     p.WriteInt(pet.CurHealth);
     p.WriteLong(pet.CurrentExperience);
     p.WriteLong(pet.NegativeExperience);
     p.WriteLong(pet.ExperienceToLevel + pet.NegativeExperience);
     return p.GetWrittenBuffer(PacketIds.SendPetLeveled);
 }
Пример #6
0
        public static byte[] SendExperience(Character ch, int experienceGained, short feGained, bool leveled, bool gettraining)
        {
            Packet p = new Packet(200);

            p.WriteInt(experienceGained);
            p.WriteLong(ch.CurrentExp);

            p.WriteByte(Convert.ToByte(leveled));
            p.WriteByte(Convert.ToByte(gettraining));

            p.WriteHexString("00"); // not sure
            p.WriteLong(ch.ExpToLevel + ch.NegativeExp);
            p.WriteLong(ch.ExpToTraining + ch.NegativeExp);

            p.WriteShort(ch.FiveElementPoint);
            p.WriteInt(ch.CurrentFEExp);
            p.WriteHexString("40 9C 00 00"); // fe exp to level 4000 all levels or 40k not sure too lazy check kthxbye

            p.WriteHexString("00 00 00 00"); // fe special skill current exp
            p.WriteHexString("00 00 00 00"); // bonus exp
            p.WriteShort(feGained);

            return p.GetWrittenBuffer(PacketIds.SendExperience);
        }