summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-13 09:55:33 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-13 09:55:33 +0000
commit20b7acf8d94c89452f7d603c703dbf4cfc95f57f (patch)
treec74e75368440ac5eff14b47661afd0c004cb5ccf /scripts
parentdddbb52f6724b8b0dd6f99b996e50ad9bfbca432 (diff)
downloadmanaserv-20b7acf8d94c89452f7d603c703dbf4cfc95f57f.tar.gz
manaserv-20b7acf8d94c89452f7d603c703dbf4cfc95f57f.tar.bz2
manaserv-20b7acf8d94c89452f7d603c703dbf4cfc95f57f.tar.xz
manaserv-20b7acf8d94c89452f7d603c703dbf4cfc95f57f.zip
Deleted obsolete files. Cleaned configuration. Removed obsolete SQL tables.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/init.rb66
1 files changed, 0 insertions, 66 deletions
diff --git a/scripts/init.rb b/scripts/init.rb
deleted file mode 100644
index 290598fe..00000000
--- a/scripts/init.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-print "enter init.rb\n"
-
-class EquipHandler < Tmw::MessageHandler
- def initialize()
- super
- end
-
- def receiveMessage(computer, message)
- print "Message ID: ", message.getId(), "\n"
- item = message.readLong()
- slot = message.readByte()
- print "Trying to equip ", item, " at ", slot.to_i(), "\n"
-
- result = Tmw::MessageOut.new()
- result.writeShort(Tmw::SMSG_EQUIP_RESPONSE)
- result.writeByte(Tmw::EQUIP_OK)
- computer.send(result.getPacket())
- end
-end
-
-# Override default equip message handler
-Tmw::connectionHandler.registerHandler(Tmw::CMSG_EQUIP, EquipHandler.new())
-
-
-# Remote Ruby expression execution
-class RubyHandler < Tmw::MessageHandler
- def initialize()
- super
- print "Ruby message handler activated\n"
- end
-
- def receiveMessage(computer, message)
- src = message.readString()
- print src, "\n";
- # doesn't work properly yet (need to have SWIG use std::string nicely)
- #eval(src, TOPLEVEL_BINDING)
- end
-end
-
-Tmw::connectionHandler.registerHandler(0x800, RubyHandler.new())
-
-
-# simple enemy
-class SimpleEnemy < Tmw::Being
- def initialize()
- super
- end
-
- def update()
- print "Updating!\n"
- end
-end
-
-# simple item
-class SimpleItem < Tmw::Item
- def initialize()
- super
- type = 100
- end
-
- def use()
- print "USE THIS THING!!"
- end
-end
-
-print "exit init.rb\n"