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!

[2.2]Default Character on new account

Bittiez

Sorceror
This little script will simply create a new character(a default character, all specs, items, etc can be specified by you in the script) for that player.

We created this script because we( On our shard, this part of the script will not be released) want to handle all character create in game in a newbie area, so in order to do this we create this script that will create a default character(so they will never see the default character creation screen, unless the click the new character button on the character selection screen, but this can be bypassed also ;) ).

Anyways, its plug and play, put this in your scripts/customs/ folder and restart. Enjoy!
 

Attachments

  • DefaultCharacter.zip
    1.5 KB · Views: 92

fcondon

Sorceror
So this actually makes a default character on everyones account? Interesting idea. How does it handle names?
 

Bittiez

Sorceror
So this actually makes a default character on everyones account? Interesting idea. How does it handle names?

Preset in the script, there are endless ways to handle this script wise, right now the character name is "Create New Character" because for us we want the user to not know there used to be a create gump there.
 

Thagoras

Sorceror
So this bypasses the character creation? I was looking for a way to bypass this to do what it sounds you've done.
 

Bittiez

Sorceror
Look for this part of the code:
C#:
        private static void AddBackpack(Mobile m)
        {
            Container pack = m.Backpack;
 
            if (pack == null)
            {
                pack = new Backpack();
                pack.Movable = false;
 
                m.AddItem(pack);
            }
 
        }

and change it to this(for an example):
C#:
        private static void AddBackpack(Mobile m)
        {
            Container pack = m.Backpack;
 
            if (pack == null)
            {
                pack = new Backpack();
                pack.Movable = false;
                pack.AddItem(new Gold(1000));
                m.AddItem(pack);
            }
 
        }


Or(This is probably better practice coding, but the above method will work also:
C#:
        private static void AddBackpack(Mobile m)
        {
            Container pack = m.Backpack;
 
            if (pack == null)
            {
                pack = new Backpack();
                pack.Movable = false;
                m.AddItem(pack);
            }
            pack.AddItem(new Gold(1000));
        }
 

fcondon

Sorceror
Couple questions:
Let's say I changed the skill or stat cap via charcreation.cs, Will that carry over with this over-ride, or do I need to set it inside this script as well?
Also what default stats / skills does this script give a newly created character (if any)?
If a player already has a character, and wants to create another one, does the script just keep creating characters, or does it only allow one, and return an error?
Lastly, How does this script handle the owner account? Does it ignore owner accounts?

Sorry for the questions, but this script gives me some ideas, I just want to cover some of my basics before I start to play with it this weekend.
 

Bittiez

Sorceror
Stat caps will probably have to be set in the script manually
Stats right now are 100/100/100 and no skills, but this is all changeable in the script if desired
The player can still use the old character creation gump, this only creates a new character if it is a new account.
This script affects all new accounts(it will have no effect on current accounts)
 

Bittiez

Sorceror
Yes, it can be done the same way you added the gold:
C#:
        private static void AddBackpack(Mobile m)
        {
            Container pack = m.Backpack;
 
            if (pack == null)
            {
                pack = new Backpack();
                pack.Movable = false;
                m.AddItem(pack);
            }
            pack.AddItem(new Gold(1000));
            m.AddItem(new JesterHat());
        }
 
Top