How can put some items in everyone newbie player backpack?

Milva

Admin
Moderator
Mar 3, 2013
4,495
573
113
Donate
Donate money to this user
If you mean with new player just starting would be here
Scripts/Misc/CharacterCreation
Look for these lines you can add items there

PackItem(new RedBook("a book", m.Name, 20, true));
PackItem(new Gold(1000)); // Starting gold can be customized here
PackItem(new Candle());
 

sunnyks

Rookie
Feb 7, 2016
94
3
8
25
If you mean with new player just starting would be here
Scripts/Misc/CharacterCreation
Look for these lines you can add items there

PackItem(new RedBook("a book", m.Name, 20, true));
PackItem(new Gold(1000)); // Starting gold can be customized here
PackItem(new Candle());
yeah that's mean

so other question can u teach me?
how can create new gift box
have some items in box
 

Milva

Admin
Moderator
Mar 3, 2013
4,495
573
113
Donate
Donate money to this user
Are you able to create simple scripts? If I give you a giftbox script which drops 2 items in it- can you change the name of the gift box and change the gift items in the scripts?
 

sunnyks

Rookie
Feb 7, 2016
94
3
8
25
Are you able to create simple scripts? If I give you a giftbox script which drops 2 items in it- can you change the name of the gift box and change the gift items in the scripts?
yes because i'm create scripts usually server crash...
 
  • Like
Reactions: Mr. T

Milva

Admin
Moderator
Mar 3, 2013
4,495
573
113
Donate
Donate money to this user
Are you saying you can change names in scripts then? :)
 

JaxStraw

Citizen
Feb 20, 2018
41
2
8
39
Are you able to create simple scripts? If I give you a giftbox script which drops 2 items in it- can you change the name of the gift box and change the gift items in the scripts?
I can and would love this script :)
 

GoldDraco13

Squire
Aug 1, 2014
411
255
63
48
Canada
mycy4.com
Donate
Donate money to this user
I ripped this from the gift box for you, the Katana can be changed out as with name & hue, add more DropItem lines for more items.

Use [add customgiftbox in game or CustomGiftBox box = new CustomGiftBox(); for a instance in code!

Code:
using Server.Items;

namespace Server
{
    [Furniture]
    [Flipable(0x232A, 0x232B)]
    public class CustomGiftBox : Container
    {
        [Constructable]
        public CustomGiftBox() : base(Utility.Random(0x232A, 2))
        {
            Name = "Custom Gift Box";
            Weight = 2.0;
            Hue = 1175;
            DropItem(new Katana());
        }

        public CustomGiftBox(Serial serial) : base(serial)
        {
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int)0); // version
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
        }
    }
}
 
  • Like
Reactions: Milva

Tukaram

Squire
Jan 4, 2015
351
50
28
56
I can and would love this script :)
Here is one I like. Pandora's Gift Box. GM can place the box anywhere in-game, regular players cannot access it. Anything you put in it can be given to players. There are settings for one per character, one per account. You can set up multiple boxes for different events. I like to add a gift box into the box, and put all the freebies in the gift box. That way the player gets a nice gift box.

I did not write this, and not sure if I got it from RunUO or ServUO. Had it for many years.
 

Attachments

JaxStraw

Citizen
Feb 20, 2018
41
2
8
39
Here is one I like. Pandora's Gift Box. GM can place the box anywhere in-game, regular players cannot access it. Anything you put in it can be given to players. There are settings for one per character, one per account. You can set up multiple boxes for different events. I like to add a gift box into the box, and put all the freebies in the gift box. That way the player gets a nice gift box.

I did not write this, and not sure if I got it from RunUO or ServUO. Had it for many years.
I have PGB, but what I assumed was being asked originally and heard there is a script someone had, I wanted to add items into a players bank account at charactercreation.cs
 

GoldDraco13

Squire
Aug 1, 2014
411
255
63
48
Canada
mycy4.com
Donate
Donate money to this user
The following code already adds an item to the new young character's bank box, using Katana as an example I'll add another item, in CharacterCreation.cs look for the following code

Code:
            if (young)
            {
                var ticket = new NewPlayerTicket
                {
                    Owner = newChar
                };
                
                newChar.BankBox.DropItem(ticket);
            }
then add as many items to the player bank using the following code, this is a basic start, you can refine this like the TestCenter.cs and use another class/method to hold all the items you wish to add to the bankbox!

Code:
            if (young)
            {
                var ticket = new NewPlayerTicket
                {
                    Owner = newChar
                };
                
                newChar.BankBox.DropItem(ticket);            
                newChar.BankBox.DropItem(new Katana()); <Example, just add as many lines as you need, one per item!
            }