RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Need help :(

Kiwi

Knight
Need help :(

Keep in mind this is my first RunUO script :\

I'm trying to make Hair Dye complete with the gump..
I took some code from the test center "help" gumps to base it off

I like to go through and add messages in there to help me 'debug' or just know that it's working properly

Also remember I have no fucking clue what some things mean, i just want a working script :p

[code:1]public class HairDyeGump : Gump
{
public override void OnResponse( NetState from, RelayInfo info )
{
switch ( info.ButtonID )
{
case 1: //test
{
break;
}
case 2: //test2
{
break;
}
case 3: //test3
{
break;
}
}
}
[/code:1]

Now the thing is... what if in one of my cases, I want to send a message? Thing is, I can't, it says it's not in NetState thing or whatever. I don't even know why 'NetState' is used, I just took it from the help thing :/
 

krrios

Administrator
NetState's have a Mobile property. You can use that to send messages.

Mobile m = from.Mobile;

m.SendMessage( "Your hair has been dyed." );
 
Top