Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

60 lines (59 sloc) 1.484 kB
[
"// click an item to see"
, "// its source codex"
, ""
, "# spells"
, ""
, "## self.say(msg)"
, ""
, "self.say(String) allows you to print a"
, "message above yourself. Use this to"
, "either talk with other players or"
, "inspect values."
, ""
, "For example try `self.say(self.id())`"
, "or try `self.say(Object.keys(self))`"
, ""
, "## self.id()"
, ""
, "Prints your id. An entities id is "
, "used to uniquely identify them."
, "you will need the id to be able"
, "to target other things. Just click"
, "on a thing and look at the tome"
, "to see their id"
, ""
, "## self.whatDist(id)"
, ""
, "Pass in the id of another thing and"
, "get the x,y distance of it. Useful"
, "to move to them"
, ""
, "Try `self.move(self.whatDist(id))`"
, ""
, "## self.move(x,y)"
, ""
, "used to move around relative. Pass it"
, "an x and y that are relative to move"
, "or pass it an `{ x: x, y: y }` to move"
, ""
, "Try `self.move(self.whatDist(id))`"
, ""
, "## self.think(cb)"
, ""
, "You can't have timers or anything fancy"
, "But you can think. this will call your"
, "callback every half second"
, ""
, "## self.hear(cb)"
, ""
, "Listen on anyone saying messages. You"
, "will need to be near them and your"
, "callback gets called with message and"
, "id"
, ""
, "If you want to be an echo player try"
, "self.hear(function (message) {"
, " self.say(message)"
, "})"
]
Jump to Line
Something went wrong with that request. Please try again.