Does anyone know how I can change the keyword for bank?
All I see for keywords is this in banker.cs
How would I change case 0x0002:// *bank* to a different word?
All I see for keywords is this in banker.cs
Code:
public override void OnSpeech( SpeechEventArgs e )
{
if ( !e.Handled && e.Mobile.InRange( this.Location, 12 ) )
{
for ( int i = 0; i < e.Keywords.Length; ++i )
{
int keyword = e.Keywords[i];
switch ( keyword )
{
case 0x0000: // *withdraw*
{
e.Handled = true;
if ( e.Mobile.Criminal )
{
this.Say( 500389 ); // I will not do business with a criminal!
break;
}
string[] split = e.Speech.Split( ' ' );
if ( split.Length >= 2 )
{
int amount;
Container pack = e.Mobile.Backpack;
if ( !int.TryParse( split[1], out amount ) )
break;
if ( amount > 5000 )
{
this.Say( 500381 ); // Thou canst not withdraw so much at one time!
}
else if (pack == null || pack.Deleted || !(pack.TotalWeight < pack.MaxWeight) || !(pack.TotalItems < pack.MaxItems))
{
this.Say(1048147); // Your backpack can't hold anything else.
}
else if (amount > 0)
{
BankBox box = e.Mobile.FindBankNoCreate();
if (box == null || !box.ConsumeTotal(typeof(Gold), amount))
{
this.Say(500384); // Ah, art thou trying to fool me? Thou hast not so much gold!
}
else
{
pack.DropItem(new Gold(amount));
this.Say(1010005); // Thou hast withdrawn gold from thy account.
}
}
}
break;
}
case 0x0001: // *balance*
{
e.Handled = true;
if ( e.Mobile.Criminal )
{
this.Say( 500389 ); // I will not do business with a criminal!
break;
}
BankBox box = e.Mobile.FindBankNoCreate();
if ( box != null )
this.Say( 1042759, box.TotalGold.ToString() ); // Thy current bank balance is ~1_AMOUNT~ gold.
else
this.Say( 1042759, "0" ); // Thy current bank balance is ~1_AMOUNT~ gold.
break;
}
case 0x0002: // *bank*
{
e.Handled = true;
if ( e.Mobile.Criminal )
{
this.Say( 500378 ); // Thou art a criminal and cannot access thy bank box.
break;
}
e.Mobile.BankBox.Open();
break;
}
}
}
}
base.OnSpeech( e );
}