Advertisement
Glyphical

Untitled

Nov 24th, 2022 (edited)
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.59 KB | None | 0 0
  1. Events.OnInitGlobalModData.Add(function()
  2. -- list of items to replace the dummy with
  3. local itemList = {"Tsarcraft.CassetteHomeLabelled'acidrain'","Tsarcraft.CassetteHomeLabelled'ain'tnorestforthewicked'","Tsarcraft.CassetteHomeLabelled'aloneinthetown'","Tsarcraft.CassetteHomeLabelled'animals'","Tsarcraft.CassetteHomeLabelled'backtoblack'","Tsarcraft.CassetteHomeLabelled'blackbetty'","Tsarcraft.CassetteHomeLabelled'blackhoney'","Tsarcraft.CassetteHomeLabelled'blueridgemountains'","Tsarcraft.CassetteHomeLabelled'bridgeburning'","Tsarcraft.CassetteHomeLabelled'changeling'","Tsarcraft.CassetteHomeLabelled'cityheadache'","Tsarcraft.CassetteHomeLabelled'creaturesinflight'","Tsarcraft.CassetteHomeLabelled'dear'","Tsarcraft.CassetteHomeLabelled'derechodenacimiento'","Tsarcraft.CassetteHomeLabelled'dirtyharry'","Tsarcraft.CassetteHomeLabelled'disquiet'","Tsarcraft.CassetteHomeLabelled'earth'","Tsarcraft.CassetteHomeLabelled'elmanana'","Tsarcraft.CassetteHomeLabelled'electricfeel'","Tsarcraft.CassetteHomeLabelled'fairweatherfriends'","Tsarcraft.CassetteHomeLabelled'finalhours'","Tsarcraft.CassetteHomeLabelled'FireAtStaticValley'","Tsarcraft.CassetteHomeLabelled'fire'","Tsarcraft.CassetteHomeLabelled'floaton'","Tsarcraft.CassetteHomeLabelled'flutter'","Tsarcraft.CassetteHomeLabelled'funeralpyre'","Tsarcraft.CassetteHomeLabelled'ghostofoldhighways'","Tsarcraft.CassetteHomeLabelled'gowiththeflow'","Tsarcraft.CassetteHomeLabelled'goldgunsgirls'","Tsarcraft.CassetteHomeLabelled'grace'","Tsarcraft.CassetteHomeLabelled'heartbeat'","Tsarcraft.CassetteHomeLabelled'heaven'snight'","Tsarcraft.CassetteHomeLabelled'hellfrozenrain'","Tsarcraft.CassetteHomeLabelled'howyoulikemenow'","Tsarcraft.CassetteHomeLabelled'hysteria'","Tsarcraft.CassetteHomeLabelled'iwantlove'","Tsarcraft.CassetteHomeLabelled'kit'","Tsarcraft.CassetteHomeLabelled'knightofnoir'","Tsarcraft.CassetteHomeLabelled'knightsofcydonia'","Tsarcraft.CassetteHomeLabelled'laura'","Tsarcraft.CassetteHomeLabelled'let'sgo'","Tsarcraft.CassetteHomeLabelled'lightsout'","Tsarcraft.CassetteHomeLabelled'littledarkage'","Tsarcraft.CassetteHomeLabelled'lustforavampyr'","Tsarcraft.CassetteHomeLabelled'madbeatz'","Tsarcraft.CassetteHomeLabelled'metal'","Tsarcraft.CassetteHomeLabelled'noplan'","Tsarcraft.CassetteHomeLabelled'notinlove'","Tsarcraft.CassetteHomeLabelled'onlavenderhill'","Tsarcraft.CassetteHomeLabelled'outoftheblack'","Tsarcraft.CassetteHomeLabelled'panicswitch'","Tsarcraft.CassetteHomeLabelled'paradisecircus'","Tsarcraft.CassetteHomeLabelled'promisereprise'","Tsarcraft.CassetteHomeLabelled'promise'","Tsarcraft.CassetteHomeLabelled'pulaskiatnight'","Tsarcraft.CassetteHomeLabelled'reyourbrains'","Tsarcraft.CassetteHomeLabelled'roomofangel'","Tsarcraft.CassetteHomeLabelled'sacrilege'","Tsarcraft.CassetteHomeLabelled'singalong'","Tsarcraft.CassetteHomeLabelled'saturnmissiles'","Tsarcraft.CassetteHomeLabelled'sealion'","Tsarcraft.CassetteHomeLabelled'shakeoffyourflesh'","Tsarcraft.CassetteHomeLabelled'silenthill'","Tsarcraft.CassetteHomeLabelled'sons&daughters'","Tsarcraft.CassetteHomeLabelled'souvenirs'","Tsarcraft.CassetteHomeLabelled'squarehammer'","Tsarcraft.CassetteHomeLabelled'stairstotheattic'","Tsarcraft.CassetteHomeLabelled'stonewallstonefence'","Tsarcraft.CassetteHomeLabelled'supermassiveblackhole'","Tsarcraft.CassetteHomeLabelled'tearsof'","Tsarcraft.CassetteHomeLabelled'thebottomofthelake'","Tsarcraft.CassetteHomeLabelled'thegarden'","Tsarcraft.CassetteHomeLabelled'themaidwemessed'","Tsarcraft.CassetteHomeLabelled'thesegoodpeople'","Tsarcraft.CassetteHomeLabelled'throughthefireandflames'","Tsarcraft.CassetteHomeLabelled'tigermountainpeasantsong'","Tsarcraft.CassetteHomeLabelled'tigerlily'","Tsarcraft.CassetteHomeLabelled'timeandtimeagain'","Tsarcraft.CassetteHomeLabelled'tokyodrift'","Tsarcraft.CassetteHomeLabelled'true'","Tsarcraft.CassetteHomeLabelled'undertow'","Tsarcraft.CassetteHomeLabelled'upwardoverthemountain'","Tsarcraft.CassetteHomeLabelled'usedtothedarkness'","Tsarcraft.CassetteHomeLabelled'violentsun'","Tsarcraft.CassetteHomeLabelled'waitingforyou'","Tsarcraft.CassetteHomeLabelled'wanttobefree'","Tsarcraft.CassetteHomeLabelled'water'","Tsarcraft.CassetteHomeLabelled'wearebornwhenwedie'","Tsarcraft.CassetteHomeLabelled'weighmedown'","Tsarcraft.CassetteHomeLabelled'whoisshe'","Tsarcraft.CassetteHomeLabelled'wood'","Tsarcraft.Cassettescratchedlabel","Tsarcraft.Cassetteunknown(1980)","Tsarcraft.Cassetteunlabelled","Tsarcraft.CassetteHomeLabelled'crazy'","Tsarcraft.CassetteHomeLabelled'auditorium'","Tsarcraft.CassetteHomeLabelled'chamberofreflection'","Tsarcraft.CassetteHomeLabelled'darkred'","Tsarcraft.CassetteHomeLabelled'skeleton'","Tsarcraft.CassetteHomeLabelled'yumeutsutsu'"}
  4.  
  5. local function onFillContainer(_roomName, _containerType, container)
  6.     local dummies = container:getAllType("Tsarcraft.BlankCassetteC") -- dummy item type
  7.     if dummies:size() == 0 then return end
  8.     for i = 0, dummies:size()-1 do
  9.         container:Remove(dummies:get(i))
  10.     end
  11.  
  12.     for i = 0, ZombRand(1 * SandboxVars.MFTEOTW.cassetteDropNumberC) do
  13.         local itemChoice = ZombRand(#itemList)
  14.         local item = container:AddItem(itemList[itemChoice])
  15.         container:addItemOnServer(item)
  16.     end
  17. end
  18.  
  19. Events.OnFillContainer.Add(onFillContainer)
  20.  
  21. -- for zombies
  22. local function onRefreshInventoryWindowContainers(inventoryPage)
  23.     if not inventoryPage.inventory or not instanceof(inventoryPage.inventory:getParent(), "IsoDeadBody") then return end
  24.     local container = inventoryPage.inventory
  25.     local dummies = container:getAllType("Tsarcraft.BlankCassetteC") -- dummy item type
  26.     for i = 0, dummies:size()-1 do
  27.         container:Remove(dummies:get(i))
  28.         local itemChoice = ZombRand(#itemList)+1
  29.         local item = container:AddItem(itemList[itemChoice])
  30.         container:addItemOnServer(item)
  31.     end
  32. end
  33.  
  34. -- for items found on zombies
  35. local function onRefreshInventoryWindowContainers(inventoryPage)
  36.     if not inventoryPage.inventory or not instanceof(inventoryPage.inventory:getParent(), "IsoDeadBody") then return end
  37.     replaceDummies(inventoryPage.inventory)
  38. end
  39. if SandboxVars.MFTEOTW.cassettespawnC then
  40. table.insert(ProceduralDistributions.list["CrateCompactDiscs"].items, "Tsarcraft.BlankCassetteC");
  41. table.insert(ProceduralDistributions.list["CrateCompactDiscs"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  42. table.insert(ProceduralDistributions.list["ElectronicStoreMusic"].items, "Tsarcraft.BlankCassetteC");
  43. table.insert(ProceduralDistributions.list["ElectronicStoreMusic"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  44. table.insert(ProceduralDistributions.list["MusicStoreCDs"].items, "Tsarcraft.BlankCassetteC");
  45. table.insert(ProceduralDistributions.list["MusicStoreCDs"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  46. table.insert(ProceduralDistributions.list["MusicStoreSpeaker"].items, "Tsarcraft.BlankCassetteC");
  47. table.insert(ProceduralDistributions.list["MusicStoreSpeaker"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  48. table.insert(ProceduralDistributions.list["GymLockers"].items, "Tsarcraft.BlankCassetteC");
  49. table.insert(ProceduralDistributions.list["GymLockers"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  50. table.insert(ProceduralDistributions.list["ClosetShelfGeneric"].items, "Tsarcraft.BlankCassetteC");
  51. table.insert(ProceduralDistributions.list["ClosetShelfGeneric"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  52. table.insert(ProceduralDistributions.list["SecurityLockers"].items, "Tsarcraft.BlankCassetteC");
  53. table.insert(ProceduralDistributions.list["SecurityLockers"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  54. table.insert(ProceduralDistributions.list["GigamartHouseElectronics"].items, "Tsarcraft.BlankCassetteC");
  55. table.insert(ProceduralDistributions.list["GigamartHouseElectronics"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  56. table.insert(ProceduralDistributions.list["PoliceDesk"].items, "Tsarcraft.BlankCassetteC");
  57. table.insert(ProceduralDistributions.list["PoliceDesk"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  58. table.insert(ProceduralDistributions.list["LivingRoomShelfNoTapes"].items, "Tsarcraft.BlankCassetteC");
  59. table.insert(ProceduralDistributions.list["LivingRoomShelfNoTapes"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  60. table.insert(ProceduralDistributions.list["ShelfGeneric"].items, "Tsarcraft.BlankCassetteC");
  61. table.insert(ProceduralDistributions.list["ShelfGeneric"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  62. table.insert(ProceduralDistributions.list["JanitorMisc"].items, "Tsarcraft.BlankCassetteC");
  63. table.insert(ProceduralDistributions.list["JanitorMisc"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  64. table.insert(ProceduralDistributions.list["GarageTools"].items, "Tsarcraft.BlankCassetteC");
  65. table.insert(ProceduralDistributions.list["GarageTools"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  66. table.insert(ProceduralDistributions.list["LivingRoomShelf"].items, "Tsarcraft.BlankCassetteC");
  67. table.insert(ProceduralDistributions.list["LivingRoomShelf"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  68. table.insert(ProceduralDistributions.list["FireDeptLockers"].items, "Tsarcraft.BlankCassetteC");
  69. table.insert(ProceduralDistributions.list["FireDeptLockers"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  70. table.insert(ProceduralDistributions.list["CrateRandomJunk"].items, "Tsarcraft.BlankCassetteC");
  71. table.insert(ProceduralDistributions.list["CrateRandomJunk"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  72. table.insert(ProceduralDistributions.list["DresserGeneric"].items, "Tsarcraft.BlankCassetteC");
  73. table.insert(ProceduralDistributions.list["DresserGeneric"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  74. table.insert(ProceduralDistributions.list["CabinetFactoryTools"].items, "Tsarcraft.BlankCassetteC");
  75. table.insert(ProceduralDistributions.list["CabinetFactoryTools"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  76. table.insert(ProceduralDistributions.list["CrateComputer"].items, "Tsarcraft.BlankCassetteC");
  77. table.insert(ProceduralDistributions.list["CrateComputer"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  78. table.insert(ProceduralDistributions.list["BandPracticeInstruments"].items, "Tsarcraft.BlankCassetteC");
  79. table.insert(ProceduralDistributions.list["BandPracticeInstruments"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  80. table.insert(ProceduralDistributions.list["LockerClassy"].items, "Tsarcraft.BlankCassetteC");
  81. table.insert(ProceduralDistributions.list["LockerClassy"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  82. table.insert(ProceduralDistributions.list["OfficeDeskHome"].items, "Tsarcraft.BlankCassetteC");
  83. table.insert(ProceduralDistributions.list["OfficeDeskHome"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  84. table.insert(ProceduralDistributions.list["KitchenRandom"].items, "Tsarcraft.BlankCassetteC");
  85. table.insert(ProceduralDistributions.list["KitchenRandom"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  86. table.insert(ProceduralDistributions.list["Locker"].items, "Tsarcraft.BlankCassetteC");
  87. table.insert(ProceduralDistributions.list["Locker"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  88. table.insert(ProceduralDistributions.list["WardrobeWomanClassy"].items, "Tsarcraft.BlankCassetteC");
  89. table.insert(ProceduralDistributions.list["WardrobeWomanClassy"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  90. table.insert(ProceduralDistributions.list["BinBar"].items, "Tsarcraft.BlankCassetteC");
  91. table.insert(ProceduralDistributions.list["BinBar"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  92. table.insert(ProceduralDistributions.list["BarCounterWeapon"].items, "Tsarcraft.BlankCassetteC");
  93. table.insert(ProceduralDistributions.list["BarCounterWeapon"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  94. table.insert(ProceduralDistributions.list["BedroomSideTable"].items, "Tsarcraft.BlankCassetteC");
  95. table.insert(ProceduralDistributions.list["BedroomSideTable"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  96. table.insert(ProceduralDistributions.list["ArmyStorageElectronics"].items, "Tsarcraft.BlankCassetteC");
  97. table.insert(ProceduralDistributions.list["ArmyStorageElectronics"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  98. table.insert(ProceduralDistributions.list["DeskGeneric"].items, "Tsarcraft.BlankCassetteC");
  99. table.insert(ProceduralDistributions.list["DeskGeneric"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  100. table.insert(ProceduralDistributions.list["CrateCamping"].items, "Tsarcraft.BlankCassetteC");
  101. table.insert(ProceduralDistributions.list["CrateCamping"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  102. table.insert(ProceduralDistributions.list["SchoolLockers"].items, "Tsarcraft.BlankCassetteC");
  103. table.insert(ProceduralDistributions.list["SchoolLockers"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  104. table.insert(ProceduralDistributions.list["FactoryLockers"].items, "Tsarcraft.BlankCassetteC");
  105. table.insert(ProceduralDistributions.list["FactoryLockers"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  106. table.insert(ProceduralDistributions.list["WardrobeMan"].items, "Tsarcraft.BlankCassetteC");
  107. table.insert(ProceduralDistributions.list["WardrobeMan"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  108. table.insert(ProceduralDistributions.list["ElectronicStoreMisc"].items, "Tsarcraft.BlankCassetteC");
  109. table.insert(ProceduralDistributions.list["ElectronicStoreMisc"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  110. table.insert(ProceduralDistributions.list["OfficeDrawers"].items, "Tsarcraft.BlankCassetteC");
  111. table.insert(ProceduralDistributions.list["OfficeDrawers"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  112. table.insert(ProceduralDistributions.list["ClassroomDesk"].items, "Tsarcraft.BlankCassetteC");
  113. table.insert(ProceduralDistributions.list["ClassroomDesk"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  114. table.insert(ProceduralDistributions.list["WardrobeRedneck"].items, "Tsarcraft.BlankCassetteC");
  115. table.insert(ProceduralDistributions.list["WardrobeRedneck"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  116. table.insert(ProceduralDistributions.list["WardrobeChild"].items, "Tsarcraft.BlankCassetteC");
  117. table.insert(ProceduralDistributions.list["WardrobeChild"].items, 5 * SandboxVars.MFTEOTW.lootrarityfactorC);
  118. end
  119.         ItemPickerJava.Parse()
  120.     if SandboxVars.MFTEOTW.zombiedropC then
  121.         table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Tsarcraft.BlankCassetteC");
  122.         table.insert(SuburbsDistributions["all"]["inventorymale"].items, 2 * SandboxVars.MFTEOTW.zombiedroprateC);
  123.         table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "Tsarcraft.BlankCassetteC");
  124.         table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 2 * SandboxVars.MFTEOTW.zombiedroprateC);
  125.     end
  126. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement