Mdo

Main.Mdo History

Hide minor edits - Show changes to markup

December 31, 2008, at 06:01 PM EST by admin
Added lines 1-15:
   mdo - syntax: mdo("command") 

mdo is the main function used to make the mob a program is running on execute a mud command. Using lua concatenation (..) you can build commands with multiple arguments. For example:

   --- Wear the object just given
   --- Note the single quotes to make sure all keywords are grouped.
   mdo("wear '" .. obj.keywords.. "'") 

    --- if it's level 1, drop/sac it.
    if (obj.level == 1) then
       mdo("drop '" .. obj.keywords .. "'")
       mdo("sacrifice '" .. obj.keywords .. "'")
    end