Difference between revisions of "Bot Playground/Commands/fly"

From SmartBots Developers Docs
Jump to: navigation, search
 
Line 10: Line 10:
  
 
{{API Variable Group|Input}}
 
{{API Variable Group|Input}}
{{API Variable|enableFlying|yes}} true to start flying, false to stom
+
{{API Variable|enableFlying|yes}} boolean, true to start flying, false to stom
  
 
{{API Variable Group|Output}}
 
{{API Variable Group|Output}}
Line 21: Line 21:
  
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
 +
// Bots Playground script: [TEST] Fly (build 1 by Glaznah Gassner)
 
Bot.fly(true);
 
Bot.fly(true);
 +
 +
// Wait a bit and stop flying
 +
await process.sleep(5_000);
 +
 +
Bot.fly(false);
 +
 +
// Gracefully exit the test script
 +
process.exit();
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
{{NavMenu}}
 
{{NavMenu}}
 
__NOTOC__
 
__NOTOC__

Latest revision as of 10:55, 7 December 2023

Starts or stops flying.

Bot.fly(enableFlying);

Reference

This command accepts the following parameters:

Variable Required Description


Input:
enableFlying yes boolean, true to start flying, false to stom
Output:
Function returns a Promise with the following data:
success bool true if command completed successfully
error string error string if command has failed


Examples

// Bots Playground script: [TEST] Fly (build 1 by Glaznah Gassner)
Bot.fly(true);

// Wait a bit and stop flying
await process.sleep(5_000);

Bot.fly(false);

// Gracefully exit the test script
process.exit();