• Print

Author Topic: For the people with OCD on commands.  (Read 4336 times)

0 Members and 1 Guest are viewing this topic.

Mr582

  • Guest
For the people with OCD on commands.
« on: March 10, 2014, 09:29:17 am »
 Hello people of Ulysses Mod Forums!

I am here today to help people who want there commands to be a bit neater. This is more of a tip than a ad don.

Have you ever did a command, like lets just say !example, and it would do this in chat

!example Numpty
Mr582 *insert echo* Numpty

All you want is the part where it says "Mr582 has slayed Numpty." SAY NO MORE!

After looking at the commands for a bit, I figured out how to do this.

go to any command and you will see this close to the end of the command.

Code: Lua
  1. local example = ulx.command( "Fun", "ulx example", ulx.example, "!example" )

All you have to do is add ", true" after "!example". I will show below.

Code: Lua
  1. local example = ulx.command( "Fun", "ulx example", ulx.example, "!example", true )

You should now see everytime you do that command just

Mr582 *insert echo* Numpty

I am sorry, I am not the best at explaining but I hope I did a good job at explaining this. People have asked me how I did this when they came on my server and I did a command, so I decided to make a thread on your forums. Thanks for your time!
~ 582
« Last Edit: March 10, 2014, 11:28:31 am by Mr582 »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: For the people with OCD on commands.
« Reply #1 on: March 10, 2014, 08:07:08 pm »
Thanks.
There's also our ULib documents page describing all the options, including one you didn't mention.
The ability to not require a space after the chat command.
!exampleHumpty
:)


http://ulyssesmod.net/docs/files/lua/ulib/shared/commands-lua.html#cmds.TranslateCommand.cmds.addCommand

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

  • Print