Python Mud (4): take ALL the things & teleport me out of here

Thursday 15 March 2012, 23:30:00 | mud / i.f.

Vorige edities:

  1. Soul Emotes →Python Mud (1): Soul emotes
  2. Eerste opzet driver en mudlib →Python Mud (2): eerste opzet driver en mudlib
  3. Items en verplaatsing →Python Mud (3): items en verplaatsing

Veel verfijning deze keer met een paar aardige grote nieuwe features:

Python 3.x compatible (en 2.7).

Soul is intelligenter geworden. Hij herkent nu ook items waar je tegenaan kan schoppen etc. Dus in plaats van alleen 'kick idiot' kun je ook 'kick trashcan' doen. Verder is 'all' wat vriendelijker geworden; hij voegt alleen livings toe, ongelijk aan de player zelf (met "and me/myself" kun je dat weer toevoegen).

Wizards hebben nieuwe commando's gekregen: teleport (verplaats jezelf of iemand anders direct naar een bepaalde locatie), reload (reload python source), move (verplaats een item direct in een ander item of in iemands inventory).

Drop/take/give all: je hoeft niet langer elk item apart op te pakken.

put x|all [in] something, take x|all [from] something: je kunt dingen ergens in stoppen of ergens uit halen (als het een container is, zoals een zak of een vuilnisbak).

locate command: als je iets of iemand zoekt, toont deze de locatie ervan.

De command help is verbeterd (toont afkortingen ook).

Intern in de code is de containment van objecten vereenvoudigd, maar het is nog niet zo generiek als ik misschien zou willen, want het is nu bijvoorbeeld nog niet mogelijk om een living in een item te stoppen. Je kunt dus b.v. nog geen konijn oppakken, of je verschuilen in een kartonnen doos.

Voor de volgende keer:

Een korte sessie met een simpele demonstratie van een paar nieuwe features volgt hieronder:

[Essglen Town square]
The old town square of Essglen. It is not much really, and narrow
streets quickly lead away from the small fountain in the center.
A long straight lane leads north towards the horizon.
You see a dented steel trashcan and a newspaper.
Laish the town crier, ant, blubbering idiot, and rat are here.

>> take newspaper
You take a newspaper.

>> put newspaper in trashcan
You put a newspaper in the trashcan.

>> exa trashcan
You see a dented steel trashcan.
A steel trash can, looking worn. The lid is closed, probably for the better.
It contains: newspaper

>> take all
You take a dented steel trashcan.

>> i
You are carrying:
  dented steel trashcan

>> drop newspaper
(newspaper was found in dented steel trashcan, in your inventory)
(you take the newspaper from the trashcan)
You drop a newspaper.

>> drop all
You drop a dented steel trashcan.

>> locate newspaper
You look around to see if you can locate newspaper.
Newspaper was found in your current location.

>> put all in trashcan
You're not carrying anything.

>> take all
You take a dented steel trashcan and a newspaper.

>> put all in trashcan
You can't put dented steel trashcan in itself.
You put a newspaper in the trashcan.

>> locate newspaper
You look around to see if you can locate newspaper.
Newspaper was found in dented steel trashcan, in your inventory.

>> kick trashcan
You kick dented steel trashcan hard.

>> ?
Available commands:
locate, quit, inspect, stats, help/?, give, drop, look/l, examine/exa/x, inventory/i/inv, put, tell, take
Abbreviations:
'=say, d=down, e=east, n=north, ne=northeast, nw=northwest, s=south, se=southeast, sw=southwest, u=up, w=west
Pick up/put down are aliases for take/drop.

>> quit

>> n
<mudlib.baseobjects.Location 'Tower kitchen' @ 0x247d5d0>
[Tower kitchen]
A cozy little kitchen for hungry wizards.
Magically conjured food often tastes like cardboard, so even wizards need to
prepare their meals the old-fashioned way. The kitchen looks small but tidy.
A door to the south leads back to the hall.

>> ls .rooms.town
<.rooms.town>
Locations: lane, square
Livings: ant, towncrier, rat, idiot
Items: newspaper, trashcan
Classes: Monster, NPC, Item, Location

>> teleport .rooms.town.idiot
Arch wizard Irmen makes some gestures and a portal suddenly opens.
Blubbering idiot tumbles out of it, and the portal quickly closes again.

>> look
<mudlib.baseobjects.Location 'Tower kitchen' @ 0x247d5d0>
[Tower kitchen]
A cozy little kitchen for hungry wizards.
Magically conjured food often tastes like cardboard, so even wizards need to
prepare their meals the old-fashioned way. The kitchen looks small but tidy.
A door to the south leads back to the hall.
Blubbering idiot is here.

>> teleport .rooms.town.square
Can't teleport a room here, maybe you wanted to teleport TO somewhere?

>> teleport to .rooms.town.square
You've been teleported.
<mudlib.baseobjects.Location 'Essglen Town square' @ 0x247d0f0>
[Essglen Town square]
The old town square of Essglen. It is not much really, and narrow
streets quickly lead away from the small fountain in the center.
A long straight lane leads north towards the horizon.
You see a dented steel trashcan and a newspaper.
Laish the town crier, ant, and rat are here.

>>