fix: Fix Manipulate Rig Slot Machines for b1013.17 (#774)

* fix: Fix  Manipulate Rig Slot Machines for b1013.17

int slots_random_results_table = 1374; -> int slots_random_results_table = 1350;

* fix: Fix issue that can't using Rig Slot Machines

During testing, there may be occasions where the "Manipulate Rig Slot Machines" function is continuously enabled during a session, resulting in the inability to use Rig Slot Machines (the "Press E" prompt does not pop up).
By checking the spin_state, we can determine whether the player is using Rig Slot Machines, and apply slot_result modifications only during the period when Rig Slot Machines are being used.
This commit is contained in:
渟雲
2025-12-18 01:18:24 +08:00
committed by GitHub
parent a401972223
commit 61000819a1
+5 -2
View File
@@ -15,8 +15,9 @@ namespace YimMenu::Features
{
using LoopedCommand::LoopedCommand;
int slots_random_results_table = 1374;
int slots_random_results_table = 1350;
std::set<int> slots_blacklist = {9, 21, 22, 87, 152};
int spin_state_var = 1668;
virtual void OnTick() override
{
@@ -29,6 +30,8 @@ namespace YimMenu::Features
{
Scripts::ForceScriptHost(Scripts::FindScriptThread("casino_slots"_J));
}
int* spin_state = ScriptLocal("casino_slots"_J, spin_state_var).As<int*>();
bool needs_run = false;
for (int slots_iter = 3; slots_iter <= 196; ++slots_iter)
@@ -41,7 +44,7 @@ namespace YimMenu::Features
}
}
}
if (needs_run)
if (needs_run && *spin_state >= 8 && *spin_state <= 15)
{
for (int slots_iter = 3; slots_iter <= 196; ++slots_iter)
{