AlpacaLibrary/Include/Core/Script.hpp

111 lines
2.9 KiB
C++
Raw Normal View History

2017-12-25 23:49:48 +00:00
#ifndef SCRIPT_HPP_INCLUDED
#define SCRIPT_HPP_INCLUDED
#include <string>
#include <vector>
2018-05-19 01:48:01 +00:00
#include <atomic>
2017-12-25 23:49:48 +00:00
#include "Types/Timer.hpp"
2018-05-19 01:48:01 +00:00
extern std::atomic_bool Terminate;
2018-02-24 12:59:53 +00:00
extern void Setup();
extern bool OnStart();
extern bool Loop();
2018-04-29 15:10:14 +00:00
extern void OnEnd();
2018-08-30 03:04:03 +00:00
extern bool OnBreak();
2018-02-24 12:59:53 +00:00
2017-12-25 23:49:48 +00:00
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;
2018-02-24 12:59:53 +00:00
std::string ProxyUsername;
std::string ProxyPassword;
2018-04-29 12:11:44 +00:00
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;
2018-05-01 21:46:41 +00:00
std::int32_t ScrollDelayMean;
float ScrollDelayDeviation;
2017-12-25 23:49:48 +00:00
float StandardDeviationX;
float StandardDeviationY;
float BoxProbabilityX;
float BoxProbabilityY;
float ConvexProbabilityX;
float ConvexProbabilityY;
float ItemProbabilityX;
float ItemProbabilityY;
float MenuProbabilityX;
float MenuProbabilityY;
float WidgetProbabilityX;
float WidgetProbabilityY;
2018-04-29 12:11:44 +00:00
float PointGenAccuracy;
2017-12-25 23:49:48 +00:00
float FatigueGain;
float FatigueLoss;
float FatigueMax;
2018-04-29 12:11:44 +00:00
bool MiniBreakEnabled;
float MiniBreakEvery;
float MiniBreakEveryDeviation;
float MiniBreakFor;
float MiniBreakForDeviation;
2017-12-25 23:49:48 +00:00
bool ShortBreakEnabled;
float ShortBreakEvery;
float ShortBreakEveryDeviation;
float ShortBreakFor;
float ShortBreakForDeviation;
bool LongBreakEnabled;
float LongBreakEvery;
float LongBreakEveryDeviation;
float LongBreakFor;
float LongBreakForDeviation;
} PlayerProfile;
2018-10-13 19:10:42 +00:00
std::string GetScriptPath();
2018-05-01 21:46:41 +00:00
void TerminateScript();
2017-12-25 23:49:48 +00:00
Timer GetScriptTimer();
2018-10-13 19:10:42 +00:00
void SetScriptInfo(const ScriptInfo&);
2017-12-25 23:49:48 +00:00
void GetScriptInfo(ScriptInfo&);
2018-10-13 19:10:42 +00:00
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);
2017-12-25 23:49:48 +00:00
std::vector<std::string> GetArguments();
std::vector<std::string> GetArgumentDescriptions();
2018-10-13 19:10:42 +00:00
2017-12-25 23:49:48 +00:00
std::uint32_t GetLoopDelay();
void SetLoopDelay(std::uint32_t Delay);
#endif // SCRIPT_HPP_INCLUDED