Jump to content
_HXPE

Spawning items at player corresponding to what random number they get?

Recommended Posts

Just joined the forum, hoping someone is able to shed a little light on what I could do to make this work.

the hints are the items I would like to spawn depending on what random number the player gets. 

Thank you in advance. ☺️

A lot of the hints were just for debug purposes. 

 

hint "rolling for items";    

sleep 3;

hintSilent "";

switch (floor random 21) do
{
    case 0: { hint "You fail terribly and find nothing.. You really do suck."; sleep 3; hintSilent ""; };
    case 1: { hint "You Find Nothing!"; sleep 3; hintSilent ""; };
    case 2: { hint "You Find Nothing!"; sleep 3; hintSilent ""; };
    case 3: { hint "You Find Nothing!"; sleep 3; hintSilent ""; };
    case 4: { hint "You Find Nothing!"; sleep 3; hintSilent ""; };
    case 5: { hint "You Find a couple MRE's!"; sleep 3; hintSilent ""; };
    case 6: { hint "You Find a couple MRE's!"; sleep 3; hintSilent ""; };
    case 7: { hint "You Find a couple MRE's!"; sleep 3; hintSilent ""; };
    case 8: { hint "You Find a couple MRE's!"; sleep 3; hintSilent ""; };
    case 9: { hint "You Find a couple MRE's! & water!"; sleep 3; hintSilent ""; };
    case 10: { hint "You Find a couple MRE's! & water!"; sleep 3; hintSilent ""; };
    case 11: { hint "You Find a couple MRE's! & water!!"; sleep 3; hintSilent ""; };
    case 12: { hint "You Find a few MRE's & water!"; sleep 3; hintSilent ""; };
    case 13: { hint "You Find a few MRE's & water!"; sleep 3; hintSilent ""; };
    case 14: { hint "You Find a few MRE's & water!"; sleep 3; hintSilent ""; };
    case 15: { hint "You Find a few MRE's & water!"; sleep 3; hintSilent ""; };
    case 16: { hint "You Find alot of MRE's & water!"; sleep 3; hintSilent ""; };
    case 17: { hint "You Find alot of MRE's & water!"; sleep 3; hintSilent ""; };
    case 18: { hint "You Find 1 month worth of MRE's & water!"; sleep 3; hintSilent ""; };
    case 19: { hint "You Find 2 months worth of MRE's & water!"; sleep 3; hintSilent ""; };
    case 20: { hint "You Find 3 months worth of MRE's & water!"; sleep 3; hintSilent ""; };
};


 

 

Share this post


Link to post
Share on other sites

What mod are you using that adds MREs and water?

Share this post


Link to post
Share on other sites

Well, first of all, since many cases are identical you could just narrow them down to only 5, which I believe is the number of different hints you provided. This could be done in one of the two ways (possibly more but I can only think of those two right now)

 

1. Use something like floor random 5 to get only 5 different numbers. Alternatively you could do something like floor ((random 1000) % 6), which I am not sure whether it provides better random results (also, I am not sure what the result of modulus command is when used with floats).

 

2. Do something like

case 1; case 2; case 3: {blah blah blah};

case 4; case 5; case 6; case 7: {blah blah blah};

which effectively groups the cases.

 

You can also have a look at the random command documentation for more info and random generation alternatives.

 

Hope this helps somehow.

 

P.S.: I'm sorry for the formatting but I'm on my phone and don't have all forums features available.

 

Share this post


Link to post
Share on other sites

https://community.bistudio.com/wiki/addItem

case 5: { hint "You find a couple of MRE's!"; sleep 3; for "_i" from 1 to 2 do {_unit addItem "ACE_MRE_BeefStew";}; hintSilent ""; };

 

You might want to run a canAdd check to make sure there is room in the player's inventory.

case 5: { hint "You find a couple of MRE's!"; sleep 3; for "_i" from 1 to 2 do { if (player canAdd "ACE_MRE_BeefStew") then { player addItem "ACE_MRE_BeefStewm"; } }; hintSilent ""; };

In case there isn't, you could instead place the item(s) nearby for them to pick up, maybe using getRelPos.

  • Like 1

Share this post


Link to post
Share on other sites

@ZaellixA I could narrow it down, but I'm making a sort of dnd style mission for some friends to play on, so I want there to be 20 random number choices like rolling a D20.

Share this post


Link to post
Share on other sites

@Harzach thank you! 😀 I was just looking to place them on the ground near the player anyway instead of just straight into the inventory.

Share this post


Link to post
Share on other sites

@Harzach Tested it out with just a floor of 2, doesn't seem to do anything, do I need to specify "_i" as anything? 

Share this post


Link to post
Share on other sites
2 hours ago, _HXPE said:

@ZaellixA I could narrow it down, but I'm making a sort of dnd style mission for some friends to play on, so I want there to be 20 random number choices like rolling a D20.

I get it but keep in mind that despite the fact that you want to add 20 different outcomes of a dice the result can be identical if the distribution of the values returned by random is uniform in all cases. So, if you really intend to group the results then using only 5 (or as many as you see fit) cases will make your code shorter and more easily maintainable.

 

Nevertheless, you are, of course, free to pick your preferred style as long as it provides the same results.

 

2 hours ago, _HXPE said:

@Harzach Tested it out with just a floor of 2, doesn't seem to do anything, do I need to specify "_i" as anything? 

Most probably no... There must be another issue as Harzach's code should work properly (unfortunately on Mac right now so I can't test).

 

You should make sure you have access to the unit (if you run an MP mission you may have to remoteExec) and that everything is passed correctly to your script.

 

Please let us know if you manage to find what the problem is (for the sake of other people's benefit in the future).

Share this post


Link to post
Share on other sites

@ZaellixA so on the object (a bag) init I have this this addAction ["Roll For Items", "RollForItems.sqf"];  how would I make that a remoteExec 

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, _HXPE said:

@Harzach Tested it out with just a floor of 2, doesn't seem to do anything, do I need to specify "_i" as anything? 

Show all of your code.

  • Like 1

Share this post


Link to post
Share on other sites

Choose 21 items.

Name them  item0  through to item20

Place them in a neat and tidy row on the ground

 

If, for example, the random number 12 comes up, the number 12 is saved as a variable.

In a script, you access that variable and select item12

The next line in the script will select item 12 and move item 12 to a spot just in front of the player.

=====================================================================================

OR:

Choose 21 items.

Name them  item0  through to item20

Place them in various locations across the map.

 

If, for example, the random number 12 comes up, the number 12 is saved as a variable.

In a script, you access that variable and select item12

The next line in the script will transport the player to stand adjacent to item 12.

 

 

 

 

Share this post


Link to post
Share on other sites

@Joe98 would it be possible to have the items invisible until the number is rolled and then just set them visible? 

Share this post


Link to post
Share on other sites
23 hours ago, _HXPE said:

@ZaellixA so on the object (a bag) init I have this this addAction ["Roll For Items", "RollForItems.sqf"];  how would I make that a remoteExec 

If you have place the code in the init box then you shouldn't worry because the code in the init box is run for each and every player joining the game. This means that all players will have an action added to their menu that will allow them to "roll the dice".

 

10 hours ago, _HXPE said:

@Joe98 would it be possible to have the items invisible until the number is rolled and then just set them visible? 

You could possibly use hideObject or even better hideObjectGlobal command(s). The only thing is that the latter should be called on the server.

 

To be honest, I am not very fond of creating a lot of objects and then moving them around when needed. It seems like an abuse of resources, which of course is not necessarily true, especially if the number of objects you create is kept to a decent value and even more, if you allow dynamic simulation of the objects. Nevertheless, it seems to me a "better practice" to create something when you need it and destroy it when it's "lifetime" has ended (or let the garbage collector do it for you if this is acceptable). Please, don't get me wrong on that, Joe98's solution works just find and most probably with 20 or so different objects, most probably, won't make a noticable difference on the gameplay/framerate. It's just my opinion that I express here and it's up to you (and everyone else on the forums) to choose their preferred style.

Share this post


Link to post
Share on other sites

@ZaellixA I was thinking I could probably do it with an array and call the randomSelect command, then just createVehicle command for whatever item the ramdomSelect lands on, I’d have to define variables for that tho wouldn’t I? 

Share this post


Link to post
Share on other sites
5 hours ago, _HXPE said:

@ZaellixA I was thinking I could probably do it with an array and call the randomSelect command, then just createVehicle command for whatever item the ramdomSelect lands on, I’d have to define variables for that tho wouldn’t I? 

 

Something along the lines of:

_array = [<array of item classes>];
_item = selectRandom _array;
_pos = getRelPos <player> [2,0];
_obj = createVehicle [_item, _pos, [], 0, "NONE"];

But again, share your code so we can see what is not working for you.

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Here's a basic working snippet based on your original idea.

 

Spoiler

//RollForItems.sqf

params ["_target", "_caller", "_actionId", "_arguments"];

_pos = _caller getRelPos [0.5, 45];

_water = "ACE_WaterBottle";

_foodItems = [
"ACE_MRE_BeefStew",
"ACE_MRE_ChickenTikkaMasala",
"ACE_MRE_ChickenHerbDumplings",
"ACE_MRE_CreamChickenSoup",
"ACE_MRE_CreamTomatoSoup",
"ACE_MRE_LambCurry",
"ACE_MRE_MeatballsPasta",
"ACE_MRE_SteakVegetables"
];

_drop =
{
    params ["_pos", "_maxWater", "_maxFood", "_water", "_foodItems"]; 
	
    _bag = createVehicle ["B_FieldPack_cbr", _pos, [], 0, "NONE"];
	
	if (_maxWater > 0) then 
    {	
        for "_i" from 1 to _maxWater do 
        {
            _bag addItemCargoGlobal [_water, 1]; 
        };
    };

    for "_i" from 1 to _maxFood do 
    {
        _food = selectRandom _foodItems;
        _bag addItemCargoGlobal [_food, 1]; 
    };
};

hint "Rolling for Items";    

sleep 3;

hintSilent "";

switch (floor random 21) do
{
    case 0: { hint "You fail terribly and find nothing.. You really do suck."; sleep 3; hintSilent ""; };
    case 1: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 2: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 3: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 4: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 5: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 6: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 7: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 8: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 9: { hint "You find a couple MRE's! & water!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 10: { hint "You find a couple MRE's! & water!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 11: { hint "You find a couple MRE's! & water!!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 12: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 13: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 14: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 15: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 16: { hint "You find a lot of MRE's & water!"; [_pos, 5, 5, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 17: { hint "You find a lot of MRE's & water!"; [_pos, 5, 5, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 18: { hint "You find 1 month worth of MRE's & water!"; [_pos, 6, 6, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 19: { hint "You find 2 months worth of MRE's & water!"; [_pos, 12, 12, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 20: { hint "You find 3 months worth of MRE's & water!"; [_pos, 18, 18, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
}; 

 

 

It will spawn a bag with the specified items near the player. The numbers I set in the call params make the most sense for the bag I chose as the container, with the three month supply filling it completely.

You might want to delete the bag after it is empty or maybe after a given amount of time.

  • Like 2

Share this post


Link to post
Share on other sites

@Harzach You really have gone above and beyond, I really appreciate all the help from everyone, thank you a lot, really! 😁 I’m keen to check this out when I get home from work. Thank you once again

  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, Harzach said:

You might want to delete the bag after it is empty or maybe after a given amount of time

@Harzach, managed to delete bag after a given amount of time, but it stays there until someone tries to pick it up.. 

 

Share this post


Link to post
Share on other sites
17 minutes ago, _HXPE said:

@Harzach, managed to delete bag after a given amount of time, but it stays there until someone tries to pick it up.. 

 

 

Guess what I am going to ask you.

Share this post


Link to post
Share on other sites

To post code? Haha 

Will do 

 

Spoiler

 

params ["_target", "_caller", "_actionId", "_arguments"];

_pos = _caller getRelPos [0, 45];

_water = "ACE_WaterBottle";

_foodItems = [
"ACE_MRE_BeefStew",
"ACE_MRE_ChickenTikkaMasala",
"ACE_MRE_ChickenHerbDumplings",
"ACE_MRE_CreamChickenSoup",
"ACE_MRE_CreamTomatoSoup",
"ACE_MRE_LambCurry",
"ACE_MRE_MeatballsPasta",
"ACE_MRE_SteakVegetables"
];

_drop =
{
    params ["_pos", "_maxWater", "_maxFood", "_water", "_foodItems"]; 
    
    _bag = createVehicle ["B_FieldPack_cbr", _pos, [], 0, "NONE"];
    
    if (_maxWater > 0) then 
    {    
        for "_i" from 1 to _maxWater do 
        {
            _bag addItemCargoGlobal [_water, 1]; 
        };
    };

    for "_i" from 1 to _maxFood do 
    {
        _food = selectRandom _foodItems;
        _bag addItemCargoGlobal [_food, 1]; 
  
        };
        sleep 40;
 deleteVehicle _bag;

    };

hint "Rolling for Items";    

sleep 3;

hintSilent "";

switch (floor random 21) do
{
    case 0: { hint "You fail terribly and find nothing.. You really do suck."; sleep 3; hintSilent ""; };
    case 1: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 2: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 3: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 4: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 5: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 6: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 7: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 8: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 9: { hint "You find a couple MRE's! & water!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 10: { hint "You find a couple MRE's! & water!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 11: { hint "You find a couple MRE's! & water!!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 12: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 13: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 14: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 15: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 16: { hint "You find a lot of MRE's & water!"; [_pos, 5, 5, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 17: { hint "You find a lot of MRE's & water!"; [_pos, 5, 5, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 18: { hint "You find 1 month worth of MRE's & water!"; [_pos, 6, 6, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 19: { hint "You find 2 months worth of MRE's & water!"; [_pos, 12, 12, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 20: { hint "You find 3 months worth of MRE's & water!"; [_pos, 18, 18, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
            
};

 

 

Share this post


Link to post
Share on other sites

Oh, there's a quirk/bug regarding deleting backpacks as they sit on the ground.

 

Instead of 

deleteVehicle _bag;

you need to do 

deleteVehicle objectParent _bag;

See here:  https://community.bistudio.com/wiki/objectParent

 

Instead of a timer, you could use a ContainerClosedEH, and delete the bag when the player exits its inventory space.

Spoiler

params ["_target", "_caller", "_actionId", "_arguments"];

_pos = _caller getRelPos [0.5, 45];

_water = "ACE_WaterBottle";

_foodItems = [
"ACE_MRE_BeefStew",
"ACE_MRE_ChickenTikkaMasala",
"ACE_MRE_ChickenHerbDumplings",
"ACE_MRE_CreamChickenSoup",
"ACE_MRE_CreamTomatoSoup",
"ACE_MRE_LambCurry",
"ACE_MRE_MeatballsPasta",
"ACE_MRE_SteakVegetables"
];

_drop =
{
    params ["_pos", "_maxWater", "_maxFood", "_water", "_foodItems"]; 
	
    _bag = createVehicle ["B_FieldPack_cbr", _pos, [], 0, "NONE"];
    objectParent _bag addEventHandler ["ContainerClosed", {
        params ["_container", "_unit"];
        deleteVehicle _container;
    }];

	if (_maxWater > 0) then 
    {	
        for "_i" from 1 to _maxWater do 
        {
            _bag addItemCargoGlobal [_water, 1]; 
        };
    };

    for "_i" from 1 to _maxFood do 
    {
        _food = selectRandom _foodItems;
        _bag addItemCargoGlobal [_food, 1]; 
    };
	
};

hint "Rolling for Items";    

sleep 3;

hintSilent "";

switch (floor random 21) do
{
    case 0: { hint "You fail terribly and find nothing.. You really do suck."; sleep 3; hintSilent ""; };
    case 1: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 2: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 3: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 4: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 5: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 6: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 7: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 8: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 9: { hint "You find a couple MRE's! & water!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 10: { hint "You find a couple MRE's! & water!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 11: { hint "You find a couple MRE's! & water!!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 12: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 13: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 14: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 15: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 16: { hint "You find a lot of MRE's & water!"; [_pos, 5, 5, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 17: { hint "You find a lot of MRE's & water!"; [_pos, 5, 5, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 18: { hint "You find 1 month worth of MRE's & water!"; [_pos, 6, 6, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 19: { hint "You find 2 months worth of MRE's & water!"; [_pos, 12, 12, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 20: { hint "You find 3 months worth of MRE's & water!"; [_pos, 18, 18, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
}; 

 

 

Or, you could maybe use Land_FoodContainer_01_F instead, so the player can't pick it up and use it. This also removes the need for the previous objectParent fix. It does require some other shenanigans, however, as that object does not have an inherent inventory space.
 

Spoiler

params ["_target", "_caller", "_actionId", "_arguments"];

_pos = _caller getRelPos [0.5, 45];

_water = "ACE_WaterBottle";

_foodItems = [
"ACE_MRE_BeefStew",
"ACE_MRE_ChickenTikkaMasala",
"ACE_MRE_ChickenHerbDumplings",
"ACE_MRE_CreamChickenSoup",
"ACE_MRE_CreamTomatoSoup",
"ACE_MRE_LambCurry",
"ACE_MRE_MeatballsPasta",
"ACE_MRE_SteakVegetables"
];

_drop =
{
    params ["_pos", "_maxWater", "_maxFood", "_water", "_foodItems"]; 
	
    _bag = createVehicle ["Land_FoodContainer_01_F", _pos, [], 0, "NONE"];
    _cargo = "Supply500" createVehicle [0,0,0];
    _cargo attachTo [_bag, [0,0,0.5]];
    _cargo addEventHandler ["ContainerClosed", {
        params ["_container", "_unit"];
        deleteVehicle _container;
    }];

	if (_maxWater > 0) then 
    {	
        for "_i" from 1 to _maxWater do 
        {
            _cargo addItemCargoGlobal [_water, 1]; 
        };
    };

    for "_i" from 1 to _maxFood do 
    {
        _food = selectRandom _foodItems;
        _cargo addItemCargoGlobal [_food, 1]; 
    };
    waitUntil {!alive _cargo};
    deleteVehicle _bag;
};

hint "Rolling for Items";    

sleep 3;

hintSilent "";

switch (floor random 21) do
{
    case 0: { hint "You fail terribly and find nothing.. You really do suck."; sleep 3; hintSilent ""; };
    case 1: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 2: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 3: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 4: { hint "You find nothing!"; sleep 3; hintSilent ""; };
    case 5: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 6: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 7: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 8: { hint "You find a couple MRE's!"; [_pos, 0, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 9: { hint "You find a couple MRE's! & water!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 10: { hint "You find a couple MRE's! & water!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 11: { hint "You find a couple MRE's! & water!!"; [_pos, 2, 2, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 12: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 13: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 14: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 15: { hint "You find a few MRE's & water!"; [_pos, 3, 3, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 16: { hint "You find a lot of MRE's & water!"; [_pos, 6, 6, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 17: { hint "You find a lot of MRE's & water!"; [_pos, 6, 6, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 18: { hint "You find 1 month worth of MRE's & water!"; [_pos, 12, 12, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 19: { hint "You find 2 months worth of MRE's & water!"; [_pos, 24, 24, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
    case 20: { hint "You find 3 months worth of MRE's & water!"; [_pos, 36, 36, _water, _foodItems] call _drop; sleep 3; hintSilent ""; };
}; 

 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×