Home » Public Forums » General Discussion » Where are the "ObjectInventory" texts? (Trying to get rid of duplicates)
Where are the "ObjectInventory" texts? |
Fri, 25 March 2022 23:42 |
AngelDa28
Messages: 1 Registered: March 2022
|
Junior Member |
|
|
Hey, I have a problem with the weapons from the shooting range and the Reaver's Wheel thing, I had used that one items unlocker that unlocks everything, used it
after defeating Saker and after I complete the Masquerade quest and play those two places I mentioned on the start, im left with twice of the 4 weapons.So if anyone has a lua script or something, i would apreciate it.Edit 2: Forgot to mention the Wolfsbane being duplicated too lol.
PD: Sorry for bad english
Edit:Also, how I can make the "Hobnobbing with Hobbes" quest appear earlier rather than after completing the base game?
[Updated on: Sat, 26 March 2022 01:01] Report message to a moderator
|
|
|
Re: Where are the "ObjectInventory" texts? |
Thu, 31 March 2022 18:23 |
squark
Messages: 45 Registered: February 2015 Location: Ireland
|
Member |
|
|
I'm going to assume you know how to get the game to load mod scripts already.
Here's the code to remove an item:if Inventory.GetNumberOfItemsOfType(QuestManager.HeroEntity, 'x') > 0 then
Inventory.RemoveItemOfType(QuestManager.HeroEntity, 'x')
end
Just replace x with anything from the list that you want to remove and the 0 with however many you want removed.
The list of weapons:
'ObjectInventoryLegendaryHammerAbsolver',
'ObjectInventoryLegendaryHammerAnwarGlory',
'ObjectInventoryLegendaryHammerAuroraShield',
'ObjectInventoryLegendaryHammerChampion',
'ObjectInventoryLegendaryHammerDragonboneHammer',
'ObjectInventoryLegendaryHammerFaerie',
'ObjectInventoryLegendaryHammerHammerOfTheWhale',
'ObjectInventoryLegendaryHammerJackHammer',
'ObjectInventoryLegendaryHammerLunariumPounder',
'ObjectInventoryLegendaryHammerMalletsMallet',
'ObjectInventoryLegendaryHammerScytheHammer',
'ObjectInventoryLegendaryHammerSorrowsFist',
'ObjectInventoryLegendaryHammerTenderiser',
'ObjectInventoryLegendaryHammerTrollblight',
'ObjectInventoryLegendaryHammerTwatter',
'ObjectInventoryLegendaryHammerWillmageddon',
'ObjectInventoryLegendaryPistolBarnumificator',
'ObjectInventoryLegendaryPistolBloodcraver',
'ObjectInventoryLegendaryPistolBriarsBlaster',
'ObjectInventoryLegendaryPistolChickenbane',
'ObjectInventoryLegendaryPistolDesertFury',
'ObjectInventoryLegendaryPistolDragonstomper',
'ObjectInventoryLegendaryPistolFullMonty',
'ObjectInventoryLegendaryPistolGnomewrecker',
'ObjectInventoryLegendaryPistolHolyVengeance',
'ObjectInventoryLegendaryPistolIceMaiden',
'ObjectInventoryLegendaryPistolMiriansMutilator',
'ObjectInventoryLegendaryPistolPerforator',
'ObjectInventoryLegendaryPistolSailorGeriShooter',
'ObjectInventoryLegendaryRifleArkwrightFlintlock',
'ObjectInventoryLegendaryRifleDefender',
'ObjectInventoryLegendaryRifleEqualiser',
'ObjectInventoryLegendaryRifleEthelbertBoner',
'ObjectInventoryLegendaryRifleFacemelter',
'ObjectInventoryLegendaryRifleHeroCompanion',
'ObjectInventoryLegendaryRifleMarksman',
'ObjectInventoryLegendaryRifleMolynator',
'ObjectInventoryLegendaryRifleSakerFlintlock',
'ObjectInventoryLegendaryRifleScattershot',
'ObjectInventoryLegendaryRifleSimmonsShotgun',
'ObjectInventoryLegendaryRifleSkormJustice',
'ObjectInventoryLegendaryRifleSwiftIrregular',
'ObjectInventoryLegendarySwordAvoLamentation',
'ObjectInventoryLegendarySwordBeadleCutlass',
'ObjectInventoryLegendarySwordCasanova',
'ObjectInventoryLegendarySwordChanneler',
'ObjectInventoryLegendarySwordDonorKebab',
'ObjectInventoryLegendarySwordFishknife',
'ObjectInventoryLegendarySwordInquisitor',
'ObjectInventoryLegendarySwordMerchantsBodyguard',
'ObjectInventoryLegendarySwordMogoShafter',
'ObjectInventoryLegendarySwordMrStabby',
'ObjectInventoryLegendarySwordPorkSword',
'ObjectInventoryLegendarySwordShardborne',
'ObjectInventoryLegendarySwordSlimquick',
'ObjectInventoryLegendarySwordSouldrinker',
'ObjectInventoryLegendarySwordSwingingSword',
'ObjectInventoryLegendarySwordWolfsbane',
'ObjectInventoryLegendarySwordThundaraga',
'ObjectInventoryLegendarySwordThunderblade'
So, it should look something like this:
if Inventory.GetNumberOfItemsOfType(QuestManager.HeroEntity, 'ObjectInventoryLegendarySwordWolfsbane') > 1 then
Inventory.RemoveItemOfType(QuestManager.HeroEntity, 'ObjectInventoryLegendarySwordWolfsbane')
end
This will remove one Wolfsbane from your weapons. At least, it SHOULD.
Or you could be cheeky and try this out:
local wolfsbane = {
'ObjectInventoryLegendarySwordWolfsbane'
}
for key,value in pairs(wolfsbane) do
if Inventory.GetNumberOfItemsOfType(GetLocalHero(), value) == 0 then
Inventory.RemoveItemOfType(GetLocalHero(), value)
end
end
Once you figure out what the names of your other duplicated weapons are, a slight alteration will work fine.
[Updated on: Thu, 31 March 2022 18:32] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Sat Nov 23 04:12:14 PST 2024
Total time taken to generate the page: 0.01798 seconds
|