RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 RC1] Command Attribute

arul

Sorceror
Command Attribute

Summary:
This scripts gives you a new way to declare commands in RunUO.

Installation:
Drop anywhere you like within the Scripts folder.

Usage:
Currently if you want to declare a command in RunUO you have to write something like this:
Code:
....
public static void Initialize()
{
     CommandSystem.Register("MyCommand", AccessLevel.GameMaster, new CommandEventHandler( MyCommand_OnCommand ) );
}
....
public static void MyCommand_OnCommand( CommandEventArgs args ) { ; }

With this script you can write:
Code:
...
[Command( "MyCommand", AccessLevel.GameMaster )]
public static void MyCommand_OnCommand( CommandEventArgs args ) { ; }
...
 

Attachments

  • CommandAttribute.cs
    1.8 KB · Views: 128
Top