wyvern.lib.commands
Class MiscCommands

java.lang.Object
  extended bywyvern.kernel.properties.PList
      extended bywyvern.kernel.commands.SimpleHandler
          extended bywyvern.lib.commands.MiscCommands
All Implemented Interfaces:
BuiltInCommand, Command, PropertyList

public class MiscCommands
extends SimpleHandler

Implements miscellaneous simple administrative commands.

Version:
1.0, Mar 21, 1999
Author:
Steve Yegge

Field Summary
static int MAX_DESCRIPTION_LENGTH
           
 
Fields inherited from class wyvern.kernel.commands.SimpleHandler
delay_
 
Fields inherited from class wyvern.kernel.properties.PList
readOnly_
 
Fields inherited from interface wyvern.lib.PropertyList
PROPERTY_PACKAGE
 
Method Summary
 void addCommands(java.util.Map commands, CommandList list)
          Adds commands.
 boolean adjust(CommandEvent event)
          Adjusts an item in the agent's inventory to a different location.
 boolean afk(CommandEvent event)
          Sets an afk (away-from-keyboard) message.
 boolean again(CommandEvent event)
          Enqueues the last command the user typed.
 boolean buy(CommandEvent event)
          Attempts to buy something.
 boolean chatwho(CommandEvent event)
          Shows who's subscribed to a particular chat channel.
 boolean crimelist(CommandEvent event)
          Shows the player their most recent crimes.
 boolean criminal(CommandEvent event)
          tell player what crime they last committed, if any
 boolean date(CommandEvent event)
           
 boolean describe(CommandEvent event)
          Allows a player to set their own description.
 boolean earmuffs(CommandEvent event)
          Turns earmuffs on or off for the wizard.
 boolean enter(CommandEvent event)
          Enters a building.
 boolean equip(CommandEvent event)
          Tries to wield a weapon and wear all available armor.
 boolean ethermuffs(CommandEvent event)
          Turns ethermuffs on or off for the wizard.
 boolean fogeys(CommandEvent event)
          Shows the "who" list, sorted by birthday.
 java.lang.reflect.Method getHandler(java.lang.String verb)
          Returns the Method corresponding to the passed verb.
static MiscCommands getImpl()
           
 boolean grow(CommandEvent event)
           
 boolean guildmuffs(CommandEvent event)
          Turns guildmuffs on or off for the wizard.
 boolean h1(CommandEvent event)
           
 boolean h2(CommandEvent event)
           
 boolean h3(CommandEvent event)
           
 boolean h4(CommandEvent event)
           
 boolean handleEvent(CommandEvent event)
          Handles the command.
 boolean ignore(CommandEvent event)
          Ignores a player (persistently).
 boolean join(CommandEvent event)
          Turns summon-player and join-player on or off.
 boolean keep(CommandEvent event)
          Marks a piece of equipment as "kept" so you can't sell it.
 boolean learn(CommandEvent event)
          Default handler for "learn" command, so if you don't have a spellbook handy it gives you some instructions.
 boolean password(CommandEvent event)
          Implements change-password.
 boolean refund(CommandEvent event)
           
 boolean repeat(CommandEvent event)
          Synonym for "again".
 boolean save(CommandEvent event)
          Saves the player.
 boolean sell(CommandEvent event)
           
 boolean shrink(CommandEvent event)
           
 boolean spy(CommandEvent event)
          Toggles snooping on or off.
 boolean subscribe(CommandEvent event)
          Subscribes to a chat-channel.
 boolean swim(CommandEvent event)
          Toggles swimming on or off.
 boolean time(CommandEvent event)
           
 boolean tnl(CommandEvent event)
          Shows XP to next level.
 boolean unignore(CommandEvent event)
          Un-ignores a player you were ignoring.
 boolean units(CommandEvent event)
          Changes unit system for displaying weights and measures.
 boolean unkeep(CommandEvent event)
          Removes the flag on a piece of equipment that keeps you from selling it accidentally.
 boolean unsell(CommandEvent event)
           
 boolean unsubscribe(CommandEvent event)
          Unsubscribes from a chat-channel.
 boolean value(CommandEvent event)
           
 boolean veterans(CommandEvent event)
          Shows the "who" list sorted by age (total time online).
 boolean where(CommandEvent event)
          Tells the player what map they're in.
 boolean wizards(CommandEvent event)
          Shows all the visible wizards online.
 
Methods inherited from class wyvern.kernel.commands.SimpleHandler
createEvent, execute, knowsCommand
 
Methods inherited from class wyvern.kernel.properties.PList
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, debugProperties, dismantlePropertyList, getDoubleProperty, getInheritedProperty, getInteger, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, getProfilingInfo, getProperties, getProperties, getPropertiesIncludingTransients, getPropertiesIncludingTransients, getProperty, getSerializableProperties, getSerializableProperty, getStringProperty, getTransientDoubleProperty, getTransientIntProperty, getTransientLongProperty, getTransientProperties, getTransientProperty, hasLocalProperty, hasPersistentProperty, hasProperty, hasTransientProperty, inheritProperty, isReadOnly, isRemoved, isTransientlyRemoved, printLocalProperties, printProperties, printProperties, printTransientProperties, removeProperty, removeTransientProperty, setDoubleProperty, setIntProperty, setLongProperty, setParent, setProperty, setReadOnly, setTransientDoubleProperty, setTransientIntProperty, setTransientLongProperty, setTransientProperty, toString, toString, transientlyRemoveProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_DESCRIPTION_LENGTH

public static final int MAX_DESCRIPTION_LENGTH
See Also:
Constant Field Values
Method Detail

getImpl

public static MiscCommands getImpl()

getHandler

public java.lang.reflect.Method getHandler(java.lang.String verb)
Returns the Method corresponding to the passed verb.


addCommands

public void addCommands(java.util.Map commands,
                        CommandList list)
Adds commands.

Specified by:
addCommands in interface BuiltInCommand
Specified by:
addCommands in class SimpleHandler
Parameters:
list - the CommandList we're associating with, if any
commands - the map to place our commands in.

handleEvent

public boolean handleEvent(CommandEvent event)
Handles the command.

Specified by:
handleEvent in class SimpleHandler
Parameters:
event - a CommandEvent with various fields filled in: the agent performing the command, the command verb and arguments, the delay for the command, and success/failure messages.
Returns:
true if it was completed successfully

password

public boolean password(CommandEvent event)
Implements change-password.

Parameters:
event - the event

again

public boolean again(CommandEvent event)
Enqueues the last command the user typed.


repeat

public boolean repeat(CommandEvent event)
Synonym for "again".


learn

public boolean learn(CommandEvent event)
Default handler for "learn" command, so if you don't have a spellbook handy it gives you some instructions.


afk

public boolean afk(CommandEvent event)
Sets an afk (away-from-keyboard) message.


describe

public boolean describe(CommandEvent event)
Allows a player to set their own description.


enter

public boolean enter(CommandEvent event)
Enters a building. Newbies were frequently typing this to try to get in to places, so we added it.


equip

public boolean equip(CommandEvent event)
Tries to wield a weapon and wear all available armor.


adjust

public boolean adjust(CommandEvent event)
Adjusts an item in the agent's inventory to a different location.


earmuffs

public boolean earmuffs(CommandEvent event)
Turns earmuffs on or off for the wizard.

Parameters:
event - the command event
Returns:
true if we handled the event

ethermuffs

public boolean ethermuffs(CommandEvent event)
Turns ethermuffs on or off for the wizard.

Parameters:
event - the command event
Returns:
true if we handled the event

guildmuffs

public boolean guildmuffs(CommandEvent event)
Turns guildmuffs on or off for the wizard.

Parameters:
event - the command event
Returns:
true if we handled the event

keep

public boolean keep(CommandEvent event)
Marks a piece of equipment as "kept" so you can't sell it.


unkeep

public boolean unkeep(CommandEvent event)
Removes the flag on a piece of equipment that keeps you from selling it accidentally.


ignore

public boolean ignore(CommandEvent event)
Ignores a player (persistently).


unignore

public boolean unignore(CommandEvent event)
Un-ignores a player you were ignoring.


join

public boolean join(CommandEvent event)
Turns summon-player and join-player on or off.


swim

public boolean swim(CommandEvent event)
Toggles swimming on or off.


spy

public boolean spy(CommandEvent event)
Toggles snooping on or off.


subscribe

public boolean subscribe(CommandEvent event)
Subscribes to a chat-channel.


unsubscribe

public boolean unsubscribe(CommandEvent event)
Unsubscribes from a chat-channel.


chatwho

public boolean chatwho(CommandEvent event)
Shows who's subscribed to a particular chat channel.


crimelist

public boolean crimelist(CommandEvent event)
Shows the player their most recent crimes.


criminal

public boolean criminal(CommandEvent event)
tell player what crime they last committed, if any


buy

public boolean buy(CommandEvent event)
Attempts to buy something. If the player is is a Shop, this handler never gets invoked, since the Shop handles the "buy" command directly. This one is used outside shops; it changes the command to "buy from " if the item was offered for auction by a player.


where

public boolean where(CommandEvent event)
Tells the player what map they're in.


units

public boolean units(CommandEvent event)
Changes unit system for displaying weights and measures.


fogeys

public boolean fogeys(CommandEvent event)
Shows the "who" list, sorted by birthday.


veterans

public boolean veterans(CommandEvent event)
Shows the "who" list sorted by age (total time online).


wizards

public boolean wizards(CommandEvent event)
Shows all the visible wizards online.


sell

public boolean sell(CommandEvent event)

value

public boolean value(CommandEvent event)

refund

public boolean refund(CommandEvent event)

unsell

public boolean unsell(CommandEvent event)

h1

public boolean h1(CommandEvent event)

h2

public boolean h2(CommandEvent event)

h3

public boolean h3(CommandEvent event)

h4

public boolean h4(CommandEvent event)

shrink

public boolean shrink(CommandEvent event)

grow

public boolean grow(CommandEvent event)

save

public boolean save(CommandEvent event)
Saves the player.


time

public boolean time(CommandEvent event)

date

public boolean date(CommandEvent event)

tnl

public boolean tnl(CommandEvent event)
Shows XP to next level.