Skip to content

Instantly share code, notes, and snippets.

@Raynos

Raynos/x.js Secret

Created November 12, 2012 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Raynos/a9e494155e7da755e7aa to your computer and use it in GitHub Desktop.
Save Raynos/a9e494155e7da755e7aa to your computer and use it in GitHub Desktop.
self.think(function () {
var trolls = [
"substack is silly"
, "I AM A ROCK"
, "CAPSLOCKSCRIPT IS THE BEST"
]
var msg = trolls[Math.floor(Math.random() * 3)]
self.say(msg)
})
self.think(function () {
var x = (Math.random() * 20) - 10
var y = (Math.random() * 20) - 10
self.move(x, y)
})
self.hear(function (message) {
self.say("ECHO " + message)
})
// substacks id
// wizard:810e6dfd-1491-4b3a-92b3-e14b086e1767
// myself id
// wizard:0981
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment