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
2 changes: 2 additions & 0 deletions src/game/backend/AnticheatBypass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ namespace YimMenu
if (m_BattlEyeRunning)
LOGF(WARNING, "If you are not running an actual BattlEye bypass, exit the game immediately and ensure that BE is properly disabled");

#if 0
if (!m_FSLProvidesBEBypass && !m_BattlEyeRunning)
Pointers.BattlEyeStatusUpdatePatch->Apply();
#endif

while (true)
{
Expand Down
4 changes: 2 additions & 2 deletions src/game/backend/PersonalVehicles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ namespace YimMenu
auto garageOffset = GetPropertyGarageOffset(propertyIterator);
for (int garageSlotIterator = 1; garageSlotIterator <= garageSize; garageSlotIterator++)
{
auto itemInSlot = *ScriptGlobal(1944744).At(garageOffset).At(garageSlotIterator).As<int*>() - 1;
auto itemInSlot = *ScriptGlobal(1945138).At(garageOffset).At(garageSlotIterator).As<int*>() - 1;
if (itemInSlot == m_Id)
{
auto staticPropertyString = GetStaticPropertyName(propertyIterator, garageSlotIterator);
Expand Down Expand Up @@ -380,7 +380,7 @@ namespace YimMenu

ScriptMgr::Yield(100ms);

*ScriptLocal("freemode"_J, 19633).At(176).As<int*>() = 0;
*ScriptLocal("freemode"_J, 19672).At(176).As<int*>() = 0;

if (bring)
{
Expand Down
8 changes: 4 additions & 4 deletions src/game/features/network/SilencePhonecalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ namespace YimMenu::Features

virtual void OnTick() override
{
constexpr auto is_incoming_call = ScriptGlobal(23010);
constexpr auto is_phone_call_in_progress = ScriptGlobal(23006);
constexpr auto phone_call_state = ScriptGlobal(23000);
constexpr auto calling_character = ScriptGlobal(8779);
constexpr auto is_incoming_call = ScriptGlobal(23050);
constexpr auto is_phone_call_in_progress = ScriptGlobal(23046);
constexpr auto phone_call_state = ScriptGlobal(23040);
constexpr auto calling_character = ScriptGlobal(8818);

if (*Pointers.IsSessionStarted)
{
Expand Down
16 changes: 8 additions & 8 deletions src/game/features/network/SpoofDataHash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ namespace YimMenu::Features
NativeHooks::AddHook(NativeHooks::ALL_SCRIPTS, NativeIndex::GET_EVER_HAD_BAD_PACK_ORDER, &PackOrderHook);

constexpr std::array<std::uint32_t, 16> validHashes = {
1222354255, // 0
1017, // 1
2008403316, // 2
3086857943, // 0
1029, // 1
578942327, // 2
472, // 3
0, // 4
0, // 5
2683527064, // 6
3471586599, // 6
0, // 7
0, // 8
1731098795, // 9
234493012, // 10
19919, // 11
4002619495, // 12
19987, // 11
1949347533, // 12
307143837, // 13
2653292054, // 14
2738033789, // 14
200299391, // 15
};
if (auto hashes = Pointers.GameDataHash)
Expand Down Expand Up @@ -93,7 +93,7 @@ namespace YimMenu::Hooks
uint32_t Network::GetDLCHash(void* manager, uint32_t seed)
{
if (YimMenu::Features::_SpoofDataHash.GetState())
return 2784221708;
return 1631480001;

return BaseHook::Get<Network::GetDLCHash, DetourHook<decltype(&Network::GetDLCHash)>>()->Original()(manager, seed);
}
Expand Down
4 changes: 2 additions & 2 deletions src/game/features/recovery/Casino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ namespace YimMenu::Features
{
using LoopedCommand::LoopedCommand;

int slots_random_results_table = 1350;
int slots_random_results_table = 1357; // Static_1381.f_1[][]
std::set<int> slots_blacklist = {9, 21, 22, 87, 152};
int spin_state_var = 1668;
int spin_state_var = 1675;
std::set<int> spin_state_whitelist = {8, 14};

virtual void OnTick() override
Expand Down
14 changes: 7 additions & 7 deletions src/game/features/recovery/ClaimSafeEarnings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,43 +43,43 @@ namespace YimMenu::Features
case eAppVinewoodMenuSafe::NIGHTCLUB:
{
if (GPBD_FM::Get()->Entries[Self::GetPlayer().GetId()].PropertyData.NightclubData.SafeCashValue > 0)
*ScriptGlobal(2708832).As<BOOL*>() = TRUE;
*ScriptGlobal(2708943).As<BOOL*>() = TRUE;
break;
}
case eAppVinewoodMenuSafe::ARCADE:
{
if (GPBD_FM::Get()->Entries[Self::GetPlayer().GetId()].PropertyData.ArcadeData.SafeCashValue > 0)
*ScriptGlobal(2708841).As<BOOL*>() = TRUE;
*ScriptGlobal(2708952).As<BOOL*>() = TRUE;
break;
}
case eAppVinewoodMenuSafe::AGENCY:
{
if (GPBD_FM::Get()->Entries[Self::GetPlayer().GetId()].PropertyData.FixerHQData.SafeCashValue > 0)
*ScriptGlobal(2708850).As<BOOL*>() = TRUE;
*ScriptGlobal(2708961).As<BOOL*>() = TRUE;
break;
}
case eAppVinewoodMenuSafe::SALVAGE_YARD:
{
if (GPBD_FM::Get()->Entries[Self::GetPlayer().GetId()].PropertyData.SalvageYardData.TotalEarnings > 0)
*ScriptGlobal(2708859).As<BOOL*>() = TRUE;
*ScriptGlobal(2708970).As<BOOL*>() = TRUE;
break;
}
case eAppVinewoodMenuSafe::BAIL_OFFICE:
{
if (GPBD_FM::Get()->Entries[Self::GetPlayer().GetId()].PropertyData.BailShopData.SafeCashValue > 0)
*ScriptGlobal(2708868).As<BOOL*>() = TRUE;
*ScriptGlobal(2708979).As<BOOL*>() = TRUE;
break;
}
case eAppVinewoodMenuSafe::GARMENT_FACTORY:
{
if (GPBD_FM::Get()->Entries[Self::GetPlayer().GetId()].PropertyData.HackerDenData.SafeCashValue > 0)
*ScriptGlobal(2708883).As<BOOL*>() = TRUE;
*ScriptGlobal(2708994).As<BOOL*>() = TRUE;
break;
}
case eAppVinewoodMenuSafe::HANDS_ON_CAR_WASH:
{
if (GPBD_FM_2::Get()->Entries[Self::GetPlayer().GetId()].SYVehSaleData.HOWCData.SafeCashValue > 0)
*ScriptGlobal(2708890).As<BOOL*>() = TRUE;
*ScriptGlobal(2709001).As<BOOL*>() = TRUE;
break;
}
}
Expand Down
40 changes: 20 additions & 20 deletions src/game/features/recovery/DailyActivities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ namespace YimMenu::Features

static joaat_t GetNextExoticExportsVehicleHash()
{
constexpr ScriptGlobal order(1950369);
constexpr ScriptGlobal order(1950873);
for (int i = 1; i <= 10; i++)
{
auto offset = *order.At(i).As<int*>();
if (!GPBD_Flow::Get()->Entries[Self::GetPlayer().GetId()].TunerCBVDeliveredFlags.IsSet(offset))
{
auto hash = *ScriptGlobal(1950358 + (offset + 1)).As<joaat_t*>();
auto hash = *ScriptGlobal(1950862 + (offset + 1)).As<joaat_t*>();
return hash;
}
}
Expand Down Expand Up @@ -205,7 +205,7 @@ namespace YimMenu::Features
}
}

auto streetDealerData = ScriptLocal(m_Thread, 258).At(12);
auto streetDealerData = ScriptLocal(m_Thread, 265).At(12);

if (!initialized)
{
Expand Down Expand Up @@ -528,13 +528,13 @@ namespace YimMenu::Features
bool partime = Stats::GetPackedInt(34838 + (index * 4)) == location;
bool landing = Stats::GetPackedInt(34839 + (index * 4)) == location;

*ScriptGlobal(1979961).As<int*>() = 1;
*ScriptGlobal(1979961).At(1).As<int*>() = 1;
*ScriptGlobal(1979961).At(3).As<int*>() = 5;
*ScriptGlobal(1979961).At(4).As<int*>() = location + 1;
*ScriptGlobal(1979961).At(8).At(1).As<int*>() = checkpointReward.Get<int>() / (1 + (checkpoints * 9));
*ScriptGlobal(1979961).At(8).At(2).As<int*>() = parTimeReward.Get<int>() / (1 + (partime * 9));
*ScriptGlobal(1979961).At(8).At(3).As<int*>() = landingReward.Get<int>() / (1 + (landing * 9));
*ScriptGlobal(1980496).As<int*>() = 1;
*ScriptGlobal(1980496).At(1).As<int*>() = 1;
*ScriptGlobal(1980496).At(3).As<int*>() = 5;
*ScriptGlobal(1980496).At(4).As<int*>() = location + 1;
*ScriptGlobal(1980496).At(8).At(1).As<int*>() = checkpointReward.Get<int>() / (1 + (checkpoints * 9));
*ScriptGlobal(1980496).At(8).At(2).As<int*>() = parTimeReward.Get<int>() / (1 + (partime * 9));
*ScriptGlobal(1980496).At(8).At(3).As<int*>() = landingReward.Get<int>() / (1 + (landing * 9));

SET_SKYDIVE_COMPLETED data;
data.SkydiveIndex = index;
Expand All @@ -544,7 +544,7 @@ namespace YimMenu::Features
data.AccurateLanding = TRUE;
data.Send();

ScriptGlobal(1983930).At(4).As<SCR_BITSET<uint64_t>*>()->Clear(3);
ScriptGlobal(1984467).At(4).As<SCR_BITSET<uint64_t>*>()->Clear(3);
}
};

Expand Down Expand Up @@ -656,8 +656,8 @@ namespace YimMenu::Features
{
thread->m_Context.m_State = rage::scrThread::State::PAUSED;

*ScriptLocal(thread, 3103).At(131).At(1).As<int*>() = FreemodeGeneral::Get()->DailyReset.Seed % 14; // if we don't init this, the par time duration function will return 0 and the COMPLETED stat will be set to 0, which is bad
*ScriptLocal(thread, 146).At(4).As<int*>() = 0;
*ScriptLocal(thread, 3135).At(131).At(1).As<int*>() = FreemodeGeneral::Get()->DailyReset.Seed % 14; // if we don't init this, the par time duration function will return 0 and the COMPLETED stat will be set to 0, which is bad
*ScriptLocal(thread, 153).At(4).As<int*>() = 0;
static ScriptFunction onBTTEnd("fm_content_bicycle_time_trial"_J,
ScriptPointer("OnBTTEnd", "64 ? ? ? 5D ? ? ? 75 77").Add(1).Rip());
onBTTEnd.Call<void>();
Expand Down Expand Up @@ -712,7 +712,7 @@ namespace YimMenu::Features
}*/

auto hash = GetNextExoticExportsVehicleHash();
static ScriptFunction onFreemodeDeliveryEnd("freemode"_J, ScriptPointer("OnFreemodeDeliveryEnd", "2D 0C 2A 00 00"));
static ScriptFunction onFreemodeDeliveryEnd("freemode"_J, ScriptPointer("OnFreemodeDeliveryEnd", "2D 0C 2B 00"));
onFreemodeDeliveryEnd.Call<void>(0, Self::GetPlayer().GetId(), 0, 0, 0, 0, 0, 0, 0, 0, hash, 273);
//FreemodeDelivery::Get()->DeliveryCooldown1.Reset();
}
Expand Down Expand Up @@ -796,8 +796,8 @@ namespace YimMenu::Features
{
for (int i = 0; i < 3; i++)
{
int combination = *ScriptLocal(thread, 146).At(22).At(i, 2).At(1).As<int*>();
*ScriptLocal(thread, 146).At(22).At(i, 2).As<float*>() = combination;
int combination = *ScriptLocal(thread, 153).At(22).At(i, 2).At(1).As<int*>();
*ScriptLocal(thread, 153).At(22).At(i, 2).As<float*>() = combination;
}
}
}
Expand Down Expand Up @@ -915,7 +915,7 @@ namespace YimMenu::Features

if (auto thread = Scripts::FindScriptThread("fm_content_daily_bounty"_J))
{
if (auto coords = *ScriptLocal(thread, 243).At(434).At(1).At(0, 4).As<Vector3*>())
if (auto coords = *ScriptLocal(thread, 250).At(434).At(1).At(0, 4).As<Vector3*>())
{
Self::GetPed().TeleportTo(coords);
}
Expand Down Expand Up @@ -962,9 +962,9 @@ namespace YimMenu::Features
if (index < 0 || index >= wildlifePhotographyAnimalHashes.size())
return;

ScriptGlobal(2709409).At(545).As<SCR_BITSET<uint64_t>*>()->Set(6);
*ScriptGlobal(2709409).At(549).As<joaat_t*>() = wildlifePhotographyAnimalHashes[index];
*ScriptGlobal(2709409).At(550).As<int*>() = *Pointers.GameTimer - 1; // bypass 2 sec delay
ScriptGlobal(2709520).At(545).As<SCR_BITSET<uint64_t>*>()->Set(6);
*ScriptGlobal(2709520).At(549).As<joaat_t*>() = wildlifePhotographyAnimalHashes[index];
*ScriptGlobal(2709520).At(550).As<int*>() = *Pointers.GameTimer - 1; // bypass 2 sec delay
}
else
{
Expand Down
33 changes: 17 additions & 16 deletions src/game/features/recovery/Heist/ApartmentHeist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "game/gta/ScriptLocal.hpp"
#include "core/backend/ScriptMgr.hpp"
#include "types/script/globals/GlobalPlayerBD.hpp"
#include "game/backend/Self.hpp"

namespace YimMenu::Features
{
Expand All @@ -22,8 +23,8 @@ namespace YimMenu::Features

virtual void OnCall() override
{
auto base1 = ScriptGlobal(1936013).At(1);
auto base2 = ScriptGlobal(1937981).At(3008);
auto base1 = ScriptGlobal(1936406).At(1);
auto base2 = ScriptGlobal(1938374).At(3008);

*base1.At(0, 1).As<int*>() = 100 - (_ApartmentHeistCut1.GetState() + _ApartmentHeistCut2.GetState() + _ApartmentHeistCut3.GetState() + _ApartmentHeistCut4.GetState());
*base1.At(1, 1).As<int*>() = _ApartmentHeistCut2.GetState();
Expand Down Expand Up @@ -75,8 +76,8 @@ namespace YimMenu::Features
{
if (auto thread = Scripts::FindScriptThread("fm_mission_controller"_J))
{
*ScriptLocal(thread, 12223).At(24).As<int*>() = 7;
*ScriptLocal(thread, 10217).As<int*>() = *ScriptLocal(thread, 10217).As<int*>() | (1 << 9);
*ScriptLocal(thread, 12239).At(24).As<int*>() = 7;
*ScriptLocal(thread, 10233).As<int*>() = *ScriptLocal(thread, 10233).As<int*>() | (1 << 9);
}
}
};
Expand All @@ -89,7 +90,7 @@ namespace YimMenu::Features
{
if (auto thread = Scripts::FindScriptThread("fm_mission_controller"_J))
{
*ScriptLocal(thread, 10511).At(11).As<float*>() = 100.0f;
*ScriptLocal(thread, 10527).At(11).As<float*>() = 100.0f;
}
}
};
Expand All @@ -102,8 +103,8 @@ namespace YimMenu::Features
{
if (auto thread = Scripts::FindScriptThread("fm_mission_controller"_J))
{
*ScriptLocal(thread, 32616).As<int*>() = 8;
*ScriptLocal(thread, 63640).As<int*>() = 5;
*ScriptLocal(thread, 32785).At(Self::GetPlayer().GetId(), 294).At(143).As<int*>() = 8;
*ScriptLocal(thread, 64655).As<int*>() = 5;
}
}
};
Expand All @@ -119,10 +120,10 @@ namespace YimMenu::Features
Scripts::ForceScriptHost(thread);
ScriptMgr::Yield(500ms);

*ScriptLocal(thread, 20395).At(1725).At(0, 1).As<int*>() = 80;
*ScriptLocal(thread, 20395).As<int*>() = 12;
*ScriptLocal(thread, 29016).At(0, 1).As<int*>() = 99999;
*ScriptLocal(thread, 32472).At(0, 294).At(68).As<int*>() = 99999;
*ScriptLocal(thread, 20412).At(1725).At(0, 1).As<int*>() = 80;
*ScriptLocal(thread, 20412).As<int*>() = 12;
*ScriptLocal(thread, 29326).At(0, 1).As<int*>() = 99999;
*ScriptLocal(thread, 32785).At(0, 294).At(68).As<int*>() = 99999;
}
// TODO: find a way of getting current heist info so that InstantFinishPacific can be implemented here conditionally.
}
Expand All @@ -139,11 +140,11 @@ namespace YimMenu::Features
Scripts::ForceScriptHost(thread);
ScriptMgr::Yield(500ms);

*ScriptLocal(thread, 20395).At(2686).As<int*>() = 1875000;
*ScriptLocal(thread, 20395).At(1062).As<int*>() = 5;
*ScriptLocal(thread, 20395).As<int*>() = 12;
*ScriptLocal(thread, 29016).At(0, 1).As<int*>() = 99999;
*ScriptLocal(thread, 32472).At(0, 294).At(68).As<int*>() = 99999;
*ScriptLocal(thread, 20412).At(2686).As<int*>() = 1875000;
*ScriptLocal(thread, 20412).At(1062).As<int*>() = 5;
*ScriptLocal(thread, 20412).As<int*>() = 12;
*ScriptLocal(thread, 29326).At(0, 1).As<int*>() = 99999;
*ScriptLocal(thread, 32785).At(0, 294).At(68).As<int*>() = 99999;
}
}
};
Expand Down
Loading
Loading