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!

Level System 3

Ki Frost

Sorceror
Level System 3

Welcome to the Level System 3 release.

NOTICE:
Created with RunUO 2.0 RC1

Description:
This is system that allows players to have an overall level. There are three versions that effect how their level is calculated. There is Classic, Enviroment, and PvP.

Classic
This takes the players skills, calculates the exp for them, and levels them off of that exp.

Enviroment
This takes the players skills, kill exp(person and creature), and stats, calculates the exp for them, and levels them off of that exp.

PvP
This takes the players kill exp (person), and caluclates the level for them off of that exp.


Not only does the system have 3 versions of the system, but there are multiple ways for the levels to be displayed as well. In Name, Below Name, or None at all.

In Name
Attaches the level to the name as a secondary title.

Below Name
Attaches the level below the name like a description.

None
Does not show the level anywhere, but it is still calculated.


Installation:
Download the Installation file of your choice and the RaR, UnRar the files, Drop "Level System 3" into your customs, and either replace your distro's with mine, or follow the Installation file.

Other Info:
If you open the Configuration file, you can change how the system operates here. You can change the System Type, The Level Display, And much more!

Here is a short description (can also be found in the file) of each option available inside the Configuration file.

StartMaxLvl - The first max level you reach.
EndMaxLvl - The last max level you reach, using Max Level Scrolls.
PartyRange - How far people in a party have to be from what was killed to get exp.

PetKillGivesExp - When your pet kills a monster, you get the exp for it.
CraftGivesExp - When you successfully craft an item, you get exp for it.
PartyExpShare - When your in a party you will share the exp (full ammount)
PartySplitExp - When Parties Exp Share, have them split one ammount evenly.

AdvancedSkillExp - When you have Classic or Enviroment enabled, this will calculate ONLY fighting skills as Exp.
AdvancedExp - Allows you to go in to the Tables file, and setup your own ranges of exp. (NOT recommended for begginers)

StaffHasLevel - When you are staff you have a level.
PaperdollLevel - When you open your paperdoll it shows your level.
MaxLevel - Display your maxlevel beside your level (ex: 12/100)
CreatureLevels - Do creatures have a level also? (NPC's, they do not gain exp)
VendorLevels - When CreatureLevels do vendors also display a level?
BonusStatOnLvl - When you level you gain a stat point! (if you arnt capped on them)
RefreshOnLevel - When you level, your hits, stam, and mana are all recharged.


Special Thanks:
Kalamin, for the basic setup of the system
Dracana, for the help pulling the code out of PM and BC
Jeff, for the single activation point.
Those that helped with the Party Bugs >.<
Nagazhizar Shard, for allowing me to have the system on their shard for testing, and some of the ideas.
Those that contributed ideas for the new release.


If you have any other ideas that you would like to see in this system dont hesitate to post!
 

Attachments

  • Level System - 3.rar
    69.3 KB · Views: 1,677
  • Install Guides.rar
    5.3 KB · Views: 1,235

Ki Frost

Sorceror
Level System 3 : R-B1

UPDATE!!! :eek: ;)

After lots of RL crap I think I am ready to release 'Level System 3 : Rework - Beta 1' or 'R-B1' for short. :rolleyes:
TAKE NOTE! THIS IS A BETA RELEASE! SOME THINGS ARE NOT COMPLETE AND SOME THINGS MAY HAVE BUGS!

Now that all the formalities are out of the way....

Description:
A completly customizable Level System for players!

Installation:
ALMOST Drag-And-Drop, I have been working on getting it stand alone like no-other, and the only things left in is the 'display' information.
Thats right NO Ser/Deser mods! YEAY!

1)Download the package, UnZip to a safe location (preferably NOT your server folder).

2)Follow the File Tree to Customs (Scripts\Customs) and Copy the 'Level System 3 R-B1' Folder and Paste it into your Customs Folder.

3)Follow the file tree to the other 4 Distro File Mods (PlayerMobile, BaseMount, BaseCreature, & Titles), and follow each of the files directions.

NOTE: All files that say SVN - 279 WILL Go into RC 1 EXCEPT Titles. It has a specific area that says RC1 on it. USE IT INSTEAD OR YOU WILL HAVE PROBLEMS!

If needed the paths to each scripts are:
  • Scripts\Mobiles\PlayerMobile.cs
  • Scripts\Mobiles\Animals\Mounts\BaseMount.cs
  • Scripts\Engines\AI\Creature\BaseCreature.cs
  • Scripts\Misc\Titles.cs
4) Restart.

Other Information:
Lets just start with saying that 3 had only 16 Setup Options... R-B1 has... 36!
And with more suggestions and Imput that number could be MUCH higher!

Saving Options
TimeSave - When true, while the system is saving, it will count how many seconds it took to save.
TimeReload - When true, while updating the people, it will count how many seconds it took to update them.

Stats & Skills Options
StatCap - Pretty self-explanitory, Tell the system what your Cap is for your shard (is used for math.)
TotalStatExp - Whatever number you put there will be how much EXP you will gain when you CAP your Stats.
SkillCap - Like StatCap, you tell the system your skill Cap for the Shard (is used for math.)
SkillTotal - Your skill Total is what your skills would equal if added up while capped.
Skill Total is found by: NumberofSkills (default 52?) * SkillCap (default 120) which equals... 6480.
TotalSkillExp - Like TotalStatExp - When you CAP all your skills you will have gained that amount of EXP.

EXP Filter Options
ExpFilterByLevel - When true, you will Start to lose EXP if you are higher/lower than a monster.
FilterByLevelRange - This determins how many levels different you can be from a monster & still gain EXP from it.
ExpLostPerLevelDiff - For every Level Out-of-Range you are you will lose this much EXP. (from the monster, not your character)
ReverseRangeEffect - This is an IMPORTANT feature in FilterbyLevelRange. While this is FALSE you will loose Exp for a monster that is HIGHER than you & out-of-range. BUT when it is TRUE You will GAIN EXP (the ExpLostPerLevelDiff is used) for every level out-of-range the monster is. (as long as its higher)

EXP-Bar Options
AllowExpBar - Self Explanitory, While TRUE players can use the command [expbar and see how much exp they have, when they will level, and how close they are to leveling.
RefreshExpBarOnGain - Self Explanitory, While TRUE the EXP bar will automatically refresh when a Player kills something (thus a working bar): may cause lagg for large numbers of players.

There are MANY more options in the Setup file, but I have only listed the more Important (and NEW) ones here.

Hooking Custom EXP to System
Have something you want to give exp? Now you can! All you have to do is make the math for it (calculate the exp), and then link it into R-B1 with one simple line:

ExpPlugin( User, EXP-Earned);

and it will Fall through all the saftey checks and add to your characters, Complete with Gain message. Will even level them if allowed!

Example - Deciphering A Map:
The following code should give you exp for successfully deciphering a map, as you can see, the only work YOU have to do is create the EXP, then hook it to the system.
Code:
		public void Decode( Mobile from )
		{
			if ( m_Completed || m_Decoder != null )
				return;

			if ( m_Level == 0 )
			{
				if ( !CheckYoung( from ) )
				{
					from.SendLocalizedMessage( 1046447 ); // Only a young player may use this treasure map.
					return;
				}
			}
			else
			{
				double minSkill = GetMinSkillLevel();

				if ( from.Skills[SkillName.Cartography].Value < minSkill )
					from.SendLocalizedMessage( 503013 ); // The map is too difficult to attempt to decode.

				double maxSkill = minSkill + 60.0;

				if ( !from.CheckSkill( SkillName.Cartography, minSkill, maxSkill ) )
				{
					from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503018 ); // You fail to make anything of the map.
					return;
				}
			}

			from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 503019 ); // You successfully decode a treasure map!
			Decoder = from;

[COLOR="Blue"]            //EXAMPLE EXP PLUGIN

            //First Make the Exp:
            int DecodeChance = (int)(from.Skills[SkillName.Cartography].Value / GetMinSkillLevel()) * 100;//Gets % to Decode
            int Exp = 0;//Start a Exp slot.

            if (DecodeChance > 0 && DecodeChance < 20)//The lower the Chance to decode the more EXP they get.
                Exp = 40;//Set the exp they get.
            else if (DecodeChance > 20 && DecodeChance < 40)
                Exp = 30;
            else if (DecodeChance > 40 && DecodeChance < 60)
                Exp = 20;
            else if (DecodeChance > 60 & DecodeChance < 80)
                Exp = 10;
            else if (DecodeChance > 80)
                Exp = 2;
            else
                Exp = 1;

            //Then Send the EXP Into The System.
            ExpPlugin( from, Exp );

            //END EXAMPLE EXP PLUGIN[/COLOR]

			DisplayTo( from );
		}
Special Thanks / Credits:
Lots of people to list...
Kalamin - His idea was what fueled 2! All the BASE info was his.
Dracana - ALOT of help with EXP and Code-Calls + The structure for 2 & 3.
Jeff - For the single-activation Information. 3 Used it, and now R-B1 uses a diff version!
TMS - Skill system was EXTREMLY helpfull on the Stand-Alone Saving part
Nagash & Nagashizar - The person and the Shard helped me with ALOT of the creativity, testing, and motivation. 2 was the base, 3 was the outcome.
Everyone else I forgot that helped me a ton! (especiall Script Support :eek:)


TEST AWAY!

~KF~
 

Attachments

  • R-B1.zip
    22 KB · Views: 417

Ki Frost

Sorceror
//edit

NVM I know what the prob is, one sec and ill post the fix.


Ok Open Your LevelHandler.CS and find

Code:
        public static int ExpFilter(Mobile m, double o, Party p, bool craft)
        {
            PlayerMobile pm = null;
and add under it
Code:
            Configured c = new Configured();
 

LordHogFred

Knight
Getting a couple of problems with this :confused:

Firstly I don't seem to be gaining any experience, so I altered the scripts to add directly to the kxp instead of the Exp and it started working. However, if I join a party only one member of the party gets the experience but they recieve all the experience form the party so, party members X experience.

Any ideas?

Cheers :),
 

Ki Frost

Sorceror
Yea, I think I know what the problems are. Its just a few things that where not changed over from the level system I was using to test things. I'll switch em around and look into the party thing when I get to my comp.
 

LordHogFred

Knight
Ki Frost;693518 said:
Yea, I think I know what the problems are. Its just a few things that where not changed over from the level system I was using to test things. I'll switch em around and look into the party thing when I get to my comp.

Awesome, for the moment I've just disabled party Exp and am running with the small mods to changing Exp to kxp in the Level Core.
Cheers :),
 

grantsuo

Wanderer
How can i make it so the level xp is preset like instead of going up by a certain number its like

lvl 1 - 500 xp to lvl
lvl 2 - 1700 xp to lvl
lvl 3 - 3200 xp to lvl


etc.
 

LordHogFred

Knight
grantsuo;694985 said:
How can i make it so the level xp is preset like instead of going up by a certain number its like

lvl 1 - 500 xp to lvl
lvl 2 - 1700 xp to lvl
lvl 3 - 3200 xp to lvl


etc.

Go to the LevelHandler.cs and find the DoLevel section.

Find this part of the section:
Code:
            for (int i = 1; pm.Exp >= pm.ToLevel; i++)
            {

And add this underneath:
Code:
int curlv = pm.Level + 1;

Then after that you will need to make various if statements like:
Code:
//Level 1 Exp
if ( curlv = 1 )
pm.ToLevel = 100;

//Level 2 Exp
else if ( curlv = 2 )
pm.ToLevel - 200;

etc, etc

Hope that helps you :).
 

jingz2k2

Sorceror
Hi,

I haven't been playing or working on server for 3 months now and just got back from Diabo II.

I have installed this system already and looks great!

Problems I have so far:
When I create a new character, its exp is set to 276,239 and level 0.
I level up to 5377 with a zombie kill.

I tried using:
[Set Level 1
[Set Exp 0

Level 1 set.
Exp stays the same however.
Any solutions to this?

Great level system Ki Frost.

Many thanks in advanced
Jingz
 

jingz2k2

Sorceror
Ah! Thank you^_^

Your file has LordHogFred's Issue fixed? It's about the exp sharing in party mode.

:)

---
Edit
---
Sorry I asked because I was offline so I didn't see the link.
I see the ftp link but it asked me for a password:p
 

jingz2k2

Sorceror
Lol,

I don't have any host site too. Thanks Grant, I really appreciate your help and constant response.

I got the file already and I'll check it out. Thank you for your help and sharing.

Jingz
 

jingz2k2

Sorceror
I still have leveling problems.

The current exp is still not set to zero and I can't change it.

New characters created also have a value in the current exp even without killing or crafting.

I think it has something to do with the skills..
 
Top