summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAaron Marks <nymacro@gmail.com>2005-11-14 08:45:28 +0000
committerAaron Marks <nymacro@gmail.com>2005-11-14 08:45:28 +0000
commitf14d517cd6bb949e935f5c5401dfdf81bbf7ab4f (patch)
tree2db0c25c872dd68321bb6031b422845aa32e1219 /scripts
parent18d9d0dd24deaba16bfdb990441b5fe69e9aef84 (diff)
downloadmanaserv-f14d517cd6bb949e935f5c5401dfdf81bbf7ab4f.tar.gz
manaserv-f14d517cd6bb949e935f5c5401dfdf81bbf7ab4f.tar.xz
manaserv-f14d517cd6bb949e935f5c5401dfdf81bbf7ab4f.zip
CVS is being stupid.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/init.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/init.rb b/scripts/init.rb
new file mode 100644
index 0000000..25e8dbc
--- /dev/null
+++ b/scripts/init.rb
@@ -0,0 +1,19 @@
+print "Hello there, this is embedded into TMW!\n"
+
+class EquipHandler < Tmw::MessageHandler
+ def initialize()
+ super
+ end
+
+ # this isn't possible -- does not override parent receiveMessage
+ def receiveMessage(computer, message)
+ item = message.readLong()
+ slot = message.readByte()
+ print "Trying to equip ", item, " at ", slot, "\n"
+ end
+end
+
+a = EquipHandler.new()
+Tmw::connectionHandler.registerHandler(Tmw::CMSG_EQUIP, a)
+
+print "Done init.rb\n"