Project Zomboid

Project Zomboid

Subpar Survivors
Arsenal[26] 2021년 6월 24일 오전 8시 41분
Ammo Type Compatibility...
Here you go... You know where this goes... This will allow NPC's to open boxes in their inventory... Bonus nailgun entry too...


function getAmmoBox(bullets)
if(isModEnabled("ORGM")) then return bullets.."_Box" end

if (bullets == "BB177") then return "BB177Box"
elseif (bullets == "Bullets22") then return "Bullets22Box"
elseif (bullets == "Bullets57") then return "Bullets57Box"
elseif (bullets == "Bullets380") then return "Bullets380Box"
elseif (bullets == "Bullets9mm") then return "Bullets9mmBox"
elseif (bullets == "Bullets38") then return "Bullets38Box"
elseif (bullets == "Bullets357") then return "Bullets357Box"
elseif (bullets == "Bullets45") then return "Bullets45Box"
elseif (bullets == "Bullets45LC") then return "Bullets45LCBox"
elseif (bullets == "Bullets44") then return "Bullets44Box"
elseif (bullets == "Bullets4570") then return "Bullets4570Box"

elseif (bullets == "410gShotgunShells")then return "410gShotgunShellsBox"
elseif (bullets == "20gShotgunShells") then return "20gShotgunShellsBox"
elseif (bullets == "ShotgunShells") then return "ShotgunShellsBox"
elseif (bullets == "10gShotgunShells") then return "10gShotgunShellsBox"
elseif (bullets == "4gShotgunShells") then return "4gShotgunShellsBox"

elseif (bullets == "223Bullets") then return "223Box"
elseif (bullets == "556Bullets") then return "556Box"
elseif (bullets == "762x39Bullets") then return "762x39Box"
elseif (bullets == "308Bullets") then return "308Box"
elseif (bullets == "762x51Bullets") then return "762x51Box"
elseif (bullets == "762x54rBullets") then return "762x54rBox"
elseif (bullets == "3006Bullets") then return "3006Box"
elseif (bullets == "50BMGBullets") then return "50BMGBox"

elseif (bullets == "Nails") then return "NailsBox" -- For Nailgun Mod
end

print("no ammo box found for bullets "..tostring(bullets))
return ""
end

function getBoxCount(box)
if (box == "BB177Box") then return 500
elseif (box == "Bullets22Box") then return 100
elseif (box == "Bullets57Box") then return 50
elseif (box == "Bullets380Box") then return 50
elseif (box == "Bullets9mmBox") then return 50
elseif (box == "Bullets38Box") then return 50
elseif (box == "Bullets357Box") then return 50
elseif (box == "Bullets45Box") then return 50
elseif (box == "Bullets45LCBox") then return 50
elseif (box == "Bullets44Box") then return 50
elseif (box == "Bullets4570Box") then return 20

elseif (box == "410gShotgunShellsBox") then return 25
elseif (box == "20gShotgunShellsBox") then return 25
elseif (box == "ShotgunShellsBox") then return 25
elseif (box == "10gShotgunShellsBox") then return 25
elseif (box == "4gShotgunShellsBox") then return 10

elseif (box == "223Box") then return 20
elseif (box == "556Box") then return 20
elseif (box == "762x39Box") then return 20
elseif (box == "308Box") then return 20
elseif (box == "762x51Box") then return 20
elseif (box == "762x54rBox") then return 20
elseif (box == "3006Box") then return 20
elseif (box == "50BMGBox") then return 10
elseif (box == "NailsBox") then return 100 -- For Nailgun Mod

elseif (isModEnabled("ORGM")) then return 50

else return 0
end
end
Arsenal[26] 님이 마지막으로 수정; 2021년 6월 24일 오전 8시 44분
< >
전체 댓글 1개 중 1~1개 표시 중
SlightlyMadman  [개발자] 2021년 6월 24일 오전 9시 46분 
Thank you! Added, will be in the next update!
< >
전체 댓글 1개 중 1~1개 표시 중
페이지당 표시 개수: 1530 50