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!

Command Attribute

arul

Sorceror
[2.0] 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()
{
     Commands.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 ) { ; }
...

Update to work under RunUO 2.0 RC1

Todo:
Shorter the time needed to load the commands ( ~10s because of large amount of classes and methods ).
 

Attachments

  • CommandAttribute.cs
    1.8 KB · Views: 42

arul

Sorceror
Update.

Updated to work under RunUO 2.0 RC 1.
 
Top