Difference between revisions of "Bot Playground"
From SmartBots Developers Docs
Line 1: | Line 1: | ||
{{DISPLAYTITLE:SmartBots Bots Playground}} | {{DISPLAYTITLE:SmartBots Bots Playground}} | ||
− | SmartBots Bots Playground is a | + | SmartBots Bots Playground is a JavaScript sandbox to run your own programs to control your Second Life bot. |
The Bots Playground is available here: [https://play.mysmartbots.com/ play.mysmartbots.com/] | The Bots Playground is available here: [https://play.mysmartbots.com/ play.mysmartbots.com/] | ||
− | == | + | == Controlling bots with JavaScript== |
[[Image:Bots Playground screenshot.png|link=|center]] | [[Image:Bots Playground screenshot.png|link=|center]] | ||
− | Playground runs programs written JavaScript. The pure javascript: with callbacks, functions, arrays and objects. The underlying javascript engine is NodeJS | + | Playground runs programs written JavaScript. The pure javascript: with callbacks, functions, arrays and objects. The underlying javascript engine is NodeJS. |
There are some limitations applied yet: | There are some limitations applied yet: | ||
Line 18: | Line 18: | ||
== Interacting with your bot == | == Interacting with your bot == | ||
− | Your program sends commands to the bot. Events come from the bots to your program. | + | Your program runs in a sandbox and sends commands to the bot. Events come from the bots to your program. |
This two-way communication is tied directly into javascript program routines: | This two-way communication is tied directly into javascript program routines: | ||
Line 36: | Line 36: | ||
== Bug Hunter program == | == Bug Hunter program == | ||
− | Playground scripts run in their own sandboxes. | + | Playground scripts run in their own sandboxes. We appreciate if you report the security issues within [[Bot Playground/Bug Hunter program|Bug Hunter program]]. |
{{NavMenu}} | {{NavMenu}} | ||
__NOTOC__ | __NOTOC__ |
Revision as of 17:03, 29 August 2022
SmartBots Bots Playground is a JavaScript sandbox to run your own programs to control your Second Life bot.
The Bots Playground is available here: play.mysmartbots.com/
Controlling bots with JavaScript
Playground runs programs written JavaScript. The pure javascript: with callbacks, functions, arrays and objects. The underlying javascript engine is NodeJS.
There are some limitations applied yet:
- We do not support ECMAScript 6
- import/export is disabled
- you can't include one script into another (yet)
Interacting with your bot
Your program runs in a sandbox and sends commands to the bot. Events come from the bots to your program.
This two-way communication is tied directly into javascript program routines:
- bot commands are functions you call
- events are callback functions you specify
Refer to Examples page for more info.
Safety FAQ
- Is my bot password safe?
- Yes. We do not store bot and SmartBots account passwords on a sandbox server at all.
- Can scripts read files?
- No. The scripts are sandboxed and can't access world outside the sandbox. However, check the "Bug Hunter" program below.
- Can I crash the server?
- Yes, easily. Just write the script which starts a dead loop. During the beta test we don't track and kill such scripts (we will later). So... just act wisely.
- Can someone access my scripts?
- We think nobody can, but check the Bug Hunter program below. And remember that your program does not hold any bot and account passwords.
Bug Hunter program
Playground scripts run in their own sandboxes. We appreciate if you report the security issues within Bug Hunter program.