AlpacaLibrary/Include/Core/Script.hpp

111 lines
2.9 KiB
C++

#ifndef SCRIPT_HPP_INCLUDED
#define SCRIPT_HPP_INCLUDED
#include <string>
#include <vector>
#include <atomic>
#include "Types/Timer.hpp"
extern std::atomic_bool Terminate;
extern void Setup();
extern bool OnStart();
extern bool Loop();
extern void OnEnd();
extern bool OnBreak();
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::string ProxyUsername;
std::string ProxyPassword;
std::int32_t InteractableMean;
float InteractableDeviation;
std::int32_t MoveMean;
float MoveDeviation;
std::int32_t MouseDownMean;
float MouseDownDeviation;
std::int32_t MouseUpMean;
float MouseUpDeviation;
std::int32_t KeyDownMean;
float KeyDownDeviation;
std::int32_t KeyUpMean;
float KeyUpDeviation;
std::int32_t ScrollAmount;
float ScrollAmountDeviation;
std::int32_t ScrollGapMean;
float ScrollGapDeviation;
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 PointGenAccuracy;
float FatigueGain;
float FatigueLoss;
float FatigueMax;
bool MiniBreakEnabled;
float MiniBreakEvery;
float MiniBreakEveryDeviation;
float MiniBreakFor;
float MiniBreakForDeviation;
bool ShortBreakEnabled;
float ShortBreakEvery;
float ShortBreakEveryDeviation;
float ShortBreakFor;
float ShortBreakForDeviation;
bool LongBreakEnabled;
float LongBreakEvery;
float LongBreakEveryDeviation;
float LongBreakFor;
float LongBreakForDeviation;
} PlayerProfile;
std::string GetScriptPath();
void TerminateScript();
Timer GetScriptTimer();
void SetScriptInfo(const ScriptInfo&);
void GetScriptInfo(ScriptInfo&);
void SetPlayerProfile(const PlayerProfile&);
void RequestArgument(const std::string& Argument, const std::string& Description);
std::string GetArgumentsName();
void LoadArguments(const std::string& FileName);
void SaveArguments(const std::string& FileName);
std::string GetArgument(const std::string& Argument);
void SetArgument(const std::string& Argument, const std::string& Value);
std::vector<std::string> GetArguments();
std::vector<std::string> GetArgumentDescriptions();
std::uint32_t GetLoopDelay();
void SetLoopDelay(std::uint32_t Delay);
#endif // SCRIPT_HPP_INCLUDED