R-T-B;722041 said:Out of curiosity, are all the fixes you went through here integrated into those first files you posted?
LordHogFred;695104 said: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 .
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ custom/other/Level System - 3/Level System 3/Core/Level Handler.CS:
CS0029: Line 185: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 189: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 190: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 193: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 197: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 198: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 201: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 205: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 206: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 209: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 213: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 214: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 217: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 221: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 222: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 225: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 229: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 230: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 233: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 237: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 238: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 241: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 245: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 246: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 249: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 253: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 254: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 257: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 261: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 262: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 265: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 269: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 270: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 273: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 277: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 278: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 281: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 285: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 286: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 289: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 293: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 294: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 297: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 301: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 302: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 305: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 309: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 310: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 313: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 317: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 318: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0029: Line 321: Cannot implicitly convert type 'int' to 'bool'
CS0029: Line 325: Cannot implicitly convert type 'int' to 'bool'
CS0201: Line 326: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
public static void DoLevel(Mobile klr, Configured c)
{
PlayerMobile pm = klr as PlayerMobile;
LevelHandler lh = new LevelHandler();
double lvls = 0;
for (int i = 1; pm.Exp >= pm.ToLevel; i++)
{
int curlv = pm.Level + 1;
//Level 1 Exp
if ( curlv = 1 )
pm.ToLevel = 1;
//Level 2 Exp
else if ( curlv = 2 )
pm.ToLevel - 2000;
//Level 3 Exp
if ( curlv = 3 )
pm.ToLevel = 4000;
//Level 4 Exp
else if ( curlv = 4 )
pm.ToLevel - 8000;
//Level 5 Exp
if ( curlv = 5 )
pm.ToLevel = 16000;
//Level 6 Exp
else if ( curlv = 6 )
pm.ToLevel - 32000;
//Level 7 Exp
if ( curlv = 7 )
pm.ToLevel = 64000;
//Level 8 Exp
else if ( curlv = 8 )
pm.ToLevel - 125000;
//Level 9 Exp
if ( curlv = 9 )
pm.ToLevel = 250000;
//Level 10 Exp
else if ( curlv = 10 )
pm.ToLevel - 500000;
//Level 11 Exp
if ( curlv = 11 )
pm.ToLevel = 750000;
//Level 12 Exp
else if ( curlv = 12 )
pm.ToLevel - 1000000;
//Level 13 Exp
if ( curlv = 13 )
pm.ToLevel = 1250000;
//Level 14 Exp
else if ( curlv = 14 )
pm.ToLevel - 1500000;
//Level 15 Exp
if ( curlv = 15 )
pm.ToLevel = 1750000;
//Level 16 Exp
else if ( curlv = 16 )
pm.ToLevel - 2000000;
//Level 17 Exp
if ( curlv = 17 )
pm.ToLevel = 2250000;
//Level 18 Exp
else if ( curlv = 18 )
pm.ToLevel - 2500000;
//Level 19 Exp
if ( curlv = 19 )
pm.ToLevel = 2750000;
//Level 20 Exp
else if ( curlv = 20 )
pm.ToLevel - 3000000;
//Level 21 Exp
if ( curlv = 21 )
pm.ToLevel = 3500000;
//Level 22 Exp
else if ( curlv = 22 )
pm.ToLevel - 4000000;
//Level 23 Exp
if ( curlv = 23 )
pm.ToLevel = 4500000;
//Level 24 Exp
else if ( curlv = 24 )
pm.ToLevel - 5000000;
//Level 25 Exp
if ( curlv = 25 )
pm.ToLevel = 5500000;
//Level 26 Exp
else if ( curlv = 26 )
pm.ToLevel - 6000000;
//Level 27 Exp
if ( curlv = 27 )
pm.ToLevel = 6500000;
//Level 28 Exp
else if ( curlv = 28 )
pm.ToLevel - 7000000;
//Level 29 Exp
if ( curlv = 29 )
pm.ToLevel = 7500000;
//Level 30 Exp
else if ( curlv = 30 )
pm.ToLevel - 8000000;
//Level 31 Exp
if ( curlv = 31 )
pm.ToLevel = 8500000;
//Level 32 Exp
else if ( curlv = 32 )
pm.ToLevel - 9000000;
//Level 33 Exp
if ( curlv = 33 )
pm.ToLevel = 9500000;
//Level 34 Exp
else if ( curlv = 34 )
pm.ToLevel - 10000000;
//Level 35 Exp
if ( curlv = 35 )
pm.ToLevel = 10500000;
//Level 36 Exp
else if ( curlv = 36 )
pm.ToLevel - 11000000;
// i is now times leveled.
pm.ToLevel += 50 + (pm.Level * 2);
Errors:
+ custom/other/Level System - 3/Level System 3/Core/Level Handler.CS:
CS0201: Line 190: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 198: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 206: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 214: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 222: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 230: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 238: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 246: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 254: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 262: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 270: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 278: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 286: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 294: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 302: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 310: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 318: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
CS0201: Line 326: Only assignment, call, increment, decrement, and new objec
t expressions can be used as a statement
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
public static void DoLevel(Mobile klr, Configured c)
{
PlayerMobile pm = klr as PlayerMobile;
LevelHandler lh = new LevelHandler();
double lvls = 0;
for (int i = 1; pm.Exp >= pm.ToLevel; i++)
{
int curlv = pm.Level + 1;
//Level 1 Exp
if ( curlv == 1 )
pm.ToLevel = 1;
//Level 2 Exp
if ( curlv == 2 )
pm.ToLevel - 2000;
//Level 3 Exp
if ( curlv == 3 )
pm.ToLevel = 4000;
//Level 4 Exp
if ( curlv == 4 )
pm.ToLevel - 8000;
//Level 5 Exp
if ( curlv == 5 )
pm.ToLevel = 16000;
//Level 6 Exp
if ( curlv == 6 )
pm.ToLevel - 32000;
//Level 7 Exp
if ( curlv == 7 )
pm.ToLevel = 64000;
//Level 8 Exp
if ( curlv == 8 )
pm.ToLevel - 125000;
//Level 9 Exp
if ( curlv == 9 )
pm.ToLevel = 250000;
//Level 10 Exp
if ( curlv == 10 )
pm.ToLevel - 500000;
//Level 11 Exp
if ( curlv == 11 )
pm.ToLevel = 750000;
//Level 12 Exp
if ( curlv == 12 )
pm.ToLevel - 1000000;
//Level 13 Exp
if ( curlv == 13 )
pm.ToLevel = 1250000;
//Level 14 Exp
if ( curlv == 14 )
pm.ToLevel - 1500000;
//Level 15 Exp
if ( curlv == 15 )
pm.ToLevel = 1750000;
//Level 16 Exp
if ( curlv == 16 )
pm.ToLevel - 2000000;
//Level 17 Exp
if ( curlv == 17 )
pm.ToLevel = 2250000;
//Level 18 Exp
if ( curlv == 18 )
pm.ToLevel - 2500000;
//Level 19 Exp
if ( curlv == 19 )
pm.ToLevel = 2750000;
//Level 20 Exp
if ( curlv == 20 )
pm.ToLevel - 3000000;
//Level 21 Exp
if ( curlv == 21 )
pm.ToLevel = 3500000;
//Level 22 Exp
if ( curlv == 22 )
pm.ToLevel - 4000000;
//Level 23 Exp
if ( curlv == 23 )
pm.ToLevel = 4500000;
//Level 24 Exp
if ( curlv == 24 )
pm.ToLevel - 5000000;
//Level 25 Exp
if ( curlv == 25 )
pm.ToLevel = 5500000;
//Level 26 Exp
if ( curlv == 26 )
pm.ToLevel - 6000000;
//Level 27 Exp
if ( curlv == 27 )
pm.ToLevel = 6500000;
//Level 28 Exp
if ( curlv == 28 )
pm.ToLevel - 7000000;
//Level 29 Exp
if ( curlv == 29 )
pm.ToLevel = 7500000;
//Level 30 Exp
if ( curlv == 30 )
pm.ToLevel - 8000000;
//Level 31 Exp
if ( curlv == 31 )
pm.ToLevel = 8500000;
//Level 32 Exp
if ( curlv == 32 )
pm.ToLevel - 9000000;
//Level 33 Exp
if ( curlv == 33 )
pm.ToLevel = 9500000;
//Level 34 Exp
if ( curlv == 34 )
pm.ToLevel - 10000000;
//Level 35 Exp
if ( curlv == 35 )
pm.ToLevel = 10500000;
//Level 36 Exp
if ( curlv == 36 )
pm.ToLevel - 11000000;
// i is now times leveled.
public bool PetKillGivesExp = true; //When players pet kills something player gets exp
public bool CraftGivesExp = true; //A sucessful craft gives players exp.
public bool PartyExpShare = true; //Do parties share exp?
public bool PartySplitExp = true; //if parties share exp do they split it evenly?
//EX: kill gives 30xp 3 people in party each person gets 10 xp, even split.
public bool AdvancedSkillExp = false; //Only fighting skills give exp?
public bool AdvancedExp = true; // Use tables to give exp off of killed.
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...done (cached)
Scripts: Compiling VB.NET scripts...no files found.
Scripts: Verifying...done (2634 items, 562 mobiles)
Regions: Loading...done
World: Loading...An error was encountered while loading a saved object
- Type: Server.Mobiles.PlayerMobile
- Serial: 0x00000500
Delete the object? (y/n)
After pressing return an exception will be thrown and the server will terminate
Error:
System.Exception: Load failed (items=False, mobiles=True, guilds=False, type=Ser
ver.Mobiles.PlayerMobile, serial=0x00000500) ---> System.ArgumentOutOfRangeExcep
tion: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks
at System.DateTime..ctor(Int64 ticks)
at Server.BinaryFileReader.ReadDateTime()
at Server.Mobiles.PlayerMobile.Deserialize(GenericReader reader)
at Server.World.Load()
--- End of inner exception stack trace ---
at Server.World.Load()
at Server.ScriptCompiler.Compile(Boolean debug)
at Server.Core.Main(String[] args)
This exception is fatal, press return to exit
case 27:
{
m_Level = reader.ReadInt();
m_MaxLevel = reader.ReadInt();
m_Exp = reader.ReadInt();
m_ToLevel = reader.ReadInt();
m_kxp = reader.ReadInt();
[COLOR="Green"]goto case 26;[/COLOR] [COLOR="DarkRed"]//goto case 25;[/COLOR]
}
writer.Write((int)27); // version
//Level System
writer.Write((int)m_Level);
writer.Write((int)m_MaxLevel);
writer.Write((int)m_Exp);
writer.Write((int)m_ToLevel);
writer.Write((int)m_kxp);
//End Level System
/*GD13_HS_Start_6*/
[COLOR="DarkRed"]//writer.Write( (int) 26 ); // version[/COLOR]
writer.Write( (int)m_HuntMode );
writer.Write( (int)m_HuntRank );