|
||
|
|||||||
| General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Join Date: Nov 2002
Posts: 18
|
May be someone wish to share custom commands? Here code for [Bank
command. [code:1] using System; using System.Reflection; using System.Collections; using Server; using Server.Targeting; using Server.Items; using Server.Gumps; namespace Server.Scripts.Commands { public class Bank { public static void Register() { Server.Commands.Register( "Bank", AccessLevel.GameMaster, new CommandEventHandler( Bank_OnCommand ) ); } private class BankTarget : Target { public BankTarget() : base( -1, true, TargetFlags.None ) { } protected override void OnTarget( Mobile from, object o ) { if(o is Mobile) { Mobile targ = (Mobile)o; BankBox box = targ.BankBox; if ( box != null ) box.Open(); } } } private static void Bank_OnCommand( CommandEventArgs e ) { e.Mobile.Target = new BankTarget(); } } } [/code:1] I wrote this because banker was not responding to my 'bank' cries. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|