| 10 | | How does it work? |
|---|
| 11 | | |
|---|
| 12 | | The component loads a few worlds from a few XML files. Each world is a |
|---|
| 13 | | component. Once joined the chat will tell you what you can do. Remember |
|---|
| 14 | | that you can get a command listing anytime by saying '?'. |
|---|
| 15 | | |
|---|
| 16 | | Reading 'You can go north, west' you may say 'go north' to go in the |
|---|
| 17 | | northern direction and 'go west' to go in the western direction. You'll |
|---|
| 18 | | then find yourself at some other place but still in the same MUC |
|---|
| 19 | | conference. Your groupchat roster will change as you'll notice different |
|---|
| 20 | | people and things that are just in the same place, not other places. |
|---|
| 21 | | |
|---|
| 22 | | Before starting to hack the scripts you may want to take a look at |
|---|
| 23 | | tower.xml. Note that users are <thing/>s, too and the whole world could |
|---|
| 24 | | be serialized back to XML by just issuing "world.to_s". |
|---|
| 25 | | |
|---|
| 26 | | Please note that the code, especially the error handling, is of extreme |
|---|
| 27 | | poor quality and was mostly written in one afternoon. If I'm going to |
|---|
| 28 | | develop this further everything should be rewritten... |
|---|
| 29 | | |
|---|
| 30 | | --- |
|---|
| 31 | | |
|---|
| 32 | | How to try? |
|---|
| 33 | | |
|---|
| 34 | | Because this is a component you are going to need your own Jabber |
|---|
| 35 | | Daemon - which you'll need anyways if you're going to experiment with |
|---|
| 36 | | XMPP4R. ;-) |
|---|
| 37 | | |
|---|
| 38 | | Syntax: |
|---|
| 39 | | ./adventure.rb <JID> <Password> <Host> |
|---|
| 40 | | |
|---|
| 41 | | Example: |
|---|
| 42 | | ./adventure.rb mud.example.com geheimnis localhost |
|---|
| 43 | | |
|---|
| 44 | | --- |
|---|
| 45 | | |
|---|
| 46 | | Messages seem to have random order? |
|---|
| 47 | | |
|---|
| 48 | | I don't know any solution for this. One may add short delays between |
|---|
| 49 | | messages, but that would only be a very dirty hack. |
|---|
| 50 | | |
|---|
| 51 | | RFC3920: |
|---|
| 52 | | |
|---|
| 53 | | "10. Server Rules for Handling XML Stanzas |
|---|
| 54 | | |
|---|
| 55 | | Compliant server implementations MUST ensure in-order processing of |
|---|
| 56 | | XML stanzas between any two entities." |
|---|
| 57 | | |
|---|