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!

PK / NONPK or PVP / PVM role Play system

Mortis

Knight
I have not seen one in a long time. So, decided to revamp and post an old one I made.

What is it?

A role play system that if you join as NONPK also known as PVM ( Player versus Monster ) other player characters can not harm you and you can not harm them. It restricts combat between other player characters.

You can also join as PK also known as PVP ( Player versus Player ) though it is not necessary. But, nice for using/making restrictions or allowed systems.
I have not seen one in a long time. So, decided to revamp and post an old one I made.

What is it?

A role play system that if you join as NONPK also known as PVM ( Player versus Monster ) other player characters can not harm you and you can not harm them. It restricts combat between other player characters.

You can also join as PK also known as PVP ( Player versus Player ) though it is not necessary. But, nice for using/making restrictions or allowed systems.

I made two swords included to show how an item can have a restriction. One is equitable only by NONPVP characters and the other equitable by only PK characters.

Two distro files need editing for existing shards and are included in a folder called distro files for new servers.

There is a README.txt with edit instructions for existing servers.

If you do the edits manually make sure to remove the distro files folder and containing files.

Distro files edited = Notoriety.cs and PlayerMobile.cs.
 

Attachments

  • NONPK.rar
    33.9 KB · Views: 15
  • NONPK6.jpg
    370.6 KB · Views: 24
  • NONPK7.jpg
    355.2 KB · Views: 21
  • NONPK8.jpg
    267.5 KB · Views: 21

Mortis

Knight
This post can be deleted. Did not realize it would auto post here when added to script library.


##########WARNING###########
DO NOT USE WITH STAFF CHARACTERS.
System only works for player accounts.
###########################


To start add ingame [add goddessofprotection

She speaks on movement and when players say key words to her.

Keywords are as follows.

hail
hail goddess
PK
NONPK
PVP
PVM
worship
bless me

All keywords are lower case only.
The goddess will prompt you as to when to say worship or bless me in her speech. To activate her.
 

Mortis

Knight
Yes. Make them frozen = true or can't walk = true in CharactorCreation.cs and set it to false when they choose in the PKNONPKGump.cs

In CharactorCreation.cs after line 701.

Original code
Code:
            }
 
            CityInfo city = GetStartLocation( args, young );
 
            newChar.MoveToWorld( city.Location, city.Map );
 
            Console.WriteLine( "Login: {0}: New character being created (account={1})", state, args.Account.Username );
            Console.WriteLine( " - Character: {0} (serial={1})", newChar.Name, newChar.Serial );
            Console.WriteLine( " - Started: {0} {1} in {2}", city.City, city.Location, city.Map.ToString() );
 
            new WelcomeTimer( newChar ).Start();
        }

Edited Code.

Code:
            }
 
            CityInfo city = GetStartLocation( args, young );
 
            newChar.MoveToWorld( city.Location, city.Map );
            newChar.Frozen = true; //####ADDED TO FREEZE PLAYER####
 
            Console.WriteLine( "Login: {0}: New character being created (account={1})", state, args.Account.Username );
            Console.WriteLine( " - Character: {0} (serial={1})", newChar.Name, newChar.Serial );
            Console.WriteLine( " - Started: {0} {1} in {2}", city.City, city.Location, city.Map.ToString() );
 
            new WelcomeTimer( newChar ).Start();
        }

In PKNONPKGump.cs

Code:
            switch(info.ButtonID)
            {
                case 0:
            {
                        from.CloseGump(typeof(PKNONPK));
            break;
            }
                case 1: // next
                    {
 
                      pk.NONPK = NONPK.PK;
            pk.Title = "[*PK*]";
                      pk.Frozen = false; //####ADDED TO UNFREEZE PLAYER####
                        pk.SendMessage(62, "You have choosen to be [PK]");
                        pk.CloseGump(typeof(PKNONPK));
 
                        break;
                    }
                case 2: // next
                    {
 
                      pk.NONPK = NONPK.NONPK;
            pk.Title = "[*NONPK*]";
                      pk.Frozen = false; //####ADDED TO UNFREEZE PLAYER####
                        pk.SendMessage(62, "You have choosen be [NONPK]");
                        pk.CloseGump(typeof(PKNONPK));
 
                        break;
 
                    }

You may want to remove the close button in the lower right hand corner of the gump if you do this.
 
Top