From 155a2d0dc87a1d5114ca86ecd347aca8f7f84946 Mon Sep 17 00:00:00 2001 From: Rxann <80224521+Rxann@users.noreply.github.com> Date: Tue, 28 Jan 2025 16:40:13 -0500 Subject: [PATCH] Revert 658f200 --- src/game/features/self/SpeedUpMoonshine.cpp | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/game/features/self/SpeedUpMoonshine.cpp diff --git a/src/game/features/self/SpeedUpMoonshine.cpp b/src/game/features/self/SpeedUpMoonshine.cpp new file mode 100644 index 0000000..e6d9097 --- /dev/null +++ b/src/game/features/self/SpeedUpMoonshine.cpp @@ -0,0 +1,32 @@ +#include "game/rdr/Natives.hpp" +#include "game/rdr/ScriptFunction.hpp" +#include "game/rdr/ScriptGlobal.hpp" + + +namespace YimMenu::Features +{ + class FastMoonshine : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + static int LastCheck = 0; + auto MoonshineGlobal = ScriptGlobal(1297600).At(Self::GetPlayer().GetId(), 87).At(19); + + if (!MoonshineGlobal.CanAccess() || MISC::GET_SYSTEM_TIME() - LastCheck < 1000) + return; + + LastCheck = MISC::GET_SYSTEM_TIME(); + + auto BottleProgression = MoonshineGlobal.At(16); + + if (*BottleProgression.As() < 20) + { + ScriptFunctions::TriggerMoonshineProduction(); + } + } + }; + + static FastMoonshine _FastMoonshine{"fastmoonshine", "Fast Moonshine", "Speeds up moonshine production"}; +} \ No newline at end of file