AlpacaLibary  1.63
A closed source C++ bot for OSRS
Script.hpp
Go to the documentation of this file.
1 #ifndef SCRIPT_HPP_INCLUDED
2 #define SCRIPT_HPP_INCLUDED
3 
4 #include <string>
5 #include <vector>
6 #include <atomic>
7 #include "Types/Timer.hpp"
8 
9 extern std::atomic_bool Terminate;
10 
11 extern void Setup();
12 extern bool OnStart();
13 extern bool Loop();
14 extern void OnEnd();
15 extern bool OnBreak();
16 
17 typedef struct
18 {
19  std::string Name = "";
20  std::string Description = "";
21  std::string Version = "";
22  std::string Category = "";
23  std::string Author = "";
24  std::string UID = "";
25  std::string ForumPage = "";
26 } ScriptInfo;
27 
28 typedef struct
29 {
30  std::string Username;
31  std::string Password;
32  bool Member;
33  std::string BankPin;
34  std::string World;
35  bool UseProxy;
36  std::string ProxyHost;
37  std::string ProxyPort;
38  std::string ProxyUsername;
39  std::string ProxyPassword;
40  std::int32_t InteractableMean;
42  std::int32_t MoveMean;
44  std::int32_t MouseDownMean;
46  std::int32_t MouseUpMean;
48  std::int32_t KeyDownMean;
50  std::int32_t KeyUpMean;
52  std::int32_t ScrollAmount;
54  std::int32_t ScrollGapMean;
56  std::int32_t ScrollDelayMean;
75  float PivotMean;
77  float SplineMean;
79  float AngleMean;
81  float FatigueGain;
82  float FatigueLoss;
83  float FatigueMax;
87  float MiniBreakFor;
97  float LongBreakFor;
100 
101 std::string GetScriptPath();
107 void RequestArgument(const std::string& Argument, const std::string& Description);
108 std::string GetArgumentsName();
109 void LoadArguments(const std::string& FileName);
110 void SaveArguments(const std::string& FileName);
111 std::string GetArgument(const std::string& Argument);
112 void SetArgument(const std::string& Argument, const std::string& Value);
113 std::vector<std::string> GetArguments();
114 std::vector<std::string> GetArgumentDescriptions();
115 
116 std::uint32_t GetLoopDelay();
117 void SetLoopDelay(std::uint32_t Delay);
118 
119 #endif // SCRIPT_HPP_INCLUDED
std::string GetArgument(const std::string &Argument)
void SetScriptInfo(const ScriptInfo &)
void GetScriptInfo(ScriptInfo &)
void SaveArguments(const std::string &FileName)
void OnEnd()
void SetLoopDelay(std::uint32_t Delay)
bool OnStart()
std::string GetArgumentsName()
void Setup()
void RequestArgument(const std::string &Argument, const std::string &Description)
std::string GetScriptPath()
Timer GetScriptTimer()
bool OnBreak()
std::vector< std::string > GetArgumentDescriptions()
void TerminateScript()
std::uint32_t GetLoopDelay()
std::atomic_bool Terminate
void LoadArguments(const std::string &FileName)
void SetPlayerProfile(const PlayerProfile &)
bool Loop()
void SetArgument(const std::string &Argument, const std::string &Value)
std::vector< std::string > GetArguments()
Definition: Timer.hpp:8
bool UseProxy
Definition: Script.hpp:35
float ShortBreakEveryDeviation
Definition: Script.hpp:91
float LongBreakForDeviation
Definition: Script.hpp:98
float ScrollGapDeviation
Definition: Script.hpp:55
float MouseUpDeviation
Definition: Script.hpp:47
float ShortBreakFor
Definition: Script.hpp:92
float ScrollDelayDeviation
Definition: Script.hpp:57
float ShortBreakForDeviation
Definition: Script.hpp:93
std::int32_t KeyUpMean
Definition: Script.hpp:50
std::string BankPin
Definition: Script.hpp:33
std::int32_t KeyDownMean
Definition: Script.hpp:48
float FatigueLoss
Definition: Script.hpp:82
float MouseDownDeviation
Definition: Script.hpp:45
float ShortBreakEvery
Definition: Script.hpp:90
float KeyDownDeviation
Definition: Script.hpp:49
float MiniBreakEvery
Definition: Script.hpp:85
std::int32_t InteractableMean
Definition: Script.hpp:40
float BoxProbabilityX
Definition: Script.hpp:60
float KeyUpDeviation
Definition: Script.hpp:51
float MiniBreakForDeviation
Definition: Script.hpp:88
float PivotDeviation
Definition: Script.hpp:76
float AccelerationMean
Definition: Script.hpp:71
float MoveDeviation
Definition: Script.hpp:43
float ConvexProbabilityX
Definition: Script.hpp:62
float StandardDeviationY
Definition: Script.hpp:59
std::string Password
Definition: Script.hpp:31
float MiniBreakFor
Definition: Script.hpp:87
float BoxProbabilityY
Definition: Script.hpp:61
float DecelerationDeviation
Definition: Script.hpp:74
float LongBreakFor
Definition: Script.hpp:97
std::int32_t ScrollAmount
Definition: Script.hpp:52
float ConvexProbabilityY
Definition: Script.hpp:63
std::int32_t ScrollGapMean
Definition: Script.hpp:54
std::int32_t MoveMean
Definition: Script.hpp:42
bool ShortBreakEnabled
Definition: Script.hpp:89
std::string ProxyPort
Definition: Script.hpp:37
float AngleMean
Definition: Script.hpp:79
float ItemProbabilityY
Definition: Script.hpp:65
float ItemProbabilityX
Definition: Script.hpp:64
std::string World
Definition: Script.hpp:34
float InteractableDeviation
Definition: Script.hpp:41
std::string ProxyHost
Definition: Script.hpp:36
float MenuProbabilityX
Definition: Script.hpp:66
float WidgetProbabilityY
Definition: Script.hpp:69
std::string ProxyUsername
Definition: Script.hpp:38
float PivotMean
Definition: Script.hpp:75
float StandardDeviationX
Definition: Script.hpp:58
float LongBreakEveryDeviation
Definition: Script.hpp:96
std::int32_t MouseDownMean
Definition: Script.hpp:44
float FatigueMax
Definition: Script.hpp:83
bool Member
Definition: Script.hpp:32
std::int32_t MouseUpMean
Definition: Script.hpp:46
float ScrollAmountDeviation
Definition: Script.hpp:53
float MiniBreakEveryDeviation
Definition: Script.hpp:86
float AccelerationDeviation
Definition: Script.hpp:72
float LongBreakEvery
Definition: Script.hpp:95
std::string ProxyPassword
Definition: Script.hpp:39
float WidgetProbabilityX
Definition: Script.hpp:68
std::string Username
Definition: Script.hpp:30
std::int32_t ScrollDelayMean
Definition: Script.hpp:56
float MenuProbabilityY
Definition: Script.hpp:67
float FatigueGain
Definition: Script.hpp:81
float AngleDeviation
Definition: Script.hpp:80
float PointGenAccuracy
Definition: Script.hpp:70
float DecelerationMean
Definition: Script.hpp:73
bool LongBreakEnabled
Definition: Script.hpp:94
bool MiniBreakEnabled
Definition: Script.hpp:84
float SplineMean
Definition: Script.hpp:77
float SplineDeviation
Definition: Script.hpp:78