~/paste/1785
~/paste/1785
~/paste/1785

  1. *:/mail [$] = >>>
  2.     assign(@items, array(parse_args($)))
  3.     assign(@first, array_get(@items, 0))
  4.    
  5.     msg(array_get(@items, 0))
  6.    
  7.     switch(to_lower(@first),
  8.         'send',
  9.             ifelse(array_index_exists(@items, 1),
  10.                 # /mail send Deaygo It lives!
  11.                 msg(player() 'sends mail to' @items[1] 'with message' array_implode(@items[2..]))
  12.             , # else
  13.                 # /mail send garf
  14.                 msg('Usage: /mail send <player> <message>')
  15.             ),
  16.         'read',
  17.             ifelse(array_index_exists(@items, 1),
  18.                 # /mail read 1
  19.                 msg('reading one mail!')
  20.             , # else
  21.                 # /mail read
  22.                 msg('reading all mail!')
  23.             ),
  24.         'clear',
  25.             # /mail clear
  26.             msg('clearing!),
  27.        msg(array_implode(@items))
  28.    )
  29. <<<
Language: commandhelper
Posted by __import__ at 10 Mar 2012, 04:25:28 UTC