Reduce var usage

This commit is contained in:
ineedbots
2021-06-04 14:15:21 -06:00
parent a18aa4c446
commit f109ab8fbb
3 changed files with 29 additions and 6 deletions

View File

@ -447,6 +447,27 @@ getValidTube()
return undefined;
}
/*
helper
*/
waittill_either_return_(str1, str2)
{
self endon(str1);
self waittill(str2);
return true;
}
/*
Returns which string gets notified first
*/
waittill_either_return(str1, str2)
{
if (!isDefined(self waittill_either_return_(str1, str2)))
return str1;
return str2;
}
/*
Returns a random grenade in the bot's inventory.
*/