f3cuk/WAI-ZOMBIELAND — pull request #11 by nerdalertdk (2014-08-14 09:48:11+00:00)
Title: Create LootTableBox.sqf

Not Tested, but wanted more eyes on it

you need to add
```cpp

wai_num_of_crates = 1;
wai_loot_tables = ["Military", "MilitaryIndustrial", "MilitarySpecial", "HeliCrash_No50s", "SupplyDrop", "HeliCrash", "MassGrave"];
```
to mission_cfg.sqf

and

```cpp
// Spawn Supplies -- Crates
for "_i" from 1 to wai_num_of_crates do
{
waitUntil{!isNil "BIS_fnc_selectRandom"};
_crate_position = [_position,0,30,3,0,2000,0] call BIS_fnc_findSafePos;
if ((count _crate_position) == 2) then {
waitUntil{!isNil "BIS_fnc_selectRandom"};
_type = wai_crates call BIS_fnc_selectRandom;
diag_log format["WAI: Creating box at %1",_position];
_crates = _crates + [[_crate_position,_type,"Random"] call wai_spawn_crates];
};
};
```

to the mission you want the loottable box.