diff --git a/includes/data/globals.lua b/includes/data/globals.lua index 3e83c8c..bcaba50 100644 --- a/includes/data/globals.lua +++ b/includes/data/globals.lua @@ -1,9 +1,9 @@ ---@diagnostic disable local SCRIPT_NAME = "samurais_scripts" -local SCRIPT_VERSION = "1.7.1" -local TARGET_BUILD = "3586.0" -local TARGET_VERSION = "1.71" +local SCRIPT_VERSION = "1.7.4" +local TARGET_BUILD = "3725.0" +local TARGET_VERSION = "1.72" local DEFAULT_CONFIG = { favorite_entities = {}, forged_entities = {}, @@ -394,28 +394,28 @@ f_DailyQuoteTextAlpha = 1.0 i_PedThrowForce = 10 i_DefaultWantedLevel = 5 FreemodeGlobal1 = 262145 -FreemodeGlobal2 = 1668000 +FreemodeGlobal2 = 1673807 PVGLobal = 1572092 BusinessHubGlobal1 = 1965869 BusinessHubGlobal2 = 1963766 ------------------- Casino Pacino ------------------- -blackjack_cards = 136 +blackjack_cards = 138 blackjack_decks = 846 -blackjack_table_players = 1796 +blackjack_table_players = 1798 blackjack_table_players_size = 8 -three_card_poker_table = 769 +three_card_poker_table = 771 three_card_poker_table_size = 9 -three_card_poker_cards = 136 +three_card_poker_cards = 138 three_card_poker_current_deck = 168 -three_card_poker_anti_cheat = 1058 +three_card_poker_anti_cheat = 1060 three_card_poker_anti_cheat_deck = 856 three_card_poker_deck_size = 55 -roulette_master_table = 144 +roulette_master_table = 146 roulette_outcomes_table = 1357 roulette_ball_table = 153 -slots_random_results_table = 1348 -slots_slot_machine_state = 1638 -prize_wheel_win_state = 300 +slots_random_results_table = 1372 +slots_slot_machine_state = 1662 +prize_wheel_win_state = 302 prize_wheel_prize = 14 prize_wheel_prize_state = 45 gb_casino_heist_planning = 1967717 diff --git a/includes/features/YimResupplierV3.lua b/includes/features/YimResupplierV3.lua index 9721abe..fb56b53 100644 --- a/includes/features/YimResupplierV3.lua +++ b/includes/features/YimResupplierV3.lua @@ -140,7 +140,7 @@ function YRV3:PopulateBikerBusinessSlot(index) name = v.name, id = v.id, unit_max = v.unit_max, - val_offset = v.val_offset, + value_tunable = v.val_tunable, blip = v.blip, } end @@ -176,35 +176,35 @@ function YRV3:GetCEOCratesValue(crates) return 0 end - if crates == 1 then - return globals.get_int(FreemodeGlobal1 + 15732) -- EXEC_CONTRABAND_SALE_VALUE_THRESHOLD1 - end + if (crates == 1) then + return tunables.get_int("EXEC_CONTRABAND_SALE_VALUE_THRESHOLD1") -- EXEC_CONTRABAND_SALE_VALUE_THRESHOLD1 + end - if crates == 2 then - return globals.get_int(FreemodeGlobal1 + 15733) * 2 - end + if (crates == 2) then + return tunables.get_int("EXEC_CONTRABAND_SALE_VALUE_THRESHOLD2") * 2 -- +1 + end - if crates == 3 then - return globals.get_int(FreemodeGlobal1 + 15734) * 3 - end + if (crates == 3) then + return tunables.get_int("EXEC_CONTRABAND_SALE_VALUE_THRESHOLD3") * 3 -- +1 + end - if crates == 4 or crates == 5 then - return globals.get_int(FreemodeGlobal1 + 15735) * crates - end + if (crates == 4 or crates == 5) then + return tunables.get_int("EXEC_CONTRABAND_SALE_VALUE_THRESHOLD4") * crates -- +1 + end - if crates >= 6 and crates <= 9 then - return (globals.get_int(FreemodeGlobal1 + 15735) + math.floor((crates - 4) / 2)) * crates - end + if (crates >= 6 and crates <= 9) then + return (tunables.get_int("EXEC_CONTRABAND_SALE_VALUE_THRESHOLD4") + math.floor((crates - 4) / 2)) * crates -- +0 + end - if crates >= 10 and crates <= 110 then - return (globals.get_int(FreemodeGlobal1 + 15738) + math.floor((crates - 10) / 5)) * crates - end + if (crates >= 10 and crates <= 110) then + return (tunables.get_int("EXEC_CONTRABAND_SALE_VALUE_THRESHOLD7") + math.floor((crates - 10) / 5)) * crates -- +3 + end - if crates == 111 then - return globals.get_int(FreemodeGlobal1 + 15752) * 111 - end + if (crates == 111) then + return tunables.get_int("EXEC_CONTRABAND_SALE_VALUE_THRESHOLD21") * 111 -- + 14 + end - return 0 + return 0 end function YRV3:FinishCEOCargoSourceMission() @@ -674,36 +674,36 @@ YRV3.t_SellScripts = { } YRV3.t_CEOwarehouses = { - { id = 1, size = 0, max = 16, coords = vec3:new(51.311188, -2568.470947, 6.004591) }, - { id = 2, size = 0, max = 16, coords = vec3:new(-1081.083740, -1261.013184, 5.648909) }, - { id = 3, size = 0, max = 16, coords = vec3:new(898.484314, -1031.882446, 34.966454) }, - { id = 4, size = 0, max = 16, coords = vec3:new(249.246918, -1955.651978, 23.161957) }, - { id = 5, size = 0, max = 16, coords = vec3:new(-424.773499, 184.146530, 80.752899) }, - { id = 6, size = 2, max = 111, coords = vec3:new(-1045.004395, -2023.150146, 13.161570) }, - { id = 7, size = 1, max = 42, coords = vec3:new(-1269.286133, -813.215820, 17.107399) }, - { id = 8, size = 2, max = 111, coords = vec3:new(-876.108032, -2734.502930, 13.844264) }, - { id = 9, size = 0, max = 16, coords = vec3:new(272.409424, -3015.267090, 5.707359) }, - { id = 10, size = 1, max = 42, coords = vec3:new(1563.832031, -2135.110840, 77.616447) }, - { id = 11, size = 1, max = 42, coords = vec3:new(-308.772247, -2698.393799, 6.000292) }, - { id = 12, size = 1, max = 42, coords = vec3:new(503.738037, -653.082642, 24.751144) }, - { id = 13, size = 1, max = 42, coords = vec3:new(-528.074585, -1782.701904, 21.483055) }, - { id = 14, size = 1, max = 42, coords = vec3:new(-328.013458, -1354.755371, 31.296524) }, - { id = 15, size = 1, max = 42, coords = vec3:new(349.901184, 327.976440, 104.303856) }, - { id = 16, size = 2, max = 111, coords = vec3:new(922.555481, -1560.048950, 30.756647) }, - { id = 17, size = 2, max = 111, coords = vec3:new(762.672363, -909.193054, 25.250854) }, - { id = 18, size = 2, max = 111, coords = vec3:new(1041.059814, -2172.653076, 31.488876) }, - { id = 19, size = 2, max = 111, coords = vec3:new(1015.361633, -2510.986572, 28.302608) }, - { id = 20, size = 2, max = 111, coords = vec3:new(-245.651718, 202.504669, 83.792648) }, - { id = 21, size = 1, max = 42, coords = vec3:new(541.587646, -1944.362793, 24.985096) }, - { id = 22, size = 2, max = 111, coords = vec3:new(93.278641, -2216.144775, 6.033320) }, + { id = 1, size = 0, max = 16, coords = vec3:new(51.311188, -2568.470947, 6.004591) }, + { id = 2, size = 0, max = 16, coords = vec3:new(-1081.083740, -1261.013184, 5.648909) }, + { id = 3, size = 0, max = 16, coords = vec3:new(898.484314, -1031.882446, 34.966454) }, + { id = 4, size = 0, max = 16, coords = vec3:new(249.246918, -1955.651978, 23.161957) }, + { id = 5, size = 0, max = 16, coords = vec3:new(-424.773499, 184.146530, 80.752899) }, + { id = 6, size = 2, max = 111, coords = vec3:new(-1045.004395, -2023.150146, 13.161570) }, + { id = 7, size = 1, max = 42, coords = vec3:new(-1269.286133, -813.215820, 17.107399) }, + { id = 8, size = 2, max = 111, coords = vec3:new(-876.108032, -2734.502930, 13.844264) }, + { id = 9, size = 0, max = 16, coords = vec3:new(272.409424, -3015.267090, 5.707359) }, + { id = 10, size = 1, max = 42, coords = vec3:new(1563.832031, -2135.110840, 77.616447) }, + { id = 11, size = 1, max = 42, coords = vec3:new(-308.772247, -2698.393799, 6.000292) }, + { id = 12, size = 1, max = 42, coords = vec3:new(503.738037, -653.082642, 24.751144) }, + { id = 13, size = 1, max = 42, coords = vec3:new(-528.074585, -1782.701904, 21.483055) }, + { id = 14, size = 1, max = 42, coords = vec3:new(-328.013458, -1354.755371, 31.296524) }, + { id = 15, size = 1, max = 42, coords = vec3:new(349.901184, 327.976440, 104.303856) }, + { id = 16, size = 2, max = 111, coords = vec3:new(922.555481, -1560.048950, 30.756647) }, + { id = 17, size = 2, max = 111, coords = vec3:new(762.672363, -909.193054, 25.250854) }, + { id = 18, size = 2, max = 111, coords = vec3:new(1041.059814, -2172.653076, 31.488876) }, + { id = 19, size = 2, max = 111, coords = vec3:new(1015.361633, -2510.986572, 28.302608) }, + { id = 20, size = 2, max = 111, coords = vec3:new(-245.651718, 202.504669, 83.792648) }, + { id = 21, size = 1, max = 42, coords = vec3:new(541.587646, -1944.362793, 24.985096) }, + { id = 22, size = 2, max = 111, coords = vec3:new(93.278641, -2216.144775, 6.033320) }, } YRV3.t_BikerBusinessIDs = { - { name = "Fake Documents", id = 0, unit_max = 60, val_offset = 17319, blip = 498, possible_ids = { 5, 10, 15, 20 } }, - { name = "Weed", id = 1, unit_max = 80, val_offset = 17323, blip = 496, possible_ids = { 2, 7, 12, 17 } }, - { name = "Fake Cash", id = 2, unit_max = 40, val_offset = 17320, blip = 500, possible_ids = { 4, 9, 14, 19 } }, - { name = "Methamphetamine", id = 3, unit_max = 20, val_offset = 17322, blip = 499, possible_ids = { 1, 6, 11, 16 } }, - { name = "Cocaine", id = 4, unit_max = 10, val_offset = 17321, blip = 497, possible_ids = { 3, 8, 13, 18 } }, + { name = "Fake Documents", id = 0, unit_max = 60, val_tunable = "BIKER_FAKEIDS_PRODUCT_VALUE", blip = 498, possible_ids = { 5, 10, 15, 20 } }, + { name = "Weed", id = 1, unit_max = 80, val_tunable = "BIKER_WEED_PRODUCT_VALUE", blip = 496, possible_ids = { 2, 7, 12, 17 } }, + { name = "Fake Cash", id = 2, unit_max = 40, val_tunable = "BIKER_COUNTERCASH_PRODUCT_VALUE", blip = 500, possible_ids = { 4, 9, 14, 19 } }, + { name = "Methamphetamine", id = 3, unit_max = 20, val_tunable = "BIKER_METH_PRODUCT_VALUE", blip = 499, possible_ids = { 1, 6, 11, 16 } }, + { name = "Cocaine", id = 4, unit_max = 10, val_tunable = "BIKER_CRACK_PRODUCT_VALUE", blip = 497, possible_ids = { 3, 8, 13, 18 } }, } YRV3.t_Hangars = { diff --git a/includes/gui/yrv3_ui.lua b/includes/gui/yrv3_ui.lua index e525bbc..132be5a 100644 --- a/includes/gui/yrv3_ui.lua +++ b/includes/gui/yrv3_ui.lua @@ -218,31 +218,31 @@ local function drawBunker() ImGui.SeparatorText(YRV3.t_Bunkers[bunker_index].name) local bunkerUpdgrade1 = stats.get_int("MPX_BUNKER_EQUIPMENT") == 1 - local bunkerUpdgrade2 = stats.get_int("MPX_BUNKER_STAFF") == 1 - local bunkerOffset1 = 0 - local bunkerOffset2 = 0 - local bunkerEqLabelCol = "white" - local bunkerStLabelCol = "white" - - if bunkerUpdgrade1 then - bunkerOffset1 = globals.get_int(FreemodeGlobal1 + 21256) - bunkerEqLabelCol = "green" - else - bunkerOffset1 = 0 - bunkerEqLabelCol = "red" - end - - if bunkerUpdgrade2 then - bunkerOffset2 = globals.get_int(FreemodeGlobal1 + 21255) - bunkerStLabelCol = "green" - else - bunkerOffset2 = 0 - bunkerStLabelCol = "red" - end - - local bunkerSupplies = stats.get_int("MPX_MATTOTALFORFACTORY5") - local bunkerStock = stats.get_int("MPX_PRODTOTALFORFACTORY5") - i_BunkerTotalValue = (globals.get_int(FreemodeGlobal1 + 21254) + bunkerOffset1 + bunkerOffset2) * bunkerStock + local bunkerUpdgrade2 = stats.get_int("MPX_BUNKER_STAFF") == 1 + local bunkerOffset1 = 0 + local bunkerOffset2 = 0 + local bunkerEqLabelCol = "white" + local bunkerStLabelCol = "white" + + if (bunkerUpdgrade1) then + bunkerOffset1 = tunables.get_int("GR_MANU_PRODUCT_VALUE_EQUIPMENT_UPGRADE") + bunkerEqLabelCol = "green" + else + bunkerOffset1 = 0 + bunkerEqLabelCol = "red" + end + + if (bunkerUpdgrade2) then + bunkerOffset2 = tunables.get_int("GR_MANU_PRODUCT_VALUE_STAFF_UPGRADE") + bunkerStLabelCol = "green" + else + bunkerOffset2 = 0 + bunkerStLabelCol = "red" + end + + local bunkerSupplies = stats.get_int("MPX_MATTOTALFORFACTORY5") + local bunkerStock = stats.get_int("MPX_PRODTOTALFORFACTORY5") + i_BunkerTotalValue = (tunables.get_int("GR_MANU_PRODUCT_VALUE") + bunkerOffset1 + bunkerOffset2) * bunkerStock ImGui.BulletText("Equipment Upgrade: ") @@ -305,30 +305,29 @@ end local function drawAcidLab() b_AcidLabOwned = stats.get_int("MPX_XM22_LAB_OWNED") ~= 0 - if not b_AcidLabOwned then ImGui.Text("You don't own an acid lab.") return end ImGui.SeparatorText("Acid Lab") - local acidUpdgrade = (stats.get_int("MPX_AWD_CALLME") >= 10) and - (stats.get_int("MPX_XM22_LAB_EQUIP_UPGRADED") == 1) - - local acidUpgradeLabelCol = "white" - local acidOffset = 0 - - if acidUpdgrade then - acidUpgradeLabelCol = "green" - acidOffset = globals.get_int(FreemodeGlobal1 + 17330) - else - acidUpgradeLabelCol = "red" - acidOffset = 0 - end + local acidUpdgrade = (stats.get_int("MPX_AWD_CALLME") >= 10) + and (stats.get_int("MPX_XM22_LAB_EQUIP_UPGRADED") == 1) + + local acidUpgradeLabelCol = "white" + local acidOffset = 0 + + if (acidUpdgrade) then + acidUpgradeLabelCol = "green" + acidOffset = tunables.get_int("BIKER_ACID_PRODUCT_VALUE_EQUIPMENT_UPGRADE") + else + acidUpgradeLabelCol = "red" + acidOffset = 0 + end local acidSupplies = stats.get_int("MPX_MATTOTALFORFACTORY6") local acidStock = stats.get_int("MPX_PRODTOTALFORFACTORY6") - i_AcidLabTotalValue = globals.get_int(FreemodeGlobal1 + 17324) + acidOffset * acidStock + i_AcidLabTotalValue = tunables.get_int("BIKER_ACID_PRODUCT_VALUE") + acidOffset * acidStock ImGui.BulletText("Equipment Upgrade: ") ImGui.SameLine() @@ -390,14 +389,14 @@ local function drawBikerBusiness() if not business.wasChecked then YRV3:PopulateBikerBusinessSlot(i) - elseif business.name and business.val_offset then + elseif business.name and business.value_tunable then ImGui.PushID(string.format("bb##", i)) ImGui.Dummy(1, 5) ImGui.SeparatorText(business.name) data.i_TotalSupplies = stats.get_int(("MPX_MATTOTALFORFACTORY%d"):format(slot)) data.i_TotalStock = stats.get_int(("MPX_PRODTOTALFORFACTORY%d"):format(slot)) - data.i_TotalValue = globals.get_int(FreemodeGlobal1 + business.val_offset) * data.i_TotalStock + data.i_TotalValue = tunables.get_int(business.value_tunable) * data.i_TotalStock YRV3.i_BikerValueSum = YRV3.i_BikerValueSum + data.i_TotalValue ImGui.BulletText("Supplies:")