Jump to content

Creating a magazine rack help


dunkemdeep

Recommended Posts

Hello All

What Started out as a simple room mod to learn how to use geck has led me to I thinks version 15z of my learning mod. I'm currently stuck with two things if anyone could point me in the right direction.

Firstly I'm trying to make a magazine rack, The script I'm using is from another mod who has given permission to use, however after some time studying his mod and others with magazine racks I still have no idea how to build it. I wanted to use some wooden static shelves but they have no option to apply the script. I have also spent time trying to find a tutorial but without any luck.

My second problem is similar to the first in that I want to try and build a display which shows items, similar to that which can be found in the underwater home mod that shows food stock and medical stocks.

Could anyone help please.

 

Link to comment
Share on other sites

You need to create a new activator using the mesh you want for your display (in this case the static wooden shelves). If you're unsure about how to do that, I refer you to my earlier post in this other thread: https://forums.nexusmods.com/index.php?/topic/7913813-scripting-issues/&do=findComment&comment=72689108

 

Once you've created your new activator, apply your script to that activator. Then, you'll have to add the rack to the world, and then place the items you want to display into the world with the "Persistent Reference" and "Initially Disabled" flags checked. Give each display item a unique Editor ID (i.e. Magazine001REF, Magazine002REF, etc.), and then in your script, use the Enable command to make them display when the player activates the magazine rack.

Link to comment
Share on other sites

I'm so sorry in a rush to test it and get out in the sun I never had a magazine in my inventory to properly test the display case, Being a plonker I thought it was working after just seeing the display case name show up after hovering the mouse over it how wrong was I :sad:

Since then I have tried a lot of things to get this to work but after two days my head is battered and I'm still no closer to getting it working.

Are long posts allowed so that I can say all that I 've done so far?

Edited by dunkemdeep
Link to comment
Share on other sites

There is not a limit on the length of posts. (Well, there is probably a practical limit, but I haven't hit it yet and I've posted a number of lengthy ones.)

 

It is a courtesy to your audience to post "code" inside of the "code tag" (so it preserves indentation) and then lengthy details like "code" inside of the "spoiler tag" (which hides it behind a "show" button) so only those interested in the gory details have to wade through it. See "How to markup images (etc) in forum posts and comments" article for how to use "tags".

 

-Dubious-

Link to comment
Share on other sites

Thanks for that Dubiousintent :)

 

Here is what I have done so far:

First attempt.

Using two resized static generic bookshelves stacked ontop of each other I created a static collection then used them to create an activator and added the script (Script is from the NV Novac Apartment mod by VIPerMX).

Then I placed the magazines on the sheleves giving them ref id mag01 upto mag14 and book01 to book 14, I made sure all had the Persistence and Initally Disabled flags ticked, saved then went into game seen the activator name but clicked on it and nothing would happen. It gave the E activate message but nothing else.

Second Attempt

same as above but just used a single static shelf, same outcome.

Third attempt

Turned the static shelf into a container, applied the script and put the magazines in place, I could put the mags in but nothing would show on display.

Fourth attempt

Used a static generic bookshelf without any activator or script applied, instead I encased the bookshelf with a locker which I applied a null texture too. I placed the magazines on the shelves and applied the script to the locker. Still could only place magazines in and nothing would display.

I have no idea on what to try next :(

here is the code I'm using

scn DunksScriptBookShelves


ref self

BEGIN onClose

	set self to this
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVBarter >= 1
		mag01.enable
	Else
		mag01.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVCritical >= 1
		mag02.enable
	Else
		mag02.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVEnergyWeapons >= 1
		mag03.enable
	Else
		mag03.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVExplosives >= 1
		mag04.enable
	Else
		mag04.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVGuns >= 1
		mag05.enable
	Else
		mag05.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVLockpick >= 1
		mag06.enable
	Else
		mag06.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVMedicine >= 1
		mag07.enable
	Else
		mag07.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVMeleeWeapons >= 1
		mag08.enable
	Else
		mag08.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVRepair >= 1
		mag09.enable
	Else
		mag09.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVScience >= 1
		mag10.enable
	Else
		mag10.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVSneak >= 1
		mag11.enable
	Else
		mag11.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVSpeech >= 1
		mag12.enable
	Else
		mag12.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVSurvival >= 1
		mag13.enable
	Else
		mag13.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount MagazineNVUnarmed >= 1
		mag14.enable
	Else
		mag14.disable
	EndIf

-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillBarter >= 1
		book01.enable
	Else
		book01.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillBigGuns >= 1
		book02.enable
	Else
		book02.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillEnergyWeapons >= 1
		book03.enable
	Else
		book03.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillExplosives >= 1
		book04.enable
	Else
		book04.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillGuns >= 1
		book05.enable
	Else
		book05.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillLockpicking >= 1
		book06.enable
	Else
		book06.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillMedicine >= 1
		book07.enable
	Else
		book07.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillMelee >= 1
		book08.enable
	Else
		book08.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillRepair >= 1
		book09.enable
	Else
		book09.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillScience >= 1
		book10.enable
	Else
		book10.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillSneak >= 1
		book11.enable
	Else
		book11.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillSpeech >= 1
		book12.enable
	Else
		book12.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillSurvival >= 1
		book13.enable
	Else
		book13.disable
	EndIf
-------------------------------------------------------------------------------------------
	If self.getitemcount BookSkillUnarmed >= 1
		book14.enable
	Else
		book14.disable
	EndIf

END
Link to comment
Share on other sites

The script for an Activator is an "Object Script". "This" is another name for "GetSelf". From the GECKWiki page:

GetSelf is only useful when this information is accessed externally, or when the scripted reference's RefID needs to be passed as a parameter to a function like PushActorAway
and
GetSelf shouldn't be used in object scripts on an item that is or can be in inventory.

See the GECKWiki "Associating data with a reference" page, and 'TIP Reference Variables explained' under the 'GECK Form-ID Base-ID Ref-ID and Editor-ID' section of the wiki "Getting started creating mods using GECK" article. When things do not go as expected, then you need to insert "debugging statements" to find out exactly what is not as you expect. Please see 'TIP Debugging data to file' under the "Scripting" section of the same article.

 

Also, a conditoinal test such as ">=1" is actually two tests: one for "equality" and one for "greater than". It is more efficient to use a single test where possible, such as ">0" instead.

 

-Dubious-

Link to comment
Share on other sites

Hey there, welcome to modding.
It's always nice to see when others either try to figure things out. I don't feel that alone anymore. ^^

 


Third attempt

Turned the static shelf into a container, applied the script and put the magazines in place, I could put the mags in but nothing would show on display.

That's actually how I solved my showcase in my enhancement for the Goodsprings Farmhouse from Ignis101 and the updated version by my old mentor.
The funny thing what I accidently discovered is, that when I turn a wall cabinet into an activator then the doors of it are actually animated. :O
Many things in the game have some animation textures, but they are nowhere used.
The problem with that was, that the activator is no container for sure. So I added a container inside the sink (cannot be interacted with), which gets activated when the player opens the wall cabinet doors. XD
Here the script for the doors:

 

scn GSfarmPreWarFoodDoorScript

ref WhoAmI
short sDoorChoice
short Button
short fWasClosed
ref GSFarmEAmmo
short GSfarmAmmoFIX
ref GSfarmWepForFIX
ref GSfarmAmmForFIX
ref GSfarmDelRef
ref GSfarmBasRef
array_var GSFInvRefs
array_var GSFCheckRefs
array_var GSFEquipRefs
ref GSFHotKey1
ref GSFHotKey3
ref GSFHotKey4
ref GSFHotKey5
ref GSFHotKey6
ref GSFHotKey7
ref GSFHotKey8
short GSFRemoveC
short GSFProcessType
float GSFCloseSoundT

Begin OnActivate
    if GetActionRef == Player        ;=> That query is necessary, as "Begin OnActivate Player" is broken.
        Let Button := 0            ;=> I shamelessly misuse variables and here Button starts as 0 for counting the index of a Form List.
        While Button < ListGetCount GSfarmNoShovelRemoveDEFAULT    ;=> That's a loop.' The end condition is, when Button has the same amount as the amount of entries in the list.
            Let GSFarmBasRef := ListGetNthForm GSfarmNoShovelRemoveDEFAULT Button    ;=> Here, the same entry of two Form Lists get compared. One is the default Form List
            Let GSFarmDelRef := ListGetNthForm GSfarmNoShovelRemove Button            ;=> the other will be changed by some scripts. Therefore it is put back into default state.
            if GSFarmBasRef != GSFarmDelRef        ;=> If the same entry doesn't match,'
                ListReplaceNthForm GSfarmNoShovelRemove GSFarmBasRef Button    ;=>the regular list
            endif
            Let Button += 1        ;=> The misused button will increase its index value, to get the next list entry.
        Loop        ;=> Be sure to always have an exit condition. Endless loops freeze your game!
        if (GSFarmPreWarFoodDoorREF.GetOpenState == 1 || GSFarmPreWarFoodDoorREF.GetOpenState == 3 || GSFarmDrAlcDoorREF.GetOpenState == 1 || GSFarmDrAlcDoorREF.GetOpenState == 3)
            if WhoAmI == 0    ;=> This will ensure that only one container instance will be opened. The food or the alcohol wall cabinet.
                Let WhoAmI := GetSelf    ;=> The current activator is saved into a ref var.
                Let fWasClosed := 1        ;=> This will be used later for various operations.
                Activate Player            ;=> The doors of the activator are opened
                PlaySound DRSFootLockerOpen        ;=> A sound for opening will be heard of the Foot Locker? ... It's a wall cabinet. XD'
            else                                                ;=> I really should stop giving my variables names. Var1, Var2, Var3, Var4, ... would work much better. XD
                if WhoAmI.GetOpenState == 1 && sDoorChoice == 0    ;=> This will be triggered when the wall cabinet doors are open.
                    MessageboxEx "What do you want to do?|Activate|Close"    ;=> A message box asks your if you want to activate the container or close the doors.
                    Let sDoorChoice := 1        ;=> To progress this message box, a variable is needed for events...
                endif
            endif
        endif        ;=> Even though the alcohol cabinet isn't influenced in this script, both scripts work in a similar way'
    endif            ;=> so it would be awkward if their functionality intervenes badly with each other.
End                    ;=> Therefore I rather mentioned both in the block to ensure only one will trigger the desired functionality before the other. I might be paranoid about the engine. XD

Begin OnClose                ;=> The close sound is NOT played here, as OnClose is triggered too early.
    Let sDoorChoice := 0    ;=> Instead all operational variables get initialized back to 0.
    Let fWasClosed := 0    
    Let WhoAmI := 0
    Let GSFCloseSoundT := 0        ;=> Yes, this is a timer for the close sound. XD
End

Begin GameMode
    if GetGameLoaded        ;=> Will only be activated when a game is loaded. This is a function and a pretty important one as the engine behaves quite dumb sometimes when loading a game.
        Call GSFarmPreWarFood11Goodies        ;=> If there are goodies in the food cabinet, the showcase UDF will be called.
    endif
;=> This is a fix, as the cabinet acts pretty unique. It's a food wall cabinet.' So all items except food and equipped items will be removed from the players inventory.
    if GSfarmAmmoFIX == 1    ;=> However, if you get your ammo back, your equipped weapon shows a wrong ammo amount. My pistol had over 12 rounds in the magazine, but only one after getting the ammo back.
        if player.GetAnimAction != 9        ;=> If the player isn't reloading automatically, the fix has to be applied.'
            if GSfarmWepForFix == 0    ;=> I think that's a useless query when I look onto the code right now. oO But it shouldn't be harmful. :D
                Let GSfarmWepForFix := Player.GetEquippedItemRef 5    ;=> Here the currently equipped weapon is written into a variable.
                Let GSfarmAmmForFix := Player.GetCurrentAmmo    ;=> Here the current ammo is written into a variable.
                if Player.GetItemCount GSfarmAmmForFix >  Player.GetCurrentAmmoRounds    ;=> So can the weapon still be reloaded or is everything in the current clip?
                    If Player.GetCurrentAmmoRounds < GSfarmWepForFix.GetWeaponClipRounds    ;=> Alright, the weapon gets reloaded quickly, when the clip is not full.
                        if Player.GetItemCount GSfarmAmmForFix >= GSfarmWepForFix.GetWeaponClipRounds    ;=> If the ammo in the players inventory is bigger than the one that fits into the weapon's magazine.'
                            Let GSFarmAmmoFIX := GSfarmWepForFix.GetWeaponClipRounds        ;=> Only as much as possible will be put into.
                            Player.SetCurrentAmmoRounds GSFarmAmmoFIX                    ;=> Now it's quickly reloaded.'
                        else        ;=> If the clip size is bigger than what's available, all's put in.
                            Let GSFarmAmmoFIX := Player.GetItemCount GSfarmAmmForFix
                            Player.SetCurrentAmmoRounds GSFarmAmmoFIX
                        endif
                    endif
                endif
                Let GSFarmAmmoFix := 0        ;=> To turn the fix off and reinitialize everything else.
                Let GSfarmWepForFix := 0
                Let GSfarmAmmForFix := 0
            endif
        endif
    endif
    if GSFCloseSoundT >= 2.025        ;=> That's the time when the close sounds plays.' 1.025 seconds after leaving the container menu.
        Playsound DRSFootLockerClose    ;=> I previously played it in the OnClose block.
        Let GSFCloseSoundT := 0.5            ;=> But I didn't like how late it was triggered. :/'
    elseif GSFCloseSoundT >= 1        ;=> Will be triggered elsewhere, by setting to 1.
        Let GSFCloseSoundT += GetSecondsPassed        ;=> Here, the seconds on the float variable GSFCloseSoundT are counted.
    endif
    if WhoAmI != 0        ;=> Just in case. Will only be run when it's known who is triggering.'
        if WhoAmI.GetOpenState == 4 && GSFCloseSoundT == 0
            Let GSFCloseSoundT := 1    ;=> So if the doors are about to close, the timer will be activated.
        endif
        if fWasClosed == 2        ;=> This will be triggered later.
            Let GSFEquipRefs := Ar_Construct "array"        ;=> One array initialized.
            Let GSFCheckRefs := Ar_Null                        ;=> Another one cleared.
            Let GSFInvRefs := Player.GetAllItemRefs            ;=> GET ALL THE ITEMS!
            if eval (Ar_Size GSFInvRefs) > 0                ;=> This is a life safer. You shouldn't continue with an empty array. ^^'
                ForEach GSFCheckRefs <- GSFInvRefs        ;=> So, loop with the condition to move all entries from one array to another is started.
                    Let GSFarmDelRef := GSFCheckRefs["value"]    ;=> By doing so, it's possible to evaluate every single entry. ["value"] is used to get the resecptive inventory reference of the specific entry.'
                    if GSFarmDelRef.IsEquipped        ;=> If the respective inventory reference is equipped...
                        Ar_Append GSFEquipRefs, GSFarmDelRef    ;=> it will be added to the previously initialized array.
                        GSFarmDelRef.SetNoUnequip 0        ;=> AH! Finally, the unequipable items can be unequipped again. :D
                    endif            
                Loop        ;=> I actually don't get how this ForEach comparison with arrays work, I just know that it works. XD'
            endif
            Let Button := 0        ;=> Button is misused again. XD
            Let GSFCheckRefs := Ar_Null    ;=> An array is cleared.
            While Button < (Ar_Size GSFEquipRefs)    ;=> So, if the player previously had items equipped, something has to be checked...
                Let GSFarmDelRef := GSFEquipRefs[Button]    ;=> The respective item from the index stated by Button, will be written into a ref var.
                Let GSFarmBasRef := GSFarmDelRef.GetBaseObject    ;=> It is an inventory reference. Luckily they are not void yet.
                if GetType GSFarmBasRef == 40    ;=> But to use GetType a base reference is needed anyways. So... Is it a weapon?
                    if GSfarmEAmmo != 0            ;=> I wonder why I use != 0 here, when I simply could leave it away with the same result. XD
                        Let GSfarmAmmoFIX := 1    ;=> So, here the ammo fix will be applied.
                    endif
                endif
                Let Button += 1    ;=> Button gets increased to get to the next index and finally leave the loop someday.
            Loop
            GSFItemStorageRef.RemoveAllItems Player 0 1        ;=> Yes, everything will be given back to the player. I said, that's a later state of the script. ;)'
            if GSfarmEAmmo != 0
                Player.EquipItemAlt GSfarmEAmmo 0 1
            endif
            if GSFHotKey1 != 0
                SetHotKeyItem 1, GSFHotKey1
            endif
            if GSFHotKey3 != 0
                SetHotKeyItem 3, GSFHotKey3
            endif
            if GSFHotKey4 != 0
                SetHotKeyItem 4, GSFHotKey4
            endif
            if GSFHotKey5 != 0
                SetHotKeyItem 5, GSFHotKey5
            endif
            if GSFHotKey6 != 0
                SetHotKeyItem 6, GSFHotKey6
            endif
            if GSFHotKey7 != 0
                SetHotKeyItem 7, GSFHotKey7
            endif
            if GSFHotKey8 != 0
                SetHotKeyItem 8, GSFHotKey8
            endif
            if WhoAmI == GSFarmPreWarFoodDoorREF
                Call GSFarmPreWarFood11Goodies        ;=> Here the showcase UDF is called, as the player could have put something into the cabinet or moved something out.
            endif
            Let Button := 0            ;=> Button should be zero as it will used later. Everything else will be reinitialized too.
            Let GSFInvRefs := Ar_Null
            Let GSFCheckRefs := Ar_Null
            Let GSFEquipRefs := Ar_Null
            Let GSFRemoveC := 0
            Let fWasClosed := 0
            Let GSFHotKey1 := 0
            Let GSFHotKey3 := 0
            Let GSFHotKey4 := 0
            Let GSFHotKey5 := 0
            Let GSFHotKey6 := 0
            Let GSFHotKey7 := 0
            Let GSFHotKey8 := 0
        elseif fWasClosed == 1                ;=> I said this will be processed later when it was set to 1, well NOW is the time. ^^
            if WhoAmI.GetOpenState == 1        ;=> It is open. Whatever it is. oO
                Let fWasClosed := 0            ;=> Yeah... It's not closed anymore.'
                Let sDoorChoice := 2        ;=> Another event stage...
            endif
        endif

        if sDoorChoice == 1        ;=> Ah, here Button is used properly. This is the event stage for the message box.
            Let Button := GetButtonPressed
            if Button == 0        ;=> The player clicked to activate the container menu.
                Let sDoorChoice := 2    ;=> So it will be...
            elseif Button == 1        ;=> The player wants to close the doors.
                Activate Player        ;=> So it will be...
            endif
        elseif sDoorChoice == 2        ;=> This is the event when the container menu will be opened.
            if Player.GetHotKeyItem 1 != 0        ;=> Lutana NVSE plugin has a function to safe all hotkeys at once into
                Let GSFHotKey1 := Player.GetHotKeyItem 1        ;=> an array.
            endif                                        ;=> Unfortunately I had issues with it.
            if Player.GetHotKeyItem 3 != 0            ;=> My hotkey items got saved properly at the first time,
                Let GSFHotKey3 := Player.GetHotKeyItem 3    ;=> But when I tried to overwrite the array (I cleared it before), somehow still the older hotkey setup was in charge.
            endif                                        ;=> So I switched back to using a ref var for every single hotkey. :(
            if Player.GetHotKeyItem 4 != 0
                Let GSFHotKey4 := Player.GetHotKeyItem 4
            endif
            if Player.GetHotKeyItem 5 != 0
                Let GSFHotKey5 := Player.GetHotKeyItem 5
            endif
            if Player.GetHotKeyItem 6 != 0
                Let GSFHotKey6 := Player.GetHotKeyItem 6
            endif
            if Player.GetHotKeyItem 7 != 0
                Let GSFHotKey7 := Player.GetHotKeyItem 7
            endif
            if Player.GetHotKeyItem 8 != 0
                Let GSFHotKey8 := Player.GetHotKeyItem 8
            endif
            if Player.GetCurrentAmmo != 0
                Let GSfarmEAmmo := Player.GetCurrentAmmo        ;=> Sure, the currently equipped ammo should be reapplied either.
            endif
            Let GSFEquipRefs := Ar_Construct "array"        ;=> The array for the equipped items will be initialized again.
            Let Button := 0            ;=> Poor misused Button. :(
    Label 1        ;=> Ah, this sucks. It's a jump point. You can call it with "Goto 1" or in the case of Label 2 "Goto 2" etc.'
            if GSFProcessType == 0    ;=> The label is used to go through different item types.
                Let GSFInvRefs := Player.GetAllItemRefs 40        ;=> First weapons.
                Let GSFProcessType := 1        ;=> If the process is finished this switch will ensure that...
            elseif GSFProcessType == 1
                Let GSFInvRefs := Player.GetAllItemRefs 24    ;=> at the second run only armor will be processed.
                Let GSFProcessType := 0
            endif
            if eval (Ar_Size GSFInvRefs) > 0    ;=> The life safer again.
                ForEach GSFCheckRefs <- GSFInvRefs    ;=> Similar to the previous weapon loop, where the WeaponFIX got applied,
                    Let GSFarmDelRef := GSFCheckRefs["value"]        ;=> equipped items will be checked.
                    if GSFarmDelRef.IsEquipped
                        Let GSfarmBasRef := GSFarmDelRef.GetBaseObject
                        ListReplaceNthForm GSfarmNoShovelRemove GSfarmBasRef Button
                        Ar_Append GSFEquipRefs, GSFarmDelRef
                        GSFarmDelRef.SetNoUnequip 1        ;=> DON'T DO THAT NORMALLY! This is a food cabinet.' All items except equipped ones are removed, but you cannot unequip them to put something into the container. :P
                        Let Button += 1                ;=> I know, people put other stuff into food cabinet than food. But, what? That's my mod, so **** ********! :P'
                    endif
                Loop
            endif
            if GSFProcessType == 1
    Goto 1        ;=> So if the Process Type is ready for getting the armor, the whole process will be repeated with that one change.
            endif
            Let Button := 0        ;=> You poor, poor button.
            Let GSFCheckRefs := Ar_Null        ;=> Sure clear the hell out of it.
            While Button < (Ar_Size GSFEquipRefs)    ;=> Alright, the equipped references will be processed.
                Let GSFarmDelRef := GSFEquipRefs[Button]
                Let GSFarmBasRef := GSFarmDelRef.GetBaseObject
                if Player.GetItemCount GSFarmBasRef > 1        ;=> You cannot fool me GameBryo. If the player has more than one of the currently equipped weapon,
                    Let GSFInvRefs := Player.GetInvRefsForItem GSFarmBasRef    ;=> all of these weapons will be processed. oO
                    ForEach GSFCheckRefs <- GSFInvRefs
                        Let GSFarmDelRef := GSFCheckRefs["value"]
                        if GSFarmDelRef.IsEquipped == 0        ;=> Yeah, I could have moved that the other way around. It's cleaner as far as I know' to avoid quering for something but just use the variable itself as true condition (if it has a value other than 0).
                            Let GSFRemoveC := GSfarmDelRef.GetRefCount    ;=> Weapons can be in packs. So if the current inventory reference is not equipped, it gets fully removed.
                            GSfarmDelRef.RemoveMeIRAlt GSFRemoveC 0 GSFItemStorageRef    ;=> RemoveMeIRAlt is for removing inventory references. Use the "Alt" function it's from JIP. :)'
                        else    ;=> Soooo... It is equipped. Ah, I remember. I added this later and kept the == 0.
                            if GSFarmDelRef.GetRefCount > 1        ;=> This one is pretty special.
                                Let GSFRemoveC := GSfarmDelRef.GetRefCount - 1        ;=> All items from the equipped stack will be removed, except one.
                                GSfarmDelRef.RemoveMeIRAlt GSFRemoveC 0 GSFItemStorageRef        ;=> Otherwise the weapons from the stack that are not equipped can be removed into the container. -.-
                            endif
                        endif
                    Loop
                endif
                Let Button += 1        ;=> Go for the index Button!
            Loop
            ListReplaceNthForm GSfarmNoShovelRemove GSfarmShovelDummy 34    ;=> We replace the Shovel in the list, as here we want it to be removed. How exceptional. oO    
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 40 GSFarmNoShovelRemove    ;=> I literally forgot how this works. XD
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 41                            ;=> No seriously, I just mix items around until I only have the items
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 24 GSFarmNoShovelRemove    ;=> in the inventory which can be sorted into the Pre War Food Cabinet.
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 25                            ;=> Everything else is in the ItemStorage.
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 31
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 47 GSFarmPreWarFoodList
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 103
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 108
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 116
            Let sDoorChoice := 3        ;=> The event will be finalized.
            Let GSfarmDelRef := 0        ;=> Sure why not? oO
        elseif sDoorChoice == 3        ;=> So now... we finally activate the container menu of the door.
            Let sDoorChoice := 0    ;=> Event variable will be cleared.
            Let fWasClosed := 2        ;=> This will ensure that your player char get all items back and can unequip equipped gear again.
            if WhoAmI == GSFarmPreWarFoodDoorREF
                GSFarmPreWarFoodREF.Activate Player    ;=> This will open the container menu
                GSFarmPreWarFoodSpaceREF.Enable        ;=> This will enable the invisible activator to make the players life a bit more comfortable.
            endif
        endif
    endif
End



Here the script for the "space" which was an invisible activator that used the same mesh as the door, but the textures got replaced with NUll TEXTURE set.

scn GSFarmPreWarFoodSpaceScript

short sDoorChoice            ;=> This is a utterly useless copy and paste. BUT, as the previous code for the door, was in fact just a code for the door activator
short Button                        ;=> and the activator prompt moves together with the door, I planted an invisible door (Null Texture used in GECK) at the same place.
short fWasClosed                ;=> Now the player is able to activate the shelf on any spot, not just on the open doors.
ref GSFarmEAmmo            ;=> A big part of the previous script is reused, but the sound still comes from the base script for example.
float GSfarmAmmoFIX
ref GSfarmWepForFIX
ref GSfarmAmmForFIX        ;=> It's only for convenience. If the door of the activator are opened, you need to aim onto the open doors.'
ref GSfarmDelRef        ;=> If you aim onto the cabinet itself, there is NOTHING! So I added an invisible activator instead with this code. :)
ref GSfarmBasRef
array_var GSFInvRefs
array_var GSFCheckRefs
array_var GSFEquipRefs
ref GSFHotKey1
ref GSFHotKey3
ref GSFHotKey4
ref GSFHotKey5
ref GSFHotKey6
ref GSFHotKey7
ref GSFHotKey8
short GSFRemoveC
short GSFProcessType

Begin OnActivate
    if GetActionRef == Player
        Let Button := 0
        While Button < ListGetCount GSfarmNoShovelRemoveDEFAULT
            Let GSFarmBasRef := ListGetNthForm GSfarmNoShovelRemoveDEFAULT Button
            Let GSFarmDelRef := ListGetNthForm GSfarmNoShovelRemove Button
            if GSFarmBasRef != GSFarmDelRef
                ListReplaceNthForm GSfarmNoShovelRemove GSFarmBasRef Button
            endif
            Let Button += 1
        Loop
        if sDoorChoice == 0
            if GSFarmPreWarFoodDoorREF.GetOpenState == 1 && sDoorChoice == 0
                MessageboxEx "What do you want to do?|Activate|Close"
                Let sDoorChoice := 1
            endif
        endif
    endif
End

Begin GameMode
    if GSfarmAmmoFIX == 1
        if player.GetAnimAction != 9
            if GSfarmWepForFix == 0
                Let GSfarmWepForFix := Player.GetEquippedItemRef 5
                Let GSfarmAmmForFix := Player.GetCurrentAmmo
                if Player.GetItemCount GSfarmAmmForFix >  Player.GetCurrentAmmoRounds
                    If Player.GetCurrentAmmoRounds < GSfarmWepForFix.GetWeaponClipRounds
                        if Player.GetItemCount GSfarmAmmForFix >= GSfarmWepForFix.GetWeaponClipRounds
                            Let GSFarmAmmoFIX := GSfarmWepForFix.GetWeaponClipRounds
                            Player.SetCurrentAmmoRounds GSFarmAmmoFIX
                        else
                            Let GSFarmAmmoFIX := Player.GetItemCount GSfarmAmmForFix
                            Player.SetCurrentAmmoRounds GSFarmAmmoFIX
                        endif
                    endif
                endif
                Let GSFarmAmmoFix := 0
                Let GSfarmWepForFix := 0
                Let GSfarmAmmForFix := 0
            endif
        endif
    endif

    if sDoorChoice == 1
        Let Button := GetButtonPressed
        if Button == 0
            if Player.GetHotKeyItem 1 != 0
                Let GSFHotKey1 := Player.GetHotKeyItem 1
            endif
            if Player.GetHotKeyItem 3 != 0
                Let GSFHotKey3 := Player.GetHotKeyItem 3
            endif
            if Player.GetHotKeyItem 4 != 0
                Let GSFHotKey4 := Player.GetHotKeyItem 4
            endif
            if Player.GetHotKeyItem 5 != 0
                Let GSFHotKey5 := Player.GetHotKeyItem 5
            endif
            if Player.GetHotKeyItem 6 != 0
                Let GSFHotKey6 := Player.GetHotKeyItem 6
            endif
            if Player.GetHotKeyItem 7 != 0
                Let GSFHotKey7 := Player.GetHotKeyItem 7
            endif
            if Player.GetHotKeyItem 8 != 0
                Let GSFHotKey8 := Player.GetHotKeyItem 8
            endif
            if Player.GetCurrentAmmo != 0
                Let GSfarmEAmmo := Player.GetCurrentAmmo
            endif
            Let GSFEquipRefs := Ar_Construct "array"
            Let Button := 0
    Label 1
            if GSFProcessType == 0
                Let GSFInvRefs := Player.GetAllItemRefs 40
                Let GSFProcessType := 1
            elseif GSFProcessType == 1
                Let GSFInvRefs := Player.GetAllItemRefs 24
                Let GSFProcessType := 0
            endif
            if eval (Ar_Size GSFInvRefs) > 0
                ForEach GSFCheckRefs <- GSFInvRefs
                    Let GSFarmDelRef := GSFCheckRefs["value"]
                    if GSFarmDelRef.IsEquipped
                        Let GSfarmBasRef := GSFarmDelRef.GetBaseObject
                        ListReplaceNthForm GSfarmNoShovelRemove GSfarmBasRef Button
                        Ar_Append GSFEquipRefs, GSFarmDelRef
                        GSFarmDelRef.SetNoUnequip 1
                        Let Button += 1
                    endif
                Loop
            endif
            if GSFProcessType == 1
    Goto 1
            endif
            Let Button := 0
            Let GSFCheckRefs := Ar_Null
            While Button < (Ar_Size GSFEquipRefs)
                Let GSFarmDelRef := GSFEquipRefs[Button]
                Let GSFarmBasRef := GSFarmDelRef.GetBaseObject
                if Player.GetItemCount GSFarmBasRef > 1
                    Let GSFInvRefs := Player.GetInvRefsForItem GSFarmBasRef
                    ForEach GSFCheckRefs <- GSFInvRefs
                        Let GSFarmDelRef := GSFCheckRefs["value"]
                        if GSFarmDelRef.IsEquipped == 0
                            Let GSFRemoveC := GSfarmDelRef.GetRefCount
                            GSfarmDelRef.RemoveMeIRAlt GSFRemoveC 0 GSFItemStorageRef
                        else
                            if GSFarmDelRef.GetRefCount > 1
                                Let GSFRemoveC := GSfarmDelRef.GetRefCount - 1
                                GSfarmDelRef.RemoveMeIRAlt GSFRemoveC 0 GSFItemStorageRef
                            endif
                        endif
                    Loop
                endif
                Let Button += 1
            Loop
            ListReplaceNthForm GSfarmNoShovelRemove GSfarmShovelDummy 34        
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 40 GSFarmNoShovelRemove
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 41
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 24 GSFarmNoShovelRemove
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 25
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 31
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 47 GSFarmPreWarFoodList
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 103
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 108
            Player.RemoveAllTypedItems GSFItemStorageRef 1 1 116
            Let sDoorChoice := 2
            Let GSfarmDelRef := 0
            GSFarmPreWarFoodREF.Activate Player
        elseif Button == 1
            GSFarmPreWarFoodDoorREF.Activate Player    ;=> The doors will be closed again.
            Let sDoorChoice := 0
            GSFarmPreWarFoodSpaceREF.Disable        ;=> So the invisible activator is not necessary anymore.
        endif
    elseif sDoorChoice == 2
        Let GSFEquipRefs := Ar_Construct "array"
        Let GSFCheckRefs := Ar_Null
        Let GSFInvRefs := Player.GetAllItemRefs
        if eval (Ar_Size GSFInvRefs) > 0
            ForEach GSFCheckRefs <- GSFInvRefs
                Let GSFarmDelRef := GSFCheckRefs["value"]
                if GSFarmDelRef.IsEquipped
                    Ar_Append GSFEquipRefs, GSFarmDelRef
                    GSFarmDelRef.SetNoUnequip 0
                endif
            Loop
        endif
        Let Button := 0
        Let GSFCheckRefs := Ar_Null
        While Button < (Ar_Size GSFEquipRefs)
            Let GSFarmDelRef := GSFEquipRefs[Button]
            Let GSFarmBasRef := GSFarmDelRef.GetBaseObject
            if GetType GSFarmBasRef == 40
                if GSfarmEAmmo != 0
                    Let GSfarmAmmoFIX := 1
                endif
            endif
            Let Button += 1
        Loop
        GSFItemStorageRef.RemoveAllItems Player 0 1
        if GSfarmEAmmo != 0
            Player.EquipItemAlt GSfarmEAmmo 0 1
        endif
        if GSFHotKey1 != 0
            SetHotKeyItem 1, GSFHotKey1
        endif
        if GSFHotKey3 != 0
            SetHotKeyItem 3, GSFHotKey3
        endif
        if GSFHotKey4 != 0
            SetHotKeyItem 4, GSFHotKey4
        endif
        if GSFHotKey5 != 0
            SetHotKeyItem 5, GSFHotKey5
        endif
        if GSFHotKey6 != 0
            SetHotKeyItem 6, GSFHotKey6
        endif
        if GSFHotKey7 != 0
            SetHotKeyItem 7, GSFHotKey7
        endif
        if GSFHotKey8 != 0
            SetHotKeyItem 8, GSFHotKey8
        endif
        Call GSFarmPreWarFood11Goodies
        Let Button := 0
        Let GSFInvRefs := Ar_Null
        Let GSFCheckRefs := Ar_Null
        Let GSFEquipRefs := Ar_Null
        Let GSFarmEAmmo := 0
        Let GSFHotKey1 := 0
        Let GSFHotKey3 := 0
        Let GSFHotKey4 := 0
        Let GSFHotKey5 := 0
        Let GSFHotKey6 := 0
        Let GSFHotKey7 := 0
        Let GSFHotKey8 := 0
        Let GSFRemoveC := 0
        Let fWasClosed := 0
        Let sDoorChoice := 0
    endif
End


These are the very inconvenient showcase scripts. They are UDFs called, when the container menu is left.

scn GSFarmPreWarFood11Goodies

ref DLC04MREid

Begin Function{}
    if IsModLoaded "LonesomeRoad.esm"
        Let DLC04MREid := GetFormFromMod "LonesomeRoad.esm" "917e"
        if GSFarmPreWarFoodREF.GetItemCount DLC04MREid >= 3
            If GSFarmMRERef1.GetDisabled
                GSFarmMRERef1.Enable
            endif
            If GSFarmMRERef2.GetDisabled
                GSFarmMRERef2.Enable
            endif
            If GSFarmMRERef3.GetDisabled
                GSFarmMRERef3.Enable
            endif
        elseif GSFarmPreWarFoodREF.GetItemCount DLC04MREid == 2
            If GSFarmMRERef1.GetDisabled
                GSFarmMRERef1.Enable
            endif
            If GSFarmMRERef2.GetDisabled
                GSFarmMRERef2.Enable
            endif
            If GSFarmMRERef3.GetDisabled == 0
                GSFarmMRERef3.Disable
            endif
        elseif GSFarmPreWarFoodREF.GetItemCount DLC04MREid == 1
            If GSFarmMRERef1.GetDisabled
                GSFarmMRERef1.Enable
            endif
            If GSFarmMRERef2.GetDisabled == 0
                GSFarmMRERef2.Disable
            endif
            If GSFarmMRERef3.GetDisabled == 0
                GSFarmMRERef3.Disable
            endif
        elseif GSFarmPreWarFoodREF.GetItemCount DLC04MREid == 0
            If GSFarmMRERef1.GetDisabled == 0
                GSFarmMRERef1.Disable
            endif
            If GSFarmMRERef2.GetDisabled == 0
                GSFarmMRERef2.Disable
            endif
            If GSFarmMRERef3.GetDisabled == 0
                GSFarmMRERef3.Disable
            endif
        endif
    else
        if GSFarmMRERef1.GetDisabled == 0
            GSFarmMRERef1.Disable
            GSFarmMRERef2.Disable
            GSFarmMRERef3.Disable
        endif
    endif
    if GSFarmPreWarFoodREF.GetItemCount PorkNBeans >= 4
        If GSFarmBeansRef1.GetDisabled
            GSFarmBeansRef1.Enable
        endif
        If GSFarmBeansRef2.GetDisabled
            GSFarmBeansRef2.Enable
        endif
        If GSFarmBeansRef3.GetDisabled
            GSFarmBeansRef3.Enable
        endif
        If GSFarmBeansRef4.GetDisabled
            GSFarmBeansRef4.Enable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount PorkNBeans == 3
        If GSFarmBeansRef1.GetDisabled
            GSFarmBeansRef1.Enable
        endif
        If GSFarmBeansRef2.GetDisabled
            GSFarmBeansRef2.Enable
        endif
        If GSFarmBeansRef3.GetDisabled
            GSFarmBeansRef3.Enable
        endif
        If GSFarmBeansRef4.GetDisabled == 0
            GSFarmBeansRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount PorkNBeans == 2
        If GSFarmBeansRef1.GetDisabled
            GSFarmBeansRef1.Enable
        endif
        If GSFarmBeansRef2.GetDisabled
            GSFarmBeansRef2.Enable
        endif
        If GSFarmBeansRef3.GetDisabled == 0
            GSFarmBeansRef3.Disable
        endif
        If GSFarmBeansRef4.GetDisabled == 0
            GSFarmBeansRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount PorkNBeans == 1
        If GSFarmBeansRef1.GetDisabled
            GSFarmBeansRef1.Enable
        endif
        If GSFarmBeansRef2.GetDisabled == 0
            GSFarmBeansRef2.Disable
        endif
        If GSFarmBeansRef3.GetDisabled == 0
            GSFarmBeansRef3.Disable
        endif
        If GSFarmBeansRef4.GetDisabled == 0
            GSFarmBeansRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount PorkNBeans == 0
        If GSFarmBeansRef1.GetDisabled == 0
            GSFarmBeansRef1.Disable
        endif
        If GSFarmBeansRef2.GetDisabled == 0
            GSFarmBeansRef2.Disable
        endif
        If GSFarmBeansRef3.GetDisabled == 0
            GSFarmBeansRef3.Disable
        endif
        If GSFarmBeansRef4.GetDisabled == 0
            GSFarmBeansRef4.Disable
        endif
    endif
    if (GSFarmPreWarFoodREF.GetItemCount PotatoCrisps + GSFarmPreWarFoodREF.GetItemCount JunkFood) >= 4
        If GSFarmCrispsRef1.GetDisabled
            GSFarmCrispsRef1.Enable
        endif
        If GSFarmCrispsRef2.GetDisabled
            GSFarmCrispsRef2.Enable
        endif
        If GSFarmCrispsRef3.GetDisabled
            GSFarmCrispsRef3.Enable
        endif
        If GSFarmCrispsRef4.GetDisabled
            GSFarmCrispsRef4.Enable
        endif
    elseif (GSFarmPreWarFoodREF.GetItemCount PotatoCrisps + GSFarmPreWarFoodREF.GetItemCount JunkFood) == 3
        If GSFarmCrispsRef1.GetDisabled
            GSFarmCrispsRef1.Enable
        endif
        If GSFarmCrispsRef2.GetDisabled
            GSFarmCrispsRef2.Enable
        endif
        If GSFarmCrispsRef3.GetDisabled
            GSFarmCrispsRef3.Enable
        endif
        If GSFarmCrispsRef4.GetDisabled == 0
            GSFarmCrispsRef4.Disable
        endif
    elseif (GSFarmPreWarFoodREF.GetItemCount PotatoCrisps + GSFarmPreWarFoodREF.GetItemCount JunkFood) == 2
        If GSFarmCrispsRef1.GetDisabled
            GSFarmCrispsRef1.Enable
        endif
        If GSFarmCrispsRef2.GetDisabled
            GSFarmCrispsRef2.Enable
        endif
        If GSFarmCrispsRef3.GetDisabled == 0
            GSFarmCrispsRef3.Disable
        endif
        If GSFarmCrispsRef4.GetDisabled == 0
            GSFarmCrispsRef4.Disable
        endif
    elseif (GSFarmPreWarFoodREF.GetItemCount PotatoCrisps + GSFarmPreWarFoodREF.GetItemCount JunkFood) == 1
        If GSFarmCrispsRef1.GetDisabled
            GSFarmCrispsRef1.Enable
        endif
        If GSFarmCrispsRef2.GetDisabled == 0
            GSFarmCrispsRef2.Disable
        endif
        If GSFarmCrispsRef3.GetDisabled == 0
            GSFarmCrispsRef3.Disable
        endif
        If GSFarmCrispsRef4.GetDisabled == 0
            GSFarmCrispsRef4.Disable
        endif
    elseif (GSFarmPreWarFoodREF.GetItemCount PotatoCrisps + GSFarmPreWarFoodREF.GetItemCount JunkFood) == 0
        If GSFarmCrispsRef1.GetDisabled == 0
            GSFarmCrispsRef1.Disable
        endif
        If GSFarmCrispsRef2.GetDisabled == 0
            GSFarmCrispsRef2.Disable
        endif
        If GSFarmCrispsRef3.GetDisabled == 0
            GSFarmCrispsRef3.Disable
        endif
        If GSFarmCrispsRef4.GetDisabled == 0
            GSFarmCrispsRef4.Disable
        endif
    endif
    if GSFarmPreWarFoodREF.GetItemCount RadioactiveGumDrops >= 8
        If GSFarmRadGumRef1.GetDisabled
            GSFarmRadGumRef1.Enable
        endif
        If GSFarmRadGumRef2.GetDisabled
            GSFarmRadGumRef2.Enable
        endif
        If GSFarmRadGumRef3.GetDisabled
            GSFarmRadGumRef3.Enable
        endif
        If GSFarmRadGumRef4.GetDisabled
            GSFarmRadGumRef4.Enable
        endif
        If GSFarmRadGumRef5.GetDisabled
            GSFarmRadGumRef5.Enable
        endif
        If GSFarmRadGumRef6.GetDisabled
            GSFarmRadGumRef6.Enable
        endif
        If GSFarmRadGumRef7.GetDisabled
            GSFarmRadGumRef7.Enable
        endif
        If GSFarmRadGumRef8.GetDisabled
            GSFarmRadGumRef8.Enable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount RadioactiveGumDrops == 7
        If GSFarmRadGumRef1.GetDisabled
            GSFarmRadGumRef1.Enable
        endif
        If GSFarmRadGumRef2.GetDisabled
            GSFarmRadGumRef2.Enable
        endif
        If GSFarmRadGumRef3.GetDisabled
            GSFarmRadGumRef3.Enable
        endif
        If GSFarmRadGumRef4.GetDisabled
            GSFarmRadGumRef4.Enable
        endif
        If GSFarmRadGumRef5.GetDisabled
            GSFarmRadGumRef5.Enable
        endif
        If GSFarmRadGumRef6.GetDisabled
            GSFarmRadGumRef6.Enable
        endif
        If GSFarmRadGumRef7.GetDisabled
            GSFarmRadGumRef7.Enable
        endif
        If GSFarmRadGumRef8.GetDisabled == 0
            GSFarmRadGumRef8.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount RadioactiveGumDrops == 6
        If GSFarmRadGumRef1.GetDisabled
            GSFarmRadGumRef1.Enable
        endif
        If GSFarmRadGumRef2.GetDisabled
            GSFarmRadGumRef2.Enable
        endif
        If GSFarmRadGumRef3.GetDisabled
            GSFarmRadGumRef3.Enable
        endif
        If GSFarmRadGumRef4.GetDisabled
            GSFarmRadGumRef4.Enable
        endif
        If GSFarmRadGumRef5.GetDisabled
            GSFarmRadGumRef5.Enable
        endif
        If GSFarmRadGumRef6.GetDisabled
            GSFarmRadGumRef6.Enable
        endif
        If GSFarmRadGumRef7.GetDisabled == 0
            GSFarmRadGumRef7.Disable
        endif
        If GSFarmRadGumRef8.GetDisabled == 0
            GSFarmRadGumRef8.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount RadioactiveGumDrops == 5
        If GSFarmRadGumRef1.GetDisabled
            GSFarmRadGumRef1.Enable
        endif
        If GSFarmRadGumRef2.GetDisabled
            GSFarmRadGumRef2.Enable
        endif
        If GSFarmRadGumRef3.GetDisabled
            GSFarmRadGumRef3.Enable
        endif
        If GSFarmRadGumRef4.GetDisabled
            GSFarmRadGumRef4.Enable
        endif
        If GSFarmRadGumRef5.GetDisabled
            GSFarmRadGumRef5.Enable
        endif
        If GSFarmRadGumRef6.GetDisabled == 0
            GSFarmRadGumRef6.Disable
        endif
        If GSFarmRadGumRef7.GetDisabled == 0
            GSFarmRadGumRef7.Disable
        endif
        If GSFarmRadGumRef8.GetDisabled == 0
            GSFarmRadGumRef8.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount RadioactiveGumDrops == 4
        If GSFarmRadGumRef1.GetDisabled
            GSFarmRadGumRef1.Enable
        endif
        If GSFarmRadGumRef2.GetDisabled
            GSFarmRadGumRef2.Enable
        endif
        If GSFarmRadGumRef3.GetDisabled
            GSFarmRadGumRef3.Enable
        endif
        If GSFarmRadGumRef4.GetDisabled
            GSFarmRadGumRef4.Enable
        endif
        If GSFarmRadGumRef5.GetDisabled == 0
            GSFarmRadGumRef5.Disable
        endif
        If GSFarmRadGumRef6.GetDisabled == 0
            GSFarmRadGumRef6.Disable
        endif
        If GSFarmRadGumRef7.GetDisabled == 0
            GSFarmRadGumRef7.Disable
        endif
        If GSFarmRadGumRef8.GetDisabled == 0
            GSFarmRadGumRef8.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount RadioactiveGumDrops == 3
        If GSFarmRadGumRef1.GetDisabled
            GSFarmRadGumRef1.Enable
        endif
        If GSFarmRadGumRef2.GetDisabled
            GSFarmRadGumRef2.Enable
        endif
        If GSFarmRadGumRef3.GetDisabled
            GSFarmRadGumRef3.Enable
        endif
        If GSFarmRadGumRef4.GetDisabled == 0
            GSFarmRadGumRef4.Disable
        endif
        If GSFarmRadGumRef5.GetDisabled == 0
            GSFarmRadGumRef5.Disable
        endif
        If GSFarmRadGumRef6.GetDisabled == 0
            GSFarmRadGumRef6.Disable
        endif
        If GSFarmRadGumRef7.GetDisabled == 0
            GSFarmRadGumRef7.Disable
        endif
        If GSFarmRadGumRef8.GetDisabled == 0
            GSFarmRadGumRef8.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount RadioactiveGumDrops == 2
        If GSFarmRadGumRef1.GetDisabled
            GSFarmRadGumRef1.Enable
        endif
        If GSFarmRadGumRef2.GetDisabled
            GSFarmRadGumRef2.Enable
        endif
        If GSFarmRadGumRef3.GetDisabled == 0
            GSFarmRadGumRef3.Disable
        endif
        If GSFarmRadGumRef4.GetDisabled == 0
            GSFarmRadGumRef4.Disable
        endif
        If GSFarmRadGumRef5.GetDisabled == 0
            GSFarmRadGumRef5.Disable
        endif
        If GSFarmRadGumRef6.GetDisabled == 0
            GSFarmRadGumRef6.Disable
        endif
        If GSFarmRadGumRef7.GetDisabled == 0
            GSFarmRadGumRef7.Disable
        endif
        If GSFarmRadGumRef8.GetDisabled == 0
            GSFarmRadGumRef8.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount RadioactiveGumDrops == 1
        If GSFarmRadGumRef1.GetDisabled
            GSFarmRadGumRef1.Enable
        endif
        If GSFarmRadGumRef2.GetDisabled == 0
            GSFarmRadGumRef2.Enable
        endif
        If GSFarmRadGumRef3.GetDisabled == 0
            GSFarmRadGumRef3.Disable
        endif
        If GSFarmRadGumRef4.GetDisabled == 0
            GSFarmRadGumRef4.Disable
        endif
        If GSFarmRadGumRef5.GetDisabled == 0
            GSFarmRadGumRef5.Disable
        endif
        If GSFarmRadGumRef6.GetDisabled == 0
            GSFarmRadGumRef6.Disable
        endif
        If GSFarmRadGumRef7.GetDisabled == 0
            GSFarmRadGumRef7.Disable
        endif
        If GSFarmRadGumRef8.GetDisabled == 0
            GSFarmRadGumRef8.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount RadioactiveGumDrops == 0
        If GSFarmRadGumRef1.GetDisabled == 0
            GSFarmRadGumRef1.Disable
        endif
        If GSFarmRadGumRef2.GetDisabled == 0
            GSFarmRadGumRef2.Disable
        endif
        If GSFarmRadGumRef3.GetDisabled == 0
            GSFarmRadGumRef3.Disable
        endif
        If GSFarmRadGumRef4.GetDisabled == 0
            GSFarmRadGumRef4.Disable
        endif
        If GSFarmRadGumRef5.GetDisabled == 0
            GSFarmRadGumRef5.Disable
        endif
        If GSFarmRadGumRef6.GetDisabled == 0
            GSFarmRadGumRef6.Disable
        endif
        If GSFarmRadGumRef7.GetDisabled == 0
            GSFarmRadGumRef7.Disable
        endif
        If GSFarmRadGumRef8.GetDisabled == 0
            GSFarmRadGumRef8.Disable
        endif
    endif
    if GSFarmPreWarFoodREF.GetItemCount SugarBombs01 >= 3
        If GSFarmSugarRef1.GetDisabled
            GSFarmSugarRef1.Enable
        endif
        If GSFarmSugarRef2.GetDisabled
            GSFarmSugarRef2.Enable
        endif
        If GSFarmSugarRef3.GetDisabled
            GSFarmSugarRef3.Enable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount SugarBombs01 == 2
        If GSFarmSugarRef1.GetDisabled
            GSFarmSugarRef1.Enable
        endif
        If GSFarmSugarRef2.GetDisabled
            GSFarmSugarRef2.Enable
        endif
        If GSFarmSugarRef3.GetDisabled == 0
            GSFarmSugarRef3.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount SugarBombs01 == 1
        If GSFarmSugarRef1.GetDisabled
            GSFarmSugarRef1.Enable
        endif
        If GSFarmSugarRef2.GetDisabled == 0
            GSFarmSugarRef2.Disable
        endif
        If GSFarmSugarRef3.GetDisabled == 0
            GSFarmSugarRef3.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount SugarBombs01 == 0
        If GSFarmSugarRef1.GetDisabled == 0
            GSFarmSugarRef1.Disable
        endif
        If GSFarmSugarRef2.GetDisabled == 0
            GSFarmSugarRef2.Disable
        endif
        If GSFarmSugarRef3.GetDisabled == 0
            GSFarmSugarRef3.Disable
        endif
    endif
    if GSFarmPreWarFoodREF.GetItemCount YumYumDeviledEggs >= 4
        If GSFarmEggsRef1.GetDisabled
            GSFarmEggsRef1.Enable
        endif
        If GSFarmEggsRef2.GetDisabled
            GSFarmEggsRef2.Enable
        endif
        If GSFarmEggsRef3.GetDisabled
            GSFarmEggsRef3.Enable
        endif
        If GSFarmEggsRef4.GetDisabled
            GSFarmEggsRef4.Enable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount YumYumDeviledEggs == 3
        If GSFarmEggsRef1.GetDisabled
            GSFarmEggsRef1.Enable
        endif
        If GSFarmEggsRef2.GetDisabled
            GSFarmEggsRef2.Enable
        endif
        If GSFarmEggsRef3.GetDisabled
            GSFarmEggsRef3.Enable
        endif
        If GSFarmEggsRef4.GetDisabled == 0
            GSFarmEggsRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount YumYumDeviledEggs == 2
        If GSFarmEggsRef1.GetDisabled
            GSFarmEggsRef1.Enable
        endif
        If GSFarmEggsRef2.GetDisabled
            GSFarmEggsRef2.Enable
        endif
        If GSFarmEggsRef3.GetDisabled == 0
            GSFarmEggsRef3.Disable
        endif
        If GSFarmEggsRef4.GetDisabled == 0
            GSFarmEggsRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount YumYumDeviledEggs == 1
        If GSFarmEggsRef1.GetDisabled
            GSFarmEggsRef1.Enable
        endif
        If GSFarmEggsRef2.GetDisabled == 0
            GSFarmEggsRef2.Disable
        endif
        If GSFarmEggsRef3.GetDisabled == 0
            GSFarmEggsRef3.Disable
        endif
        If GSFarmEggsRef4.GetDisabled == 0
            GSFarmEggsRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount YumYumDeviledEggs == 0
        If GSFarmEggsRef1.GetDisabled == 0
            GSFarmEggsRef1.Disable
        endif
        If GSFarmEggsRef2.GetDisabled == 0
            GSFarmEggsRef2.Disable
        endif
        If GSFarmEggsRef3.GetDisabled == 0
            GSFarmEggsRef3.Disable
        endif
        If GSFarmEggsRef4.GetDisabled == 0
            GSFarmEggsRef4.Disable
        endif
    endif
    if GSFarmPreWarFoodREF.GetItemCount BlamcoMacandCheese >= 2
        If GSFarmBlamcoRef1.GetDisabled
            GSFarmBlamcoRef1.Enable
        endif
        If GSFarmBlamcoRef2.GetDisabled
            GSFarmBlamcoRef2.Enable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount BlamcoMacandCheese == 1
        If GSFarmBlamcoRef1.GetDisabled
            GSFarmBlamcoRef1.Enable
        endif
        If GSFarmBlamcoRef2.GetDisabled == 0
            GSFarmBlamcoRef2.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount BlamcoMacandCheese == 0
        If GSFarmBlamcoRef1.GetDisabled == 0
            GSFarmBlamcoRef1.Disable
        endif
        If GSFarmBlamcoRef2.GetDisabled == 0
            GSFarmBlamcoRef2.Disable
        endif
    endif
    Call GSFarmPreWarFood12Goodies
End


This UDF gets called by the previous UDF. Scripts have a limited length.
I actually think it's pretty dumb to program like that, but it works and it only runs once when the respective event triggers the call.

scn GSFarmPreWarFood12Goodies

Begin Function{}
    if GSFarmPreWarFoodREF.GetItemCount SalisburySteak >= 6
        If GSFarmSteakRef1.GetDisabled
            GSFarmSteakRef1.Enable
        endif
        If GSFarmSteakRef2.GetDisabled
            GSFarmSteakRef2.Enable
        endif
        If GSFarmSteakRef3.GetDisabled
            GSFarmSteakRef3.Enable
        endif
        If GSFarmSteakRef4.GetDisabled
            GSFarmSteakRef4.Enable
        endif
        If GSFarmSteakRef5.GetDisabled
            GSFarmSteakRef5.Enable
        endif
        If GSFarmSteakRef6.GetDisabled
            GSFarmSteakRef6.Enable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount SalisburySteak == 5
        If GSFarmSteakRef1.GetDisabled
            GSFarmSteakRef1.Enable
        endif
        If GSFarmSteakRef2.GetDisabled
            GSFarmSteakRef2.Enable
        endif
        If GSFarmSteakRef3.GetDisabled
            GSFarmSteakRef3.Enable
        endif
        If GSFarmSteakRef4.GetDisabled
            GSFarmSteakRef4.Enable
        endif
        If GSFarmSteakRef5.GetDisabled
            GSFarmSteakRef5.Enable
        endif
        If GSFarmSteakRef6.GetDisabled == 0
            GSFarmSteakRef6.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount SalisburySteak == 4
        If GSFarmSteakRef1.GetDisabled
            GSFarmSteakRef1.Enable
        endif
        If GSFarmSteakRef2.GetDisabled
            GSFarmSteakRef2.Enable
        endif
        If GSFarmSteakRef3.GetDisabled
            GSFarmSteakRef3.Enable
        endif
        If GSFarmSteakRef4.GetDisabled
            GSFarmSteakRef4.Enable
        endif
        If GSFarmSteakRef5.GetDisabled == 0
            GSFarmSteakRef5.Disable
        endif
        If GSFarmSteakRef6.GetDisabled == 0
            GSFarmSteakRef6.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount SalisburySteak == 3
        If GSFarmSteakRef1.GetDisabled
            GSFarmSteakRef1.Enable
        endif
        If GSFarmSteakRef2.GetDisabled
            GSFarmSteakRef2.Enable
        endif
        If GSFarmSteakRef3.GetDisabled
            GSFarmSteakRef3.Enable
        endif
        If GSFarmSteakRef4.GetDisabled == 0
            GSFarmSteakRef4.Disable
        endif
        If GSFarmSteakRef5.GetDisabled == 0
            GSFarmSteakRef5.Disable
        endif
        If GSFarmSteakRef6.GetDisabled == 0
            GSFarmSteakRef6.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount SalisburySteak == 2
        If GSFarmSteakRef1.GetDisabled
            GSFarmSteakRef1.Enable
        endif
        If GSFarmSteakRef2.GetDisabled
            GSFarmSteakRef2.Enable
        endif
        If GSFarmSteakRef3.GetDisabled == 0
            GSFarmSteakRef3.Disable
        endif
        If GSFarmSteakRef4.GetDisabled == 0
            GSFarmSteakRef4.Disable
        endif
        If GSFarmSteakRef5.GetDisabled == 0
            GSFarmSteakRef5.Disable
        endif
        If GSFarmSteakRef6.GetDisabled == 0
            GSFarmSteakRef6.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount SalisburySteak == 1
        If GSFarmSteakRef1.GetDisabled
            GSFarmSteakRef1.Enable
        endif
        If GSFarmSteakRef2.GetDisabled == 0
            GSFarmSteakRef2.Disable
        endif
        If GSFarmSteakRef3.GetDisabled == 0
            GSFarmSteakRef3.Disable
        endif
        If GSFarmSteakRef4.GetDisabled == 0
            GSFarmSteakRef4.Disable
        endif
        If GSFarmSteakRef5.GetDisabled == 0
            GSFarmSteakRef5.Disable
        endif
        If GSFarmSteakRef6.GetDisabled == 0
            GSFarmSteakRef6.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount SalisburySteak == 0
        If GSFarmSteakRef1.GetDisabled == 0
            GSFarmSteakRef1.Disable
        endif
        If GSFarmSteakRef2.GetDisabled == 0
            GSFarmSteakRef2.Disable
        endif
        If GSFarmSteakRef3.GetDisabled == 0
            GSFarmSteakRef3.Disable
        endif
        If GSFarmSteakRef4.GetDisabled == 0
            GSFarmSteakRef4.Disable
        endif
        If GSFarmSteakRef5.GetDisabled == 0
            GSFarmSteakRef5.Disable
        endif
        If GSFarmSteakRef6.GetDisabled == 0
            GSFarmSteakRef6.Disable
        endif
    endif
    if GSFarmPreWarFoodREF.GetItemCount InstaMash >= 4
        If GSFarmMashRef1.GetDisabled
            GSFarmMashRef1.Enable
        endif
        If GSFarmMashRef2.GetDisabled
            GSFarmMashRef2.Enable
        endif
        If GSFarmMashRef3.GetDisabled
            GSFarmMashRef3.Enable
        endif
        If GSFarmMashRef4.GetDisabled
            GSFarmMashRef4.Enable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount InstaMash == 3
        If GSFarmMashRef1.GetDisabled
            GSFarmMashRef1.Enable
        endif
        If GSFarmMashRef2.GetDisabled
            GSFarmMashRef2.Enable
        endif
        If GSFarmMashRef3.GetDisabled
            GSFarmMashRef3.Enable
        endif
        If GSFarmMashRef4.GetDisabled == 0
            GSFarmMashRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount InstaMash == 2
        If GSFarmMashRef1.GetDisabled
            GSFarmMashRef1.Enable
        endif
        If GSFarmMashRef2.GetDisabled
            GSFarmMashRef2.Enable
        endif
        If GSFarmMashRef3.GetDisabled == 0
            GSFarmMashRef3.Disable
        endif
        If GSFarmMashRef4.GetDisabled == 0
            GSFarmMashRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount InstaMash == 1
        If GSFarmMashRef1.GetDisabled
            GSFarmMashRef1.Enable
        endif
        If GSFarmMashRef2.GetDisabled == 0
            GSFarmMashRef2.Disable
        endif
        If GSFarmMashRef3.GetDisabled == 0
            GSFarmMashRef3.Disable
        endif
        If GSFarmMashRef4.GetDisabled == 0
            GSFarmMashRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount InstaMash == 0
        If GSFarmMashRef1.GetDisabled == 0
            GSFarmMashRef1.Disable
        endif
        If GSFarmMashRef2.GetDisabled == 0
            GSFarmMashRef2.Disable
        endif
        If GSFarmMashRef3.GetDisabled == 0
            GSFarmMashRef3.Disable
        endif
        If GSFarmMashRef4.GetDisabled == 0
            GSFarmMashRef4.Disable
        endif
    endif
    if GSFarmPreWarFoodREF.GetItemCount FancyLadsSnackCakes >= 4
        If GSFarmFancyRef1.GetDisabled
            GSFarmFancyRef1.Enable
        endif
        If GSFarmFancyRef2.GetDisabled
            GSFarmFancyRef2.Enable
        endif
        If GSFarmFancyRef3a.GetDisabled && GSFarmSteakRef3.GetDisabled == 0
            GSFarmFancyRef3a.Enable
            GSFarmFancyRef3b.Disable
        endif
        If GSFarmFancyRef3b.GetDisabled && GSFarmSteakRef3.GetDisabled
            GSFarmFancyRef3b.Enable
            GSFarmFancyRef3a.Disable
        endif
        If GSFarmFancyRef4a.GetDisabled && GSFarmSteakRef4.GetDisabled == 0
            GSFarmFancyRef4a.Enable
            GSFarmFancyRef4b.Disable
        endif
        If GSFarmFancyRef4b.GetDisabled && GSFarmSteakRef4.GetDisabled
            GSFarmFancyRef4b.Enable
            GSFarmFancyRef4a.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount FancyLadsSnackCakes == 3
        If GSFarmFancyRef1.GetDisabled
            GSFarmFancyRef1.Enable
        endif
        If GSFarmFancyRef2.GetDisabled
            GSFarmFancyRef2.Enable
        endif
        If GSFarmFancyRef3a.GetDisabled && GSFarmSteakRef3.GetDisabled == 0
            GSFarmFancyRef3a.Enable
            GSFarmFancyRef3b.Disable
        endif
        If GSFarmFancyRef3b.GetDisabled && GSFarmSteakRef3.GetDisabled
            GSFarmFancyRef3b.Enable
            GSFarmFancyRef3a.Disable
        endif
        If GSFarmFancyRef4a.GetDisabled == 0
            GSFarmFancyRef4a.Disable
        endif
        if GSFarmFancyRef4b.GetDisabled == 0
            GSFarmFancyRef4b.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount FancyLadsSnackCakes == 2
        If GSFarmFancyRef1.GetDisabled
            GSFarmFancyRef1.Enable
        endif
        If GSFarmFancyRef2.GetDisabled
            GSFarmFancyRef2.Enable
        endif
        If GSFarmFancyRef3a.GetDisabled == 0
            GSFarmFancyRef3a.Disable
        endif
        if GSFarmFancyRef3b.GetDisabled == 0
            GSFarmFancyRef3b.Disable
        endif
        If GSFarmFancyRef4a.GetDisabled == 0
            GSFarmFancyRef4a.Disable
        endif
        if GSFarmFancyRef4b.GetDisabled == 0
            GSFarmFancyRef4b.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount FancyLadsSnackCakes == 1
        If GSFarmFancyRef1.GetDisabled
            GSFarmFancyRef1.Enable
        endif
        If GSFarmFancyRef2.GetDisabled == 0
            GSFarmFancyRef2.Disable
        endif
        If GSFarmFancyRef3a.GetDisabled == 0
            GSFarmFancyRef3a.Disable
        endif
        if GSFarmFancyRef3b.GetDisabled == 0
            GSFarmFancyRef3b.Disable
        endif
        If GSFarmFancyRef4a.GetDisabled == 0
            GSFarmFancyRef4a.Disable
        endif
        if GSFarmFancyRef4b.GetDisabled == 0
            GSFarmFancyRef4b.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount FancyLadsSnackCakes == 0
        If GSFarmFancyRef1.GetDisabled == 0
            GSFarmFancyRef1.Disable
        endif
        If GSFarmFancyRef2.GetDisabled == 0
            GSFarmFancyRef2.Disable
        endif
        If GSFarmFancyRef3a.GetDisabled == 0
            GSFarmFancyRef3a.Disable
        endif
        if GSFarmFancyRef3b.GetDisabled == 0
            GSFarmFancyRef3b.Disable
        endif
        If GSFarmFancyRef4a.GetDisabled == 0
            GSFarmFancyRef4a.Disable
        endif
        if GSFarmFancyRef4b.GetDisabled == 0
            GSFarmFancyRef4b.Disable
        endif
    endif
    if GSFarmPreWarFoodREF.GetItemCount DandyBoyApples >= 4
        If GSFarmDandyRef1.GetDisabled
            GSFarmDandyRef1.Enable
        endif
        If GSFarmDandyRef2.GetDisabled
            GSFarmDandyRef2.Enable
        endif
        If GSFarmDandyRef3.GetDisabled
            GSFarmDandyRef3.Enable
        endif
        If GSFarmDandyRef4.GetDisabled
            GSFarmDandyRef4.Enable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount DandyBoyApples == 3
        If GSFarmDandyRef1.GetDisabled
            GSFarmDandyRef1.Enable
        endif
        If GSFarmDandyRef2.GetDisabled
            GSFarmDandyRef2.Enable
        endif
        If GSFarmDandyRef3.GetDisabled
            GSFarmDandyRef3.Enable
        endif
        If GSFarmDandyRef4.GetDisabled == 0
            GSFarmDandyRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount DandyBoyApples == 2
        If GSFarmDandyRef1.GetDisabled
            GSFarmDandyRef1.Enable
        endif
        If GSFarmDandyRef2.GetDisabled
            GSFarmDandyRef2.Enable
        endif
        If GSFarmDandyRef3.GetDisabled == 0
            GSFarmDandyRef3.Disable
        endif
        If GSFarmDandyRef4.GetDisabled == 0
            GSFarmDandyRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount DandyBoyApples == 1
        If GSFarmDandyRef1.GetDisabled
            GSFarmDandyRef1.Enable
        endif
        If GSFarmDandyRef2.GetDisabled == 0
            GSFarmDandyRef2.Disable
        endif
        If GSFarmDandyRef3.GetDisabled == 0
            GSFarmDandyRef3.Disable
        endif
        If GSFarmDandyRef4.GetDisabled == 0
            GSFarmDandyRef4.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount DandyBoyApples == 0
        If GSFarmDandyRef1.GetDisabled == 0
            GSFarmDandyRef1.Disable
        endif
        If GSFarmDandyRef2.GetDisabled == 0
            GSFarmDandyRef2.Disable
        endif
        If GSFarmDandyRef3.GetDisabled == 0
            GSFarmDandyRef3.Disable
        endif
        If GSFarmDandyRef4.GetDisabled == 0
            GSFarmDandyRef4.Disable
        endif
    endif
    if GSFarmPreWarFoodREF.GetItemCount Cram >= 5
        If GSFarmCramRef1.GetDisabled
            GSFarmCramRef1.Enable
        endif
        If GSFarmCramRef2.GetDisabled
            GSFarmCramRef2.Enable
        endif
        If GSFarmCramRef3.GetDisabled
            GSFarmCramRef3.Enable
        endif
        If GSFarmCramRef4.GetDisabled
            GSFarmCramRef4.Enable
        endif
        If GSFarmCramRef5.GetDisabled
            GSFarmCramRef5.Enable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount Cram == 4
        If GSFarmCramRef1.GetDisabled
            GSFarmCramRef1.Enable
        endif
        If GSFarmCramRef2.GetDisabled
            GSFarmCramRef2.Enable
        endif
        If GSFarmCramRef3.GetDisabled
            GSFarmCramRef3.Enable
        endif
        If GSFarmCramRef4.GetDisabled
            GSFarmCramRef4.Enable
        endif
        If GSFarmCramRef5.GetDisabled == 0
            GSFarmCramRef5.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount Cram == 3
        If GSFarmCramRef1.GetDisabled
            GSFarmCramRef1.Enable
        endif
        If GSFarmCramRef2.GetDisabled
            GSFarmCramRef2.Enable
        endif
        If GSFarmCramRef3.GetDisabled
            GSFarmCramRef3.Enable
        endif
        If GSFarmCramRef4.GetDisabled == 0
            GSFarmCramRef4.Disable
        endif
        If GSFarmCramRef5.GetDisabled == 0
            GSFarmCramRef5.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount Cram == 2
        If GSFarmCramRef1.GetDisabled
            GSFarmCramRef1.Enable
        endif
        If GSFarmCramRef2.GetDisabled
            GSFarmCramRef2.Enable
        endif
        If GSFarmCramRef3.GetDisabled == 0
            GSFarmCramRef3.Disable
        endif
        If GSFarmCramRef4.GetDisabled == 0
            GSFarmCramRef4.Disable
        endif
        If GSFarmCramRef5.GetDisabled == 0
            GSFarmCramRef5.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount Cram == 1
        If GSFarmCramRef1.GetDisabled
            GSFarmCramRef1.Enable
        endif
        If GSFarmCramRef2.GetDisabled == 0
            GSFarmCramRef2.Disable
        endif
        If GSFarmCramRef3.GetDisabled == 0
            GSFarmCramRef3.Disable
        endif
        If GSFarmCramRef4.GetDisabled == 0
            GSFarmCramRef4.Disable
        endif
        If GSFarmCramRef5.GetDisabled == 0
            GSFarmCramRef5.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount Cram == 0
        If GSFarmCramRef1.GetDisabled == 0
            GSFarmCramRef1.Disable
        endif
        If GSFarmCramRef2.GetDisabled == 0
            GSFarmCramRef2.Disable
        endif
        If GSFarmCramRef3.GetDisabled == 0
            GSFarmCramRef3.Disable
        endif
        If GSFarmCramRef4.GetDisabled == 0
            GSFarmCramRef4.Disable
        endif
        If GSFarmCramRef5.GetDisabled == 0
            GSFarmCramRef5.Disable
        endif
    endif
    if GSFarmPreWarFoodREF.GetItemCount Bubblegum >= 2
        If GSFarmBubbleRef1.GetDisabled
            GSFarmBubbleRef1.Enable
        endif
        If GSFarmBubbleRef2.GetDisabled
            GSFarmBubbleRef2.Enable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount Bubblegum == 1
        If GSFarmBubbleRef1.GetDisabled
            GSFarmBubbleRef1.Enable
        endif
        If GSFarmBubbleRef2.GetDisabled == 0
            GSFarmBubbleRef2.Disable
        endif
    elseif GSFarmPreWarFoodREF.GetItemCount Bubblegum == 0
        If GSFarmBubbleRef1.GetDisabled == 0
            GSFarmBubbleRef1.Disable
        endif
        If GSFarmBubbleRef2.GetDisabled == 0
            GSFarmBubbleRef2.Disable
        endif
    endif
End

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...