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
grantsuo;695275 said:
thats beacause your players are getting there levels from all there stats i had that problem to so i fixed it with a great deal of help from ki frost

ill send my file and then you can edit it to match your server currently it only shows to level 16 cuz i was testing it, and it works great


The password is uo i dont know how well this hosting thing will work it required me putting a password tho -.-

Hey, Grantsuo, After looking through your file again, and doing a little math, I noticed that your ToLevel only increased by 150 each time. This, is a little low, but an easier way to do it would be.
Code:
pm.ToLevel += 150;
in place of all of those if statements. If you wanted to make that value higher for latter levels, then you could do a simpler if statement than what you have. Something like
Code:
if (pm.Level > 0 && pm.Level < 10)
pm.ToLevel += 150;
else if (pm.Level > 9 && pm.Level < 20)
pm.ToLevel += 300;
else if (pm.Level > 19 && pm.Level < 30)
pm.ToLevel += 450;
ect. ect. ect.
This would simplify things alot. It will also require less maintenence in the long run.

jingz2k2 said:
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
Grantsuo was partially correct with the skills and stats giving you the exp. Yes, you will have exp before you kill anything, but the most levels I have ever gotten off of it at one time was 20... What is your type of server? (Pre-AoS, AoS, SE, ML?) Also, another thing you could do to fix the "skills and stats" issue, is remove the exp they give all together. This is very easily done. Open Your Level Core.cs and find.
Code:
        public static int TExp(Mobile m)
        {
            PlayerMobile pm = m as PlayerMobile;

            if (Cl.Enabled)
                return LevelHandler.Classic(pm);
            else if (En.Enabled)
                return pm.kxp + LevelCore.GetExp(pm);
            else
                return pm.kxp;
        }
Simpley change it over to
Code:
        public static int TExp(Mobile m)
        {
            PlayerMobile pm = m as PlayerMobile;

            /*
            if (Cl.Enabled)
                return LevelHandler.Classic(pm);
            else if (En.Enabled)
                return pm.kxp + LevelCore.GetExp(pm);
            else
                return pm.kxp;
            */

            return pm.kxp;
        }
That will remove the stat and skill exp alltogether, leaving you only with kill exp.
 

jingz2k2

Sorceror
Hehehe YAY!!

I have been refreshing the page since I saw you online and viewing this page eversince..

Thank you so much for everything:) It's exactly 5.00 am now and I hope I can finish this before heading off to bed:D

I really appreciate everything:D

Again, thank you very much and great job with this system!

Jingz

-----
Edit
-----
I just modified it using your solutions. About to test them now, I would also like to ask that

public bool AdvancedExp = false; // Use tables to give exp off of killed.

in Configuration.cs.

Does this config option use the EXP Tables.CS if set to false? or True?
Inside the EXP Tables.cs, you stated that
//This File Is Used For ADVANCED Monster Exp

So if advancedexp = false; , the system will be ignoring the exp tables.cs ?
 

Ki Frost

Sorceror
jingz2k2;695301 said:
Hehehe YAY!!

I have been refreshing the page since I saw you online and viewing this page eversince..

Thank you so much for everything:) It's exactly 5.00 am now and I hope I can finish this before heading off to bed:D

I really appreciate everything:D

Again, thank you very much and great job with this system!

Jingz
Yea, No Prob. I have a lil fix for your older players too ;)

Just follow these steps, and your server will reset your level system ;)

First, download the file that is attached to this post. Put it somewhere in your scripts folder (perferably with your level system stuff).

DONT RESTART THE SERVER YET!!

Go in game and type [Global Set Level 0 - this should/will set everyones level to 0, then imediatly restart the server. Now when people log on, the server will automatically reset them. (dont worry, this will only affect people one time, therfore you dont have to remove it, that way, if you ever need to, you can reset it again. ;))

edit//

Saw you edited your post after I posted...
-----
Edit
-----
I just modified it using your solutions. About to test them now, I would also like to ask that

public bool AdvancedExp = false; // Use tables to give exp off of killed.

in Configuration.cs.

Does this config option use the EXP Tables.CS if set to false? or True?
Inside the EXP Tables.cs, you stated that
//This File Is Used For ADVANCED Monster Exp

So if advancedexp = false; , the system will be ignoring the exp tables.cs ?
If it is set to ture, then you can go into the EXP tables.cs and scroll down to the monster portion of it, and modify the tables so that each "Group" of monsters gives a pre-determined amount or range of exp.

If you want to make a new table, use the ones that are in the EXP tables.cs as an example, then go into your Level Core.cs and find the Base() method. There should be an area marked with a #region tag that is called Get Table Exp.

will have alot of foreach's in it, similar to this.
Code:
                    foreach (Type creat in exp.NoExp)
                    {
                        if (creat == bc.GetType())
                            return 0;
                    }

Simply copy that table, rename the "exp.NoExp" to what you named your table, then change the "return 0;" to what you want that group of monsters exp to be. (this is why I said it was "Advanced" : /)
 

Attachments

  • ResetPlayers.cs
    748 bytes · Views: 78

jingz2k2

Sorceror
Cool.

Current Level: 0
Current Exp: 0
Exp to Next Level: 50
---
Killed mongbat
---
Current Level: 1
Current Exp: 0
Exp to next level: 50
---
Killed zombie
---
Current Level: 1
Current Exp: 0
Exp to Next Level: 50

======

Oh noes:(
 

jingz2k2

Sorceror
Oh okay thank you very much.

I'll do that right away:D

---
Done
---
Restarting
---

Interesting... you used the style of welcometimer.cs! So cool=D

Many thanks again.. I hope this works out.

I will click on 'post' when it works!

******
Okay I got everyone's level back to zero with the current exp right.

But I still can't gain exp properly. I don't gain exp at all. Heheh oh well.

many thanks!
Jingz
 

Ki Frost

Sorceror
jingz2k2;695306 said:
Oh okay thank you very much.

I'll do that right away:D

---
Done
---
Restarting
---

Interesting... you used the style of welcometimer.cs! So cool=D

Many thanks again.. I hope this works out.

I will click on 'post' when it works!

******
Okay I got everyone's level back to zero with the current exp right.

But I still can't gain exp properly. I don't gain exp at all. Heheh oh well.

many thanks!
Jingz
Oh yea... that is a little bug that I have been meaning to post a fix for... lol, whoops. It is really simple to change. All you have to do is open your Level Handler.cs and find
Code:
public static void AddExp(Mobile m, Mobile k, Party p, Configured c)
then, find all the spots that are in that section that look like this.
Code:
pm.Exp += (int)give;
(there should only be two) and change them to
Code:
pm.kxp += (int)give;
that will fix that... I'll fix the download so ppl will quit asking about that :eek:
 

jingz2k2

Sorceror
Nifty everything works fine now.

=)

Thank you very very much Ki Frost.
Thank you very much Grant.

I would like to modify a little bit,
How do I go about to make new characters start at level 1 instead of 0?
newChar.Level = 1; in CharacterCreation.cs doesn't work.

Any ideas?

Thank you again.
Jingz
 

Ki Frost

Sorceror
jingz2k2;695328 said:
Nifty everything works fine now.

=)

Thank you very very much Ki Frost.
Thank you very much Grant.

I would like to modify a little bit,
How do I go about to make new characters start at level 1 instead of 0?
newChar.Level = 1; in CharacterCreation.cs doesn't work.

Any ideas?

Thank you again.
Jingz
Sure, no probelm.

An easy way to do what you want, is, in the "Reset" file I gave you. Open it, and make it look like:
Code:
            if (pm.Level < 1)
            {
                pm.Level = 1;

                if (pm.ToLevel > 0)
                    pm.ToLevel = 0; //Resets all players.
            }
That way, when they log on, they will automatically be "Level 1"
 

jingz2k2

Sorceror
I got a new problem now.

As I'm trying to level.

I tried reseting by set level 1 again.

My current exp stays the same and cannot be changed. Whenever I attack a mob, the game and server freezes.
 

grantsuo

Wanderer
im confused, lol does that mean to get to level one u need to gain 150 xp and to get to lvl 2 u need to gain 300 xp and to get to lvl 3 u need to gain 450xp and so on? or jsut u need 150 xp each to level,
and i ahve it low cuz i find that it takes alot fo killing to level
but ill test it as i go.
 

jingz2k2

Sorceror
Yea UO does not have super powerups or super attacking skills like other grinding mmorpgs however we have Champion Spawns remember?

That's why I think it's a good idea to make it harder to level. :D
 

Ki Frost

Sorceror
grantsuo;695406 said:
im confused, lol does that mean to get to level one u need to gain 150 xp and to get to lvl 2 u need to gain 300 xp and to get to lvl 3 u need to gain 450xp and so on? or jsut u need 150 xp each to level,
and i ahve it low cuz i find that it takes alot fo killing to level
but ill test it as i go.
No, the "300", "450", "600" are just the accumulated exp needed. Notice how when you level your "Exp" doesnt drop back down to 0 like it did in LS2? Thats because this style of the system is accumulative. Meaning, when you level you keep your old exp, you just need, in your case atm, 150 more to level.
jingz2k2 said:
I got a new problem now.

As I'm trying to level.

I tried reseting by set level 1 again.

My current exp stays the same and cannot be changed. Whenever I attack a mob, the game and server freezes.
Does this happen only when you are leveling, or would be close to leveling, or does it happen in general?

If it is happening WHEN you are/would be leveling then it is more than likely the "for" loop in the DoLevel() code. if it is

for (int i = 0; ..... ....)

it needs to be

for (int i = 1; ..... ....)

and that will probably fix it. Why it does that when it is 0 I have no idea... :/
 

grantsuo

Wanderer
jingz2k2;695328 said:
Nifty everything works fine now.

=)

Thank you very very much Ki Frost.
Thank you very much Grant.

I would like to modify a little bit,
How do I go about to make new characters start at level 1 instead of 0?
newChar.Level = 1; in CharacterCreation.cs doesn't work.

Any ideas?

Thank you again.
Jingz

np =] its was all pretty much ki i was jsut using his stuff to help you so credit more to him =]
 

jingz2k2

Sorceror
Thank you very very much Ki Frost.
Thank you very much Grant.

Note that Ki Frost gets 2x Verys and you get 1 hahaha Jk^^.
 

grantsuo

Wanderer
how can i make it so that when I level my xp gets set back to 0 but i need to get 150 more xp to level then i did last time.. eg.

Lvl 1
145/150
then i level and jsut say gain 40xp
normally i would be at 185/300 for the next level
but instead i want it to be 0/300 meaning that i need to gain 300 experience to get to level 3
then the same for that liek 290/300 then i gain 20 xp or even jsut 10 and my xp will be 0/450 so i need to get 450 experience to advance to level 4 and so on
 

Ki Frost

Sorceror
grantsuo;695676 said:
how can i make it so that when I level my xp gets set back to 0 but i need to get 150 more xp to level then i did last time.. eg.

Lvl 1
145/150
then i level and jsut say gain 40xp
normally i would be at 185/300 for the next level
but instead i want it to be 0/300 meaning that i need to gain 300 experience to get to level 3
then the same for that liek 290/300 then i gain 20 xp or even jsut 10 and my xp will be 0/450 so i need to get 450 experience to advance to level 4 and so on

In the on level code add something like

pm.kxp = 0; (that is if you have it based off of kills only. if it is skills and kills then not possible)
 

Riders Myst

Wanderer
I dont understand how to put this script in at all on my shard I read everything on how to put it in and install it. You said something about having your files replace the files I already have and I did that and it still didn't work. I try running RunUO after I put the files in then it says the scripts or files cant be found or compiled or something like that.
 
Top