Skip to content
Merged
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
45 changes: 43 additions & 2 deletions src/game/features/recovery/Casino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
#include "game/gta/Natives.hpp"
#include "game/gta/ScriptLocal.hpp"
#include "game/gta/Stats.hpp"
#include "core/commands/ListCommand.hpp"
#include "game/backend/Tunables.hpp"
#include "core/backend/ScriptMgr.hpp"

#include "core/commands/ListCommand.hpp"
#include <set>


Expand Down Expand Up @@ -108,6 +107,48 @@ virtual void OnDisable() override
}
};

static std::vector<std::pair<int, const char*>> g_LuckyWheelPrizes = {
{0, "Clothing"},
{1, "2,500 RP"},
{2, "$20,000"},
{3, "10,000 Chips"},
{4, "10% Discount Voucher"},
{5, "5,000 RP"},
{6, "$30,000"},
{7, "15,000 Chips"},
{8, "Clothing"},
{9, "7,500 RP"},
{10, "20,000 Chips"},
{11, "Mystery Prize"},
{12, "Clothing"},
{13, "10,000 RP"},
{14, "$40,000"},
{15, "25,000 Chips"},
{16, "Clothing"},
{17, "15,000 RP"},
{18, "Podium Vehicle"},
{19, "$50,000"},
};
static ListCommand _LuckyWheelPrize{"luckywheelprize", "Lucky Wheel Prize", "Select the Lucky Wheel prize", g_LuckyWheelPrizes, 18};
class SetLuckyWheelPrize : public Command
{

using Command::Command;

virtual void OnCall() override
{
if (auto thread = Scripts::FindScriptThread("casino_lucky_wheel"_J))
{
const auto player = PLAYER::PLAYER_ID();
*ScriptGlobal(262145).At(26856).As<bool*>() = true; // Enable Additional Spins
*ScriptGlobal(262145).At(37458).As<int*>() = 2; // Max. Spins Per Day w/ GTA+
*ScriptLocal(thread, 150).At(player, 5).As<int*>() = _LuckyWheelPrize.GetState(); // Prize outcome
}
}
};


static SetLuckyWheelPrize _SetLuckyWheelPrize{"setluckywheelprize", "Set Lucky Wheel Prize", "Sets the Lucky Wheel outcome"};
static CasinoMembershipBonus _CasinoMembershipBonus{"casino_membership_bonus", "Casino Membership Bonus", "Triggers the Casino Membership Bonus."};
static CasinoManipulateRigSlotMachines _CasinoManipulateRigSlotMachines{"casinomanipulaterigslotmachines", "Manipulate Rig Slot Machines", "Lets you win the Rig Slot Machines every time"};
}
2 changes: 1 addition & 1 deletion src/game/features/recovery/Cooldown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace YimMenu::Features
if (*Pointers.IsSessionStarted)
{
FiberPool::Push([] {
ScriptGlobal(2686095).At(4357).At(260).At(7, 2).As<TIMER*>()->Destroy();
ScriptGlobal(2686124).At(4373).At(260).At(7, 2).As<TIMER*>()->Destroy();
});
STATS::STAT_SAVE(0, 0, 3, 0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace YimMenu::Features
{
if (*Pointers.IsSessionStarted)
{
*ScriptGlobal(262145).At(33939).As<bool*>() = true; // 2022
*ScriptGlobal(262145).At(35825).As<bool*>() = true; // 2023
*ScriptGlobal(262145).At(33940).As<bool*>() = true; // 2022
*ScriptGlobal(262145).At(35826).As<bool*>() = true; // 2023
}
else
{
Expand Down
5 changes: 2 additions & 3 deletions src/game/features/recovery/Instant-FinishStuffAndMore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,12 @@ namespace YimMenu::Features

virtual void OnCall() override
{
/*Unknow*/
/**ScriptGlobal(262145).At(18451).As<int*>() = 1;
*ScriptGlobal(262145).At(18451).As<int*>() = 1;
*ScriptGlobal(262145).At(18495).As<int*>() = 1;
*ScriptGlobal(262145).At(18497).As<int*>() = 0;
*ScriptGlobal(262145).At(18499).As<int*>() = 1;
*ScriptGlobal(262145).At(18501).As<int*>() = 0;
*ScriptGlobal(262145).At(18503).As<int*>() = 1;*/
*ScriptGlobal(262145).At(18503).As<int*>() = 1;
}
};
static Instant_MCBusinessSellMissions _Instant_MCBusinessSellMissions{"mcbusinesssellmissions", "MC Business Sell Missions ", "mc business sell missions"};
Expand Down
16 changes: 8 additions & 8 deletions src/game/features/recovery/Unreleased/content.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ namespace YimMenu::Features
{
if (*Pointers.IsSessionStarted)
{
*ScriptGlobal(262145).At(37820).As<int*>() = 1; // Bomb Squad, Mansion Raid
*ScriptGlobal(262145).At(37821).As<int*>() = 1; // Knockdown
*ScriptGlobal(262145).At(37822).As<int*>() = 1; // Alpha Mail
*ScriptGlobal(262145).At(37823).As<int*>() = 1; // Meteoric, Hot Off The Press
*ScriptGlobal(262145).At(37636).As<int*>() = 1; // LS Fire Department
*ScriptGlobal(262145).At(37637).As<int*>() = 1; // Forklift Operator
*ScriptGlobal(262145).At(37638).As<int*>() = 1; // Paper Route
*ScriptGlobal(262145).At(37639).As<int*>() = 1; // Lucky Clover Event
*ScriptGlobal(262145).At(37823).As<int*>() = 1; // Bomb Squad, Mansion Raid
*ScriptGlobal(262145).At(37824).As<int*>() = 1; // Knockdown
*ScriptGlobal(262145).At(37825).As<int*>() = 1; // Alpha Mail
*ScriptGlobal(262145).At(37826).As<int*>() = 1; // Meteoric, Hot Off The Press
*ScriptGlobal(262145).At(37639).As<int*>() = 1; // LS Fire Department
*ScriptGlobal(262145).At(37640).As<int*>() = 1; // Forklift Operator
*ScriptGlobal(262145).At(37641).As<int*>() = 1; // Paper Route
*ScriptGlobal(262145).At(37642).As<int*>() = 1; // Lucky Clover Event
}
else
{
Expand Down
9 changes: 5 additions & 4 deletions src/game/features/recovery/fillVehiclewarehouse.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "core/commands/Command.hpp"
#include "game/gta/ScriptGlobal.hpp"
#include "game/gta/Stats.hpp"

namespace YimMenu::Features
{
Expand All @@ -9,11 +9,12 @@ namespace YimMenu::Features

virtual void OnCall() override
{
constexpr std::size_t base = 32359;
for (int i = 0; i < 5; i++)
for (int i = 32359; i <= 32363; i++)
{
ScriptGlobal(base + i).As<bool&>() = true;
Stats::SetPackedBool(i, true);
}

Stats::SaveStats();
}
};

Expand Down
8 changes: 4 additions & 4 deletions src/game/features/recovery/unlocks/Collectibles_Unlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ namespace YimMenu::Features
{
if (*Pointers.IsSessionStarted)
{
*ScriptGlobal(262145).At(34421).As<int*>() = 1; // Pumpkins Finished
*ScriptGlobal(262145).At(34392).As<int*>() = 20; // All 20 Ghosts
*ScriptGlobal(262145).At(35268).As<int*>() = 1; // UFO Event active
*ScriptGlobal(262145).At(35269).As<int*>() = 1; // Abduction Finished
*ScriptGlobal(262145).At(34422).As<int*>() = 1; // Pumpkins Finished
*ScriptGlobal(262145).At(34393).As<int*>() = 20; // All 20 Ghosts
*ScriptGlobal(262145).At(35269).As<int*>() = 1; // UFO Event active
*ScriptGlobal(262145).At(35270).As<int*>() = 1; // Abduction Finished
Stats::SetInt("XM22_FOOLIGAN_JOBS_COMPLETED", 10);
Stats::SetBool("XM22_LAB_UNLOCKED", true);
Stats::SetInt("RADIO_ANTENNA_COLLECTED", 10);
Expand Down
4 changes: 1 addition & 3 deletions src/game/features/recovery/unlocks/gunvan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,12 @@ namespace YimMenu::Features
void OnCall() override
{
FiberPool::Push([] {
ScriptGlobal gunVanGlobal(2652582);

ScriptGlobal gunVanGlobal(2652584);
*gunVanGlobal.At(2706).As<int*>() = _GunVanLocation.GetState();
*gunVanGlobal.At(2707).As<int*>() = 0;
});
}
};

static SetGunVanLocationCommand _SetGunVanLocation{
"setgunvanlocation",
"Set Location",
Expand Down
5 changes: 4 additions & 1 deletion src/game/frontend/submenus/Recovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace YimMenu::Submenus

auto casinoSlots = std::make_shared<Group>("Slot Machines");
auto casinoMisc = std::make_shared<Group>("Misc");
auto casinoLuckyWheel = std::make_shared<Group>("Lucky Wheel");
//auto casinoBlackJack = std::make_shared<Group>("Blackjack");
//auto casinoRoulette = std::make_shared<Group>("Roulette");

Expand Down Expand Up @@ -130,6 +131,8 @@ namespace YimMenu::Submenus

casinoMisc->AddItem(std::make_shared<BoolCommandItem>("casino_membership_bonus"_J));

casinoLuckyWheel->AddItem(std::make_shared<ListCommandItem>("luckywheelprize"_J));
casinoLuckyWheel->AddItem(std::make_shared<CommandItem>("setluckywheelprize"_J));


generalUnlocks->AddItem(std::make_shared<CommandItem>("unlockallcareerprogress"_J));
Expand Down Expand Up @@ -252,7 +255,7 @@ namespace YimMenu::Submenus

casino->AddItem(casinoSlots);
casino->AddItem(casinoMisc);

casino->AddItem(casinoLuckyWheel);


unlocks->AddItem(generalUnlocks);
Expand Down
Loading