public ValueChange(Character Character, byte index, uint value) : base(0x48, 7) { writer.Write(Character.WorldId); writer.Write(index); writer.Write(value); }
public void ExecuteQuest(Character Character) { foreach (Case ccase in Cases) { ExecuteCase(ccase, Character); } }
public SetCamera(Character Character, ushort mapId) : base(0x1b, 10) { writer.Write(mapId); writer.Write(Character.Position.X); writer.Write(Character.Position.Y); }
public override bool Check(Character Character) { if (Character.Player.Level >= MinLevel) { return true; } return false; }
public SpawnPlayer(Character Character, bool isPlayerPlayer) : base(0x32) { SetCapacity((ushort)(59 + Character.Player.Name.Length)); writer.Write(Character.WorldId); writer.Write(Character.Player.Name.ToCharArray()); writer.Write((byte)0); if(isPlayerPlayer) { writer.Write((byte)((byte)0x80 | (byte)Character.Player.Class)); } else { writer.Write((byte)Character.Player.Class); } //Coordinates writer.Write(Character.Position.X); writer.Write(Character.Position.Y); writer.Write(Character.Position.Z); writer.Write((short)1); if (Character.IsAlive) { writer.Write((byte)0); // Alive } else { writer.Write((byte)2); // Dead } writer.Write((short)0); writer.Write((byte)0); /// /// Gear /// PlayerGear gear = Character.Gear as PlayerGear; writer.Write(gear.Slots[1]); writer.Write(gear.Slots[2]); writer.Write(gear.Slots[3]); writer.Write(gear.Slots[4]); writer.Write(gear.Slots[5]); writer.Write(gear.Slots[6]); writer.Write(gear.Slots[7]); /// /// Look /// writer.Write((byte)Character.Player.Face); writer.Write((byte)Character.Player.Hair); for(int i=0;i<19;i++) { writer.Write((byte)0); } }
public Agility(Character Character) : base(0x04, 9) { writer.Write(Character.Stats.Dexterity); writer.Write(Character.Stats.OTP); writer.Write(Character.Stats.Evasion); writer.Write(Character.Stats.MinDamage); writer.Write(Character.Stats.MaxDamage); }
private void ExecuteCase(Case Case, Character Character) { //check each condition foreach (Condition condition in Case.Conditions) { if (!condition.Check(Character)) { return; } } //execute each action foreach (Quests.Action action in Case.Actions) { action.Execute(Character); } }
public static void Chat(Character Character, string Message) { foreach (string Key in ChatCommands.Keys) { if (Message.StartsWith(Key)) { try { ChatCommands[Key].Execute(Character, Message); } catch (Exception ex) { ServerConsole.WriteLine("Chat command error: {0}", MessageLevel.Error, ex); } } } Character.Chat(Message); }
public PlayerInfo(Character Character) : base(0x42, 59) { writer.Write((byte)Character.Player.Specialty); writer.Write((ushort)0); // Contribution writer.Write((ushort)Character.Player.Contribute); // Stats writer.Write(Character.Stats.Strength); writer.Write(Character.Stats.Health); writer.Write(Character.Stats.Intelligence); writer.Write(Character.Stats.Wisdom); writer.Write(Character.Stats.Dexterity); // Health writer.Write((ushort)Character.CurrentHP); writer.Write(Character.Stats.MaximumHP); // Mana writer.Write((ushort)Character.CurrentMP); writer.Write(Character.Stats.MaximumMP); // Special stats writer.Write(Character.Stats.OTP); writer.Write(Character.Stats.Evasion); writer.Write(Character.Stats.Defense); writer.Write(Character.Stats.Absorb); // Other writer.Write(Character.Player.Experience); // Damage writer.Write(Character.Stats.MinDamage); writer.Write(Character.Stats.MaxDamage); writer.Write(Character.Stats.MinMagicalDamage); writer.Write(Character.Stats.MaxMagicalDamage); // Points writer.Write((short)Character.Player.StatPoints); writer.Write((short)Character.Player.SkillPoints); // Resistance writer.Write(Character.Stats.FireResistance); writer.Write(Character.Stats.IceResistance); writer.Write(Character.Stats.LightningResistance); writer.Write(Character.Stats.CurseResistance); writer.Write(Character.Stats.ParalysisResistance); // Rage writer.Write((int)Character.Player.Rage); }
public void Execute(Character Character, string Message) { string[] args = Message.Split(' '); int index = Convert.ToInt32(args[1]); //check if the item exists if (Item.FindByIndex(index) != null) { PlayerItem pItem = new PlayerItem(); pItem.Index = index; pItem.MaxEnd = (byte)pItem.Item.Endurance; pItem.CurEnd = pItem.MaxEnd; pItem.Num = 1; Character.Inventory.AddItem(pItem); } else { ServerConsole.WriteLine("Index {0} does not exist", MessageLevel.Error, index); } }
public void Execute(Character Character, string Message) { Character.Chat(Message); }
public ParalysisResistance(Character Character) : base(0x16, 2) { writer.Write(Character.Stats.ParalysisResistance); }
public CharacterBaseStats(Character Character) { this.Character = Character; }
public PUPoint(Character Character) : base(0x17, 2) { writer.Write((ushort)Character.Player.StatPoints); }
public abstract bool Check(Character Character);
public OTP(Character Character) : base(0x09, 2) { writer.Write(Character.Stats.OTP); }
public Contribution(Character Character) : base(0x1e, 2) { writer.Write((ushort)Character.Player.Contribute); }
/// <summary> /// Unspawn a player /// </summary> public void UnspawnPlayer() { Database.Update(Database.KalDB, Character.Player); ServerWorld.RemoveEntity(Character); Character = null; }
public Wisdom(Character Character) : base(0x03, 7) { writer.Write(Character.Stats.Wisdom); writer.Write(Character.CurrentMP); writer.Write(Character.Stats.MaximumMP); writer.Write(Character.Stats.CurseResistance); }
public Magic(Character Character) : base(0x1c, 4) { writer.Write(Character.Stats.MinMagicalDamage); writer.Write(Character.Stats.MaxMagicalDamage); }
/// <summary> /// Selects a Player /// </summary> /// <param name="playerId"></param> public void PlayerSelect(int PID) { if (Authenticated) { Player player = Player.GetPlayer(PID); Character = new Character(player, this); Send(new Packets.LoginAccepted()); Send(new Packets.PlayerInfo(Character)); Send(new Packets.SetCamera(Character, 0)); Send(new Packets.CameraUpdate()); } }
public Attack(Character Character) : base(0x1b, 4) { writer.Write(Character.Stats.MinDamage); writer.Write(Character.Stats.MaxDamage); }
public override void Execute(Character Character) { Character.ShowHtml(HtmlID); }
public CurseResistance(Character Character) : base(0x15, 2) { writer.Write(Character.Stats.CurseResistance); }
public override void Execute(Character Character) { // Character.ShowHtml(GuideID); }
public SUPoint(Character Character) : base(0x18, 2) { writer.Write((ushort)Character.Player.SkillPoints); }
public CharacterPosition(Character Character) : base() { this.Character = Character; }
public Strength(Character Character) : base(0x00, 7) { writer.Write(Character.Stats.Strength); writer.Write(Character.Stats.OTP); writer.Write(Character.Stats.MinDamage); writer.Write(Character.Stats.MaxDamage); }
public LightningResistance(Character Character) : base(0x14, 2) { writer.Write(Character.Stats.LightningResistance); }
public AttackSpeed(Character Character) : base(0x11, 2) { writer.Write(Character.Stats.AttackSpeed); }