public bool TalkToQuestNPC(short npcIndex, short questID) { if (!Initialized || !m_client.ConnectedAndInitialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Quest, PacketAction.Use); pkt.AddShort(npcIndex); pkt.AddShort(questID); return(m_client.SendPacket(pkt)); }
public bool RespondToQuestDialog(QuestState state, DialogReply reply, byte action = 0) { if (!Initialized || !m_client.ConnectedAndInitialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Quest, PacketAction.Accept); pkt.AddShort(state.SessionID); //session ID - ignored by default EOSERV pkt.AddShort(state.DialogID); //dialog ID - ignored by default EOSERV pkt.AddShort(state.QuestID); pkt.AddShort(state.NPCIndex); //npc index - ignored by default EOSERV pkt.AddChar((byte)reply); if (reply == DialogReply.Link) { pkt.AddChar(action); } return(m_client.SendPacket(pkt)); }
public bool RequestShop(short npcIndex) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Shop, PacketAction.Open); pkt.AddShort(npcIndex); return(m_client.SendPacket(pkt)); }
public bool RequestSkillmaster(short skillmasterIndex) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.StatSkill, PacketAction.Open); pkt.AddShort(skillmasterIndex); return(m_client.SendPacket(pkt)); }
/// <summary> /// Craft an item with a shopkeeper /// </summary> public bool CraftItem(short ItemID) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Shop, PacketAction.Create); pkt.AddShort(ItemID); return(m_client.SendPacket(pkt)); }
public bool UseItem(short itemID) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Item, PacketAction.Use); pkt.AddShort(itemID); return(m_client.SendPacket(pkt)); }
public bool RequestPaperdoll(short charId) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.PaperDoll, PacketAction.Request); pkt.AddShort(charId); return(m_client.SendPacket(pkt)); }
private bool _trainStatShared(short id, TrainType type) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.StatSkill, PacketAction.Add); pkt.AddChar((byte)type); pkt.AddShort(id); return(m_client.SendPacket(pkt)); }
public bool ForgetSpell(short spellID) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.StatSkill, PacketAction.Remove); pkt.AddInt(1234); //shop ID, ignored by eoserv - eomain may require this to be correct pkt.AddShort(spellID); return(m_client.SendPacket(pkt)); }
public bool UnequipItem(short id, byte subLoc = 0) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.PaperDoll, PacketAction.Remove); pkt.AddShort(id); pkt.AddChar(subLoc); return(m_client.SendPacket(pkt)); }
public bool DoCastTargetSpell(short spellID, bool targetIsNPC, short targetID) { if (spellID < 0 || targetID < 0) { return(false); } if (!Initialized || !m_client.ConnectedAndInitialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Spell, PacketAction.TargetOther); pkt.AddChar((byte)(targetIsNPC ? 2 : 1)); pkt.AddChar(1); //unknown value pkt.AddShort(1); //unknown value pkt.AddShort(spellID); pkt.AddShort(targetID); pkt.AddThree(DateTime.Now.ToEOTimeStamp()); return(m_client.SendPacket(pkt)); }
public bool JunkItem(short id, int amount) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Item, PacketAction.Junk); pkt.AddShort(id); pkt.AddInt(amount); return(m_client.SendPacket(pkt)); }
/// <summary> /// Add an item to a pending trade offer /// </summary> /// <param name="itemID">Item ID of the item to add</param> /// <param name="amount">Amount of the item to add</param> public bool TradeAddItem(short itemID, int amount) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Trade, PacketAction.Add); pkt.AddShort(itemID); pkt.AddInt(amount); return(m_client.SendPacket(pkt)); }
/// <summary> /// Accept another players request for trade /// </summary> /// <param name="characterID">ID of the other player's character</param> public bool TradeAcceptRequest(short characterID) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Trade, PacketAction.Accept); pkt.AddChar(123); //? pkt.AddShort(characterID); return(m_client.SendPacket(pkt)); }
public bool ChestTakeItem(byte x, byte y, short itemID) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Chest, PacketAction.Take); pkt.AddChar(x); pkt.AddChar(y); pkt.AddShort(itemID); return(m_client.SendPacket(pkt)); }
/// <summary> /// Deposit an item in your private locker /// </summary> public bool LockerAddItem(byte x, byte y, short id, int amount) { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Locker, PacketAction.Add); pkt.AddChar(x); pkt.AddChar(y); pkt.AddShort(id); pkt.AddThree(amount); return(m_client.SendPacket(pkt)); }
public bool PrepareCastSpell(short spellID) { if (spellID < 0) { return(false); //integer overflow resulted in negative number - server expects ushort } if (!Initialized || !m_client.ConnectedAndInitialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Spell, PacketAction.Request); pkt.AddShort(spellID); pkt.AddThree(DateTime.Now.ToEOTimeStamp()); return(m_client.SendPacket(pkt)); }
public bool DoCastGroupSpell(short spellID) { if (spellID < 0) { return(false); } if (!Initialized || !m_client.ConnectedAndInitialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Spell, PacketAction.TargetGroup); pkt.AddShort(spellID); pkt.AddThree(DateTime.Now.ToEOTimeStamp()); return(m_client.SendPacket(pkt)); }
public bool DoCastSelfSpell(short spellID) { if (spellID < 0) { return(false); } if (!Initialized || !m_client.ConnectedAndInitialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Spell, PacketAction.TargetSelf); pkt.AddChar(1); //target type pkt.AddShort(spellID); pkt.AddInt(DateTime.Now.ToEOTimeStamp()); return(m_client.SendPacket(pkt)); }
public bool DropItem(short id, int amount, byte x = 255, byte y = 255) //255 means use character's current location { if (!m_client.ConnectedAndInitialized || !Initialized) { return(false); } OldPacket pkt = new OldPacket(PacketFamily.Item, PacketAction.Drop); pkt.AddShort(id); pkt.AddInt(amount); if (x == 255 && y == 255) { pkt.AddByte(x); pkt.AddByte(y); } else { pkt.AddChar(x); pkt.AddChar(y); } return(m_client.SendPacket(pkt)); }