commit 58cc534814f421a2b5357cbcc18796cc56a99d6c Author: Kasi Date: Mon Dec 25 23:49:48 2017 +0000 Release 0.01 diff --git a/Include/Core/Classes/Animation.hpp b/Include/Core/Classes/Animation.hpp new file mode 100644 index 0000000..1f74974 --- /dev/null +++ b/Include/Core/Classes/Animation.hpp @@ -0,0 +1,24 @@ +#ifndef ANIMATION_HPP_INCLUDED +#define ANIMATION_HPP_INCLUDED + +#include "CacheableNode.hpp" +#include "../JavaClass/Class.hpp" +#include +#include + +class Animation : public CacheableNode +{ + public: + Animation(); + Animation(const void* Obj); + Animation(const Animation& A); + static Class GetClass(); + + std::vector GetFrameIDs() const; + std::vector GetInterleave() const; + std::int32_t GetLeftHandItem() const; + std::int32_t GetRightHandItem() const; + +}; + +#endif // ANIMATION_HPP_INCLUDED diff --git a/Include/Core/Classes/Cache.hpp b/Include/Core/Classes/Cache.hpp new file mode 100644 index 0000000..c0c7597 --- /dev/null +++ b/Include/Core/Classes/Cache.hpp @@ -0,0 +1,22 @@ +#ifndef CACHE_HPP_INCLUDED +#define CACHE_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include "HashTable.hpp" +#include "Queue.hpp" + +class Cache : public Object +{ + public: + Cache(); + Cache(const void* Obj); + Cache(const Cache& C); + static Class GetClass(); + + HashTable GetHashTable() const; + Queue GetQueue() const; + +}; + +#endif // CACHE_HPP_INCLUDED diff --git a/Include/Core/Classes/CacheableNode.hpp b/Include/Core/Classes/CacheableNode.hpp new file mode 100644 index 0000000..4dcb2b6 --- /dev/null +++ b/Include/Core/Classes/CacheableNode.hpp @@ -0,0 +1,20 @@ +#ifndef CACHEABLENODE_HPP_INCLUDED +#define CACHEABLENODE_HPP_INCLUDED + +#include "Node.hpp" +#include "../JavaClass/Class.hpp" + +class CacheableNode : public Node +{ + public: + CacheableNode(); + CacheableNode(const void* Obj); + CacheableNode(const CacheableNode& C); + static Class GetClass(); + + CacheableNode GetNext() const; + CacheableNode GetPrev() const; + +}; + +#endif // CACHEABLENODE_HPP_INCLUDED diff --git a/Include/Core/Classes/Character.hpp b/Include/Core/Classes/Character.hpp new file mode 100644 index 0000000..0520af2 --- /dev/null +++ b/Include/Core/Classes/Character.hpp @@ -0,0 +1,36 @@ +#ifndef CHARACTER_HPP_INCLUDED +#define CHARACTER_HPP_INCLUDED + +#include "Renderable.hpp" +#include "../JavaClass/Class.hpp" +#include +#include "LinkedList.hpp" +#include +#include + +class Character : public Renderable +{ + public: + Character(); + Character(const void* Obj); + Character(const Character& C); + static Class GetClass(); + + std::int32_t GetAngle() const; + std::int32_t GetAnimation() const; + std::int32_t GetAnimationDelay() const; + std::int32_t GetAnimationFrame() const; + LinkedList GetCombatInfo() const; + std::int32_t GetInteractIndex() const; + std::string GetOverhead() const; + std::vector GetPathX() const; + std::vector GetPathY() const; + std::int32_t GetPoseAnimation() const; + std::int32_t GetSubAnimationFrame() const; + std::int32_t GetSubPoseAnimation() const; + std::int32_t GetX() const; + std::int32_t GetY() const; + +}; + +#endif // CHARACTER_HPP_INCLUDED diff --git a/Include/Core/Classes/ChatLineBuffer.hpp b/Include/Core/Classes/ChatLineBuffer.hpp new file mode 100644 index 0000000..1bfc312 --- /dev/null +++ b/Include/Core/Classes/ChatLineBuffer.hpp @@ -0,0 +1,23 @@ +#ifndef CHATLINEBUFFER_HPP_INCLUDED +#define CHATLINEBUFFER_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include +#include "MessageNode.hpp" + +class ChatLineBuffer : public Object +{ + public: + ChatLineBuffer(); + ChatLineBuffer(const void* Obj); + ChatLineBuffer(const ChatLineBuffer& C); + static Class GetClass(); + + std::int32_t GetLength() const; + std::vector GetLines() const; + +}; + +#endif // CHATLINEBUFFER_HPP_INCLUDED diff --git a/Include/Core/Classes/ClanMember.hpp b/Include/Core/Classes/ClanMember.hpp new file mode 100644 index 0000000..5dff0a4 --- /dev/null +++ b/Include/Core/Classes/ClanMember.hpp @@ -0,0 +1,23 @@ +#ifndef CLANMEMBER_HPP_INCLUDED +#define CLANMEMBER_HPP_INCLUDED + +#include "Node.hpp" +#include "../JavaClass/Class.hpp" +#include +#include + +class ClanMember : public Node +{ + public: + ClanMember(); + ClanMember(const void* Obj); + ClanMember(const ClanMember& C); + static Class GetClass(); + + std::string GetName() const; + std::int8_t GetRank() const; + std::int32_t GetWorld() const; + +}; + +#endif // CLANMEMBER_HPP_INCLUDED diff --git a/Include/Core/Classes/DecorativeModel.hpp b/Include/Core/Classes/DecorativeModel.hpp new file mode 100644 index 0000000..8bb782a --- /dev/null +++ b/Include/Core/Classes/DecorativeModel.hpp @@ -0,0 +1,30 @@ +#ifndef DECORATIVEMODEL_HPP_INCLUDED +#define DECORATIVEMODEL_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include "Renderable.hpp" + +class DecorativeModel : public Object +{ + public: + DecorativeModel(); + DecorativeModel(const void* Obj); + DecorativeModel(const DecorativeModel& D); + static Class GetClass(); + + std::int32_t GetAngle() const; + std::int32_t GetFlags() const; + std::int32_t GetHash() const; + std::int32_t GetOffsetX() const; + std::int32_t GetOffsetY() const; + std::int32_t GetPlane() const; + std::int32_t GetRenderInfo() const; + Renderable GetRenderable() const; + std::int32_t GetX() const; + std::int32_t GetY() const; + +}; + +#endif // DECORATIVEMODEL_HPP_INCLUDED diff --git a/Include/Core/Classes/Deque.hpp b/Include/Core/Classes/Deque.hpp new file mode 100644 index 0000000..8ed2e41 --- /dev/null +++ b/Include/Core/Classes/Deque.hpp @@ -0,0 +1,21 @@ +#ifndef DEQUE_HPP_INCLUDED +#define DEQUE_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include "Node.hpp" + +class Deque : public Object +{ + public: + Deque(); + Deque(const void* Obj); + Deque(const Deque& D); + static Class GetClass(); + + Node GetHead() const; + Node GetTail() const; + +}; + +#endif // DEQUE_HPP_INCLUDED diff --git a/Include/Core/Classes/DynamicModel.hpp b/Include/Core/Classes/DynamicModel.hpp new file mode 100644 index 0000000..9cc4147 --- /dev/null +++ b/Include/Core/Classes/DynamicModel.hpp @@ -0,0 +1,21 @@ +#ifndef DYNAMICMODEL_HPP_INCLUDED +#define DYNAMICMODEL_HPP_INCLUDED + +#include "Renderable.hpp" +#include "../JavaClass/Class.hpp" +#include + +class DynamicModel : public Renderable +{ + public: + DynamicModel(); + DynamicModel(const void* Obj); + DynamicModel(const DynamicModel& D); + static Class GetClass(); + + std::int32_t GetID() const; + std::int32_t GetOrientation() const; + std::int32_t GetType() const; +}; + +#endif // DYNAMICMODEL_HPP_INCLUDED diff --git a/Include/Core/Classes/ExchangeOffer.hpp b/Include/Core/Classes/ExchangeOffer.hpp new file mode 100644 index 0000000..bfd9912 --- /dev/null +++ b/Include/Core/Classes/ExchangeOffer.hpp @@ -0,0 +1,23 @@ +#ifndef EXCHANGEOFFER_HPP_INCLUDED +#define EXCHANGEOFFER_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include + +class ExchangeOffer : public Object +{ + public: + ExchangeOffer(); + ExchangeOffer(const void* Obj); + ExchangeOffer(const ExchangeOffer& E); + static Class GetClass(); + + std::int32_t GetAmountTraded() const; + std::int32_t GetItemID() const; + std::int8_t GetProgress() const; + std::int32_t GetTotalAmount() const; + +}; + +#endif // EXCHANGEOFFER_HPP_INCLUDED diff --git a/Include/Core/Classes/Frame.hpp b/Include/Core/Classes/Frame.hpp new file mode 100644 index 0000000..6463b1a --- /dev/null +++ b/Include/Core/Classes/Frame.hpp @@ -0,0 +1,28 @@ +#ifndef FRAME_HPP_INCLUDED +#define FRAME_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include +#include "FrameMap.hpp" + +class Frame : public Object +{ + public: + Frame(); + Frame(const void* Obj); + Frame(const Frame& F); + static Class GetClass(); + + std::vector GetIndices() const; + bool GetShowing() const; + FrameMap GetSkin() const; + std::vector GetTranslatorX() const; + std::vector GetTranslatorY() const; + std::vector GetTranslatorZ() const; + std::int32_t GetTranslatorsLength() const; + +}; + +#endif // FRAME_HPP_INCLUDED diff --git a/Include/Core/Classes/FrameMap.hpp b/Include/Core/Classes/FrameMap.hpp new file mode 100644 index 0000000..b9e81a5 --- /dev/null +++ b/Include/Core/Classes/FrameMap.hpp @@ -0,0 +1,22 @@ +#ifndef FRAMEMAP_HPP_INCLUDED +#define FRAMEMAP_HPP_INCLUDED + +#include "Node.hpp" +#include "../JavaClass/Class.hpp" +#include +#include + +class FrameMap : public Node +{ + public: + FrameMap(); + FrameMap(const void* Obj); + FrameMap(const FrameMap& F); + static Class GetClass(); + + std::vector> GetList() const; + std::vector GetTypes() const; + +}; + +#endif // FRAMEMAP_HPP_INCLUDED diff --git a/Include/Core/Classes/Frames.hpp b/Include/Core/Classes/Frames.hpp new file mode 100644 index 0000000..1d50977 --- /dev/null +++ b/Include/Core/Classes/Frames.hpp @@ -0,0 +1,21 @@ +#ifndef FRAMES_HPP_INCLUDED +#define FRAMES_HPP_INCLUDED + +#include "CacheableNode.hpp" +#include "../JavaClass/Class.hpp" +#include +#include "Frame.hpp" + +class Frames : public CacheableNode +{ + public: + Frames(); + Frames(const void* Obj); + Frames(const Frames& F); + static Class GetClass(); + + std::vector GetSkeletons() const; + +}; + +#endif // FRAMES_HPP_INCLUDED diff --git a/Include/Core/Classes/Friend.hpp b/Include/Core/Classes/Friend.hpp new file mode 100644 index 0000000..c9627da --- /dev/null +++ b/Include/Core/Classes/Friend.hpp @@ -0,0 +1,24 @@ +#ifndef FRIEND_HPP_INCLUDED +#define FRIEND_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include + +class Friend : public Object +{ + public: + Friend(); + Friend(const void* Obj); + Friend(const Friend& F); + static Class GetClass(); + + std::string GetName() const; + std::string GetPreviousName() const; + std::int32_t GetRank() const; + std::int32_t GetWorld() const; + +}; + +#endif // FRIEND_HPP_INCLUDED diff --git a/Include/Core/Classes/GameModel.hpp b/Include/Core/Classes/GameModel.hpp new file mode 100644 index 0000000..d77093f --- /dev/null +++ b/Include/Core/Classes/GameModel.hpp @@ -0,0 +1,32 @@ +#ifndef GAMEMODEL_HPP_INCLUDED +#define GAMEMODEL_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include "Renderable.hpp" + +class GameModel : public Object +{ + public: + GameModel(); + GameModel(const void* Obj); + GameModel(const GameModel& G); + static Class GetClass(); + + std::int32_t GetAngle() const; + std::int32_t GetFlags() const; + std::int32_t GetHash() const; + std::int32_t GetHeight() const; + std::int32_t GetOffsetX() const; + std::int32_t GetOffsetY() const; + std::int32_t GetPlane() const; + std::int32_t GetRelativeX() const; + std::int32_t GetRelativeY() const; + Renderable GetRenderable() const; + std::int32_t GetX() const; + std::int32_t GetY() const; + +}; + +#endif // GAMEMODEL_HPP_INCLUDED diff --git a/Include/Core/Classes/GameShell.hpp b/Include/Core/Classes/GameShell.hpp new file mode 100644 index 0000000..305d42b --- /dev/null +++ b/Include/Core/Classes/GameShell.hpp @@ -0,0 +1,20 @@ +#ifndef GAMESHELL_HPP_INCLUDED +#define GAMESHELL_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include "../JavaClass/Canvas.hpp" + +class GameShell : public Object +{ + public: + GameShell(); + GameShell(const void* Obj); + GameShell(const GameShell& G); + static Class GetClass(); + + Canvas GetCanvas() const; + +}; + +#endif // GAMESHELL_HPP_INCLUDED diff --git a/Include/Core/Classes/GroundItem.hpp b/Include/Core/Classes/GroundItem.hpp new file mode 100644 index 0000000..7624deb --- /dev/null +++ b/Include/Core/Classes/GroundItem.hpp @@ -0,0 +1,21 @@ +#ifndef GROUNDITEM_HPP_INCLUDED +#define GROUNDITEM_HPP_INCLUDED + +#include "Renderable.hpp" +#include "../JavaClass/Class.hpp" +#include + +class GroundItem : public Renderable +{ + public: + GroundItem(); + GroundItem(const void* Obj); + GroundItem(const GroundItem& G); + static Class GetClass(); + + std::int32_t GetAmount() const; + std::int32_t GetID() const; + +}; + +#endif // GROUNDITEM_HPP_INCLUDED diff --git a/Include/Core/Classes/GroundModel.hpp b/Include/Core/Classes/GroundModel.hpp new file mode 100644 index 0000000..72db3ce --- /dev/null +++ b/Include/Core/Classes/GroundModel.hpp @@ -0,0 +1,26 @@ +#ifndef GROUNDMODEL_HPP_INCLUDED +#define GROUNDMODEL_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include "Renderable.hpp" + +class GroundModel : public Object +{ + public: + GroundModel(); + GroundModel(const void* Obj); + GroundModel(const GroundModel& G); + static Class GetClass(); + + std::int32_t GetHash() const; + std::int32_t GetPlane() const; + std::int32_t GetRenderInfo() const; + Renderable GetRenderable() const; + std::int32_t GetX() const; + std::int32_t GetY() const; + +}; + +#endif // GROUNDMODEL_HPP_INCLUDED diff --git a/Include/Core/Classes/HashTable.hpp b/Include/Core/Classes/HashTable.hpp new file mode 100644 index 0000000..6c1e00d --- /dev/null +++ b/Include/Core/Classes/HashTable.hpp @@ -0,0 +1,24 @@ +#ifndef HASHTABLE_HPP_INCLUDED +#define HASHTABLE_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include "Node.hpp" +#include + +class HashTable : public Object +{ + public: + HashTable(); + HashTable(const void* Obj); + HashTable(const HashTable& H); + static Class GetClass(); + + std::vector GetBuckets() const; + std::int32_t GetIndex() const; + std::int32_t GetSize() const; + +}; + +#endif // HASHTABLE_HPP_INCLUDED diff --git a/Include/Core/Classes/Ignore.hpp b/Include/Core/Classes/Ignore.hpp new file mode 100644 index 0000000..ec2d38a --- /dev/null +++ b/Include/Core/Classes/Ignore.hpp @@ -0,0 +1,21 @@ +#ifndef IGNORE_HPP_INCLUDED +#define IGNORE_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include + +class Ignore : public Object +{ + public: + Ignore(); + Ignore(const void* Obj); + Ignore(const Ignore& I); + static Class GetClass(); + + std::string GetName() const; + std::string GetPreviousName() const; + +}; + +#endif // IGNORE_HPP_INCLUDED diff --git a/Include/Core/Classes/ItemContainer.hpp b/Include/Core/Classes/ItemContainer.hpp new file mode 100644 index 0000000..9a0acc9 --- /dev/null +++ b/Include/Core/Classes/ItemContainer.hpp @@ -0,0 +1,22 @@ +#ifndef ITEMCONTAINER_HPP_INCLUDED +#define ITEMCONTAINER_HPP_INCLUDED + +#include "Node.hpp" +#include "../JavaClass/Class.hpp" +#include +#include + +class ItemContainer : public Node +{ + public: + ItemContainer(); + ItemContainer(const void* Obj); + ItemContainer(const ItemContainer& I); + static Class GetClass(); + + std::vector GetItemAmounts() const; + std::vector GetItemIDs() const; + +}; + +#endif // ITEMCONTAINER_HPP_INCLUDED diff --git a/Include/Core/Classes/ItemInfo.hpp b/Include/Core/Classes/ItemInfo.hpp new file mode 100644 index 0000000..84daff4 --- /dev/null +++ b/Include/Core/Classes/ItemInfo.hpp @@ -0,0 +1,32 @@ +#ifndef ITEMINFO_HPP_INCLUDED +#define ITEMINFO_HPP_INCLUDED + +#include "CacheableNode.hpp" +#include "../JavaClass/Class.hpp" +#include +#include +#include + +class ItemInfo : public CacheableNode +{ + public: + ItemInfo(); + ItemInfo(const void* Obj); + ItemInfo(const ItemInfo& I); + static Class GetClass(); + + std::vector GetGroundActions() const; + std::int32_t GetID() const; + std::vector GetInventoryActions() const; + bool GetMembers() const; + std::string GetName() const; + std::int32_t GetNoteID() const; + std::int32_t GetPrice() const; + std::int32_t GetSpriteID() const; + std::vector GetStackAmounts() const; + std::vector GetStackModelIDs() const; + std::int32_t GetStackable() const; + +}; + +#endif // ITEMINFO_HPP_INCLUDED diff --git a/Include/Core/Classes/LinkedList.hpp b/Include/Core/Classes/LinkedList.hpp new file mode 100644 index 0000000..d927b28 --- /dev/null +++ b/Include/Core/Classes/LinkedList.hpp @@ -0,0 +1,21 @@ +#ifndef LINKEDLIST_HPP_INCLUDED +#define LINKEDLIST_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include "Node.hpp" + +class LinkedList : public Object +{ + public: + LinkedList(); + LinkedList(const void* Obj); + LinkedList(const LinkedList& L); + static Class GetClass(); + + Node GetHead() const; + Node GetTail() const; + +}; + +#endif // LINKEDLIST_HPP_INCLUDED diff --git a/Include/Core/Classes/MessageNode.hpp b/Include/Core/Classes/MessageNode.hpp new file mode 100644 index 0000000..7d0f49b --- /dev/null +++ b/Include/Core/Classes/MessageNode.hpp @@ -0,0 +1,26 @@ +#ifndef MESSAGENODE_HPP_INCLUDED +#define MESSAGENODE_HPP_INCLUDED + +#include "CacheableNode.hpp" +#include "../JavaClass/Class.hpp" +#include +#include + +class MessageNode : public CacheableNode +{ + public: + MessageNode(); + MessageNode(const void* Obj); + MessageNode(const MessageNode& M); + static Class GetClass(); + + std::int32_t GetID() const; + std::string GetName() const; + std::string GetSender() const; + std::string GetText() const; + std::int32_t GetTick() const; + std::int32_t GetType() const; + +}; + +#endif // MESSAGENODE_HPP_INCLUDED diff --git a/Include/Core/Classes/Model.hpp b/Include/Core/Classes/Model.hpp new file mode 100644 index 0000000..934c3db --- /dev/null +++ b/Include/Core/Classes/Model.hpp @@ -0,0 +1,29 @@ +#ifndef MODEL_HPP_INCLUDED +#define MODEL_HPP_INCLUDED + +#include "Renderable.hpp" +#include "../JavaClass/Class.hpp" +#include +#include + +class Model : public Renderable +{ + public: + Model(); + Model(const void* Obj); + Model(const Model& M); + static Class GetClass(); + + std::vector> GetFrameMapIndices() const; + std::vector GetIndicesA() const; + std::vector GetIndicesB() const; + std::vector GetIndicesC() const; + std::int32_t GetIndicesLength() const; + std::int32_t GetVerticesLength() const; + std::vector GetVerticesX() const; + std::vector GetVerticesY() const; + std::vector GetVerticesZ() const; + +}; + +#endif // MODEL_HPP_INCLUDED diff --git a/Include/Core/Classes/NPC.hpp b/Include/Core/Classes/NPC.hpp new file mode 100644 index 0000000..6b7bf60 --- /dev/null +++ b/Include/Core/Classes/NPC.hpp @@ -0,0 +1,20 @@ +#ifndef NPC_HPP_INCLUDED +#define NPC_HPP_INCLUDED + +#include "Character.hpp" +#include "../JavaClass/Class.hpp" +#include "NPCInfo.hpp" + +class NPC : public Character +{ + public: + NPC(); + NPC(const void* Obj); + NPC(const NPC& N); + static Class GetClass(); + + NPCInfo GetInfo() const; + +}; + +#endif // NPC_HPP_INCLUDED diff --git a/Include/Core/Classes/NPCInfo.hpp b/Include/Core/Classes/NPCInfo.hpp new file mode 100644 index 0000000..4ad1bc1 --- /dev/null +++ b/Include/Core/Classes/NPCInfo.hpp @@ -0,0 +1,33 @@ +#ifndef NPCINFO_HPP_INCLUDED +#define NPCINFO_HPP_INCLUDED + +#include "CacheableNode.hpp" +#include "../JavaClass/Class.hpp" +#include +#include +#include + +class NPCInfo : public CacheableNode +{ + public: + NPCInfo(); + NPCInfo(const void* Obj); + NPCInfo(const NPCInfo& N); + static Class GetClass(); + + std::vector GetActions() const; + std::int32_t GetCombatLevel() const; + std::int32_t GetID() const; + std::vector GetImposterIDs() const; + bool GetMinimapVisible() const; + std::vector GetModelIDs() const; + std::string GetName() const; + std::int32_t GetResizeX() const; + std::int32_t GetResizeY() const; + std::int32_t GetSettingID() const; + std::int32_t GetVarbitID() const; + bool GetVisible() const; + +}; + +#endif // NPCINFO_HPP_INCLUDED diff --git a/Include/Core/Classes/Node.hpp b/Include/Core/Classes/Node.hpp new file mode 100644 index 0000000..fe07117 --- /dev/null +++ b/Include/Core/Classes/Node.hpp @@ -0,0 +1,22 @@ +#ifndef NODE_HPP_INCLUDED +#define NODE_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include + +class Node : public Object +{ + public: + Node(); + Node(const void* Obj); + Node(const Node& N); + static Class GetClass(); + + Node GetNext() const; + Node GetPrev() const; + std::int64_t GetUID() const; + +}; + +#endif // NODE_HPP_INCLUDED diff --git a/Include/Core/Classes/ObjectInfo.hpp b/Include/Core/Classes/ObjectInfo.hpp new file mode 100644 index 0000000..cd59642 --- /dev/null +++ b/Include/Core/Classes/ObjectInfo.hpp @@ -0,0 +1,29 @@ +#ifndef OBJECTINFO_HPP_INCLUDED +#define OBJECTINFO_HPP_INCLUDED + +#include "CacheableNode.hpp" +#include "../JavaClass/Class.hpp" +#include +#include +#include + +class ObjectInfo : public CacheableNode +{ + public: + ObjectInfo(); + ObjectInfo(const void* Obj); + ObjectInfo(const ObjectInfo& O); + static Class GetClass(); + + std::vector GetActions() const; + std::int32_t GetID() const; + std::vector GetImposterIDs() const; + std::vector GetModelIDs() const; + std::string GetName() const; + std::vector GetObjectTypes() const; + std::int32_t GetSettingID() const; + std::int32_t GetVarbitID() const; + +}; + +#endif // OBJECTINFO_HPP_INCLUDED diff --git a/Include/Core/Classes/Player.hpp b/Include/Core/Classes/Player.hpp new file mode 100644 index 0000000..6aa9c71 --- /dev/null +++ b/Include/Core/Classes/Player.hpp @@ -0,0 +1,31 @@ +#ifndef PLAYER_HPP_INCLUDED +#define PLAYER_HPP_INCLUDED + +#include "Character.hpp" +#include "../JavaClass/Class.hpp" +#include +#include +#include +#include "PlayerInfo.hpp" + +class Player : public Character +{ + public: + Player(); + Player(const void* Obj); + Player(const Player& P); + static Class GetClass(); + + std::vector GetActions() const; + std::int32_t GetCombatLevel() const; + bool GetHidden() const; + PlayerInfo GetInfo() const; + std::string GetName() const; + std::int32_t GetOverheadIcon() const; + std::int32_t GetSkullIcon() const; + std::int32_t GetTeam() const; + std::int32_t GetTotalLevel() const; + +}; + +#endif // PLAYER_HPP_INCLUDED diff --git a/Include/Core/Classes/PlayerInfo.hpp b/Include/Core/Classes/PlayerInfo.hpp new file mode 100644 index 0000000..8ed353f --- /dev/null +++ b/Include/Core/Classes/PlayerInfo.hpp @@ -0,0 +1,25 @@ +#ifndef PLAYERINFO_HPP_INCLUDED +#define PLAYERINFO_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include + +class PlayerInfo : public Object +{ + public: + PlayerInfo(); + PlayerInfo(const void* Obj); + PlayerInfo(const PlayerInfo& P); + static Class GetClass(); + + std::vector GetEquipment() const; + bool GetGender() const; + std::int64_t GetHash() const; + std::int64_t GetModelID() const; + std::int32_t GetNPCModelID() const; + +}; + +#endif // PLAYERINFO_HPP_INCLUDED diff --git a/Include/Core/Classes/Preferences.hpp b/Include/Core/Classes/Preferences.hpp new file mode 100644 index 0000000..a8dab2b --- /dev/null +++ b/Include/Core/Classes/Preferences.hpp @@ -0,0 +1,24 @@ +#ifndef PREFERENCES_HPP_INCLUDED +#define PREFERENCES_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include "../JavaClass/LinkedHashMap.hpp" +#include + +class Preferences : public Object +{ + public: + Preferences(); + Preferences(const void* Obj); + Preferences(const Preferences& P); + static Class GetClass(); + + bool GetHideRoofs() const; + bool GetMuted() const; + LinkedHashMap GetPreferences() const; + std::int32_t GetScreenType() const; + +}; + +#endif // PREFERENCES_HPP_INCLUDED diff --git a/Include/Core/Classes/Queue.hpp b/Include/Core/Classes/Queue.hpp new file mode 100644 index 0000000..27e05ca --- /dev/null +++ b/Include/Core/Classes/Queue.hpp @@ -0,0 +1,20 @@ +#ifndef QUEUE_HPP_INCLUDED +#define QUEUE_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include "CacheableNode.hpp" + +class Queue : public Object +{ + public: + Queue(); + Queue(const void* Obj); + Queue(const Queue& Q); + static Class GetClass(); + + CacheableNode GetHead() const; + +}; + +#endif // QUEUE_HPP_INCLUDED diff --git a/Include/Core/Classes/Region.hpp b/Include/Core/Classes/Region.hpp new file mode 100644 index 0000000..693526f --- /dev/null +++ b/Include/Core/Classes/Region.hpp @@ -0,0 +1,23 @@ +#ifndef REGION_HPP_INCLUDED +#define REGION_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include "GameModel.hpp" +#include "SceneTile.hpp" + +class Region : public Object +{ + public: + Region(); + Region(const void* Obj); + Region(const Region& R); + static Class GetClass(); + + std::vector GetGameModels() const; + std::vector>> GetSceneTiles() const; + +}; + +#endif // REGION_HPP_INCLUDED diff --git a/Include/Core/Classes/Renderable.hpp b/Include/Core/Classes/Renderable.hpp new file mode 100644 index 0000000..39c1fd9 --- /dev/null +++ b/Include/Core/Classes/Renderable.hpp @@ -0,0 +1,20 @@ +#ifndef RENDERABLE_HPP_INCLUDED +#define RENDERABLE_HPP_INCLUDED + +#include "CacheableNode.hpp" +#include "../JavaClass/Class.hpp" +#include + +class Renderable : public CacheableNode +{ + public: + Renderable(); + Renderable(const void* Obj); + Renderable(const Renderable& R); + static Class GetClass(); + + std::int32_t GetModelHeight() const; + +}; + +#endif // RENDERABLE_HPP_INCLUDED diff --git a/Include/Core/Classes/SceneTile.hpp b/Include/Core/Classes/SceneTile.hpp new file mode 100644 index 0000000..1c5aa17 --- /dev/null +++ b/Include/Core/Classes/SceneTile.hpp @@ -0,0 +1,31 @@ +#ifndef SCENETILE_HPP_INCLUDED +#define SCENETILE_HPP_INCLUDED + +#include "Node.hpp" +#include "../JavaClass/Class.hpp" +#include "DecorativeModel.hpp" +#include +#include "GameModel.hpp" +#include "GroundModel.hpp" +#include +#include "WallModel.hpp" + +class SceneTile : public Node +{ + public: + SceneTile(); + SceneTile(const void* Obj); + SceneTile(const SceneTile& G); + static Class GetClass(); + + DecorativeModel GetDecorativeModel() const; + std::vector GetGameModels() const; + GroundModel GetGroundModel() const; + std::int32_t GetPlane() const; + WallModel GetWallModel() const; + std::int32_t GetX() const; + std::int32_t GetY() const; + +}; + +#endif // SCENETILE_HPP_INCLUDED diff --git a/Include/Core/Classes/Sprite.hpp b/Include/Core/Classes/Sprite.hpp new file mode 100644 index 0000000..fcd19a2 --- /dev/null +++ b/Include/Core/Classes/Sprite.hpp @@ -0,0 +1,23 @@ +#ifndef SPRITE_HPP_INCLUDED +#define SPRITE_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include + +class Sprite : public Object +{ + public: + Sprite(); + Sprite(const void* Obj); + Sprite(const Sprite& S); + static Class GetClass(); + + std::int32_t GetHeight() const; + std::vector GetPixels() const; + std::int32_t GetWidth() const; + +}; + +#endif // SPRITE_HPP_INCLUDED diff --git a/Include/Core/Classes/Varbit.hpp b/Include/Core/Classes/Varbit.hpp new file mode 100644 index 0000000..8d624b2 --- /dev/null +++ b/Include/Core/Classes/Varbit.hpp @@ -0,0 +1,22 @@ +#ifndef VARBIT_HPP_INCLUDED +#define VARBIT_HPP_INCLUDED + +#include "CacheableNode.hpp" +#include "../JavaClass/Class.hpp" +#include + +class Varbit : public CacheableNode +{ + public: + Varbit(); + Varbit(const void* Obj); + Varbit(const Varbit& V); + static Class GetClass(); + + std::int32_t GetLSB() const; + std::int32_t GetMSB() const; + std::int32_t GetSettingID() const; + +}; + +#endif // VARBIT_HPP_INCLUDED diff --git a/Include/Core/Classes/WallModel.hpp b/Include/Core/Classes/WallModel.hpp new file mode 100644 index 0000000..523ec69 --- /dev/null +++ b/Include/Core/Classes/WallModel.hpp @@ -0,0 +1,28 @@ +#ifndef WALLMODEL_HPP_INCLUDED +#define WALLMODEL_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include "Renderable.hpp" + +class WallModel : public Object +{ + public: + WallModel(); + WallModel(const void* Obj); + WallModel(const WallModel& W); + static Class GetClass(); + + std::int32_t GetAngle() const; + std::int32_t GetFlags() const; + std::int32_t GetHash() const; + std::int32_t GetHeight() const; + std::int32_t GetPlane() const; + Renderable GetRenderable() const; + std::int32_t GetX() const; + std::int32_t GetY() const; + +}; + +#endif // WALLMODEL_HPP_INCLUDED diff --git a/Include/Core/Classes/Widget.hpp b/Include/Core/Classes/Widget.hpp new file mode 100644 index 0000000..2655d8e --- /dev/null +++ b/Include/Core/Classes/Widget.hpp @@ -0,0 +1,44 @@ +#ifndef WIDGET_HPP_INCLUDED +#define WIDGET_HPP_INCLUDED + +#include "Node.hpp" +#include "../JavaClass/Class.hpp" +#include +#include +#include + +class Widget : public Node +{ + public: + Widget(); + Widget(const void* Obj); + Widget(const Widget& W); + static Class GetClass(); + + std::vector GetActions() const; + std::int32_t GetBorderThickness() const; + std::int32_t GetBoxIndex() const; + std::vector GetChildren() const; + std::int32_t GetHeight() const; + bool GetHidden() const; + std::int32_t GetID() const; + std::int32_t GetItemAmount() const; + std::vector GetItemAmounts() const; + std::int32_t GetItemID() const; + std::vector GetItemIDs() const; + std::string GetName() const; + Widget GetParent() const; + std::int32_t GetParentID() const; + std::int32_t GetRelativeX() const; + std::int32_t GetRelativeY() const; + std::int32_t GetScrollX() const; + std::int32_t GetScrollY() const; + std::int32_t GetShadowColor() const; + std::int32_t GetSpriteID() const; + std::int32_t GetStackType() const; + std::string GetText() const; + std::int32_t GetWidth() const; + +}; + +#endif // WIDGET_HPP_INCLUDED diff --git a/Include/Core/Classes/WidgetNode.hpp b/Include/Core/Classes/WidgetNode.hpp new file mode 100644 index 0000000..f260852 --- /dev/null +++ b/Include/Core/Classes/WidgetNode.hpp @@ -0,0 +1,19 @@ +#ifndef WIDGETNODE_HPP_INCLUDED +#define WIDGETNODE_HPP_INCLUDED + +#include "Node.hpp" +#include "../JavaClass/Class.hpp" +#include + +class WidgetNode : public Node +{ + public: + WidgetNode(); + WidgetNode(const void* Obj); + WidgetNode(const WidgetNode& W); + static Class GetClass(); + + std::int32_t GetID() const; +}; + +#endif // WIDGETNODE_HPP_INCLUDED diff --git a/Include/Core/Classes/World.hpp b/Include/Core/Classes/World.hpp new file mode 100644 index 0000000..56c3f2b --- /dev/null +++ b/Include/Core/Classes/World.hpp @@ -0,0 +1,27 @@ +#ifndef WORLD_HPP_INCLUDED +#define WORLD_HPP_INCLUDED + +#include "../JavaClass/Object.hpp" +#include "../JavaClass/Class.hpp" +#include +#include + +class World : public Object +{ + public: + World(); + World(const void* Obj); + World(const World& W); + static Class GetClass(); + + std::string GetActivity() const; + std::string GetAddress() const; + std::int32_t GetID() const; + std::int32_t GetIndex() const; + std::int32_t GetLocation() const; + std::int32_t GetMask() const; + std::int32_t GetPlayerCount() const; + +}; + +#endif // WORLD_HPP_INCLUDED diff --git a/Include/Core/Debug.hpp b/Include/Core/Debug.hpp new file mode 100644 index 0000000..85ed0e1 --- /dev/null +++ b/Include/Core/Debug.hpp @@ -0,0 +1,21 @@ +#ifndef DEBUG_HPP_INCLUDED +#define DEBUG_HPP_INCLUDED + +#include "../../Include/Core/Types/Logger.hpp" + +class Debug +{ + public: + static Logger Info; + static Logger Verbose; + static Logger Warning; + static Logger Error; + static Logger Fatal; + + static void ShowConsole(); + static void HideConsole(); + static void SetVerbose(bool Toggle); +}; + + +#endif // DEBUG_HPP_INCLUDED diff --git a/Include/Core/Input.hpp b/Include/Core/Input.hpp new file mode 100644 index 0000000..81e6869 --- /dev/null +++ b/Include/Core/Input.hpp @@ -0,0 +1,68 @@ +#ifndef INPUT_HPP_INCLUDED +#define INPUT_HPP_INCLUDED + +#include "Types/Point.hpp" +#include +#include + +typedef enum ScrollDirection +{ + SCROLL_DOWN = 0, + SCROLL_UP = 1 +} ScrollDirection; + +typedef enum Button +{ + BUTTON_NONE = 0, + BUTTON_LEFT = 1, + BUTTON_MIDDLE = 2, + BUTTON_RIGHT = 3 +} Button; + +typedef enum Key +{ + KEY_BACKSPACE = 8, + KEY_TAB = 9, + KEY_NEWLINE = 10, + KEY_SHIFT = 16, + KEY_CTRL = 17, + KEY_ALT = 18, + KEY_ESC = 27, + KEY_DEL = 127, + KEY_LEFT = 256, + KEY_UP = 257, + KEY_RIGHT = 258, + KEY_DOWN = 259, + KEY_F1 = 260, + KEY_F2 = 261, + KEY_F3 = 262, + KEY_F4 = 263, + KEY_F5 = 264, + KEY_F6 = 265, + KEY_F7 = 266, + KEY_F8 = 267, + KEY_F9 = 268, + KEY_F10 = 269, + KEY_F11 = 270, + KEY_F12 = 271 +} Key; + +void SetupInput(); +void GainFocus(); +void LoseFocus(); +bool IsKeyDown(std::int32_t K); +void ScrollUp(); +void ScrollDown(); +void MouseDown(std::int32_t B); +void MouseUp(std::int32_t B); +void MouseClick(std::int32_t B); +void MouseMove(Point P); +void MouseMove(std::int32_t X, std::int32_t Y); +void KeyDown(std::int32_t K); +void KeyUp(std::int32_t K); +void KeyHold(std::int32_t K, std::uint32_t Duration); +void KeyRelease(std::int32_t K); +bool ShiftNeeded(std::int32_t K); +Point GetMousePos(); + +#endif // INPUT_HPP_INCLUDED diff --git a/Include/Core/Internal.hpp b/Include/Core/Internal.hpp new file mode 100644 index 0000000..801ab21 --- /dev/null +++ b/Include/Core/Internal.hpp @@ -0,0 +1,218 @@ +#ifndef INTERNAL_HPP_INCLUDED +#define INTERNAL_HPP_INCLUDED + +#include "Debug.hpp" +#include "Input.hpp" +#include "Math.hpp" +#include "Paint.hpp" +#include "Script.hpp" +#include "Time.hpp" + +#include "Types/Tile.hpp" +#include "Types/Point.hpp" +#include "Types/Box.hpp" +#include "Types/Timer.hpp" +#include "Types/Counter.hpp" +#include "Types/Countdown.hpp" +#include "Types/Convex.hpp" +#include "Types/Area.hpp" +#include "Types/Logger.hpp" + + +#include "JavaClass/Canvas.hpp" +#include "JavaClass/FocusEvent.hpp" +#include "JavaClass/Integer.hpp" +#include "JavaClass/KeyEvent.hpp" +#include "JavaClass/LinkedHashMap.hpp" +#include "JavaClass/Map.hpp" +#include "JavaClass/MouseEvent.hpp" +#include "JavaClass/MouseWheelEvent.hpp" +#include "JavaClass/Object.hpp" + +#include "Classes/Animation.hpp" +#include "Classes/Cache.hpp" +#include "Classes/CacheableNode.hpp" +#include "Classes/Character.hpp" +#include "Classes/ChatLineBuffer.hpp" +#include "Classes/ClanMember.hpp" +#include "Classes/DecorativeModel.hpp" +#include "Classes/Deque.hpp" +#include "Classes/DynamicModel.hpp" +#include "Classes/ExchangeOffer.hpp" +#include "Classes/Frame.hpp" +#include "Classes/FrameMap.hpp" +#include "Classes/Frames.hpp" +#include "Classes/Friend.hpp" +#include "Classes/GameModel.hpp" +#include "Classes/GameShell.hpp" +#include "Classes/GroundItem.hpp" +#include "Classes/GroundModel.hpp" +#include "Classes/HashTable.hpp" +#include "Classes/Ignore.hpp" +#include "Classes/ItemContainer.hpp" +#include "Classes/ItemInfo.hpp" +#include "Classes/LinkedList.hpp" +#include "Classes/MessageNode.hpp" +#include "Classes/Model.hpp" +#include "Classes/Node.hpp" +#include "Classes/NPC.hpp" +#include "Classes/NPCInfo.hpp" +#include "Classes/ObjectInfo.hpp" +#include "Classes/Player.hpp" +#include "Classes/PlayerInfo.hpp" +#include "Classes/Preferences.hpp" +#include "Classes/Queue.hpp" +#include "Classes/Region.hpp" +#include "Classes/Renderable.hpp" +#include "Classes/SceneTile.hpp" +#include "Classes/Sprite.hpp" +#include "Classes/Varbit.hpp" +#include "Classes/WallModel.hpp" +#include "Classes/Widget.hpp" +#include "Classes/WidgetNode.hpp" +#include "Classes/World.hpp" + +extern GameShell Client; + +Cache GetAnimationCache(); +std::int32_t GetCameraPitch(); +std::int32_t GetCameraX(); +std::int32_t GetCameraY(); +std::int32_t GetCameraYaw(); +std::int32_t GetCameraZ(); +Map GetChatLineCache(); +std::vector GetClanMembers(); +std::int32_t GetClientPlane(); +Preferences GetClientPreferences(); +std::int32_t GetClientX(); +std::int32_t GetClientY(); +std::vector GetCurrentLevels(); +std::int32_t GetCurrentWorld(); +Cache GetDynamicModelCache(); +std::vector GetExchangeOffers(); +std::vector GetExperiences(); +bool GetFocused(); +Cache GetFramesCache(); +std::vector GetFriends(); +std::int32_t GetGameState(); +std::int32_t GetGameTick(); +std::vector>> GetGroundItems(); +std::vector GetIgnores(); +HashTable GetItemContainers(); +Cache GetItemModelCache(); +std::int32_t GetItemSelected(); +std::int32_t GetItemSelectedIndex(); +Cache GetItemSpriteCache(); +std::vector GetLevels(); +std::int32_t GetLocalDestinationX(); +std::int32_t GetLocalDestinationY(); +Player GetLocalPlayer(); +Region GetLocalRegion(); +std::int32_t GetLoginCaret(); +std::string GetLoginMessage0(); +std::string GetLoginMessage1(); +std::string GetLoginMessage2(); +std::int32_t GetLoginScreenX(); +std::int32_t GetLoginState(); +std::int32_t GetLoginWindow(); +std::int32_t GetMapAngle(); +std::vector GetMenuActions(); +std::int32_t GetMenuCount(); +std::int32_t GetMenuHeight(); +std::vector GetMenuTargets(); +bool GetMenuVisible(); +std::int32_t GetMenuWidth(); +std::int32_t GetMenuX(); +std::int32_t GetMenuY(); +Cache GetModelCache(); +std::vector GetNPCIndices(); +Cache GetNPCModelCache(); +std::vector GetNPCs(); +std::string GetPassword(); +Cache GetPlayerModelCache(); +std::vector GetPlayers(); +std::int32_t GetRunEnergy(); +std::string GetSelectedItemName(); +std::string GetSelectedSpellName(); +std::vector GetSettings(); +bool GetSpellSelected(); +std::vector>> GetTileHeights(); +std::vector>> GetTileSettings(); +std::string GetUsername(); +Cache GetVarbitCache(); +std::vector GetVarbitSettings(); +std::int32_t GetViewportHeight(); +std::int32_t GetViewportScale(); +std::int32_t GetViewportWidth(); +std::int32_t GetWeight(); +HashTable GetWidgetNodeCache(); +std::vector> GetWidgets(); +std::vector GetWidgetsHeight(); +std::vector GetWidgetsWidth(); +std::vector GetWidgetsX(); +std::vector GetWidgetsY(); +bool GetWorldSelectOpen(); +std::vector GetWorlds(); +ItemInfo GetItemInfo(std::int32_t ID); +NPCInfo GetNPCInfo(std::int32_t ID); +ObjectInfo GetObjectInfo(std::int32_t ID); +bool LoadWorlds(); +void SetWorld(World W); + + +Widget GetWidget(std::int32_t Container, std::int32_t Component); +Widget GetWidgetParent(Widget W); +std::int32_t GetWidgetX(Widget W); +std::int32_t GetWidgetY(Widget W); +bool GetWidgetHidden(Widget W); +Box GetWidgetBox(Widget W); +ItemContainer GetItemContainer(std::int32_t ID); +NPC GetNPC(std::int32_t Index); +std::int32_t GetTileHeight(std::int32_t X, std::int32_t Y, std::int32_t Z, + std::vector>>& TileHeights, + std::vector>>& TileSettings); +Point WorldToScreen(std::int32_t X, std::int32_t Y, std::int32_t Z, + std::vector>>& TileHeights, + std::vector>>& TileSettings, + std::int32_t CameraX, std::int32_t CameraY, std::int32_t CameraZ, + std::int32_t Pitch, std::int32_t Yaw, std::int32_t Scale, + std::int32_t ViewportWidth, std::int32_t ViewportHeight, + std::int32_t ScreenType, std::int32_t Plane); +Point WorldToScreenEx(std::int32_t X, std::int32_t Y, std::int32_t Z, + std::vector>>& TileHeights, + std::vector>>& TileSettings, + std::int32_t CameraX, std::int32_t CameraY, std::int32_t CameraZ, + std::int32_t Pitch, std::int32_t Yaw, std::int32_t Scale, + std::int32_t ViewportWidth, std::int32_t ViewportHeight, + std::int32_t ScreenType, std::int32_t Plane, + std::int32_t PositionX, std::int32_t PositionY); +void RotateVertices(std::vector& X, std::vector& Y, + std::vector& Z, std::int32_t Angle); +std::vector ProjectModel(Model M, std::int32_t LocalX, std::int32_t LocalY, + std::int32_t LocalZ, std::int32_t Angle); +Model GetPlayerModel(std::int64_t ID); +Model GetNPCModel(std::int32_t ID); +Varbit GetVarbit(std::int32_t ID); +Animation GetAnimation(std::int32_t ID); +Frames GetFrames(std::int32_t ID); +Model GetItemModel(std::int32_t ID); +Model GetItemModel(std::int32_t ID, std::int32_t Amount); +Model GetGameModel(GameModel O); +Model GetWallModel(WallModel O); +Model GetDecorativeModel(DecorativeModel O); +Model GetGroundModel(GroundModel O); +Model GetDynamicModel(std::int32_t ID); +std::vector> GetGroundItems(std::int32_t Plane); +Deque GetGroundItems(std::int32_t X, std::int32_t Y); +Deque GetGroundItems(std::int32_t X, std::int32_t Y, std::int32_t Plane); +std::vector GetPlayerModel(Player P); +std::vector GetNPCModel(NPC N); +SceneTile GetSceneTile(std::int32_t X, std::int32_t Y, std::int32_t Plane); +std::vector> GetSceneTiles(std::int32_t Plane); +Point TileToMinimap(Tile T); +std::int32_t GetTileItemHeight(std::int32_t X, std::int32_t Y, std::int32_t Plane); +Sprite GetItemSprite(std::int32_t ID, std::int32_t Amount, std::int32_t BorderThickness, + std::int32_t ShadowColor, std::int32_t StackType); +Convex GetItemSpriteConvex(Sprite S); + +#endif // INTERNAL_HPP_INCLUDED diff --git a/Include/Core/JavaClass/Canvas.hpp b/Include/Core/JavaClass/Canvas.hpp new file mode 100644 index 0000000..6a069cc --- /dev/null +++ b/Include/Core/JavaClass/Canvas.hpp @@ -0,0 +1,18 @@ +#ifndef CANVAS_HPP_INCLUDED +#define CANVAS_HPP_INCLUDED + +#include +#include "Object.hpp" + +class Canvas : public Object +{ + public: + Canvas(); + Canvas(void* Obj); + Canvas(const Canvas& C); + void DispatchEvent(Object Event) const; + std::int32_t GetWidth() const; + std::int32_t GetHeight() const; +}; + +#endif // CANVAS_HPP_INCLUDED diff --git a/Include/Core/JavaClass/Class.hpp b/Include/Core/JavaClass/Class.hpp new file mode 100644 index 0000000..9ed5530 --- /dev/null +++ b/Include/Core/JavaClass/Class.hpp @@ -0,0 +1,14 @@ +#ifndef CLASS_HPP_INCLUDED +#define CLASS_HPP_INCLUDED + +#include "Object.hpp" + +class Class : public Object +{ + public: + Class(); + Class(const void* Obj); + Class(const Class& C); +}; + +#endif // CLASS_HPP_INCLUDED diff --git a/Include/Core/JavaClass/FocusEvent.hpp b/Include/Core/JavaClass/FocusEvent.hpp new file mode 100644 index 0000000..1024863 --- /dev/null +++ b/Include/Core/JavaClass/FocusEvent.hpp @@ -0,0 +1,16 @@ +#ifndef FOCUSEVENT_HPP_INCLUDED +#define FOCUSEVENT_HPP_INCLUDED + +#include +#include "Object.hpp" + +class FocusEvent : public Object +{ + public: + FocusEvent(); + FocusEvent(void* Object); + FocusEvent(const FocusEvent& M); + FocusEvent(Object Source, std::int32_t ID); +}; + +#endif // FOCUSEVENT_HPP_INCLUDED diff --git a/Include/Core/JavaClass/Integer.hpp b/Include/Core/JavaClass/Integer.hpp new file mode 100644 index 0000000..7ba0a0a --- /dev/null +++ b/Include/Core/JavaClass/Integer.hpp @@ -0,0 +1,17 @@ +#ifndef INTEGER_HPP_INCLUDED +#define INTEGER_HPP_INCLUDED + +#include +#include "Object.hpp" + +class Integer : public Object +{ + public: + Integer(); + Integer(void* Obj); + Integer(const Integer& I); + Integer(std::int32_t Value); + std::int32_t GetIntValue() const; +}; + +#endif // INTEGER_HPP_INCLUDED diff --git a/Include/Core/JavaClass/KeyEvent.hpp b/Include/Core/JavaClass/KeyEvent.hpp new file mode 100644 index 0000000..71a8bdc --- /dev/null +++ b/Include/Core/JavaClass/KeyEvent.hpp @@ -0,0 +1,17 @@ +#ifndef KEYEVENT_HPP_INCLUDED +#define KEYEVENT_HPP_INCLUDED + +#include +#include "Object.hpp" + +class KeyEvent : public Object +{ + public: + KeyEvent(); + KeyEvent(void* Obj); + KeyEvent(const KeyEvent& M); + KeyEvent(Object Source, std::int32_t ID, std::int64_t When, std::int32_t Modifiers, + std::int32_t KeyCode, std::uint16_t KeyChar, std::int32_t KeyLocation); +}; + +#endif // KEYEVENT_HPP_INCLUDED diff --git a/Include/Core/JavaClass/LinkedHashMap.hpp b/Include/Core/JavaClass/LinkedHashMap.hpp new file mode 100644 index 0000000..66cc50d --- /dev/null +++ b/Include/Core/JavaClass/LinkedHashMap.hpp @@ -0,0 +1,15 @@ +#ifndef LINKEDHASHMAP_HPP_INCLUDED +#define LINKEDHASHMAP_HPP_INCLUDED + +#include "Object.hpp" + +class LinkedHashMap : public Object +{ + public: + LinkedHashMap(); + LinkedHashMap(void* Obj); + LinkedHashMap(const LinkedHashMap& L); + Object GetValue(Object Key) const; +}; + +#endif // LINKEDHASHMAP_HPP_INCLUDED diff --git a/Include/Core/JavaClass/Map.hpp b/Include/Core/JavaClass/Map.hpp new file mode 100644 index 0000000..c0f013e --- /dev/null +++ b/Include/Core/JavaClass/Map.hpp @@ -0,0 +1,18 @@ +#ifndef MAP_HPP_INCLUDED +#define MAP_HPP_INCLUDED + +#include +#include "Object.hpp" +#include "Set.hpp" + +class Map : public Object +{ + public: + Map(); + Map(void* Obj); + Map(const Map& M); + Object GetValue(Object Key) const; + Set GetKeySet() const; +}; + +#endif // MAP_HPP_INCLUDED diff --git a/Include/Core/JavaClass/MouseEvent.hpp b/Include/Core/JavaClass/MouseEvent.hpp new file mode 100644 index 0000000..943d96a --- /dev/null +++ b/Include/Core/JavaClass/MouseEvent.hpp @@ -0,0 +1,18 @@ +#ifndef MOUSEEVENT_HPP_INCLUDED +#define MOUSEEVENT_HPP_INCLUDED + +#include +#include "Object.hpp" + +class MouseEvent : public Object +{ + public: + MouseEvent(); + MouseEvent(void* Object); + MouseEvent(const MouseEvent& M); + MouseEvent(Object Source, std::int32_t ID, std::int64_t When, std::int32_t Modifiers, + std::int32_t X, std::int32_t Y, std::int32_t ClickCount, bool PopupTrigger, + std::int32_t Button); +}; + +#endif // MOUSEEVENT_HPP_INCLUDED diff --git a/Include/Core/JavaClass/MouseWheelEvent.hpp b/Include/Core/JavaClass/MouseWheelEvent.hpp new file mode 100644 index 0000000..1b1f50e --- /dev/null +++ b/Include/Core/JavaClass/MouseWheelEvent.hpp @@ -0,0 +1,18 @@ +#ifndef MOUSEWHEELEVENT_HPP_INCLUDED +#define MOUSEWHEELEVENT_HPP_INCLUDED + +#include +#include "Object.hpp" + +class MouseWheelEvent : public Object +{ + public: + MouseWheelEvent(); + MouseWheelEvent(void* Object); + MouseWheelEvent(const MouseWheelEvent& M); + MouseWheelEvent(Object Source, std::int32_t ID, std::int64_t When, std::int32_t Modifiers, + std::int32_t X, std::int32_t Y, std::int32_t ClickCount, bool PopupTrigger, + std::int32_t ScrollType, std::int32_t ScrollAmount, std::int32_t WheelRotation); +}; + +#endif // MOUSEWHEELEVENT_HPP_INCLUDED diff --git a/Include/Core/JavaClass/Object.hpp b/Include/Core/JavaClass/Object.hpp new file mode 100644 index 0000000..6121517 --- /dev/null +++ b/Include/Core/JavaClass/Object.hpp @@ -0,0 +1,25 @@ +#ifndef OBJECT_HPP_INCLUDED +#define OBJECT_HPP_INCLUDED + +class Class; + +class Object +{ + public: + void* Obj; + + Object(); + Object(const void* Obj); + Object(const Object& O); + void* Get() const; + Object& operator=(const Object& O); + bool operator==(const Object& O) const; + bool operator!=(const Object& O) const; + bool Equals(Object O) const; + bool InstanceOf(Class C) const; + operator bool() const; + operator void*() const; + virtual ~Object(); +}; + +#endif // OBJECT_HPP_INCLUDED diff --git a/Include/Core/JavaClass/Set.hpp b/Include/Core/JavaClass/Set.hpp new file mode 100644 index 0000000..45eb5d6 --- /dev/null +++ b/Include/Core/JavaClass/Set.hpp @@ -0,0 +1,16 @@ +#ifndef SET_HPP_INCLUDED +#define SET_HPP_INCLUDED + +#include +#include "Object.hpp" + +class Set : public Object +{ + public: + Set(); + Set(void* Obj); + Set(const Set& S); + std::vector ToArray() const; +}; + +#endif // SET_HPP_INCLUDED diff --git a/Include/Core/Math.hpp b/Include/Core/Math.hpp new file mode 100644 index 0000000..f83caa9 --- /dev/null +++ b/Include/Core/Math.hpp @@ -0,0 +1,22 @@ +#ifndef MATH_HPP_INCLUDED +#define MATH_HPP_INCLUDED + +#include +#include + +#include "Types/Point.hpp" + +/** @addtogroup Math +* @{ */ + +std::int32_t BinomialRandom(std::int32_t Min, std::int32_t Max, double Probability); +std::int32_t UniformRandom(std::int32_t Min, std::int32_t Max); +double UniformRandom(); +std::int32_t NormalRandom(std::int32_t Mean, double StandardDeviation); +std::int32_t NormalRandom(std::int32_t Low, std::int32_t High, double PercentageDeviation); +std::vector Spiral(Point Start, Box Area); +std::vector ConvexHull(std::vector Points); + +/** @} */ + +#endif // MATH_HPP_INCLUDED diff --git a/Include/Core/Paint.hpp b/Include/Core/Paint.hpp new file mode 100644 index 0000000..9903cd3 --- /dev/null +++ b/Include/Core/Paint.hpp @@ -0,0 +1,24 @@ +#ifndef PAINT_HPP_INCLUDED +#define PAINT_HPP_INCLUDED + +#include +#include "Types/Convex.hpp" + +/** @addtogroup Core +* @{ */ +class Paint +{ + public: + static void Clear(); + static void DrawPoint(const Point& P, std::uint8_t Red, std::uint8_t Green, std::uint8_t Blue, std::uint8_t Alpha); + static void DrawPoints(const std::vector& Points, std::uint8_t Red, std::uint8_t Green, std::uint8_t Blue, std::uint8_t Alpha); + static void DrawLine(const Point& A, const Point& B, std::uint8_t Red, std::uint8_t Green, std::uint8_t Blue, std::uint8_t Alpha); + static void DrawLines(const std::vector& A, const std::vector& B, std::uint8_t Red, std::uint8_t Green, std::uint8_t Blue, std::uint8_t Alpha); + static void DrawBox(const Box& B, std::uint8_t Red, std::uint8_t Green, std::uint8_t Blue, std::uint8_t Alpha); + static void DrawSquare(const Box& B, std::uint8_t Red, std::uint8_t Green, std::uint8_t Blue, std::uint8_t Alpha); + static void DrawConvex(Convex& C, std::uint8_t Red, std::uint8_t Green, std::uint8_t Blue, std::uint8_t Alpha); +}; + +/** @} */ + +#endif // PAINT_HPP_INCLUDED diff --git a/Include/Core/Script.hpp b/Include/Core/Script.hpp new file mode 100644 index 0000000..6dbd2fe --- /dev/null +++ b/Include/Core/Script.hpp @@ -0,0 +1,84 @@ +#ifndef SCRIPT_HPP_INCLUDED +#define SCRIPT_HPP_INCLUDED + +#include +#include +#include "Types/Timer.hpp" + +typedef struct +{ + std::string Name = ""; + std::string Description = ""; + std::string Version = ""; + std::string Category = ""; + std::string Author = ""; + std::string UID = ""; + std::string ForumPage = ""; +} ScriptInfo; + +typedef struct +{ + std::string Username; + std::string Password; + bool Member; + bool HasPin; + std::string BankPin; + std::string World; + bool UseProxy; + std::string ProxyHost; + std::string ProxyPort; + std::int32_t ActionDelayMean; + float ActionDelayDeviation; + std::int32_t MoveDelayMean; + float MoveDelayDeviation; + std::int32_t MouseDownDelayMean; + float MouseDownDelayDeviation; + std::int32_t MouseUpDelayMean; + float MouseUpDelayDeviation; + std::int32_t KeyDownDelayMean; + float KeyDownDelayDeviation; + std::int32_t KeyUpDelayMean; + float KeyUpDelayDeviation; + std::int32_t ScrollDelayMean; + float ScrollDelayDeviation; + float StandardDeviationX; + float StandardDeviationY; + float BoxProbabilityX; + float BoxProbabilityY; + float ConvexProbabilityX; + float ConvexProbabilityY; + float ItemProbabilityX; + float ItemProbabilityY; + float MenuProbabilityX; + float MenuProbabilityY; + float WidgetProbabilityX; + float WidgetProbabilityY; + float MissFollowUp; + float FatigueGain; + float FatigueLoss; + float FatigueMax; + bool ShortBreakEnabled; + float ShortBreakEvery; + float ShortBreakEveryDeviation; + float ShortBreakFor; + float ShortBreakForDeviation; + bool LongBreakEnabled; + float LongBreakEvery; + float LongBreakEveryDeviation; + float LongBreakFor; + float LongBreakForDeviation; +} PlayerProfile; + +Timer GetScriptTimer(); +void SetScriptInfo(ScriptInfo); +void GetScriptInfo(ScriptInfo&); +void SetPlayerProfile(PlayerProfile); +void RequestArgument(std::string Argument, std::string Description); +std::vector GetArguments(); +std::vector GetArgumentDescriptions(); +void SetArgument(std::string Argument, std::string Value); +std::string GetArgument(std::string Argument); +std::uint32_t GetLoopDelay(); +void SetLoopDelay(std::uint32_t Delay); + +#endif // SCRIPT_HPP_INCLUDED diff --git a/Include/Core/Time.hpp b/Include/Core/Time.hpp new file mode 100644 index 0000000..113d904 --- /dev/null +++ b/Include/Core/Time.hpp @@ -0,0 +1,18 @@ +#ifndef TIME_HPP_INCLUDED +#define TIME_HPP_INCLUDED + +#include +#include + +/** @addtogroup Time +* @{ */ + +void Wait(std::int64_t Duration); +std::uint64_t CurrentTimeMillis(); +std::uint64_t CurrentTimeNanos(); +bool WaitFunc(std::uint32_t Duration, std::uint32_t Step, std::function Func); +bool WaitFunc(std::uint32_t Duration, std::uint32_t Step, std::function Func, bool Result); + +/** @} */ + +#endif // TIME_HPP_INCLUDED diff --git a/Include/Core/Types/Area.hpp b/Include/Core/Types/Area.hpp new file mode 100644 index 0000000..8045d17 --- /dev/null +++ b/Include/Core/Types/Area.hpp @@ -0,0 +1,84 @@ +#ifndef AREA_HPP_INCLUDED +#define AREA_HPP_INCLUDED + +#include "Tile.hpp" +#include "Convex.hpp" +#include +#include + +/** @addtogroup Types +* @{ */ +class Area : public Convex +{ + public: + /** + * @brief The Plane the Area is located on + * @par Description + * The Plane the Area is located on + */ + std::int32_t Plane; + + /** + * @brief Default Constructor, constructs an Area with -1 as the TopLeft and BottomRight Tile + * @par Description + * Default Constructor, constructs an Area with -1 as the TopLeft and BottomRight Tile + */ + Area(); + /** + * @brief Constructs an Area based on a TopLeft tile and a BottomRight tile, sets the internal Plane to the plane of the TopLeft tile + * @param Tile TopLeft Top Left tile of the Area + * @param Tile BottomRight Bottom Right tile of the Area + */ + Area(Tile TopLeft, Tile BottomRight); + /** + * @brief Constructs an Area based on a TopLeft tile and a BottomRight tile, sets the internal Plane to the plane of the TopLeft tile + * @param std::vector TileVertices + */ + Area(std::vector TileVertices); + /** + * @brief Constructs an Area, by copying another + * @param const Area& A The Area to "copy" + */ + Area(const Area& A); + + /** + * @brief Returns True if the Area contains a Tile, does check the Tiles Plane + * @return True if the Area contains a Tile, does check the Tiles Plane + * @par Example + * @code + * Area A(Tile(100, 100, 0), Tile(200, 200, 0)); + * Debug::Info << A.contains(Tile(150, 150, 0)); + * @endcode + */ + bool Contains(const Tile& T) const; + /** + * @brief Returns the middle Tile of the Area + * @return The middle Tile of the Area + * @par Example + * @code + * Area A(Tile(100, 100, 0), Tile(200, 200, 0)); + * Debug::Info << A.GetMiddle()); + * @endcode + */ + Tile GetMiddle() const; + /** + * @brief Returns a random Tile using Hybrid Distribution + * @return A random Tile using Hybrid Distribution + * @par Example + * @code + * Area A(Tile(100, 100, 0), Tile(200, 200, 0)); + * Debug::Info << A.GetHybridRandomTile(0.20, 0.20, 0.50, false)); + * @endcode + * @see @ref HybridRandomDocs + * @see @ref MissChanceFollowupDocs + */ + Tile GetHybridRandomTile(double ProbabilityX, double ProbabilityY, double StandardDeviationX, double StandardDeviationY, bool CheckMissFollowupChance = true) const; + + friend std::ostream& operator<<(std::ostream& OS, const Area& A); + + ~Area(); +}; + +/** @} */ + +#endif // AREA_HPP_INCLUDED diff --git a/Include/Core/Types/Box.hpp b/Include/Core/Types/Box.hpp new file mode 100644 index 0000000..96670d2 --- /dev/null +++ b/Include/Core/Types/Box.hpp @@ -0,0 +1,159 @@ +#ifndef BOX_HPP_INCLUDED +#define BOX_HPP_INCLUDED + +#include +#include +#include "Point.hpp" + +class Point; + +/** @addtogroup Types +* @{ */ +class Box +{ + public: + /** + * @brief The X of where the Box starts + * @par Description + * The X of where the Box starts + */ + std::int32_t X; + /** + * @brief The Y of where the Box starts + * @par Description + * The Y of where the Box starts + */ + std::int32_t Y; + /** + * @brief The Width of the Box + * @par Description + * The Width of the Box + */ + std::int32_t Width; + /** + * @brief The Height of the Box + * @par Description + * The Height of the Box + */ + std::int32_t Height; + + /** + * @brief Default Constructor, constructs a Box with -1 as the X, Y, Width, and Height + * @par Description + * Default Constructor, constructs a Box with -1 as the X, Y, Width, and Height + */ + Box(); + /** + * @brief Constructs a Box based on X, Y, Width, and Height + * @param std::int32_t X The X of where the Box begins + * @param std::int32_t Y The Y of where the Box begins + * @param std::int32_t Width The Width of the Box to be constructed + * @param std::int32_t Height The Height of the Box to be constructed + */ + Box(std::int32_t X, std::int32_t Y, std::int32_t Width, std::int32_t Height); + /** + * @brief Constructs a Box, by copying another + * @param const Box& B The Box to "copy" + */ + Box(const Box& B); + + /** + * @brief Returns a random Point using Uniform Distribution + * @return A random Point using Uniform Distribution + * @see @ref UniformRandomDocs + * @see @ref MissChanceFollowupDocs + */ + Point GetUniformRandomPoint() const; + /** + * @brief Returns a random Point using Binomial Distribution + * @return A random Point using Binomial Distribution + * @see @ref BinomialRandomDocs + * @see @ref MissChanceFollowupDocs + */ + Point GetBinomialRandomPoint(double ProbabilityX, double ProbabilityY) const; + /** + * @brief Returns a random Point using Normal Distribution + * @return A random Point using Normal Distribution + * @see @ref NormalRandomDocs + * @see @ref MissChanceFollowupDocs + */ + Point GetNormalRandomPoint(double PercentageDeviationX, double PercentageDeviationY) const; + /** + * @brief Returns a random Point using Hybrid Distribution + * @return A random Point using Hybrid Distribution + * @see @ref HybridRandomDocs + * @see @ref MissChanceFollowupDocs + */ + Point GetHybridRandomPoint(double ProbilityX, double ProbilityY, double StandardDeviationX, double StandardDeviationY, bool CheckMissFollowupChance = true) const; + + /** + * @brief Returns True if the Box contains a Point + * @return True if the Box contains a Point + * @par Example + * @code + * Box B(25, 25, 100, 100); + * Debug::Info << B.contains(Point(30, 30)); + * @endcode + */ + bool Contains(Point P) const; + /** + * @brief Returns True if the Box contains both X, and Y + * @return True if the Box contains both X, and Y + * @par Example + * @code + * Box B(25, 25, 100, 100); + * Debug::Info << B.contains(30, 30); + * @endcode + */ + bool Contains(std::int32_t X, std::int32_t Y) const; + /** + * @brief Returns True if the Box contains another Box + * @return True if the Box contains another Box + * @par Example + * @code + * Box A(25, 25, 100, 100); + * Box B(30, 30, 10, 10); + * Debug::Info << A.contains(B); + * @endcode + */ + bool Contains(Box Box) const; + /** + * @brief Returns the X2 of the Box + * @return The X2 of the Box + * @par Example + * @code + * Box B(25, 25, 100, 100); + * Debug::Info << B.GetX2() << ", " << B.GetY2(); + * @endcode + */ + std::int32_t GetX2() const; + /** + * @brief Returns the Y2 of the Box + * @return The Y2 of the Box + * @par Example + * @code + * Box B(25, 25, 100, 100); + * Debug::Info << B.GetX2() << ", " << B.GetY2(); + * @endcode + */ + std::int32_t GetY2() const; + /** + * @brief Returns True if the Box is within the bounds of Client Canvas + * @return True if the Box is within the bounds of Client Canvas + */ + bool OnScreen() const; + /** + * @brief Returns True if the Box's X, Y, Width, and Height are greater than greater than or equal to 0 + * @return True if the Box's X, Y, Width, and Height are greater than or equal to 0 + */ + bool IsValid() const; + bool operator==(const Box& B) const; + bool operator!=(const Box& B) const; + friend std::ostream& operator<<(std::ostream& OS, const Box& B); + operator bool() const; + ~Box(); +}; + +/** @} */ + +#endif // BOX_HPP_INCLUDED diff --git a/Include/Core/Types/Convex.hpp b/Include/Core/Types/Convex.hpp new file mode 100644 index 0000000..52e011c --- /dev/null +++ b/Include/Core/Types/Convex.hpp @@ -0,0 +1,67 @@ +#ifndef CONVEX_HPP_INCLUDED +#define CONVEX_HPP_INCLUDED + +#include +#include "Point.hpp" +#include "Box.hpp" + +/** @addtogroup Types +* @{ */ +class Convex +{ + public: + std::vector Vertices; + + /** + * @brief Default Constructor, constructs a Convex with null Vertices + * @par Description + * Default Constructor, constructs a Convex with null Vertices + */ + Convex(); + Convex(std::vector Vertices); + /** + * @brief Constructs a Convex, by copying another + * @param const Convex& C The Convex to "copy" + */ + Convex(const Convex& C); + + /** + * @brief Returns True if the Convex has more than two Vertices + * @return True if the Convex has more than two Vertices + */ + virtual bool Valid() const; + /** + * @brief Returns True if the Convex contains a Point + * @return True if the Convex contains a Point + */ + virtual bool Contains(const Point& P) const; + /** + * @brief Returns the middle Point of the Convex + * @return The middle Point of the Convex + */ + Point GetMiddle() const; + /** + * @brief Returns a Box of the Convex + * @return A Box of the Convex + */ + Box GetBox() const; + /** + * @brief Returns a random Point using Hybrid Distribution + * @return A random Point using Hybrid Distribution + * @see @ref HybridRandomDocs + * @see @ref MissChanceFollowupDocs + */ + Point GetHybridRandomPoint(double ProbabilityX, double ProbabilityY, double StandardDeviationX, double StandardDeviationY, bool CheckMissFollowupChance = true) const; + + Convex operator+(const Point& P) const; + Convex operator-(const Point& P) const; + Convex& operator+=(const Point& P); + Convex& operator-=(const Point& P); + friend std::ostream& operator<<(std::ostream& OS, const Convex& C); + operator bool() const; + virtual ~Convex(); +}; + +/** @} */ + +#endif // CONVEX_HPP_INCLUDED diff --git a/Include/Core/Types/Countdown.hpp b/Include/Core/Types/Countdown.hpp new file mode 100644 index 0000000..c458609 --- /dev/null +++ b/Include/Core/Types/Countdown.hpp @@ -0,0 +1,31 @@ +#ifndef COUNTDOWN_HPP_INCLUDED +#define COUNTDOWN_HPP_INCLUDED + +#include +#include + +/** @addtogroup Types +* @{ */ +class Countdown +{ + public: + Countdown(); + Countdown(std::uint64_t Time); + void Reset(); + void SetTime(std::uint64_t Time); + std::uint64_t GetTimeRemaining() const; + std::uint64_t GetStartTime() const; + bool IsFinished() const; + + friend std::ostream& operator<<(std::ostream& OS, const Countdown& C); + operator bool() const; + + ~Countdown(); + private: + std::uint64_t Time; + std::uint64_t StartTime; +}; + +/** @} */ + +#endif // COUNTDOWN_HPP_INCLUDED diff --git a/Include/Core/Types/Counter.hpp b/Include/Core/Types/Counter.hpp new file mode 100644 index 0000000..6ae960d --- /dev/null +++ b/Include/Core/Types/Counter.hpp @@ -0,0 +1,61 @@ +#ifndef COUNTER_HPP_INCLUDED +#define COUNTER_HPP_INCLUDED + +#include +#include + +/** @addtogroup Types +* @{ */ +/** +* @brief A Counter can be used, well as a Counter. You construct it with MaxIterations, the counter is marked as finished whenever the current Iterations reach, or exceed MaxIterations. +* You can use @ref Increment to increase, and @ref Reset to reset the current Iterations. +* You can also use @ref IsFinished to check the current state of the Counter. +*/ +class Counter +{ + public: + /** + * @brief Default Counter constructor with MaxIterations as 0 + */ + Counter(); + /** + * @brief Constructs a Counter with + * @param std::int32_t MaxIterations Maximum amount of Iterations before the counter is Finished + */ + Counter(std::int32_t MaxIterations); + /** + * @brief Resets the Counter's current Iterations to 0 + * @par Description + * Resets the Counter's current Iterations to 0 + */ + void Reset(); + /** + * @brief Increases the Counter's current Iterations by Amount, and returns true if the Counter isn't Finished + * @return True if the Counter isn't Finished, after it increments the Counter's current Iterations + */ + bool Increment(std::int32_t Amount = 1); + /** + * @brief Returns True if the Counter's current Iterations equals the MaxIterations Paramater passed in the Constructor + * @return True if the Counter's current Iterations equals the MaxIterations Paramater passed in the Constructor + */ + bool IsFinished() const; + /** + * @brief Returns the Counter's current Iterations + * @return Returns the Counter's current Iterations + */ + std::int32_t GetIterations() const; + /** + * @brief Returns the Counter's maximum Iterations + * @return Returns the Counter's maximum Iterations + */ + std::int32_t GetMaxIterations() const; + friend std::ostream& operator<<(std::ostream& OS, const Counter& C); + ~Counter(); + private: + std::int32_t MaxIterations; + std::int32_t Iterations; +}; + +/** @} */ + +#endif // COUNTER_HPP_INCLUDED diff --git a/Include/Core/Types/Logger.hpp b/Include/Core/Types/Logger.hpp new file mode 100644 index 0000000..0d50685 --- /dev/null +++ b/Include/Core/Types/Logger.hpp @@ -0,0 +1,55 @@ +#ifndef LOGGER_HPP_INCLUDED +#define LOGGER_HPP_INCLUDED + +#include +#include + +/** @addtogroup Types +* @{ */ +class Logger : public std::ostream, public std::streambuf +{ + public: + /** + * @brief Constructs a Logger, with a Prefix + * @param std::string Prefix The Prefix that's added before a message + * @param bool Enabled Enabled the printing of output sent to the logger, if false no output will be printed + * @par Detailed Description + * Loggers can be used to make it easier to identify whats what in the Log. + * We urge you to instead use our default Loggers, for sake of consistency, however we will not keep you from using the Logger class. + * You will need to add whitespace to the end of a Prefix, if you want to space out the Prefix and the Message. + * @par Example + * @code + * Logger LevelUp("[LEVEL] Gained a Level Up in the Skill"); + * LevelUp << "Mining" << std::endl; + * @endcode + */ + Logger(std::string Prefix, bool Enabled = true); + /** + * @brief Constructs a Logger, with a function pointer that returns a String + * @param std::string (*Func)() Prefix The Prefix that's added before a message + * @param bool Enabled Enabled the printing of output sent to the logger, if false no output will be printed + */ + Logger(std::string (*Func)(), bool Enabled = true); + /** + * @brief Sets the Enabled state of a logger + * @par Description + * Toggles the state of Enabled in a logger + */ + void SetEnabled(bool Toggle); + /** + * @brief Returns True if the Logger is Enabled + * @return True if the Logger is Enabled + */ + bool IsEnabled() const; + virtual std::streambuf::int_type overflow(std::streambuf::int_type Char = std::streambuf::traits_type::eof()); + ~Logger(); + private: + std::string Prefix = ""; + std::string (*FuncPtr)() = nullptr; + bool Enabled; + bool NewLine = true; +}; + +/** @} */ + +#endif // LOGGER_HPP_INCLUDED diff --git a/Include/Core/Types/Point.hpp b/Include/Core/Types/Point.hpp new file mode 100644 index 0000000..9823ec0 --- /dev/null +++ b/Include/Core/Types/Point.hpp @@ -0,0 +1,87 @@ +#ifndef POINT_HPP_INCLUDED +#define POINT_HPP_INCLUDED + +#include +#include "Box.hpp" + +class Box; + +/** @addtogroup Types +* @{ */ +class Point +{ + public: + /** + * @brief The X of the Point + * @par Description + * The X of the Point + */ + std::int32_t X; + /** + * @brief The Y of the Point + * @par Description + * The Y of the Point + */ + std::int32_t Y; + + /** + * @brief Default Constructor, constructs a Point with -1 as the X, Y, and Plane + * @par Description + * Default Constructor, constructs a Point with -1 as the X, Y, and Plane + */ + Point(); + /** + * @brief Constructs a Point based on an X and Y + * @param std::int32_t X The X of the Point + * @param std::int32_t Y The Y of the Point + */ + Point(std::int32_t X, std::int32_t Y); + /** + * @brief Constructs a Point, by copying another + * @param const Point& P The Point to "copy" + */ + Point(const Point& P); + + /** + * @brief Returns the distance from one Point to another + * @return The distance from one Point to another + */ + std::int32_t DistanceFrom(Point P) const; + /** + * @brief Returns True if the Point is inside the passed Box + * @return True if the Point is inside the passed Box + */ + bool InBox(Box B) const; + /** + * @brief Returns True if the Point is inside a Circle defined by a starting Point, and Radius + * @return True if the Point is inside a Circle defined by a starting Point, and Radius + */ + bool InCircle(Point P, std::int32_t Radius) const; + /** + * @brief Returns True if the Point is less than 0, not equal to + * @return True if the Point is less than 0, not equal to + */ + bool IsNegative() const; + /** + * @brief Returns True if the Point is greater than 0, not equal to + * @return True if the Point is greater than 0, not equal to + */ + bool IsPositive() const; + /** + * @brief Returns True if the Point is within the bounds of Client Canvas + * @return True if the Point is within the bounds of Client Canvas + */ + bool OnScreen() const; + bool operator==(const Point& P) const; + bool operator!=(const Point& P) const; + Point operator+(const Point& P) const; + Point operator-(const Point& P) const; + Point& operator+=(const Point& P); + Point& operator-=(const Point& P); + friend std::ostream& operator<<(std::ostream& OS, const Point& P); + ~Point(); +}; + +/** @} */ + +#endif // POINT_HPP_INCLUDED diff --git a/Include/Core/Types/Tile.hpp b/Include/Core/Types/Tile.hpp new file mode 100644 index 0000000..e2be106 --- /dev/null +++ b/Include/Core/Types/Tile.hpp @@ -0,0 +1,72 @@ +#ifndef TILE_HPP_INCLUDED +#define TILE_HPP_INCLUDED + +#include +#include + +/** @addtogroup Types +* @{ */ +class Tile +{ + public: + /** + * @brief The X of the Tile + * @par Description + * The X of the Tile + */ + std::int32_t X; + /** + * @brief The Y of the Tile + * @par Description + * The Y of the Tile + */ + std::int32_t Y; + /** + * @brief The Plane the Tile is on + * @par Description + * The Plane the Tile is on + */ + std::int32_t Plane; + + /** + * @brief Default Constructor, constructs a Tile with -1 as the X, Y, and Plane + * @par Description + * Default Constructor, constructs a Tile with -1 as the X, Y, and Plane + */ + Tile(); + /** + * @brief Constructs a Tile based on an X, Y, and a Plane + * @param std::int32_t X The X of the Tile + * @param std::int32_t Y The Y of the Tile + * @param std::int32_t Y The Plane the Tile is on + */ + Tile(std::int32_t X, std::int32_t Y, std::int32_t Plane); + /** + * @brief Constructs a Tile, by copying another + * @param const Tile& T The Tile to "copy" + */ + Tile(const Tile& T); + /** + * @brief Returns the distance from one Tile to another + * @return The distance from one Tile to another + */ + std::int32_t DistanceFrom(Tile T) const; + /** + * @brief Returns True if the Tile is less than 0, not equal to + * @return True if the Tile is less than 0, not equal to + */ + bool IsNegative() const; + /** + * @brief Returns True if the Tile is greater than 0, not equal to + * @return True if the Tile is greater than 0, not equal to + */ + bool IsPositive() const; + bool operator==(const Tile& T) const; + bool operator!=(const Tile& T) const; + friend std::ostream& operator<<(std::ostream& OS, const Tile& T); + ~Tile(); +}; + +/** @} */ + +#endif // TILE_HPP_INCLUDED diff --git a/Include/Core/Types/Timer.hpp b/Include/Core/Types/Timer.hpp new file mode 100644 index 0000000..eef4861 --- /dev/null +++ b/Include/Core/Types/Timer.hpp @@ -0,0 +1,88 @@ +#ifndef TIMER_HPP_INCLUDED +#define TIMER_HPP_INCLUDED + +#include +#include + +/** @addtogroup Types +* @{ */ +class Timer +{ + public: + + /** + * @brief Constructs a Timer, and optionally starts it + * @param bool Start + * @par Description + * Constructs a Timer, and starts it + */ + Timer(bool Start = true); + + /** + * @brief Restarts the Timer + * @par Detailed Description + * Sets the Timer start time to the current time + */ + void Restart(); + + /** + * @brief Increases the Timer's elapsed time by MS + * @return Returns the Time's elapsed time by MS + * @par Description + * Increases the Timer's elapsed time by MS + */ + std::int64_t FastForward(std::uint32_t Duration); + + /** + * @brief Decreases the Timer's elapsed time by MS + * @return Returns the Time's elapsed time by MS + * @par Description + * Decreases the Timer's elapsed time by MS + */ + std::int64_t Rewind(std::uint32_t Duration); + + /** + * @brief Pauses the Timer + * @return Returns the Time's elapsed time by MS + * @par Description + * Pauses the Timer + */ + std::int64_t Suspend(); + + /** + * @brief Resumes the Timer + * @return Returns the Timer's elapsed time by MS + * @par Description + * Resumes the Timer + */ + std::int64_t Resume(); + + /** + * @brief Returns when the Timer started, in MS + * @return When the Timer started, in MS + */ + std::uint64_t GetStartTime() const; + + /** + * @brief Returns the Timer's elapsed Time, in MS + * @return The Timer's elapsed Time, in MS + */ + std::int64_t GetTimeElapsed() const; + + /** + * @brief Returns True if the Timer is currently Paused + * @return True if the Timer is currently Paused + */ + bool Paused() const; + + friend std::ostream& operator<<(std::ostream& OS, const Timer& T); + ~Timer(); + private: + std::uint64_t StartTime; + std::uint64_t PauseTime; + std::int64_t Offset; +}; + +/** @} */ + +#endif // TIMER_HPP_INCLUDED diff --git a/Include/Game/Core.hpp b/Include/Game/Core.hpp new file mode 100644 index 0000000..3942adb --- /dev/null +++ b/Include/Game/Core.hpp @@ -0,0 +1,166 @@ +#ifndef CORE_HPP_INCLUDED +#define CORE_HPP_INCLUDED + +#include "../Core/Internal.hpp" + +#include "Tools/BreakHandler.hpp" +#include "Tools/Interact.hpp" +#include "Tools/Profile.hpp" +#include "Tools/Settings.hpp" +#include "Tools/Widgets.hpp" +#include "Tools/Worlds.hpp" + +#include "Interfaces/Bank.hpp" +#include "Interfaces/Chat.hpp" +#include "Interfaces/DepositBox.hpp" +#include "Interfaces/Login.hpp" +#include "Interfaces/Mainscreen.hpp" +#include "Interfaces/Menu.hpp" +#include "Interfaces/Minimap.hpp" +#include "Interfaces/GameTabs/Clan.hpp" +#include "Interfaces/GameTabs/Combat.hpp" +#include "Interfaces/GameTabs/Emotes.hpp" +#include "Interfaces/GameTabs/Equipment.hpp" +#include "Interfaces/GameTabs/Friends.hpp" +#include "Interfaces/GameTabs/Ignores.hpp" +#include "Interfaces/GameTabs/Inventory.hpp" +#include "Interfaces/GameTabs/Logout.hpp" +#include "Interfaces/GameTabs/Magic.hpp" +#include "Interfaces/GameTabs/Music.hpp" +#include "Interfaces/GameTabs/Options.hpp" +#include "Interfaces/GameTabs/Prayer.hpp" +#include "Interfaces/GameTabs/Quests.hpp" +#include "Interfaces/GameTabs/Stats.hpp" + +#include "Models/SceneObjects.hpp" +#include "Models/GroundItems.hpp" +#include "Models/NPCs.hpp" +#include "Models/Players.hpp" + +// +// DoxyGen +//======================================================= +// Pages +//======================================================= +/** +* @mainpage +* Mainpage Docs +* +* @page About About +* About +* +* @page GettingStarted Getting Started +* Getting Started +* +* @page RandomMethodDocs Random Distribution Methods +* @tableofcontents +* @section UniformRandomDocs Uniform Random Distribution +* Uniform Random Documentation +* @section BinomialRandomDocs Binomial Random Distribution +* Binomial Random Documentation +* @section NormalRandomDocs Normal Random Distribution +* Normal Random Documentation +* @section HybridRandomDocs Hybrid Random Distribution +* Hybrid Random Documentation +* @section MissChanceFollowupDocs MissChanceFollowup +* MissChanceFollowupDocs +* +* @page DetailedFuncDocs Detailed Function Documentation +* @tableofcontents +* @section ItemContainers Item Containers +* @subsection ICUsing Using Item Containers +* @subsection ICLibFunctions Lib functions that use an Internal Item Container +* Some classes have functions that Interface a class-related Item Container, an example +* being Bank::GetItemIDs(), which return an array of all ItemIDs found in the Bank Item Container. These interfaced-functions +* can be found in @ref Bank, @ref Inventory, and @ref Equipment +* +* Element positions in the returned arrays (ItemIDs, ItemNames, ItemAmounts) almost always correspond to their positions in the +* visual Game Interface. If there isn't an Item in a Container position, it's -1 for ItemIDs and Amounts, and simply a blank +* String ("") for ItemNames. Remember, arrays in C++ start at 0. +* +* Classes that Interface an Item Container will have a GetIndexOf() function, @ref Inventory::GetIndexOf() and +* @ref Bank::GetIndexOf() are examples. These two functions will return the Index of the passed Item (By ID, or Name) +* relative to the Item Container array, for example if Coins are in Inventory slot 5, using @ref Inventory::GetIndexOf("Coins") +* should return 4. +* +* Here is a more extensive example, where we grab the Item amount of Coins in our Inventory; +* +* @code +* std::int32_t CoinsIndex = Inventory::GetIndexOf("Coins"); +* std::vector Amounts = Inventory::GetItemAmounts(); +* if ((CoinsIndex != -1) && (CoindsIndex <= Amounts.size())) //A range check will never hurt +* { +* std::cout << "Coins has an Index of " << CoinsIndex << " relative to the Inventory Item Container Array" << std::endl; +* std::cout << "There are " << Amounts[Index] << " coins in our Inventory" << std::endl; +* } +* @endcode +* +* Here is a list of all class functions that Interface an internally-used Item Container. +* - Item IDs +* - @ref Bank::GetItemIDs() +* - @ref Inventory::GetItemIDs() +* - @ref Equipment::GetItemIDs() +* . +* - Item Names +* - @ref Bank::GetItemNames() +* - @ref Inventory::GetItemNames() +* - @ref Equipment::GetItemNames() +* . +* - Item Amounts +* - @ref Bank::GetItemAmounts() +* - @ref Inventory::GetItemAmounts() +* - @ref Equipment::GetItemAmounts() +* . +* @subsection Examples +* +*/ +//======================================================= +// Groups +//======================================================= +/** +* @defgroup Core Core +* +* @defgroup Types Types +* @brief @b Types Module +* @ingroup Core +* +* @defgroup Math Math +* @brief @b Math Module +* @ingroup Core +* +* @defgroup Time Time +* @brief @b Time Module +* @ingroup Core +* +* @defgroup Game Game +* +* @defgroup Interfaces Interfaces +* @brief @b Interfaces Module +* @ingroup Game +* +* @defgroup Models Models +* @brief @b Models Module +* @ingroup Game +* +* @defgroup Tools Tools +* @brief @b Tools Module +* @ingroup Game +* +*/ +//======================================================= +// SubGroups +//======================================================= +/** +* @defgroup GameTabs GameTabs +* @brief @b GameTabs Module +* @ingroup Interfaces +* +**/ +//======================================================= +// Examples +//======================================================= +/** +* @example ScriptExample.cpp +**/ + +#endif // CORE_HPP_INCLUDED diff --git a/Include/Game/Interfaces/Bank.hpp b/Include/Game/Interfaces/Bank.hpp new file mode 100644 index 0000000..0e795e0 --- /dev/null +++ b/Include/Game/Interfaces/Bank.hpp @@ -0,0 +1,263 @@ +#ifndef BANK_HPP_INCLUDED +#define BANK_HPP_INCLUDED + +#include "../../Core/Types/Convex.hpp" +#include +#include +#include + +/** @addtogroup Interfaces +* @{ */ +/** +* @note All methods require the Bank to be currently Open to successfully return a proper result +*/ +class Bank +{ + public: + /** + * @brief Returns True if the Bank is currently Open + * @return True if the Bank is currently Open + * @par Example + * @code + * if (Bank::IsOpen) + * return Bank::Close(); + * @endcode + */ + static bool IsOpen(); + + /** + * @brief Attempts to Close the Bank if it's Currently Open, returns True if the Bank is currently Closed + * @return Returns True if the is successfully Closed, or the Bank is already Closed + * @par Example + * @code + * if (Bank::IsOpen) + * return Bank::Close(); + * @endcode + */ + static bool Close(); + + /** + * @brief Returns an array of all Item IDs in the Bank Inventory Container + * @return An array of all Item IDs in the Bank Inventory Container + * @par Example + * @code + * std::int32_t Index = Bank::GetIndexOf(995); + * std::vector BankContainerItemIDs = Bank::GetItemIDs(); + * if ((Index != -1) && (Index <= BankContainerItemIDs.size())) + * std::cout << "Item with ID " << BankContainerItemIDs[Index] << " is in the " << Index << "th position in Bank" << std::endl; + * @endcode + * @see @ref ICLibFunctions + */ + static std::vector GetItemIDs(); + /** + * @brief Returns an array of all Item Names in the Bank Inventory Container + * @return An array of all Item Names in the Bank Inventory Container + * @par Example + * @code + * std::int32_t Index = Bank::GetIndexOf("Coins"); + * std::vector BankContainerItemNames = Bank::GetItemNames(); + * if ((Index != -1) && (Index <= BankContainerItemNames.size())) + * std::cout << "Item with Name " << BankContainerItemNames[Index] << " is in the " << Index << "th position in Bank" << std::endl; + * @endcode + * @see @ref ICLibFunctions + */ + static std::vector GetItemNames(); + /** + * @brief Returns an array of all Item Names in the Bank Inventory Container + * @return An array of all Item Names in the Bank Inventory Container + * @par Example + * @code + * std::int32_t Index = Bank::GetIndexOf("Coins"); + * std::vector BankContainerItemNames = Bank::GetItemNames(); + * if ((Index != -1) && (Index <= BankContainerItemNames.size())) + * std::cout << "Item with Name " << BankContainerItemNames[Index] << " is in the " << Index << "th position in Bank" << std::endl; + * @endcode + * @see @ref ICLibFunctions + */ + static std::vector GetItemAmounts(); + + /** + * @brief Returns the total Item Amount of the specified Item matching the passed ID in the Bank + * @return The total Item Amount of the specified Item matching the passed ID in the Bank + * @par Example + * @code + * if (Bank::GetItemAmount(995) <= 100000) + * return false; + * @endcode + */ + static std::int32_t GetItemAmount(std::int32_t ID); + + /** + * @brief Returns the total Item Amount of the specified Item matching the passed Name in the Bank + * @return The total Item Amount of the specified Item matching the passed Name in the Bank + * @par Example + * @code + * if (Bank::GetItemAmount(995) <= 100000) + * return false; + * @endcode + */ + static std::int32_t GetItemAmount(const std::string& Name); + + /** + * @brief Returns the Index of the first occurrence of the specified Item matching the passed ID in the GetItemIDs() array + * @return The Index of the first occurrence of the specified Item matching the passed ID in the GetItemIDs() array + * @note Returns -1 if no occurrence of the specified Item matching the passed ID is found in the GetItemIDs() array + */ + static std::int32_t GetIndexOf(std::int32_t ID); + + /** + * @brief Returns the Index of the first occurrence of the specified Item matching the passed Name in the GetItemIDs() array + * @return The Index of the first occurrence of the specified Item matching the passed Name in the GetItemIDs() array + * @note Returns -1 if no occurrence of the specified Item matching the passed Name is found in the GetItemIDs() array + */ + static std::int32_t GetIndexOf(const std::string& Name); + + static Convex GetConvexOf(std::int32_t ID); + static Convex GetConvexOf(const std::string& Name); + + + /** + * @brief Returns True if the Bank contains the specified Item matching the passed ID + * @return True if the Bank contains the specified Item matching the passed ID + * @par Example + * @code + * if (Bank::Contains(995)) + * return Bank::WithdrawAllOf(995); + * @endcode + */ + static bool Contains(std::int32_t ID); + + /** + * @brief Returns True if the Bank contains the specified Item matching the passed Name + * @return True if the Bank contains the specified Item matching the passed Name + * @par Example + * @code + * if (Bank::Contains("Coins")) + * return Bank::WithdrawAllOf("Coins"); + * @endcode + */ + static bool Contains(const std::string& Name); + + /** + * @brief Returns True if the Bank contains any of the specified Item matching the passed IDs + * @return True if the Bank contains any of the specified Item matching the passed IDs + * @par Example + * @code + * if (!Bank::Contains(std::vector { 995, 207, 584 })) + * return false; + * @endcode + */ + static bool Contains(const std::vector& IDs); + + /** + * @brief Returns True if the Bank contains any of the specified Item matching the passed Names + * @return True if the Bank contains any of the specified Item matching the passed Names + * @par Example + * @code + * if (!Bank::Contains(std::vector { "Coins", "Oak Logs", "Air Runes" })) + * return false; + * @endcode + */ + static bool Contains(const std::vector& Names); + + /** + * @brief Returns the currently active Bank Tab + * @return The currently active Bank Tab + * @note Returns -1 if no currently active Bank Tab is found + * @par Example + * @code + * if (Bank::GetCurrentTab() == 0) + * Debug("The All tab is open"); + * @endcode + */ + static std::int32_t GetCurrentTab(); + + /** + * @brief Returns the Tab Index of the specified Item matching the passed ID + * @return The Tab Index of the specified Item matching the passed ID + * @par Example + * @code + * std::int32_t TabWithCoins = Bank::GetTabOf(995); + * if (Bank::GetCurrentTab() != TabWithCoins) + * return Bank::OpenTab(TabWithCoins); + * @endcode + */ + static std::int32_t GetTabOf(std::int32_t ID); + + /** + * @brief Returns the Tab Index of the specified Item Name + * @return The Tab Index of the specified Item Name + * @par Example + * @code + * std::int32_t TabWithCoins = Bank::GetTabOf("Coins"); + * if (Bank::GetCurrentTab() != TabWithCoins) + * return Bank::OpenTab(TabWithCoins); + * @endcode + */ + static std::int32_t GetTabOf(const std::string& Name); + + /** + * @brief Attempts to Open the specified Bank Tab, 0 being all items + * @return True if it successfully opens the specified Bank Tab + * @par Example + * @code + * if ((Bank::IsOpen()) && (Bank::GetCurrentTab() != 0)) + * return Bank::OpenTab(0); + * @endcode + */ + static bool OpenTab(std::int32_t Tab); + + /** + * @brief Attempts to Scroll to the specified Item matching the passed ID + * @return True if it successfully scrolls to the specified Item matching the passed ID + * @note Returns True if the Item is already in view + * @par Example + * @code + * if (Bank::Contains(995)) + * return Bank::ScrolTo(995); + * @endcode + */ + static bool ScrollTo(std::int32_t ID); + + /** + * @brief Attempts to Scroll to the specified Item matching the passed Name + * @return True if it successfully scrolls to the specified Item matching the passed Name + * @note Returns True if the Item is already in view + * @par Example + * @code + * if (Bank::Contains("Coins")) + * return Bank::ScrolTo("Coins"); + * @endcode + */ + static bool ScrollTo(const std::string& Name); + /** + * @brief Attempts to Scroll to the specified Item matching the passed Name, and optionally Opens the Tab + * @return True if it successfully scrolls to the specified Item matching the passed Name + * @note Returns True if the Item is already in view + * @par Example + * @code + * if (Bank::Contains("Coins")) + * return Bank::ScrolTo("Coins"); + * @endcode + */ + static bool ScrollTo(std::int32_t ID, bool OpenTab); + static bool ScrollTo(const std::string& Name, bool OpenTab); + + static bool WithdrawAllOf(std::int32_t ID); + static bool WithdrawAllOf(const std::string& Name); + static bool WithdrawXOf(std::int32_t ID, std::int32_t Amount); + static bool WithdrawXOf(const std::string& Name, std::int32_t Amount); + static bool WithdrawAllButOneOf(std::int32_t ID); + static bool WithdrawAllButOneOf(const std::string& Name); + + static bool DepositAllOf(std::int32_t ID); + static bool DepositAllOf(const std::string& Name); + static bool DepositXOf(std::int32_t ID, std::int32_t Amount); + static bool DepositXOf(const std::string& Name, std::int32_t Amount); + static bool DepositAll(); + static bool DepositEquipment(); +}; + +/** @} */ + +#endif // BANK_HPP_INCLUDED diff --git a/Include/Game/Interfaces/Chat.hpp b/Include/Game/Interfaces/Chat.hpp new file mode 100644 index 0000000..95f3193 --- /dev/null +++ b/Include/Game/Interfaces/Chat.hpp @@ -0,0 +1,66 @@ +#ifndef CHAT_HPP_INCLUDED +#define CHAT_HPP_INCLUDED + +#include "../../Core/Classes/MessageNode.hpp" +#include +#include +#include + +/** @addtogroup Interfaces +* @{ */ +class Chat +{ + + public: + + typedef enum DIALOGUE_STATE + { + IDLE, + CLICK_CONTINUE, + SELECT_OPTION, + ENTER_AMOUNT + } DIALOGUE_STATE; + + typedef enum CHAT_TYPE + { + SYSTEM = 200, + PUBLIC_CHAT = 201, + PRIVATE_CHAT = 202, + CLAN_CHAT = 203, + + _SYSTEM = 0, + _PUBLIC_CHAT = 2, + _PRIVATE_CHAT_INCOMING = 3, + _PRIVATE_CHAT_SYSTEM = 5, + _PRIVATE_CHAT_OUTGOING = 6, + _CLAN_CHAT = 9, + _CLAN_CHAT_SYSTEM = 11, + _BROADCAST_SYSTEM = 14, + _EXAMINE_ITEM = 27, + _EXAMINE_NPC = 28, + _EXAMINE_GAMEOBJECT = 29, + _PRIVATE_CHAT_SYSTEM2 = 30, + _AUTO_CHAT = 90, + _TRADE_INCOMING = 101, + _TRADE = 102 + } CHAT_TYPE; + + + static std::vector GetMessages(CHAT_TYPE Type); + static std::vector GetMessages(CHAT_TYPE Type, bool Sort); + static MessageNode GetLastMessage(CHAT_TYPE Type); + + static DIALOGUE_STATE GetDialogueState(); + static std::vector GetDialogueOptions(); + static std::string GetDialogueTitle(); + static std::string GetDialogueMessage(); + static bool ClickContinue(); + static bool EnterAmount(std::int32_t Amount); + static bool SelectDialogueOption(const std::string& Option); + static bool SelectDialogueOption(const std::vector& Options); + static bool SelectDialogueOption(std::uint32_t OptionIndex); +}; + +/** @} */ + +#endif // CHAT_HPP_INCLUDED diff --git a/Include/Game/Interfaces/DepositBox.hpp b/Include/Game/Interfaces/DepositBox.hpp new file mode 100644 index 0000000..6fd48b1 --- /dev/null +++ b/Include/Game/Interfaces/DepositBox.hpp @@ -0,0 +1,19 @@ +#ifndef DEPOSITBOX_HPP +#define DEPOSITBOX_HPP + +/** @addtogroup Interfaces +* @{ */ +class DepositBox +{ + public: + static bool IsOpen(); + static bool Close(); + + static bool DepositAll(); + static bool DepositEquipment(); + static bool DepositLoot(); +}; + +/** @} */ + +#endif // DEPOSITBOX_HPP diff --git a/Include/Game/Interfaces/GameTabs/Clan.hpp b/Include/Game/Interfaces/GameTabs/Clan.hpp new file mode 100644 index 0000000..3aaac56 --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Clan.hpp @@ -0,0 +1,21 @@ +#ifndef CLAN_HPP_INCLUDED +#define CLAN_HPP_INCLUDED + +#include "../../../Core/Classes/ClanMember.hpp" +#include +#include + +/** @addtogroup GameTabs +* @{ */ +class Clan +{ + public: + static bool IsOpen(); + static bool Open(); + static std::vector GetAll(); + static std::vector GetAll(const std::function& Filter); +}; + +/** @} */ + +#endif // CLAN_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Combat.hpp b/Include/Game/Interfaces/GameTabs/Combat.hpp new file mode 100644 index 0000000..1684322 --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Combat.hpp @@ -0,0 +1,34 @@ +#ifndef COMBAT_HPP_INCLUDED +#define COMBAT_HPP_INCLUDED + +#include +#include + +/** @addtogroup GameTabs +* @{ */ +class Combat +{ + public: + static bool IsOpen(); + static bool Open(); + + static std::int32_t GetHealth(); + static std::int32_t GetMaxHealth(); + + static std::int32_t GetSpecialAttack(); + static bool IsSpecialAttacking(); + static bool ToggleSpecialAttack(bool Toggle); + + static bool IsPoisoned(); + static bool HasPoisonImmunity(); + + static bool GetAutoRetaliate(); + static bool ToggleAutoRetaliate(bool Toggle); + + static std::string GetStyle(); + static bool SetStyle(const std::string& Style); +}; + +/** @} */ + +#endif // COMBAT_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Emotes.hpp b/Include/Game/Interfaces/GameTabs/Emotes.hpp new file mode 100644 index 0000000..d222edf --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Emotes.hpp @@ -0,0 +1,15 @@ +#ifndef EMOTES_HPP_INCLUDED +#define EMOTES_HPP_INCLUDED + +/** @addtogroup GameTabs +* @{ */ +class Emotes +{ + public: + static bool IsOpen(); + static bool Open(); +}; + +/** @} */ + +#endif // EMOTES_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Equipment.hpp b/Include/Game/Interfaces/GameTabs/Equipment.hpp new file mode 100644 index 0000000..c1b21cc --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Equipment.hpp @@ -0,0 +1,63 @@ +#ifndef EQUIPMENT_HPP_INCLUDED +#define EQUIPMENT_HPP_INCLUDED + +#include +#include +#include + +/** @addtogroup GameTabs +* @{ */ +class Equipment +{ + public: + typedef enum SLOTS + { + HEAD, + CAPE, + NECK, + WEAPON, + BODY, + SHIELD, + LEGS, + HANDS, + FEET, + RING, + AMMO + } SLOTS; + + static bool IsOpen(); + static bool Open(); + static bool IsEmpty(); + + static std::vector GetItemIDs(); + static std::vector GetItemNames(); + static std::vector GetItemAmounts(); + + static std::int32_t GetItemID(SLOTS Slot); + static std::string GetItemName(SLOTS Slot); + + static std::int32_t GetItemAmount(SLOTS Slot); + static std::int32_t GetItemAmount(std::int32_t ID); + static std::int32_t GetItemAmount(const std::string& Name); + + static SLOTS GetSlotOf(std::int32_t ID); + static SLOTS GetSlotOf(const std::string& Name); + + static bool Contains(std::int32_t ID); + static bool Contains(const std::string& Name); + static bool Contains(const std::vector& IDs); + static bool Contains(const std::vector& Names); + + static bool ContainsOnly(std::int32_t ID); + static bool ContainsOnly(const std::string& Name); + static bool ContainsOnly(const std::vector& IDs); + static bool ContainsOnly(const std::vector& Names); + + static bool UnequipItem(SLOTS Slot); + static bool UnequipItem(std::int32_t ID); + static bool UnequipItem(const std::string& Name); +}; + +/** @} */ + +#endif // EQUIPMENT_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Friends.hpp b/Include/Game/Interfaces/GameTabs/Friends.hpp new file mode 100644 index 0000000..1385621 --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Friends.hpp @@ -0,0 +1,21 @@ +#ifndef FRIENDS_HPP_INCLUDED +#define FRIENDS_HPP_INCLUDED + +#include "../../../Core/Classes/Friend.hpp" +#include +#include + +/** @addtogroup GameTabs +* @{ */ +class Friends +{ + public: + static bool IsOpen(); + static bool Open(); + static std::vector GetAll(); + static std::vector GetAll(const std::function& Filter); +}; + +/** @} */ + +#endif // FRIENDS_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Ignores.hpp b/Include/Game/Interfaces/GameTabs/Ignores.hpp new file mode 100644 index 0000000..22ef5ca --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Ignores.hpp @@ -0,0 +1,21 @@ +#ifndef IGNORES_HPP_INCLUDED +#define IGNORES_HPP_INCLUDED + +#include "../../../Core/Classes/Ignore.hpp" +#include +#include + +/** @addtogroup GameTabs +* @{ */ +class Ignores +{ + public: + static bool IsOpen(); + static bool Open(); + static std::vector GetAll(); + static std::vector GetAll(const std::function& Filter); +}; + +/** @} */ + +#endif // IGNORES_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Inventory.hpp b/Include/Game/Interfaces/GameTabs/Inventory.hpp new file mode 100644 index 0000000..6a17eb9 --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Inventory.hpp @@ -0,0 +1,98 @@ +#ifndef INVENTORY_HPP_INCLUDED +#define INVENTORY_HPP_INCLUDED + +#include "../../../Core/Types/Box.hpp" +#include "../../../Core/Types/Convex.hpp" +#include +#include +#include + +/** @addtogroup GameTabs +* @{ */ +class Inventory +{ + public: + + static bool IsOpen(); + static bool Open(); + + static std::vector GetItemIDs(); + static std::vector GetItemNames(); + static std::vector GetItemAmounts(); + + static std::int32_t GetItemAmount(std::int32_t ID); + static std::int32_t GetItemAmount(const std::string& Name); + + static bool IsEmpty(); + static bool IsFull(); + + static bool IsItemSelected(); + static bool IsItemSelected(std::int32_t ID); + static bool IsItemSelected(const std::string& Name); + + static std::string GetItemSelectedName(); + + static std::int32_t Count(std::int32_t ID); + static std::int32_t Count(const std::string& Name); + static std::int32_t Count(const std::vector& IDs); + static std::int32_t Count(const std::vector& Names); + + static std::int32_t CountOccupied(); + static std::int32_t CountEmpty(); + + static std::int32_t GetIndexOf(std::int32_t ID); + static std::int32_t GetIndexOf(const std::string& Name); + static std::int32_t GetIndexOf(const std::vector& IDs); // Returns first found ID index + static std::int32_t GetIndexOf(const std::vector& Names); // Returns first found Name Index + + static std::vector GetIndicesOf(std::int32_t ID); + static std::vector GetIndicesOf(const std::string& Name); + + static Convex GetConvexOf(std::int32_t SlotIndex); + + static Box GetBoxOf(std::int32_t ID); + static Box GetBoxOf(const std::string& Name); + static Box GetBoxOf(const std::vector& IDs); // Returns first found ID box + static Box GetBoxOf(const std::vector& Names); // Returns first found Name box + + static std::vector GetSlotBoxes(); + static std::vector GetBoxesOf(std::int32_t ID); + static std::vector GetBoxesOf(const std::string& Name); + + static bool Contains(std::int32_t ID); + static bool Contains(const std::string& Name); + static bool Contains(const std::vector& IDs); + static bool Contains(const std::vector& Names); + + static bool ContainsAny(const std::vector& IDs); + static bool ContainsAny(const std::vector& Names); + + static bool ContainsOnly(std::int32_t ID); + static bool ContainsOnly(const std::string& Name); + static bool ContainsOnly(const std::vector& IDs); + static bool ContainsOnly(const std::vector& Names); + + static bool InteractItemByIndex(std::int32_t Index); + static bool InteractItemByIndex(std::int32_t Index, const std::string& Action); + static bool InteractItemByIndex(std::int32_t Index, const std::vector& Actions); + + static bool InteractItem(std::int32_t ID, const std::string& Action = ""); + static bool InteractItem(const std::string& Name, const std::string& Action = ""); + static bool InteractItem(const std::vector& IDs, const std::vector& Actions); //Interacts with first found ID and Action + static bool InteractItem(const std::vector& Names, const std::vector& Actions); //Interacts with first found Name and Action + + static bool DropItemByIndex(std::int32_t Index, bool AllowShiftClick = true); + + static bool DropItem(std::int32_t ID, bool AllowShiftClick = true); + static bool DropItem(const std::string& Name, bool AllowShiftClick = true); + + static bool UseItem(std::int32_t ID); + static bool UseItem(const std::string& Name); + + static bool UseItemOn(std::int32_t PrimaryID, std::int32_t SecondaryID); + static bool UseItemOn(const std::string& PrimaryName, const std::string& SecondaryName); +}; + +/** @} */ + +#endif // INVENTORY_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Logout.hpp b/Include/Game/Interfaces/GameTabs/Logout.hpp new file mode 100644 index 0000000..3b4d7dd --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Logout.hpp @@ -0,0 +1,38 @@ +#ifndef LOGOUT_HPP_INCLUDED +#define LOGOUT_HPP_INCLUDED + +#include "../../../Core/Types/Box.hpp" +#include "../../../Core/Classes/World.hpp" +#include "../../../Core/Classes/Widget.hpp" +#include +#include + +/** @addtogroup GameTabs +* @{ */ +class Logout +{ + public: + static bool IsOpen(); + static bool Open(); + static bool LogoutPlayer(); + + static bool IsWorldSwitcherOpen(); + + static bool OpenWorldSwitcher(); + static bool OpenWorldSwitcher(bool OpenInventory); + + static bool WorldSwitcherScrollTo(World World); + static bool WorldSwitcherScrollTo(std::int32_t WorldID); + + static bool SwitchWorld(World World); + static bool SwitchWorld(std::int32_t WorldID); + + static std::vector GetFavoriteWorlds(); + + static Widget GetWorldWidget(World World); + static Widget GetWorldWidget(std::int32_t WorldID); +}; + +/** @} */ + +#endif // LOGOUT_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Magic.hpp b/Include/Game/Interfaces/GameTabs/Magic.hpp new file mode 100644 index 0000000..c6ccab8 --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Magic.hpp @@ -0,0 +1,172 @@ +#ifndef MAGIC_HPP_INCLUDED +#define MAGIC_HPP_INCLUDED + +#include +#include + +/** @addtogroup GameTabs +* @{ */ +class Magic +{ + public: + + typedef enum SPELLS + { + NORMAL_LUMBRIDGE_HOME_TELEPORT, + NORMAL_WIND_STRIKE, + NORMAL_CONFUSE, + NORMAL_ENCHANT_CROSSBOW_BOLT, + NORMAL_WATER_STRIKE, + NORMAL_LVL1_ENCHANT, + NORMAL_EARTH_STRIKE, + NORMAL_WEAKEN, + NORMAL_FIRE_STRIKE, + NORMAL_BONES_TO_BANANAS, + NORMAL_WIND_BOLT, + NORMAL_CURSE, + NORMAL_BIND, + NORMAL_LOW_LEVEL_ALCHEMY, + NORMAL_WATER_BOLT, + NORMAL_VARROCK_TELEPORT, + NORMAL_LVL2_ENCHANT, + NORMAL_EARTH_BOLT, + NORMAL_LUMBRIDGE_TELEPORT, + NORMAL_TELEKINETIC_GRAB, + NORMAL_FIRE_BOLT, + NORMAL_FALADOR_TELEPORT, + NORMAL_CRUMBLE_UNDEAD, + NORMAL_TELEPORT_TO_HOUSE, + NORMAL_WIND_BLAST, + NORMAL_SUPERHEAT_ITEM, + NORMAL_CAMELOT_TELEPORT, + NORMAL_WATER_BLAST, + NORMAL_LVL3_ENCHANT, + NORMAL_IBAN_BLAST, + NORMAL_SNARE, + NORMAL_MAGIC_DART, + NORMAL_ARDOUGNE_TELEPORT, + NORMAL_EARTH_BLAST, + NORMAL_HIGH_LEVEL_ALCHEMY, + NORMAL_CHARGE_WATER_ORB, + NORMAL_LVL4_ENCHANT, + NORMAL_WATCHTOWER_TELEPORT, + NORMAL_FIRE_BLAST, + NORMAL_CHARGE_EARTH_ORB, + NORMAL_BONES_TO_PEACHES, + NORMAL_SARADOMIN_STRIKE, + NORMAL_CLAWS_OF_GUTHIX, + NORMAL_FLAMES_OF_ZAMORAK, + NORMAL_TROLLHEIM_TELEPORT, + NORMAL_WIND_WAVE, + NORMAL_CHARGE_FIRE_ORB, + NORMAL_TELEPORT_TO_APE_ATOLL, + NORMAL_WATER_WAVE, + NORMAL_CHARGE_AIR_ORB, + NORMAL_VULNERABILITY, + NORMAL_LVL5_ENCHANT, + NORMAL_TELEPORT_TO_KOUREND, + NORMAL_EARTH_WAVE, + NORMAL_ENFEEBLE, + NORMAL_TELEOTHER_LUMBRIDGE, + NORMAL_FIRE_WAVE, + NORMAL_ENTANGLE, + NORMAL_STUN, + NORMAL_CHARGE, + NORMAL_TELEOTHER_FALADOR, + NORMAL_TELE_BLOCK, + NORMAL_TELEPORT_TO_BOUNTY_TARGET, + NORMAL_LVL6_ENCHANT, + NORMAL_TELEOTHER_CAMELOT, + NORMAL_LVL7_ENCHANT, + + LUNAR_LUNAR_HOME_TELEPORT, + LUNAR_BAKE_PIE, + LUNAR_GEOMANCY, + LUNAR_CURE_PLANT, + LUNAR_MONSTER_EXAMINE, + LUNAR_NPC_CONTACT, + LUNAR_CURE_OTHER, + LUNAR_HUMIDIFY, + LUNAR_MOONCLAN_TELEPORT, + LUNAR_TELE_GROUP_MOONCLAN, + LUNAR_CURE_ME, + LUNAR_OURANIA_TELEPORT, + LUNAR_HUNTER_KIT, + LUNAR_WATERBIRTH_TELEPORT, + LUNAR_TELE_GROUP_WATERBIRTH, + LUNAR_CURE_GROUP, + LUNAR_STAT_SPY, + LUNAR_BARBARIAN_TELEPORT, + LUNAR_TELE_GROUP_BARBARIAN, + LUNAR_SPIN_FLAX, + LUNAR_SUPERGLASS_MAKE, + LUNAR_TAN_LEATHER, + LUNAR_KHAZARD_TELEPORT, + LUNAR_TELE_GROUP_KHAZARD, + LUNAR_DREAM, + LUNAR_STRING_JEWELLERY, + LUNAR_STAT_RESTORE_POT_SHARE, + LUNAR_MAGIC_IMBUE, + LUNAR_FERTILE_SOIL, + LUNAR_BOOST_POTION_SHARE, + LUNAR_FISHING_GUILD_TELEPORT, + LUNAR_TELEPORT_TO_BOUNTY_TARGET, + LUNAR_TELE_GROUP_FISHING_GUILD, + LUNAR_PLANK_MAKE, + LUNAR_CATHERBY_TELEPORT, + LUNAR_TELE_GROUP_CATHERBY, + LUNAR_RECHARGE_DRAGONSTONE, + LUNAR_ICE_PLATEAU_TELEPORT, + LUNAR_TELE_GROUP_ICE_PLATEAU, + LUNAR_ENERGY_TRANSFER, + LUNAR_HEAL_OTHER, + LUNAR_VENGEANCE_OTHER, + LUNAR_VENGEANCE, + LUNAR_HEAL_GROUP, + LUNAR_SPELLBOOK_SWAP, + + ANCIENT_ICE_RUSH, + ANCIENT_ICE_BLITZ, + ANCIENT_ICE_BURST, + ANCIENT_ICE_BARRAGE, + ANCIENT_BLOOD_RUSH, + ANCIENT_BLOOD_BLITZ, + ANCIENT_BLOOD_BURST, + ANCIENT_BLOOD_BARRAGE, + ANCIENT_SMOKE_RUSH, + ANCIENT_SMOKE_BLITZ, + ANCIENT_SMOKE_BURST, + ANCIENT_SMOKE_BARRAGE, + ANCIENT_SHADOW_RUSH, + ANCIENT_SHADOW_BLITZ, + ANCIENT_SHADOW_BURST, + ANCIENT_SHADOW_BARRAGE, + ANCIENT_PADDEWWA_TELEPORT, + ANCIENT_SENNTISTEN_TELEPORT, + ANCIENT_KHARYRLL_TELEPORT, + ANCIENT_LASSAR_TELEPORT, + ANCIENT_DAREEYAK_TELEPORT, + ANCIENT_CARRALLANGAR_TELEPORT, + ANCIENT_ANNAKARL_TELEPORT, + ANCIENT_GHORROCK_TELEPORT, + ANCIENT_TELEPORT_TO_BOUNTY_TARGET, + ANCIENT_EDGEVILLE_HOME_TELEPORT + } SPELLS; + + + static bool IsOpen(); + static bool Open(); + + static bool HasLevel(SPELLS Spell); + + static bool IsSpellSelected(); + static bool IsSpellSelected(SPELLS Spell); + static bool IsSpellSelected(const std::string& Name); + static std::string GetSelectedSpellName(); + + static bool SelectSpell(SPELLS Spell); +}; + +/** @} */ + +#endif // MAGIC_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Music.hpp b/Include/Game/Interfaces/GameTabs/Music.hpp new file mode 100644 index 0000000..3caaf63 --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Music.hpp @@ -0,0 +1,15 @@ +#ifndef MUSIC_HPP_INCLUDED +#define MUSIC_HPP_INCLUDED + +/** @addtogroup GameTabs +* @{ */ +class Music +{ + public: + static bool IsOpen(); + static bool Open(); +}; + +/** @} */ + +#endif // MUSIC_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Options.hpp b/Include/Game/Interfaces/GameTabs/Options.hpp new file mode 100644 index 0000000..954382d --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Options.hpp @@ -0,0 +1,21 @@ +#ifndef OPTIONS_HPP_INCLUDED +#define OPTIONS_HPP_INCLUDED + +/** @addtogroup GameTabs +* @{ */ +class Options +{ + public: + static bool IsOpen(); + static bool Open(); + + static bool GetAcceptAid(); + static bool ToggleAcceptAid(bool Toggle); + + static bool GetRunMode(); + static bool ToggleRunMode(bool Toggle); +}; + +/** @} */ + +#endif // OPTIONS_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Prayer.hpp b/Include/Game/Interfaces/GameTabs/Prayer.hpp new file mode 100644 index 0000000..a35e01e --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Prayer.hpp @@ -0,0 +1,58 @@ +#ifndef PRAYER_HPP_INCLUDED +#define PRAYER_HPP_INCLUDED + +#include + +/** @addtogroup GameTabs +* @{ */ +class Prayer +{ + public: + + typedef enum PRAYERS + { + THICK_SKIN, + BURST_OF_STRENGTH, + CLARITY_OF_THOUGHT, + SHARP_EYE, + MYSTIC_WILL, + ROCK_SKIN, + SUPERHUMAN_STRENGTH, + IMPROVED_REFLEXES, + RAPID_RESTORE, + RAPID_HEAL, + PROTECT_ITEM, + HAWK_EYE, + MYSTIC_LORE, + STEEL_SKIN, + ULTIMATE_STRENGTH, + INCREDIBLE_REFLEXES, + PROTECT_FROM_MAGIC, + PROTECT_FROM_MISSILES, + PROTECT_FROM_MELEE, + EAGLE_EYE, + MYSTIC_MIGHT, + RETRIBUTION, + REDEMPTION, + SMITE, + PRESERVE, + CHIVALRY, + PIETY, + RIGOUR, + AUGURY + } PRAYERS; + + static bool IsOpen(); + static bool Open(); + static std::int32_t GetPoints(); + static bool HasLevel(PRAYERS Prayer); + static bool IsActive(PRAYERS Prayer); + static bool WaitPrayer(std::uint32_t Duration, std::uint32_t Step, PRAYERS Prayer, bool Active); + static bool Activate(PRAYERS Prayer); + static bool Deactivate(PRAYERS Prayer); + +}; + +/** @} */ + +#endif // PRAYER_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Quests.hpp b/Include/Game/Interfaces/GameTabs/Quests.hpp new file mode 100644 index 0000000..94d1263 --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Quests.hpp @@ -0,0 +1,15 @@ +#ifndef QUESTS_HPP_INCLUDED +#define QUESTS_HPP_INCLUDED + +/** @addtogroup GameTabs +* @{ */ +class Quests +{ + public: + static bool IsOpen(); + static bool Open(); +}; + +/** @} */ + +#endif // QUESTS_HPP_INCLUDED diff --git a/Include/Game/Interfaces/GameTabs/Stats.hpp b/Include/Game/Interfaces/GameTabs/Stats.hpp new file mode 100644 index 0000000..a602a97 --- /dev/null +++ b/Include/Game/Interfaces/GameTabs/Stats.hpp @@ -0,0 +1,52 @@ +#ifndef STATS_HPP_INCLUDED +#define STATS_HPP_INCLUDED + +#include + +/** @addtogroup GameTabs +* @{ */ +class Stats +{ + public: + + typedef enum SKILLS + { + ATTACK, + DEFENCE, + STRENGTH, + HITPOINTS, + RANGE, + PRAYER, + MAGIC, + COOKING, + WOODCUTTING, + FLETCHING, + FISHING, + FIREMAKING, + CRAFTING, + SMITHING, + MINING, + HERBLORE, + AGILITY, + THIEVING, + SLAYER, + FARMING, + RUNECRAFT, + HUNTER, + CONSTRUCTION + } SKILLS; + + static bool IsOpen(); + static bool Open(); + static std::int32_t GetWeight(); + static std::int32_t GetRunEnergy(); + static std::int32_t GetCurrentLevel(SKILLS Skill); + static std::int32_t GetRealLevel(SKILLS Skill); + static std::int32_t GetExperience(SKILLS Skill); + static std::int32_t GetExperienceTo(SKILLS Skill, std::int32_t Level); + +}; + +/** @} */ + +#endif // STATS_HPP_INCLUDED diff --git a/Include/Game/Interfaces/Login.hpp b/Include/Game/Interfaces/Login.hpp new file mode 100644 index 0000000..86749c9 --- /dev/null +++ b/Include/Game/Interfaces/Login.hpp @@ -0,0 +1,85 @@ +#ifndef LOGIN_HPP_INCLUDED +#define LOGIN_HPP_INCLUDED + +#include "../../Core/Types/Box.hpp" +#include "../../Core/Classes/World.hpp" + +#include +#include +#include + +/** @addtogroup Interfaces +* @{ */ +class Login +{ + public: + + typedef enum LOGIN_STATE + { + WELCOME_SCREEN, + ENTER_CREDENTIALS, + INVALID_CREDENTIALS, + FORGOTTEN_PASSWORD, + RUNESCAPE_UPDATED, + TEMP_BANNED, + PERM_BANNED, + ACCOUNT_LOCKED, + WORLD_SELECT, + CONNECTING, + LOADING, + LOBBY_SCREEN, + LOGGED_IN + } LOGIN_STATE; + + static LOGIN_STATE GetState(); + + static bool IsLoggedIn(); + static bool IsWorldSelectOpen(); + static bool CloseWorldSelect(); + + static std::int32_t LoginPlayer(); + static bool EnterCredentials(); + + static bool SelectWorld(); + static bool SelectWorld(World World); + static bool SelectWorld(std::int32_t WorldID); + static bool OpenWorldSelect(); + static bool OpenWorldSelect(bool Close); + + /** + * @return X of where the login screen starts + */ + static std::int32_t GetScreenX(); + /** + * @return X of where the login window starts + */ + static std::int32_t GetWindowX(); + + /** + * @return current state of the login caret + * 0: Username line; 1: Password line; + */ + static std::int32_t GetCaretState(); + + /** + * @return a vector of login messages + * 0: LoginMessage0; 1: LoginMessage1; 2: LoginMessage2; + */ + static std::vector GetLoginMessages(); + + /** + * @return a vector of button boxes on the login screen + * 0: Existing User; 1: Login; 2: Cancel; 3: Try Again; 4: World Select; 5: World Select Cancel; + */ + static std::vector GetButtonBoxes(); + + /** + * @return a vector of World Boxes found in the World Select screen + */ + static std::vector GetWorldBoxes(); + +}; + +/** @} */ + +#endif // LOGIN_HPP_INCLUDED diff --git a/Include/Game/Interfaces/Mainscreen.hpp b/Include/Game/Interfaces/Mainscreen.hpp new file mode 100644 index 0000000..42991a8 --- /dev/null +++ b/Include/Game/Interfaces/Mainscreen.hpp @@ -0,0 +1,53 @@ +#ifndef MAINSCREEN_HPP_INCLUDED +#define MAINSCREEN_HPP_INCLUDED + +#include "../../Core/Types/Box.hpp" +#include "../../Core/Classes/Character.hpp" +#include +#include +#include + +/** @addtogroup Interfaces +* @{ */ +class Mainscreen +{ + public: + typedef enum SCREEN_STATE + { + LOGIN_SCREEN, + LOBBY_SCREEN, + CONNECTING, + LOADING, + HOPPING, + PLAYING + } SCREEN_STATE; + + static Mainscreen::SCREEN_STATE GetState(); + + static bool IsLoggedIn(); + static bool IsPlaying(); + + static std::string GetUpText(); + static bool UpTextContains(const std::string& UpText); + static bool UpTextContains(const std::vector& UpTexts); + static bool IsUpText(const std::string& UpText); + static bool IsUpText(const std::vector& UpTexts); + static bool WaitIsUpText(std::uint32_t Duration, std::uint32_t Step, const std::string& UpText); + static bool WaitUpTextContains(std::uint32_t Duration, std::uint32_t Step, const std::string& UpText); + + static Character GetInteractingByIndex(std::uint32_t Index); + static Character GetInteracting(); //Returns the Character interacting with the Local Player + static Character GetInteractingWith(const Character& C); //Returns the Character interactinng with the Character + + static bool IsInteracting(const Character& A, const Character& B); // True if A is interacting with B + + static std::int32_t GetCameraX(); + static std::int32_t GetCameraY(); + static std::int32_t GetCameraZ(); + static std::int32_t GetCameraPitch(); + static std::int32_t GetCameraYaw(); +}; + +/** @} */ + +#endif // MAINSCREEN_HPP_INCLUDED diff --git a/Include/Game/Interfaces/Menu.hpp b/Include/Game/Interfaces/Menu.hpp new file mode 100644 index 0000000..929dbc9 --- /dev/null +++ b/Include/Game/Interfaces/Menu.hpp @@ -0,0 +1,51 @@ +#ifndef MENU_HPP_INCLUDED +#define MENU_HPP_INCLUDED + +#include "../../Core/Types/Box.hpp" +#include +#include +#include + +/** @addtogroup Interfaces +* @{ */ +class Menu +{ + public: + + static bool IsOpen(); + static bool Open(); + + static std::int32_t GetCount(); + static std::vector GetActions(); + static std::vector GetTargetsRaw(); + static std::vector GetTargets(); + static std::vector GetOptions(); + + static std::int32_t IndexOf(const std::string& Action); + static std::int32_t IndexOf(const std::string& Action, const std::string& Target); + static std::int32_t IndexOf(const std::vector& PossibleActions); + static std::int32_t IndexOf(const std::vector& PossibleActions, const std::vector& PossibleTargets); + + static bool Contains(const std::string& Action); + static bool Contains(const std::string& Action, const std::string& Target); + static bool Contains(const std::vector& PossibleActions); + static bool Contains(const std::vector& PossibleActions, const std::vector& Targets); + + static bool WaitContains(std::uint32_t Duration, std::uint32_t Step, const std::string& Action); + static bool WaitContains(std::uint32_t Duration, std::uint32_t Step, const std::string& Action, const std::string& Target); + static bool WaitContains(std::uint32_t Duration, std::uint32_t Step, const std::vector& PossibleActions); // Waits until the Menu contains at least one of these actions + static bool WaitContains(std::uint32_t Duration, std::uint32_t Step, const std::vector& PossibleActions, const std::vector& PossibleTargets); // Waits until the Menu contains at least one of these actions and Targets + + static bool Select(std::uint32_t Index); + static bool Select(const std::string& Action); + static bool Select(const std::string& Action, const std::string& Target); + static bool Select(const std::vector& PossibleActions); + static bool Select(const std::vector& PossibleActions, const std::vector& PossibleTargets); + + static std::vector GetBoxes(); + static Box GetBox(); +}; + +/** @} */ + +#endif // MENU_HPP_INCLUDED diff --git a/Include/Game/Interfaces/Minimap.hpp b/Include/Game/Interfaces/Minimap.hpp new file mode 100644 index 0000000..7d82482 --- /dev/null +++ b/Include/Game/Interfaces/Minimap.hpp @@ -0,0 +1,35 @@ +#ifndef MINIMAP_HPP_INCLUDED +#define MINIMAP_HPP_INCLUDED + +#include "../../Core/Types/Tile.hpp" +#include "../../Core/Types/Point.hpp" +#include "../../Core/Classes/Region.hpp" +#include + +/** @addtogroup Interfaces +* @{ */ +class Minimap +{ + public: + static Point GetMiddle(); + static Tile GetPosition(); + static Tile GetDestination(); + + static std::int32_t GetPlane(); + static std::int32_t GetPositionX(); + static std::int32_t GetPositionY(); + + + static std::int32_t GetDestinationX(); + static std::int32_t GetDestinationY(); + + static bool CloseTo(Tile T, std::int32_t Distance); + static bool TileOnMM(Tile T); + + static double GetCompassAngle(); + static void RotateCompass(std::int32_t Degrees); +}; + +/** @} */ + +#endif // MINIMAP_HPP_INCLUDED diff --git a/Include/Game/Models/GroundItems.hpp b/Include/Game/Models/GroundItems.hpp new file mode 100644 index 0000000..cdb7e9d --- /dev/null +++ b/Include/Game/Models/GroundItems.hpp @@ -0,0 +1,37 @@ +#ifndef GROUNDITEMS_HPP_INCLUDED +#define GROUNDITEMS_HPP_INCLUDED + +#include "../../Core/Classes/GroundItem.hpp" +#include "../../Core/Types/Tile.hpp" +#include "../../Core/Types/Convex.hpp" +#include +#include +#include +#include + +/** @addtogroup Models +* @{ */ +class GroundItems +{ + public: + static std::vector GetAll(); + static std::vector GetAll(Tile T); + static std::vector GetAll(std::int32_t ID); + static std::vector GetAll(const std::string& Name); + static std::vector GetAll(const std::vector& IDs); + static std::vector GetAll(const std::vector& Names); + static std::vector GetAll(const std::function& Filter); + + static GroundItem Get(Tile T); + static GroundItem Get(std::int32_t ID); + static GroundItem Get(const std::string& Name); + static GroundItem Get(const std::vector& IDs); + static GroundItem Get(const std::vector& Names); + + static Tile GetTileOf(GroundItem G); + + static Convex GetConvexOf(GroundItem G); +}; +/** @} */ + +#endif // GROUNDITEMS_HPP_INCLUDED diff --git a/Include/Game/Models/NPCs.hpp b/Include/Game/Models/NPCs.hpp new file mode 100644 index 0000000..28e9eb9 --- /dev/null +++ b/Include/Game/Models/NPCs.hpp @@ -0,0 +1,40 @@ +#ifndef NPCS_HPP_INCLUDED +#define NPCS_HPP_INCLUDED + +#include "../../Core/Classes/NPC.hpp" +#include "../../Core/Types/Tile.hpp" +#include "../../Core/Types/Convex.hpp" +#include +#include +#include +#include + + +/** @addtogroup Models +* @{ */ +class NPCs +{ + public: + static std::vector GetAll(); + static std::vector GetAll(const Tile& Tile); + static std::vector GetAll(std::int32_t ID); + static std::vector GetAll(const std::string& Name); + static std::vector GetAll(const std::vector& IDs); + static std::vector GetAll(const std::vector& Names); + static std::vector GetAll(const std::function& Filter); + + static NPC Get(); + static NPC Get(const Tile& Tile); + static NPC Get(std::int32_t ID); + static NPC Get(const std::string& Name); + static NPC Get(const std::vector& IDs); + static NPC Get(const std::vector& Names); + static NPC Get(const std::function& Filter); + + static Tile GetTileOf(NPC NPC); + + static Convex GetConvexOf(NPC NPC); +}; +/** @} */ + +#endif // NPCS_HPP_INCLUDED diff --git a/Include/Game/Models/Players.hpp b/Include/Game/Models/Players.hpp new file mode 100644 index 0000000..59c3105 --- /dev/null +++ b/Include/Game/Models/Players.hpp @@ -0,0 +1,37 @@ +#ifndef PLAYERS_HPP_INCLUDED +#define PLAYERS_HPP_INCLUDED + +#include "../../Core/Classes/Player.hpp" +#include "../../Core/Types/Tile.hpp" +#include "../../Core/Types/Convex.hpp" +#include +#include +#include +#include + +/** @addtogroup Models +* @{ */ +class Players +{ + public: + static Player GetLocal(); + static std::vector GetAll(); + static std::vector GetAll(const Tile& Tile); + static std::vector GetAll(const std::string& Name); + static std::vector GetAll(const std::vector& Names); + static std::vector GetAll(const std::function& Filter); + + static Player Get(); + static Player Get(const Tile& Tile); + static Player Get(const std::string& Name); + static Player Get(const std::vector& Names); + static Player Get(const std::function& Filter); + + static Tile GetTileOf(Player Player); + + static Convex GetConvexOf(Player Player); +}; + +/** @} */ + +#endif // PLAYERS_HPP_INCLUDED diff --git a/Include/Game/Models/SceneObjects.hpp b/Include/Game/Models/SceneObjects.hpp new file mode 100644 index 0000000..4e5d000 --- /dev/null +++ b/Include/Game/Models/SceneObjects.hpp @@ -0,0 +1,67 @@ +#ifndef SCENEOBJECTS_HPP_INCLUDED +#define SCENEOBJECTS_HPP_INCLUDED + +#include "../../Core/Classes/GameModel.hpp" +#include "../../Core/Classes/DecorativeModel.hpp" +#include "../../Core/Classes/GroundModel.hpp" +#include "../../Core/Classes/WallModel.hpp" +#include "../../Core/Types/Tile.hpp" +#include "../../Core/Types/Convex.hpp" +#include +#include +#include +#include + +/** @addtogroup Models +* @{ */ +class SceneObjects +{ + public: + + + typedef enum MODEL_TYPE + { + GAME_MODEL = (1 << 1), + DECORATIVE_MODEL = (1 << 2), + GROUND_MODEL = (1 << 3), + WALL_MODEL = (1 << 4), + ALL = (GAME_MODEL | DECORATIVE_MODEL | GROUND_MODEL | WALL_MODEL) + } MODEL_TYPE; + + static std::vector GetAll(MODEL_TYPE ModelTypes = ALL); + static std::vector GetAll(const Tile& T, MODEL_TYPE ModelTypes = ALL); + static std::vector GetAll(std::int32_t ID, MODEL_TYPE ModelTypes = ALL); + static std::vector GetAll(const std::string& Name, MODEL_TYPE ModelTypes = ALL); + static std::vector GetAll(const std::vector& PossibleIDs, MODEL_TYPE ModelTypes = ALL); + static std::vector GetAll(const std::vector& PossibleNames, MODEL_TYPE ModelTypes = ALL); + + static std::vector GetAll(const std::function& Filter); + static std::vector GetAll(const std::function& Filter); + static std::vector GetAll(const std::function& Filter); + static std::vector GetAll(const std::function& Filter); + + static Object Get(const Tile& T, MODEL_TYPE ModelTypes = ALL); + static Object Get(std::int32_t ID, MODEL_TYPE ModelTypes = ALL); + static Object Get(const std::string& Name, MODEL_TYPE ModelTypes = ALL); + static Object Get(const std::vector& PossibleIDs, MODEL_TYPE ModelTypes = ALL); + static Object Get(const std::vector& PossibleNames, MODEL_TYPE ModelTypes = ALL); + + static GameModel Get(const std::function& Filter); + static DecorativeModel Get(const std::function& Filter); + static GroundModel Get(const std::function& Filter); + static WallModel Get(const std::function& Filter); + + static Tile GetTileOf(const GameModel& G); + static Tile GetTileOf(const DecorativeModel& D); + static Tile GetTileOf(const GroundModel& G); + static Tile GetTileOf(const WallModel& W); + + static Convex GetConvexOf(const GameModel& G); + static Convex GetConvexOf(const DecorativeModel& D); + static Convex GetConvexOf(const GroundModel& G); + static Convex GetConvexOf(const WallModel& W); +}; + +/** @} */ + +#endif // SCENEOBJECTS_HPP_INCLUDED diff --git a/Include/Game/Tools/BreakHandler.hpp b/Include/Game/Tools/BreakHandler.hpp new file mode 100644 index 0000000..f5437fc --- /dev/null +++ b/Include/Game/Tools/BreakHandler.hpp @@ -0,0 +1,18 @@ +#ifndef BREAKHANDLER_HPP_INCLUDED +#define BREAKHANDLER_HPP_INCLUDED + +#include "../../Core/Types/Timer.hpp" +#include "../../Core/Types/Counter.hpp" + +class BreakHandler +{ + public: + static Counter GetBreakCounter(); + static Timer GetBreakTimer(); + + static bool ShortBreak(bool Logout = true); + static bool LongBreak(bool Logout = true); + static bool Break(bool Logout = true); +}; + +#endif // BREAKHANDLER_HPP_INCLUDED diff --git a/Include/Game/Tools/Interact.hpp b/Include/Game/Tools/Interact.hpp new file mode 100644 index 0000000..7ccbeae --- /dev/null +++ b/Include/Game/Tools/Interact.hpp @@ -0,0 +1,77 @@ +#ifndef INTERACT_HPP_INCLUDED +#define INTERACT_HPP_INCLUDED + +#include "../../Core/Input.hpp" +#include "../../Core/Internal.hpp" +#include +#include +#include + +/** @addtogroup Tools +* @{ */ +class Interact +{ + public: + static bool MoveMouse(Point P); + static bool MoveMouse(Box B); + + static bool Scroll(ScrollDirection Direction); + static bool Scroll(Point P, ScrollDirection Direction); + static bool Scroll(Box B, ScrollDirection Direction); + static bool ScrollUntil(ScrollDirection Direction, std::int32_t Duration, const std::function& Func); + + static bool Click(Button Button = BUTTON_LEFT); + + static bool Click(Point P, Button Button = BUTTON_LEFT); + static bool Click(Point P, const std::string& Action, const std::string& Target = ""); + static bool Click(Point P, const std::vector& PossibleActions, const std::vector& PossibleTargets = {""}); + + static bool Click(Box B, Button Button = BUTTON_LEFT); + static bool Click(Box B, const std::string& Action, const std::string& Target = ""); + static bool Click(Box B, const std::vector& PossibleActions, const std::vector& PossibleTargets = {""}); + + static bool Click(Widget W, Button Button = BUTTON_LEFT); + static bool Click(Widget W, const std::string& Action, const std::string& Target = ""); + static bool Click(Widget W, const std::vector& PossibleActions, const std::vector& PossibleTargets = {""}); + + static bool Click(Convex C, Button Button = BUTTON_LEFT); + static bool Click(Convex C, const std::string& Action, const std::string& Target = ""); + static bool Click(Convex C, const std::vector& PossibleActions, const std::vector& PossibleTargets = {""}); + + static bool Click(GroundItem G, Button Button = BUTTON_LEFT); + static bool Click(GroundItem G, const std::string& Action); + static bool Click(GroundItem G, const std::vector& PossibleActions); + + static bool Click(NPC N, Button Button = BUTTON_LEFT); + static bool Click(NPC N, const std::string& Action); + static bool Click(NPC N, const std::vector& PossibleActions); + + static bool Click(Player P, Button Button = BUTTON_LEFT); + static bool Click(Player P, const std::string& Action); + static bool Click(Player P, const std::vector& PossibleActions); + + static bool Click(GameModel G, Button Button = BUTTON_LEFT); + static bool Click(GameModel G, const std::string& Action); + static bool Click(GameModel G, const std::vector& PossibleActions); + + static bool Click(GroundModel G, Button Button = BUTTON_LEFT); + static bool Click(GroundModel G, const std::string& Action); + static bool Click(GroundModel G, const std::vector& PossibleActions); + + static bool Click(WallModel W, Button Button = BUTTON_LEFT); + static bool Click(WallModel W, const std::string& Action); + static bool Click(WallModel W, const std::vector& PossibleActions); + + static bool UpKey(std::int32_t Key); + static bool DownKey(std::int32_t Key); + + bool ReleaseKey(std::int32_t Key); + bool HoldKey(std::int32_t Key, std::uint32_t Duration); + + static bool TypeKey(std::int32_t Key); + static bool TypeString(const std::string& String, bool PressEnter = false); +}; + +/** @} */ + +#endif // INTERACT_HPP_INCLUDED diff --git a/Include/Game/Tools/Profile.hpp b/Include/Game/Tools/Profile.hpp new file mode 100644 index 0000000..146bf94 --- /dev/null +++ b/Include/Game/Tools/Profile.hpp @@ -0,0 +1,82 @@ +#ifndef PROFILE_HPP_INCLUDED +#define PROFILE_HPP_INCLUDED + +#include "../../Core/Types/Timer.hpp" +#include +#include + +/** @addtogroup Tools +* @{ */ +class Profile +{ + public: + static std::string GetUsername(); + static std::string GetPassword(); + static std::string GetBankPin(); + static std::int32_t GetWorld(); + + static bool GetIsMember(); + static bool GetHasPin(); + + static std::int32_t GetActionDelayMean(); + static double GetActionDelayDeviation(); + + static std::int32_t GetMoveDelayMean(); + static double GetMoveDelayDeviation(); + + static std::int32_t GetMouseDownDelayMean(); + static double GetMouseDownDelayDeviation(); + + static std::int32_t GetMouseUpDelayMean(); + static double GetMouseUpDelayDeviation(); + + static std::int32_t GetKeyDownDelayMean(); + static double GetKeyDownDelayDeviation(); + + static std::int32_t GetKeyUpDelayMean(); + static double GetKeyUpDelayDeviation(); + + static std::int32_t GetScrollDelayMean(); + static double GetScrollDelayDeviation(); + + static double GetStandardDeviationX(); + static double GetStandardDeviationY(); + + static double GetBoxProbabilityX(); + static double GetBoxProbabilityY(); + + static double GetConvexProbabilityX(); + static double GetConvexProbabilityY(); + + static double GetItemProbabilityX(); + static double GetItemProbabilityY(); + + static double GetMenuProbabilityX(); + static double GetMenuProbabilityY(); + + static double GetWidgetProbabilityX(); + static double GetWidgetProbabilityY(); + + static double GetMissFollowUp(); + + static double GetFatigue(); + static double GetFatigueGain(); + static double GetFatigueLoss(); + static double GetFatigueMax(); + + static bool GetShortBreakEnabled(); + static double GetShortBreakEvery(); + static double GetShortBreakEveryDeviation(); + static double GetShortBreakFor(); + static double GetShortBreakForDeviation(); + + static bool GetLongBreakEnabled(); + static double GetLongBreakEvery(); + static double GetLongBreakEveryDeviation(); + static double GetLongBreakFor(); + static double GetLongBreakForDeviation(); +}; + +/** @} */ + +#endif // PROFILE_HPP_INCLUDED diff --git a/Include/Game/Tools/RandomHandler.hpp b/Include/Game/Tools/RandomHandler.hpp new file mode 100644 index 0000000..69ea84d --- /dev/null +++ b/Include/Game/Tools/RandomHandler.hpp @@ -0,0 +1,17 @@ +#ifndef RANDOMHANDLER_HPP_INCLUDED +#define RANDOMHANDLER_HPP_INCLUDED + +#include "../../Core/Types/Counter.hpp" +#include "../../Core/Types/Countdown.hpp" +#include + +class RandomHandler +{ + public: + static void SetCheckDelay(std::int64_t Time); + static Countdown GetCheckCountdown(); + static Counter GetRandomsCounter(); + static bool Check(); +}; + +#endif // RANDOMHANDLER_HPP_INCLUDED diff --git a/Include/Game/Tools/Settings.hpp b/Include/Game/Tools/Settings.hpp new file mode 100644 index 0000000..175a40c --- /dev/null +++ b/Include/Game/Tools/Settings.hpp @@ -0,0 +1,22 @@ +#ifndef SETTINGS_HPP_INCLUDED +#define SETTINGS_HPP_INCLUDED + +#include +#include + +/** @addtogroup Tools +* @{ */ +class Settings +{ + public: + static std::vector GetAll(); + + static std::int32_t GetSetting(std::int32_t SettingIndex); + static std::int32_t GetSetting(std::int32_t SettingIndex, std::int32_t BitMask); + static bool GetSettingBit(std::int32_t SettingIndex, std::int32_t BitIndex); + static std::int32_t GetScreenType(); +}; + +/** @} */ + +#endif // SETTINGS_HPP_INCLUDED diff --git a/Include/Game/Tools/Tools.hpp b/Include/Game/Tools/Tools.hpp new file mode 100644 index 0000000..4223831 --- /dev/null +++ b/Include/Game/Tools/Tools.hpp @@ -0,0 +1,20 @@ +#ifndef TOOLS_HPP_INCLUDED +#define TOOLS_HPP_INCLUDED + +#include "../../Core/Classes/ItemInfo.hpp" +#include "../../Core/Classes/ItemContainer.hpp" +#include +#include + +/** @addtogroup Tools +* @{ */ +class Tools +{ + public: + + +}; + +/** @} */ + +#endif // TOOLS_HPP_INCLUDED diff --git a/Include/Game/Tools/Widgets.hpp b/Include/Game/Tools/Widgets.hpp new file mode 100644 index 0000000..b6f4b2d --- /dev/null +++ b/Include/Game/Tools/Widgets.hpp @@ -0,0 +1,81 @@ +#ifndef WIDGETS_HPP_INCLUDED +#define WIDGETS_HPP_INCLUDED + +#include "../../Core/Types/Box.hpp" +#include "../../Core/Classes/Widget.hpp" +#include +#include +#include + +/** @addtogroup Tools +* @{ */ +class Widgets +{ + public: + /** + * @brief Returns true if the Widget, or it's Parent, is Hidden + * @code + * Widget Inventory = Widgets::GetWidget(149, 0); + * bool InventoryHidden = Widgets::IsHidden(Inventory); + * @endcode + */ + static bool IsHidden(Widget W); + /** + * @brief Returns the Box of the passed Widget + * @code + * Widget BankInventory = Widgets::GetWidget(15, 3); + * Box BankInventoryBox = Widgets::GetBox(BankInventory); + * @endcode + */ + static Box GetBox(Widget W); + /** + * @brief Returns the absolute X of the passed Widget + * @code + * Widget BankInventory = Widgets::GetWidget(15, 3); + * std::int32_t BankInventoryX = Widgets::GetX(BankInventory); + * @endcode + */ + static std::int32_t GetX(Widget W); + /** + * @brief Returns the absolute Y of the passed Widget + * @code + * Widget BankInventory = Widgets::GetWidget(15, 3); + * std::int32_t BankInventoryY = Widgets::GetX(BankInventory); + * @endcode + */ + static std::int32_t GetY(Widget W); + + /** + * @brief Returns a vector of All Loaded Widgets + * @code std::vector Widgets = Widgets::GetAll(); @endcode + */ + static std::vector GetAll(); + /** + * @brief Returns the specified Widget by Parent ID + * @code Widget BankParent = Widgets::Get(15); @endcode + */ + static Widget Get(std::int32_t Parent); + /** + * @brief Returns the specified Widget by Parent, and Child ID + * @code Widget BankInventory = Widgets::Get(15, 3); @endcode + */ + static Widget Get(std::int32_t Parent, std::int32_t Child); + /** + * @brief Returns the specified Widget by Parent, and Child, and Grandchild ID + * @code Widget BankCloseButton = Widgets::Get(12, 3, 11); @endcode + */ + static Widget Get(std::int32_t Parent, std::int32_t Child, std::int32_t Grandchild); + /** + * @brief Returns a vector of all Widgets that pass the specified Filter @see LibraryFilterLambdas + * @code + * auto const WTextEquals = [](const Widget& W){ return W.GetText() == "Enter Amount"; }; + * std::vector Widgets = Widgets::Get(WTextEquals); @endcode + * Will return all Widgets whose Text equals Enter Amount + */ + static std::vector Get(const std::function& Filter); + +}; + +/** @} */ + +#endif // WIDGETS_HPP_INCLUDED diff --git a/Include/Game/Tools/Worlds.hpp b/Include/Game/Tools/Worlds.hpp new file mode 100644 index 0000000..69c441c --- /dev/null +++ b/Include/Game/Tools/Worlds.hpp @@ -0,0 +1,39 @@ +#ifndef WORLDS_HPP_INCLUDED +#define WORLDS_HPP_INCLUDED + +#include "../../Core/Classes/World.hpp" +#include +#include +#include +#include + +/** @addtogroup Tools +* @{ */ +class Worlds +{ + public: + static bool Refresh(); + static bool Refresh(bool ExitWorldSelection); + + static bool SwitchWorld(World World); + static bool SwitchWorld(std::int32_t WorldID); + + static std::int32_t GetCurrent(); + static std::vector GetAll(); + + static std::int32_t GetIndexOf(World World); + static std::int32_t GetIndexOf(std::int32_t WorldID); + + static std::vector GetF2P(); + static std::vector GetP2P(); + + static bool IsP2P(World World); + static bool IsP2P(std::int32_t WorldID); + + static World GetBy(std::int32_t WorldID); + static std::vector GetBy(const std::function& Filter); +}; + +/** @} */ + +#endif // WORLDS_HPP_INCLUDED diff --git a/Library/libAlpacaLibrary.a b/Library/libAlpacaLibrary.a new file mode 100644 index 0000000..27b3cf4 Binary files /dev/null and b/Library/libAlpacaLibrary.a differ