Python Mud (3): items en verplaatsing

Saturday 10 March 2012, 20:00: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

Sinds de vorige versie is er een hoop veranderd onder de motorkap maar ook qua mogelijkheden.

Je kunt nu rondlopen! De exits doen het inclusief controles (b.v. normale spelers kunnen de wizard tower niet in komen). Tevens kun je nu items oppakken en wegleggen, en aan iemand anders geven (zolang die dat accepteert).

Vrijwel alle commands zijn uit de driver losgehaald en in eigen modules ondergebracht. Er is een opsplitsing tussen commando's die iedereen kan doen, en commando's waar je wizard privileges voor moet hebben. Middels een eenvoudige decorator @cmd("take") wordt de benodigde glue aan elk commando toegevoegd.

Wizards zien meer details over personen, npc's en items, en kunnen ze clonen en destroyen. Ze kunnen ook een 'wiretap' leggen op een living of een kamer, om de berichten die daarheen worden gestuurd, af te tappen.

Aggressieve acties die je tegen een monster pleegt (bv kick, taunt) zorgen ervoor dat het monster gaat aanvallen (combat zit er echter nog helemaal niet in).

Voor de volgende keer wil ik iets doen aan:

Een sessie met een paar nieuwe opties loopt nu als volgt, zie verder:

[E:\projects\Mud]python driver.py

Snakepit mud driver and mudlib. Copyright (C) 2012  Irmen de Jong.
This program comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under the terms and conditions
of the GNU General Public License version 3. See the file LICENSE.txt


  ___              _          ___  _  _
 / __| _ _   __ _ | |__ ___  | _ \(_)| |_
 \__ \| ' \ / _` || / // -_) |  _/| ||  _|  by Irmen de Jong
 |___/|_||_|\__,_||_\_\\___| |_|  |_| \__|  irmen@razorvine.net


Create default (w)izard, default (p)layer, (c)ustom player? w

Welcome to Snakepit, arch wizard Irmen.


<mudlib.baseobjects.Location 'Main hall of the Tower of Magic' @ 0x2465190>
[Main hall of the Tower of Magic]
The main hall of this ancient wizard tower sparkles with traces of magic.
Everything seems to glow a little from within. You can hear a very faint hum.
You see an oak table and a rusty key.
A heavy wooden door to the east blocks the noises from the street outside.
A small ladder leads up through a hole in the ceiling.
A door to the north leads to the kitchen.
Mindless drone is here.

>> ?
Available commands: clone, destroy, drop, exa, examine, give, help, inv, inventory, look,
  ls, pdb, quit, stats, take, tell, wiretap
Abbreviations: ?=help, d=down, e=east, i=inventory, l=look, n=north, s=south, u=up, w=west

>> i
You are carrying nothing.

>> clone key
Cloned: <mudlib.baseobjects.Item 'key' @ 0x24796b0>

>> i
You are carrying:
  rusty key

>> give key to drone
You can't give key to mindless drone.

>> e
<mudlib.baseobjects.Location 'Lane of Magicks' @ 0x2402d10>
[Lane of Magicks]
A long straight road leading to the horizon. Apart from a nearby small tower,
you can't see any houses or other landmarks. The road seems to go on forever though.
The town square lies to the south.
To the west is the wizard's tower. It seems to be protected by a force-field.

>> s
<mudlib.baseobjects.Location 'Essglen Town square' @ 0x23d7370>
[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.
You see a piece of paper.
A long straight lane leads north towards the horizon.
Laish the town crier, blubbering idiot, and rat are here.

>> give key to idiot
You can't give key to blubbering idiot.

>> wiretap .
Wiretapped room 'Essglen Town square'.

>> wiretap laish
Wiretapped laish.

>> taunt rat
You taunt rat.
[wiretap on 'laish': Arch wizard Irmen taunts rat.]
[wiretap on 'Essglen Town square': Arch wizard Irmen taunts rat.]
Rat starts attacking you!
[wiretap on 'laish': Rat starts attacking arch wizard Irmen!]
[wiretap on 'Essglen Town square': Rat starts attacking arch wizard Irmen!]

>> destroy rat
You destroyed <mudlib.npc.Monster 'rat' @ 0x2402f70>.
[wiretap on 'laish': Arch wizard Irmen makes some gestures and a tiny black hole appears.
Rat disappears in it, and the black hole immediately vanishes.]
[wiretap on 'Essglen Town square': Arch wizard Irmen makes some gestures and a tiny black hole appears.
Rat disappears in it, and the black hole immediately vanishes.]

>> drop key
You drop a rusty key.
[wiretap on 'laish': Arch wizard Irmen drops a rusty key.]
[wiretap on 'Essglen Town square': Arch wizard Irmen drops a rusty key.]

>> l
<mudlib.baseobjects.Location 'Essglen Town square' @ 0x23d7370>
[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.
You see a piece of paper and a rusty key.
A long straight lane leads north towards the horizon.
Laish the town crier and blubbering idiot are here.

>> ls .rooms.wizardtower
<.rooms.wizardtower>
Classes: Monster, Item, Location
Livings: drone
Items: key, table

>> clone .rooms.wizardtower.drone
Cloned: <mudlib.npc.Monster 'drone' @ 0x24797d0>
[wiretap on 'laish': Arch wizard Irmen summons a mindless drone.]
[wiretap on 'Essglen Town square': Arch wizard Irmen summons a mindless drone.]
[wiretap on 'laish': Mindless drone arrives.]
Mindless drone arrives.
[wiretap on 'Essglen Town square': Mindless drone arrives.]

>> l
<mudlib.baseobjects.Location 'Essglen Town square' @ 0x23d7370>
[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.
You see a piece of paper and a rusty key.
A long straight lane leads north towards the horizon.
Laish the town crier, blubbering idiot, and mindless drone are here.

>> inv idiot
Blubbering idiot is carrying nothing.

>> take paper
You take a piece of paper.
[wiretap on 'laish': Arch wizard Irmen takes a piece of paper.]
[wiretap on 'Essglen Town square': Arch wizard Irmen takes a piece of paper.]

>> exa paper
<mudlib.baseobjects.Item 'paper' @ 0x2402e50>
You're carrying a piece of paper.
A worn piece of paper with a few faded words written on it.

>> quit
Goodbye, arch wizard Irmen.