cyberpunk-2077-utils.lua (4781B)
1 local Utils = {} 2 3 local TransactionSystem = Game.GetTransactionSystem() 4 local StatsSystem = Game.GetStatsSystem() 5 6 local createStatModifier = Game["gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat"] 7 8 Utils.UpgradeWeapon = function(slot) 9 local player = Game.GetPlayer() 10 11 local playerData = Game 12 .GetScriptableSystemsContainer() 13 :Get(CName.new("EquipmentSystem")) 14 :GetPlayerData(player) 15 16 17 local item = playerData["GetItemInEquipSlot;gamedataEquipmentAreaInt32"](playerData, "Weapon", slot) 18 19 if item.id.hash == 0 then 20 print("No weapon found in slot", slot) 21 return 22 end 23 24 local objectId = TransactionSystem:GetItemData(player, item):GetStatsObjectID() 25 26 StatsSystem:RemoveAllModifiers(objectId, "Quality", true) 27 StatsSystem:AddSavedModifier(objectId, createStatModifier("Quality", "Additive", 4)) 28 StatsSystem:RemoveAllModifiers(objectId, "IsItemPlus", true) 29 StatsSystem:AddSavedModifier(objectId, createStatModifier("IsItemPlus", "Additive", 2)) 30 31 print("Item upgraded") 32 end 33 34 Utils.Weapons = { 35 Nue = function() Game.AddToInventory("Items.Preset_Nue_Default") end, 36 Tamayura = function() Game.AddToInventory("Items.Preset_Nue_Arasaka_2020") end, 37 Overture = function() Game.AddToInventory("Items.Preset_Overture_Legendary") end, 38 Saratoga = function() Game.AddToInventory("Items.Preset_Saratoga_Default") end, 39 Igla = function() Game.AddToInventory("Items.Preset_Igla_Pimp") end, 40 Tactician = function() Game.AddToInventory("Items.Preset_Tactician_Default") end, 41 Kyubi = function() Game.AddToInventory("Items.Preset_Kyubi_Default") end, 42 Ajax = function() Game.AddToInventory("Items.Preset_Ajax_Default") end, 43 MA70 = function() Game.AddToInventory("Items.Preset_MA70_Default") end, 44 Kolac = function() Game.AddToInventory("Items.Preset_Kolac_Default") end, 45 Grad = function() Game.AddToInventory("Items.Preset_Grad_Default") end, 46 ChefsKnife = function() Game.AddToInventory("Items.Preset_Chefs_Knife_Default") end, 47 } 48 49 Utils.Mods = { 50 Silencio = function() Game.AddToInventory("Items.MeleeMod3_Legendary") end, 51 Pax = function() Game.AddToInventory("Items.GenericMod1_Legendary") end, 52 Equalizer = function() Game.AddToInventory("Items.RangedMod3_Legendary") end, 53 SwissCheese = function() Game.AddToInventory("Items.PowerMod2_Legendary") end, 54 Parallax = function() Game.AddToInventory("Items.HGMod3_X") end, 55 ZeroG = function() Game.AddToInventory("Items.ThrowMod2_Legendary") end, 56 Vivisector = function() Game.AddToInventory("Items.ShotgunMod1_Legendary") end, 57 Kneel = function() Game.AddToInventory("Items.ShotgunMod2_Legendary") end, 58 } 59 60 Utils.Money = function(amount) 61 Game.AddToInventory("Items.money", amount) 62 end 63 64 Utils.Progress = { 65 Level = function(level) 66 Game.SetLevel("Level", level, 1) 67 end, 68 StreetCreda = function(level) 69 Game.SetLevel("StreetCred", level, 1) 70 end, 71 AttributePoint = function(count) 72 for _=1,count do 73 Game.AddToInventory("Items.AttributePointSkillbook") 74 end 75 end, 76 PerkPoint = function(count) 77 for _=1,count do 78 Game.AddToInventory("Items.PerkPointSkillbook") 79 end 80 end, 81 RelicPoint = function(count) 82 for _=1,count do 83 Game.AddToInventory("Items.Espionage_Skillbook") 84 end 85 end, 86 CyberwareCapacity = function(count) 87 if math.fmod(count, 2) ~= 0 then 88 print("Count must be divisible by 2") 89 return 90 end 91 for _=1,count/2 do 92 Game.AddToInventory("Items.CWCapacityPermaReward_Uncommon") 93 end 94 end, 95 SoloExperience = function(count) 96 if math.fmod(count, 400) ~= 0 then 97 print("Count must be divisible by 400") 98 return 99 end 100 for _=1,count/400 do 101 Game.AddToInventory("Items.BodySkill_Skillbook_Legendary") 102 end 103 end, 104 HeadhunterExperience = function(count) 105 if math.fmod(count, 400) ~= 0 then 106 print("Count must be divisible by 400") 107 return 108 end 109 for _=1,count/400 do 110 Game.AddToInventory("Items.CoolSkill_Skillbook_Legendary") 111 end 112 end, 113 NetrunnerExperience = function(count) 114 if math.fmod(count, 400) ~= 0 then 115 print("Count must be divisible by 400") 116 return 117 end 118 for _=1,count/400 do 119 Game.AddToInventory("Items.IntelligenceSkill_Skillbook_Legendary") 120 end 121 end, 122 ShinobiExperience = function(count) 123 if math.fmod(count, 400) ~= 0 then 124 print("Count must be divisible by 400") 125 return 126 end 127 for _=1,count/400 do 128 Game.AddToInventory("Items.ReflexSkill_Skillbook_Legendary") 129 end 130 end, 131 EngineerExperience = function(count) 132 if math.fmod(count, 400) ~= 0 then 133 print("Count must be divisible by 400") 134 return 135 end 136 for _=1,count/400 do 137 Game.AddToInventory("Items.TechnicalAbilitySkill_Skillbook_Legendary") 138 end 139 end, 140 } 141 142 return Utils