Full Version : SendMessages
xmlspawner >>Scripting Support >>SendMessages


<< Prev | Next >>

Odee- 04-27-2006
Just need a little help with SendMessages. Im updating the Help engine (Page system) and the Stuck Menu areas etc. I have a few quick ?'s about the SendMessages Im adding.

If you see anything wrong, please point it out and suggest how I could by by fixing it. Thanks smile.gif
___

Original HelpGump.cs
CODE

AddButton( 80, 270, 5540, 5541, 0, GumpButtonType.Page, 3 );
   AddHtml( 110, 270, 450, 58, @"<u>Another player is harassing me.</u> Another player is verbally harassing your character. When you select this option you will be sending a text log to Origin Systems. To see what constitutes harassment please visit http://support.uo.com/gm_9.html.", true, true );


Will be

CODE


AddButton( 80, 270, 5540, 5541, 0, GumpButtonType.Page, 3 );
   AddHtml( 110, 270, 450, 58, @"<u>Another player is harassing me.</u> Another player is verbally harassing your character. When you select this option, a staff member will look at Chat Logs from both parties. To see what is considered Verbal Harassment please visit http://MYWEBSITEHERE.com", true, true );


___

Original PageQueue.cs

CODE


private class InternalTimer : Timer
 {
  private static TimeSpan StatusDelay = TimeSpan.FromMinutes( 2.0 );

  private PageEntry m_Entry;

  public InternalTimer( PageEntry entry ) : base( TimeSpan.FromSeconds( 1.0 ), StatusDelay )
  {
   m_Entry = entry;
  }

  protected override void OnTick()
  {
   int index = PageQueue.IndexOf( m_Entry );

   if ( m_Entry.Sender.NetState != null && index != -1 )
   {
    m_Entry.Sender.SendLocalizedMessage( 1008077, true, (index + 1).ToString() ); // Thank you for paging. Queue status :
    m_Entry.Sender.SendLocalizedMessage( 1008084 ); // You can reference our website at www.uo.com or contact us at support@uo.com. To cancel your page, please select the help button again and select cancel.
   }
   else
   {
    PageQueue.Remove( m_Entry );
   }
  }
 }
}



Will be

CODE


private class InternalTimer : Timer
 {
  private static TimeSpan StatusDelay = TimeSpan.FromMinutes( 2.0 );

  private PageEntry m_Entry;

  public InternalTimer( PageEntry entry ) : base( TimeSpan.FromSeconds( 1.0 ), StatusDelay )
  {
   m_Entry = entry;
  }

  protected override void OnTick()
  {
   int index = PageQueue.IndexOf( m_Entry );

   if ( m_Entry.Sender.NetState != null && index != -1 )
   {
    m_Entry.Sender.SendLocalizedMessage( 1008077, true, (index + 1).ToString() ); // Thank you for paging. Queue status :
    m_Entry.Sender.SendMessage( "If you would like to visit our website and talk about the In-Game problem you are having, open your browser and visit -- http://MYWEBSITEHERE.com". Also, if you would like to contact the Staff Team out of game, e-mail us at MYEMAILHERE@ADDRESS.com );
   }
   else
   {
    PageQueue.Remove( m_Entry );
   }
  }
 }
}



This is a SendMessage that I am worried about. Do you see anything wrong with it?

CODE

m_Entry.Sender.SendMessage( "If you would like to visit our website and talk about the In-Game problem you are having, open your browser and visit -- http://MYWEBSITEHERE.com". Also, if you would like to contact the Staff Team out of game, e-mail us at MYEMAILHERE@ADDRESS.com );



Thanks for all of the help.



ArteGordon- 04-28-2006
you have the closing double quotes in the middle of your string instead of at the end. That wont compile.

QUOTE

m_Entry.Sender.SendMessage( "If you would like to visit our website and talk about the In-Game problem you are having, open your browser and visit -- http://MYWEBSITEHERE.com". Also, if you would like to contact the Staff Team out of game, e-mail us at MYEMAILHERE@ADDRESS.com );



Odee- 04-29-2006
Thanks. Ill have to get to work on these scripts today