Lua Table Of Functions With Definitions
Click on the funtion to see an example if available.
adddelay addelay(seconds) Sets a timer to call a 'delay' trigger on the mob.
addstats addstats(obj,stat,amount) Adds stats to an item
affected affected(ch,flag) Test if character has a specific affect flag set.
ally ally(ch) Tests if ch is an ally of the current mob.
call call(...) Calls another lua program. Argument list in details.
cancel cancel() Cancel a delay - mprog compability
canseechar canseechar(ch1,ch2) Test if ch1 can see ch2.
carries carries(ch1,item) Test if ch1 is carrying item in their inventory
cast cast(spell,targ,opts) Casts a spell at the target given, or self.
clantalk clantalk(message) Allows clan mobs and guards to talk on their channel.
channel channel(ch1,"channel",on|off) Test or set value of a channel flag on a player.
config config(ch1,"flag",on|off)]] Test or set value of a configuration flag on a player.
countitems countitems(ch,item,opts)Counts how many of a specific item a player is wearing and/or carrying.
damage damage(...)Inflict damage on CH. See details for argument list.
destroy destroy(ch,obj,opts) Destroy one of more instances of item [objkey] on CH.
doat doat(loc,action,opts) Mob performs an action in another room.
echo echo(msg,about,opts) Echo a message to CH, or about CH (to room). $ variables available.
echoat echoat(ch,about,opts) Echo a message to a specific character. $ variables available.
echoaround echoaround(ch,about,opts) Echo a message to all rooms adjacent to ch.
emote emote(msg) Emote a message to the room.
force force(ch,commands,opts) Force a character, or group of characters, to perform an action.
forget Forget a previously remembered character - mprog compability
getmob getmob(mob,room,opts) Find a character in the game or a single room. Return as ch type.
getobj getobj(objkey,ch|obj|room,opts} Find an object. Return as obj type.
getroom getroom(roomkey Get room if roomkey exists, returned as room type variable.
give give(item,ch) Give an item to character 'ch'
givegive(ch,amount) Give experience to player 'ch'
giveqp giveqp(ch,amount) Give quest points to player 'ch'
hasclass hasclass(ch,[class]) Tests whether CH has the given class.
hasdelay hasdelay() Tests whether the mob running the program has an old-style 'mob delay' set.
hasobj hasobj(ch,item)Tests if character has the item type carried. For compatibility with old mobprog conversions.
immune immune(ch,focus) Tests if character is immune to a specific damage focus.
info info("message","channel") Test or set value of an info channel setting.
infoflag infoflag(ch1,"info chan",on|off) Test or set value of an info channel setting.
isplayer isplayer(ch) Tests if ch is a player.
kill kill(ch,opts) Attack another character.
mobflag mobflag(ch,flag) Tests if mob has a flag set. Always false on a player.
mdo mdo(command) Causes the mob running the prog to execute a mud command.
mgoto mgoto(name)Go to mob, if found.
mload mload(mobkey) Create an instance of mobkey and place it in the current room. Return mob created.
mobexists mobexists(mobkey,room) Tests if instances of mob exist, specific room or entire game.
movechar movechar(ch,room,opts) Transfer a character or group to another room from room progs.
objflag objflag(obj,flag,[0|1]) Test for, or set, flags on an item.
objingame objingame(objkey)Tests if instances of obj exist anywhere in game.
objhere objhere(objkey) Tests if instances of obj exist in current room.
oload oload(mobkey) Create an instance of an object in inventory or room. Return obj created.
peace peace( ) Stops all combat on a given character, or on character running the prog.
pgoto pgoto(name)Go to player, if found.
plrflag plrflag(ch,flagname) Tests if player has a specific flag set. Always false for mobs.
postnote postnote(...) Allows a mob to post a note from within lua progs.
purgemob purgemob(ch,opts) Purge mob(s) in current room or in entire game.
purgeobj purgeobj(obj,opts) Purge various combinations of objects in room or game.
randchar randchar(opts) Find a random charater in the current room. Return as ch type variable.
remember remember(ch)Remember 'ch' for use with delay triggers - mprog compability
rgoto rgoto(roomkey)Go to a specific room.
say say(message)Causes mob to say something to the room.
sayto sayto(ch,message,opts) Causes a "say" to be sent to single char and formatted for linebreaks. Used in Academy.
send send(ch,message) Send a message to ch. Useful for debug and in progs where echo is not available.
social social(social,targ)Causes the mob to execute a social.
summon summon(ch,opts)Causes the character, if found, to be transferred to current room.
transfer transfer(ch,loc,opts) Transfers character(s) already in the current room to another location.
wearsobj wearsobj(ch,item) Tests if character has the item type worn. For compatibility with old mobprog conversions.
zecho zecho(message) Sends a message to all players in the current zone.