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!

Login

Login

Been looking around and not sure what the command is I'm looking for.

Basically, I want it, upon login, to send a check for my guys race (much like it does on his death - which I already have scripted). If the race is such and such, then I want it to execute a block of commands. The race is not an issue, nor is the block of commands, but what is the correct syntax for checking the login?

Something to the effect of "public override bool OnLogin (Mobile from)" ? I've been looking and just can't find it. :/


EDIT: Nevermind. Right after I wrote this, I checked again. I had mispelled it before. :D Back to work with me.
 
Well, it didn't work like I thought it would.

Here's the script:
[code:1]
private static void OnLogin( LoginEventArgs e )
{
Mobile from = e.Mobile;
dovPlayerMobile mp = from as dovPlayerMobile;
RaceType race = mp.Race;
switch (race)
{
case RaceType.Lycanthrope: {mp.SendGump(new WereBeastGump( mp ) );break;}
}

}
[/code:1]

The idea is, when I log in with a Lycanthrope character, the morph gump should appear. This is not happening. :( Any help would be great.
 
UOT said:
Put it in the Loginstats.cs in Script\Misc

Thanks, that got it.

Sadly, I can't get it to just send the gump, so I put in an "OnDoubleClick" which works fine. The issue with not being able to just go gump is that the gump calls another gump which is friggin HUGE (the script for it), well over 1000 lines, and I don't want to put all that in my loginstats.cs, so I'll just leave it at the double-click and put in a provision to keep others from clickage.

Thanks for the help UOT. :D
 
Top