Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 04-15-2006, 09:41 PM   #1 (permalink)
Newbie
 
Join Date: Mar 2006
Posts: 34
Default XP Level System (v1.0)

This is an XP (level) system that is based upon the race, level system created by atticus. Original post: Atticus589 Presents >RCL< ver-1.

Last Update: 04/16/2006

I am not taking credit for this system, I am only improving his system as he has not even replied to his thread for some time now. I am only taking credit for the work I have done and any future work I may do.

You can add this system to a shard at any stage of development, new or old. You can also remove it just as easily. It will not interfere with any distro systems.

I have removed the races from this system, I have removed the special items from this system, I have reworked the code to about a 10th the size of the original code, and I have added some great extra features that I thought should be included in a level system.

Previous features:
Earn experience for crafting, or killing.
Gain levels by earning a certain amount of experience.

Removed features:
Race system.
Special items available for purchase with points.
Harvest xp. (Will add this back in at a later date if there is a demand for it.)

Added/Improved features:
Ability to respec (redo) skills. - You can now use skill points to turn down your skills.
Crafting XP now based upon the skill required to craft the item.
[nolevels command to allow players to either use the xp system, or the standard skill gain.
(Once players choose to not use the xp system for their character, it will not let them switch back.)
More balanced xp gain system, raised the maximum level to 50.
(After level 50, players earn "After Experience", when they earn a certain amount of "After Experience" they earn skill points.
Players can not gain more than 10% of their current level from killing one creature.
If a player does not have the veryfire stone in their pack, this system will automatically add it.

Planned features for future releases:
Preventing players from over-equipping wearables.
Perk system, every 10 levels, players can choose a special ability.

If enough people need assistance removing atticus's race level system, I will create a how-to. Just let me know if you need any assistance, you can do that by replying to the thread for this script.

All input welcome, suggestions, comments, questions, etc. I would especially like to know what features people would like to see in future releases.
Attached Files
File Type: zip XP System.zip (7.3 KB, 341 views)

Last edited by theaxiom; 04-18-2006 at 07:52 PM.
theaxiom is offline  
Old 04-15-2006, 10:27 PM   #2 (permalink)
Forum Newbie
 
Join Date: Oct 2005
Location: Oregon
Age: 26
Posts: 87
Default

Hmm, well I got some errors

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (5 errors, 5 warnings)
 - Warning: Scripts\Custom\motd.cs: CS0183: (line 201, column 47) The given expr
ession is always of the provided ('Server.Mobiles.PlayerMobile') type
 - Warning: Scripts\Donation Items\StatBall.cs: CS0162: (line 142, column 6) Unr
eachable code detected
 - Warning: Scripts\Ore, Woods, and Leathers\Rewards.cs: CS0162: (line 238, colu
mn 73) Unreachable code detected
 - Warning: Scripts\Ore, Woods, and Leathers\Rewards.cs: CS0162: (line 239, colu
mn 69) Unreachable code detected
 - Warning: Scripts\Special Mobiles & their Items\Jack The Ripper\BaseKiller.cs:
CS0168: (line 98, column 9) The variable 'item' is declared but never used
 - Error: Scripts\SkillCheck.cs: CS0246: (line 194, column 63) The type or names
pace name 'VERYFIRE' could not be found (are you missing a using directive or an
 assembly reference?)
 - Error: Scripts\SkillCheck.cs: CS0246: (line 197, column 21) The type or names
pace name 'VERYFIRE' could not be found (are you missing a using directive or an
 assembly reference?)
 - Error: Scripts\SkillCheck.cs: CS0103: (line 198, column 21) The name 'v' does
 not exist in the class or namespace 'Server.Misc.SkillCheck'
 - Error: Scripts\SkillCheck.cs: CS0246: (line 200, column 25) The type or names
pace name 'v' could not be found (are you missing a using directive or an assemb
ly reference?)
 - Error: Scripts\SkillCheck.cs: CS0246: (line 204, column 48) The type or names
pace name 'VERYFIRE' could not be found (are you missing a using directive or an
 assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
I do know that I have VERYFIRE.cs in my scripts, I looked like 3 times and it says I don't,
__________________
My favorite internet qoutes:
'Woah, my ninja skills cost 99.99 a month, so I gave them up after the free trial.' - Lord Kaza, RunUO forums. (PS I know him IRL lol)
'Do you really think tacos beat chicken soldiers?' - Special People, Patamalia forums.
'Well, have a good life :\ Though, as we all should know, UO will grab you...and pull you in and you will be a slave to the RPGness once more.' - Starnum, Patamalia Forums.
Donky-Bull is offline  
Old 04-15-2006, 10:36 PM   #3 (permalink)
Newbie
 
Join Date: Mar 2006
Posts: 34
Default

Whoops looks like I ended up deleting a line of code that was important.

Open SkillCheck.cs and look for this:
Code:
using Server.Mobiles;
and add this below it:
Code:
using Server.Items; // XP system
I am updating the zip file instructions now. Thank you.
theaxiom is offline  
Old 04-15-2006, 10:37 PM   #4 (permalink)
Forum Novice
 
Join Date: Feb 2006
Location: at my computer
Posts: 117
Send a message via ICQ to tindin156 Send a message via MSN to tindin156
Default

try adding ether to the tope and see if the fixs it

using Server.Gumps;
using Server.Items;
__________________
some peaple search for what they want others have it handed to them....

Yes i know my spelling sucks.....
tindin156 is offline  
Old 04-16-2006, 03:44 AM   #5 (permalink)
Forum Newbie
 
Join Date: Oct 2005
Location: Oregon
Age: 26
Posts: 87
Default

ah, thank you this system is great!

Only problem now is from this I am guessing, I can't log in, I try and the server crashes as soon as I do
__________________
My favorite internet qoutes:
'Woah, my ninja skills cost 99.99 a month, so I gave them up after the free trial.' - Lord Kaza, RunUO forums. (PS I know him IRL lol)
'Do you really think tacos beat chicken soldiers?' - Special People, Patamalia forums.
'Well, have a good life :\ Though, as we all should know, UO will grab you...and pull you in and you will be a slave to the RPGness once more.' - Starnum, Patamalia Forums.

Last edited by Donky-Bull; 04-16-2006 at 03:47 AM.
Donky-Bull is offline  
Old 04-16-2006, 12:21 PM   #6 (permalink)
Forum Newbie
 
Join Date: Dec 2005
Location: Puerto Rico
Posts: 57
Send a message via MSN to advani
Default

just add the skillcheck distro and is more easy ....
__________________
The Harder The Wind The Harder The Trees
advani is offline  
Old 04-16-2006, 01:59 PM   #7 (permalink)
Newbie
 
Join Date: Mar 2006
Posts: 34
Default

Quote:
Originally Posted by advani
just add the skillcheck distro and is more easy ....
If you use the distro SkillCheck then your players will gain XP and they will gain skills at the same time, which defeats the whole purpose of the XP system.

Quote:
Only problem now is from this I am guessing, I can't log in, I try and the server crashes as soon as I do
I will see if I can figure out why the server is crashing, what is the error you are getting?

I have reviewed the instructions for installing this script and have cleaned them up a bit to make them easier, especially this bit:

---------------------------------------------
Scripts\Engines\Craft\Core\CraftItem.cs
---------------------------------------------
Search for this line:
Code:
		if ( gainSkills ) // This is a passive check. Success chance is entirely dependant on the main skill
			from.CheckSkill( craftSkill.SkillToMake, minSkill, maxSkill );
Replace it with this:
Code:
		if ( gainSkills ) // This is a passive check. Success chance is entirely dependant on the main skill
		{
                    // Begin XP system

                    Mobile m = from;

                    m.Backpack.FindItemByType(typeof(VERYFIRE));
                    int m_Exists = m.Backpack.GetAmount(typeof(VERYFIRE));
                    if (m_Exists == 0)
                        m.Backpack.DropItem(new VERYFIRE());

                    VERYFIRE v;

                    v = m.Backpack.FindItemByType(typeof(VERYFIRE)) as VERYFIRE;

                    int amount = Convert.ToInt32(maxMainSkill * 10);
                    amount = Convert.ToInt32(amount * .5);

                    if (v.Level == 50)
                    {
                        v.EXP += amount;
                        m.SendMessage(600, "You have gained {0} After XP!", amount);

                        if (v.EXP >= 10000)
                        {
                            v.EXP -= 10000;
                            v.SkillPoints++;
                            m.SendMessage(600, "Your After XP has added up to 10000, you have now gained 1 Skill Point!");
                        }

                        m.SendMessage(88, "You have to gain {0} XP to gain another Skill Point.", v.LevelXp - v.EXP);
                    }
                    else
                    {
                        if (amount > v.LevelXp * .1)
                            amount = Convert.ToInt32(v.LevelXp * .1);

                        v.EXP += amount;
                        m.SendMessage(600, "You have gained {0} XP!", amount);

                        if (v.EXP >= v.LevelXp)
                        {
                            v.Level++; // Increase the level by 1
                            v.EXP -= v.LevelXp; // Set the total XP to the new level XP minus current XP.
                            v.LevelXp = Convert.ToInt32(v.LevelXp * 1.1); // Set the new level XP to 110% of the previous level XP.
                            v.SkillPoints += 15; // Give the player 15 Skill Points for gaining a new level.
                            m.Title = "[" + v.Level + "]"; // Change the player's title to reflect their new level.
                            m.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist); // Show special effects to catch the player's attention for gaining a new level.
                            m.PlaySound(533); // Play a special sound to catch the player's attention for gaining a new level.
                            m.SendMessage(600, "You are now level " + v.Level + "."); // Notify the player of their new level.
                            if (v.Level == 2)
                                m.SendGump(new LevelInfoGump());
                        }

                        if (v.Level == 50)
                        {
                            v.EXP = 0;
                            v.LevelXp = 10000;
                            v.SkillPoints += 20;
                            m.SendMessage(600, "Congratulations! You are now level 50 which is the highest level in the game. You have received 20 extra Skill Points as a reward.");
                            m.SendMessage(600, "From now on you will gain After XP. Once you gain a total of 10000 After XP, you will gain another Skill Point.");
                        }

                        m.SendMessage(88, "You have to gain {0} XP to advance to the next level.", v.LevelXp - v.EXP);
                    }

                    m.SendMessage(88, "You have {0} XP total.", v.EXP);

                    // End XP system

		    from.CheckSkill( craftSkill.SkillToMake, minSkill, maxSkill );

		    }
See if that solves your crashing problem, I am guessing you probably forgot an { or an }. I also updated the download to reflect these changes. I also found a typo, when you gain 10000 after xp, it tells you that you gained 2000 after xp, I have fixed that as well. The changes are in both BaseCreature.cs and CraftItem.cs. Currently I am working on a way to make this script easier to install. Thank you all for your input.

I am looking for great suggestions as to what people would like to see in this script, so feel free to let me know. This is just the beginning of a great system.

Last edited by theaxiom; 04-16-2006 at 02:18 PM.
theaxiom is offline  
Old 04-18-2006, 02:45 PM   #8 (permalink)
 
Join Date: Mar 2006
Posts: 3
Default More Levels?

Would there be any way to raise the maximum level easily? Such as making the maximum level 100 or something?

Its just a thought to keep people interested longer.
Erinyes is offline  
Old 04-18-2006, 07:50 PM   #9 (permalink)
Newbie
 
Join Date: Mar 2006
Posts: 34
Default

Quote:
Originally Posted by Erinyes
Would there be any way to raise the maximum level easily? Such as making the maximum level 100 or something?

Its just a thought to keep people interested longer.
After level 50 they still earn skill points so they can respec their skills. If you increase the maximum level to 100, it will be almost impossible to get to level 100 because at each level it adds 10% of the current required xp to level to the next required level's xp. I will add this information to the main post to clarify. If you change the maximum level to 100, what I would do is change it so that it adds a bit less xp to the required per level, so that it is not impossible to get to level 100.

Here is the current required XP table:
Code:
Level	-	Required XP
2	-	1000
3	-	1100
4	-	1210
5	-	1331
6	-	1464
7	-	1611
8	-	1772
9	-	1949
10	-	2144
11	-	2358
12	-	2594
13	-	2853
14	-	3138
15	-	3452
16	-	3797
17	-	4177
18	-	4595
19	-	5054
20	-	5560
21	-	6116
22	-	6727
23	-	7400
24	-	8140
25	-	8954
26	-	9850
27	-	10835
28	-	11918
29	-	13110
30	-	14421
31	-	15863
32	-	17449
33	-	19194
34	-	21114
35	-	23225
36	-	25548
37	-	28102
38	-	30913
39	-	34004
40	-	37404
41	-	41145
42	-	45259
43	-	49785
44	-	54764
45	-	60240
46	-	66264
47	-	72890
48	-	80180
49	-	88197
50	-	97017
theaxiom is offline  
Old 05-01-2006, 11:06 PM   #10 (permalink)
 
Join Date: Jul 2004
Age: 21
Posts: 35
Send a message via AIM to Islaya
Default

I keep getting this message on shard load:

- Error: Scripts\Engines\Craft\Core\CraftItems.cs: CS1513 :<line 880, column 8>
} expected

I looked at it, and } is there, I cant figure out whats causing this problem.
Islaya is offline  
Old 05-02-2006, 08:28 AM   #11 (permalink)
Forum Novice
 
Join Date: Dec 2005
Posts: 133
Default

add another one and that will resolve your problem
nacrom is offline  
Old 05-02-2006, 04:02 PM   #12 (permalink)
 
Join Date: Jul 2004
Age: 21
Posts: 35
Send a message via AIM to Islaya
Default

k, that problem is fixed, but now whenever I try to log onto the shard, I get this error and the server crashes:

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Misc.SkillCheck.Gain(Mobile from, Skill skill)
at Server.Misc.SkillCheck.CheckSkill(Mobile from, Skill skill, Object amObj, Double chance)
at Server.Misc.SkillCheck.Mobile_SkillCheckDirectLoca tion(Mobile from, SkillName skillName, Double chance)
at Server.Mobile.CheckSkill(SkillName skill, Double chance)
at Server.Misc.RegenRates.CheckBonusSkill(Mobile m, Int32 cur, Int32 max, SkillName skill)
at Server.Misc.RegenRates.Mobile_StamRegenRate(Mobile from)
at Server.Mobile.GetStamRegenRate(Mobile m)
at Server.StamTimer..ctor(Mobile m)
at Server.Mobile.CheckStatTimers()
at Server.Mobile.set_Player(Boolean value)
at Server.Misc.CharacterCreation.EventSink_CharacterC reated(CharacterCreatedEventArgs args)
at Server.Network.PacketHandlers.CreateCharacter(NetS tate state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
Islaya is offline  
Old 05-04-2006, 09:10 AM   #13 (permalink)
 
Join Date: Sep 2004
Age: 18
Posts: 23
Default

Really nice script ive tried to find a script like that for a while and when i dont want to find a level system i found one thx alot for this script but there only one thing i want to change is the title i want to set it for : Level 2 . Level 3 ..... because now its only (2) and and i to know if its possible because i got race in my shard and they got title it is possible to add the level 2 to the title they actually ad
UndSk8 is offline  
Old 05-04-2006, 02:36 PM   #14 (permalink)
Forum Expert
 
Join Date: Jan 2004
Location: England
Age: 24
Posts: 404
Send a message via AIM to malgrimace
Default

Quote:
Originally Posted by Islaya
k, that problem is fixed, but now whenever I try to log onto the shard, I get this error and the server crashes:

Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Misc.SkillCheck.Gain(Mobile from, Skill skill)
at Server.Misc.SkillCheck.CheckSkill(Mobile from, Skill skill, Object amObj, Double chance)
at Server.Misc.SkillCheck.Mobile_SkillCheckDirectLoca tion(Mobile from, SkillName skillName, Double chance)
at Server.Mobile.CheckSkill(SkillName skill, Double chance)
at Server.Misc.RegenRates.CheckBonusSkill(Mobile m, Int32 cur, Int32 max, SkillName skill)
at Server.Misc.RegenRates.Mobile_StamRegenRate(Mobile from)
at Server.Mobile.GetStamRegenRate(Mobile m)
at Server.StamTimer..ctor(Mobile m)
at Server.Mobile.CheckStatTimers()
at Server.Mobile.set_Player(Boolean value)
at Server.Misc.CharacterCreation.EventSink_CharacterC reated(CharacterCreatedEventArgs args)
at Server.Network.PacketHandlers.CreateCharacter(NetS tate state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
I get the same error message whenever someone creates a new char.
malgrimace is offline  
Old 05-04-2006, 05:40 PM   #15 (permalink)
 
Join Date: Sep 2004
Age: 18
Posts: 23
Default

its always talking of the script your suposed to modify maybe you can try to take back you backup after backup again and try modify them again maybe you made something bad ..... ( its just a idea like that )

and if you find a way to change the title when you level up please tell me
UndSk8 is offline  
Old 05-04-2006, 06:15 PM   #16 (permalink)
 
Join Date: Sep 2004
Age: 18
Posts: 23
Default

Ok i found how to set Title that i want just need to go in modifed script and set the title we want for the craftitem and the basecreature

but now its kinda ... too fast is there a way to set we need more XP from each level ?

Edit : And i want to know too how do we set its take normal skill gain system and the XP system

Last edited by UndSk8; 05-06-2006 at 12:22 AM.
UndSk8 is offline  
Old 05-05-2006, 01:17 PM   #17 (permalink)
bby
 
Join Date: Nov 2005
Age: 19
Posts: 12
Default not shure hgow to fix

Quote:
Originally Posted by malgrimace
I get the same error message whenever someone creates a new char.
did yall ever find out what was wrong i saw aet the titles but how do i do that?
bby is offline  
Old 05-06-2006, 02:00 AM   #18 (permalink)
 
Join Date: Sep 2004
Age: 18
Posts: 23
Default

Found a bug when we craft and we open information window its give EXP but we didnt have to use materials or have the skills ..... to ... player get lvl 50 easy
UndSk8 is offline  
Old 05-06-2006, 02:47 AM   #19 (permalink)
bby
 
Join Date: Nov 2005
Age: 19
Posts: 12
Default how do i fix it?

Quote:
Originally Posted by UndSk8
Ok i found how to set Title that i want just need to go in modifed script and set the title we want for the craftitem and the basecreature

but now its kinda ... too fast is there a way to set we need more XP from each level ?

Edit : And i want to know too how do we set its take normal skill gain system and the XP system
hey man how do i fix this error? i know u have to change the titles but to what
bby is offline  
Old 05-06-2006, 06:17 AM   #20 (permalink)
 
Join Date: May 2006
Age: 20
Posts: 2
Default

Sorry for my English, I speack not this langage !

How can I change the give EXP ? This is allway 100 !
Phisius_ is offline  
Old 05-06-2006, 01:07 PM   #21 (permalink)
 
Join Date: Sep 2004
Age: 18
Posts: 23
Default

Quote:
Originally Posted by bby
hey man how do i fix this error? i know u have to change the titles but to what
what error ? the bug ive found that they can get exp without craft just need to buy the tool i dont know ...

for change the title you need to go there :
Quote:
m.Title = "[" + v.Level + "]"; // Change the player's title to reflect their new level.
you need to edit this
Quote:
"[" + v.Level + "]"
if you want its look like : ( The Name ) ( Level ( The level ) )
Exemple : Undsk8 [Level 50]

you need to take the
Quote:
"[" + v.Level + "]"
and change it for
Quote:
"[Level " + v.Level + "]"
in the 2 file you need to modify

If you dont understand add me on MSN : ArthasGm@hotmail.com

Quote:
Originally Posted by Phisius_
How can I change the give EXP ? This is allway 100 !
It not always 100 at the start lvl 1 you can gain only 10% of current level experiance your first level you need 1000 XP so 10% = 100 when you will level up next level you need 1100 so you gain more than 10%
UndSk8 is offline  
Old 05-09-2006, 06:09 PM   #22 (permalink)
 
Join Date: May 2006
Age: 20
Posts: 2
Default

Ok, but How can I change this for 10% of the STR of the monster ?
Phisius_ is offline  
Old 05-10-2006, 09:02 PM   #23 (permalink)
Forum Novice
 
Join Date: Dec 2004
Age: 16
Posts: 111
Default Hmm

I cannot gain Exp from killing monsters,crafting etc. Is this because im using Daat's OWLTR or am i making a dumb mistake :/
Shadow82 is offline  
Old 05-14-2006, 02:57 AM   #24 (permalink)
Forum Newbie
 
Join Date: Oct 2004
Age: 32
Posts: 35
Default Server Crash

I get the same thing when someone try's to make a new account... Not sure what the deal is... Can someone that knows alittle more about scripting help out? Doesn't seem to be any replys from the guy that made it about whats going on...
valdis is offline  
Old 05-14-2006, 02:12 PM   #25 (permalink)
Forum Novice
 
ultima_killa's Avatar
 
Join Date: May 2005
Age: 18
Posts: 248
Send a message via MSN to ultima_killa
Default

i cant seem to find this line in my scripts...
Titles.AwardKarma( ds.m_Mobile, totalKarma, true );
could someone tell me what line it is around in the: scripts\engines\AI\Creature\BaseCreature.cs
I have daats Owltr so if you guys no what line it is on in there i would be greatful thanks a lot
ultima_killa is offline  
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5