Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions boxr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ MasterBoxControl::MasterBoxControl() {
boxes.push_back(std::make_shared<EntropyControl>());
boxes.push_back(std::make_shared<AlsoKissAssistControl>());
boxes.push_back(std::make_shared<XGenControl>());
boxes.push_back(std::make_shared<RGMercsLuaControl>());
boxes.push_back(std::make_shared<CwtnControl>());
}

Expand Down Expand Up @@ -140,6 +141,40 @@ void RGMercsControl::SetRaidAssistNum(int raidAssistNum) {
boxrRunCommandf(MACRO_COMMAND_DELAY "/rg OutsideAssistList {}", GetRaidMainAssistName(raidAssistNum));
}

bool RGMercsLuaControl::IsRunning() {
return EvaluateBooleanMacroExpression("${Lua.Script[rgmercs].Status.Equal[RUNNING]}");
}

void RGMercsLuaControl::Pause() {
boxrRunCommandf("/rg pause");
PauseTwist();
}

void RGMercsLuaControl::Unpause() {
boxrRunCommandf("/rg unpause");
}

void RGMercsLuaControl::Chase() {
boxrRunCommandf("/rg chaseon");
}

void RGMercsLuaControl::Camp() {
boxrRunCommandf("/rg campon");
}

void RGMercsLuaControl::Manual() {
boxrRunCommandf("/rg chaseoff");
boxrRunCommandf("/rg campoff");
}

void RGMercsLuaControl::BurnNow() {
LOGGER.info("BurnNow is not supported for RGMercs - Lua edition");
}

void RGMercsLuaControl::SetRaidAssistNum(int raidAssistNum) {
LOGGER.info("RaidAssistNum is not supported for RGMercs - Lua edition");
}

bool KissAssistControl::IsRunning() {
return ci_starts_with(gszMacroName, "kiss");
}
Expand Down
15 changes: 15 additions & 0 deletions boxr.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ class RGMercsControl : public BoxControl {
inline std::string GetPauseQuery() { return MACRO_PAUSED_QUERY; }
};

class RGMercsLuaControl : public BoxControl {
public:
const char* GetKey() override { return "rgmercs.lua"; }
const char* GetName() override { return "RGMercs - Lua edition"; }
bool IsRunning() override;
void Pause() override;
void Unpause() override;
void Chase() override;
void Camp() override;
void Manual() override;
void BurnNow() override;
void SetRaidAssistNum(int raidAssistNum) override;
inline std::string GetPauseQuery() { return MACRO_PAUSED_QUERY; }
};

class KissAssistControl : public BoxControl {
public:
const char* GetKey() override { return "kissassist"; }
Expand Down