macman104
Member
Hey, so for those of you that have a large chunk of meat, and don't like broadcasting that to the world, here's a nifty little script for you. The script will prompt you for two values, your lbound and ubound. Lbound is the lowest amount of meat you want on hand, and ubound is the highest amount of meat you want on hand.
*NOTE: Your lower bound cannot be greater than or equal to your upper bound. Well it can, but the script yells at you, and then quits.
If you have any questions let me know.
*NOTE: Your lower bound cannot be greater than or equal to your upper bound. Well it can, but the script yells at you, and then quits.
Code:
void main(int lbound, int ubound)
{
if(lbound >= ubound)
{
print("Your upper bound cannot be lower than your lower bound, try again");
return;
}
print("Remaining meat will be between " + lbound + " and " + ubound);
print("Removing all closet meat...");
take_closet(my_closetmeat());
int rand = lbound + random(ubound - lbound);
print("First number is: " + rand);
print("Rand was acceptable, transferring all but " + rand + " meat to the closet...");
put_closet(my_meat() - rand);
print("Transfer complete");
print("There is: " + my_closetmeat() + " meat in the closet");
print("There is: " + my_meat() + " meat remaining on-hand.");
print("Thank you!");
}