Python Mud (5): laatste paar commands

Monday 19 March 2012, 22:17: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
  4. take ALL the things & teleport me out of here →Python Mud (4): take ALL the things & teleport me out of here

Ik heb snel nog een paar laatste commando's geĆÆmplementeerd die wel nuttig leken: debug (wizard; dumpt alle interne attributen van iets), set (wizard; geeft een intern attribuut een andere waarde), who (toont speler informatie), open/close/lock/unlock (nodig voor deuren).

Verder is er nu een mechanisme om aliassen te kunnen definiƫren voor items en npcs zodat je b.v. trashcan ook kan aanduiden als trash.

Er zijn nu deuren die open/dicht kunnen zijn en op slot.

Put & drop verbeterd voor items die je niet kan verplaatsen, en een aantal andere commando's doet betere checks op toegestane acties (drop, put, take, give).

De languagetools module naam vond ik te lang, hernoemd naar lang (pun intended)

Voorbeelden van de nieuwe commando's volgen hieronder:

>> exa drone
<mudlib.npc.Monster 'drone' @ 0x200fcf0>
This is mindless drone.
A stupid metallic drone. It just hovers here with no apparent reason.
It's a somewhat small orb bot, and speaks Bocce.

>> debug drone
<mudlib.npc.Monster 'drone' @ 0x200fcf0>
Drone was found in your current location.
.aggressive: True
.aliases: []
.description: 'A stupid metallic drone. It just hovers here with no apparent reason.'
.gender: 'n'
.inventory: set([])
.location: <mudlib.baseobjects.Location 'Main hall of the Tower of Magic' @ 0x200fc70>
.name: 'drone'
.objective: 'it'
.possessive: 'its'
.race: 'bot'
.stats: {'cha': 50, 'sta': 50, 'agi': 50, 'int': 50, 'wis': 50, 'str': 50, 'spd': 50, 'lck': 10}
.subjective: 'it'
.title: 'mindless drone'
.wiretaps: <_weakrefset.WeakSet object at 0x0200FD10>

>> set drone.race='dragon'
<mudlib.npc.Monster 'drone' @ 0x200fcf0>
Field set: drone.race = 'dragon'

>> exa drone
<mudlib.npc.Monster 'drone' @ 0x200fcf0>
This is mindless drone.
A stupid metallic drone. It just hovers here with no apparent reason.
It's a huge semi bipedal dragon, and speaks Dragonate.

>> who
Arch wizard Irmen is playing, he is currently in 'Main hall of the Tower of Magic'.

>> who dunno
Right now, there's nobody online with that name.

>> e
>> s
You see a dented steel trashcan and a newspaper.

>> exa newspaper
<mudlib.baseobjects.Item 'newspaper' @ 0x200f930>
You see a newspaper.
Reading the date, you see it is last week's newspaper. It smells funky too.

>> take paper
You take a newspaper.

>>

>> s
[Alley of doors]
An alley filled with doors.
door1 (unlocked and open)
door2 (locked and open)
door3 (unlocked and closed)
door4 (locked and closed)
You can go north which brings you back to the square.

>> lock door3
You can't lock it.

>> door3
You can't go there; it's closed.

>> open door3
You opened it.

>> door3
[Alley of doors]
An alley filled with doors.
door1 (unlocked and open)
door2 (locked and open)
door3 (unlocked and closed)
door4 (locked and closed)
You can go north which brings you back to the square.

>> door4
You can't go there; it's closed.

>> open door4
You can't open it; it's locked.

>> unlock door4
You can't unlock it.

>> n
[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.
There's an alley to the south.
A long straight lane leads north towards the horizon.
You see a dark gem, a box1 (a black box), a box2 (a white box), a dented steel trashcan, and a newspaper.
Laish the town crier, ant, blubbering idiot, and rat are here.

>> take all
You can't pick up dented steel trashcan.
You take a newspaper, a dark gem, a box2 (a white box), and a box1 (a black box).

>> put all in trashcan
The gem is cursed! It sticks to your hand, you can't get rid of it!
You put a box2 (a white box), a newspaper, and a box1 (a black box) 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: box2 (a white box), newspaper, and box1 (a black box).

>> i
You are carrying:
  a dark gem

>> drop gem
The gem is cursed! It sticks to your hand, you can't get rid of it!

>> i
You are carrying:
  a dark gem

>>