ServUO Version
Publish 58
Ultima Expansion
Endless Journey
I can't seem to figure out how to make the BankerGump.cs open when players type "bank" right now the only way to access the BankerGump is if a player left clicks on a banker and chooses "Open Bank Box" from the context menu.

Any insight would be greatly appreciated.

Thanks,
 
I was responding to your original gump question..which would have been, in public static void HandleSpeech(Mobile vendor, SpeechEventArgs e)

C#:
                        case 0x0002: // *bank*
                            {
                                e.Handled = true;

                                if (e.Mobile.Criminal)
                                {
                                    // Thou art a criminal and cannot access thy bank box.
                                    vendor.Say(500378);
                                    break;
                                }

                                e.Mobile.BankBox.Open();

                                if (e.Mobile is PlayerMobile pm)
                                {
                                    pm.CloseGump(typeof(BankerGump));
                                    pm.SendGump(new BankerGump(pm));
                                }
                            }
                            break;
 
I was responding to your original gump question..which would have been,

C#:
                        case 0x0002: // *bank*
                            {
                                e.Handled = true;

                                if (e.Mobile.Criminal)
                                {
                                    // Thou art a criminal and cannot access thy bank box.
                                    vendor.Say(500378);
                                    break;
                                }

                                e.Mobile.BankBox.Open();

                                if (e.Mobile is PlayerMobile pm)
                                {
                                    pm.CloseGump(typeof(BankerGump));
                                    pm.SendGump(new BankerGump(pm));
                                }
                            }
                            break;
Thanks, trying this now.

They respond to speech, they just don't open the BankerGump when players type "bank" they only open the bank box.

UPDATE:
Code:
C:\Servers\ServUO\Scripts\Mobiles\NPCs\Banker.cs(420,57): error CS0246: The type or namespace name 'BankerGump' could n
ot be found (are you missing a using directive or an assembly reference?) [C:\Servers\ServUO\Scripts\Scripts.csproj]
C:\Servers\ServUO\Scripts\Mobiles\NPCs\Banker.cs(421,53): error CS0246: The type or namespace name 'BankerGump' could n
ot be found (are you missing a using directive or an assembly reference?) [C:\Servers\ServUO\Scripts\Scripts.csproj]
    0 Warning(s)
    2 Error(s)
Says BankerGump can't be found.
 
thank you for this. I was wondering why I had to do the same thing left clicking on the banker to bring the gump up.. Got it working and did exactly like you said.

Thanks again for the help.
 
Back