ImaNewb

Member
I found this random quest generator script that I like but in order to activate the dialogue you have to use a context menu and select talk. I have context menus disabled on my shard so I was wondering how do I convert a click to a command. I think this is where the click initiates but I can't figure out how to make it a spoken command similar to a vendor when you say "Vendor Buy".

Code:
public override void OnClick()
            {
                             if( !( m_Mobile is PlayerMobile ) )
                    return;
               
                PlayerMobile mobile = (PlayerMobile) m_Mobile;

                {
                    if ( ! mobile.HasGump( typeof( QuestGiver_gump ) ) )
                    {
                        mobile.SendGump( new QuestGiver_gump( mobile ));
                    }
                }
            }
        }

Below are the scripts I am using.
 

Attachments

  • QuestGiver.cs
    12 KB · Views: 5
  • QuestScroll.cs
    79.4 KB · Views: 4
If you use Xmlspawner, and XmlQuestNPCs, you can use the property of TalkText/WhatYouWantThePlayerToSay.
Players could still click and see the TalkText, but if you have the ContextMenu disabled anyway, it won't matter.
 

Active Shards

Donations

Total amount
$0.00
Goal
$500.00
Back