|
||
|
|||||||
| Custom Script Releases This forum is where you can release your custom scripts for other users to use. Please note: By releasing your scripts here you are submitting them to the public and as such agree to make them public domain. The RunUO Team has made its software GPL for you to use and enjoy you should do the same for anything based off of RunUO. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#51 (permalink) |
|
Forum Expert
|
actuall i tried the 2 == and that broguht up errors also granted not as many. i and using ALL the systems. and teh second advanced one. i beielvie i posted how much i gained on killing a dragon.some where around 1538 i think. i gained a total of 14 levels!
here are the errors i am getting after changing everything to == and = Code:
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.
Code:
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.
Code:
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.
__________________
My online store - jdvaluestore.com A D&D shard - dodronline.com |
|
|
|
|
|
#52 (permalink) |
|
Forum Expert
|
it seems every other one of your pm.ToLevel ='s is pm.ToLevel '-' wich is incorrect, if you ARE wanting to subtract that amount it would be -= not just -, if you ARNT then change them to ='s and go from there.
If you are using the tables as your exp option then to tone down the exp given just open your LevelHandler.cs (i think, its been a while since ive actually looked. :/) and find the table that a "dragon" can be found in. and change the exp given to a smaller amount.
__________________
|
|
|
|
|
|
#53 (permalink) |
|
Forum Expert
|
actually after i posted that i noticed it and fixed the - back ito a = still not sure how that happened. lol tired i guess. and i am recompiling it right now. ill edit this in a minute to let ya know how it goers
ok it compiled now to give it a test run granted it deleted ALL playermobiles thankfully im the only one on it right now lolok appears to be working correct let me prop a weapon up real quick and have my level 2 char after killing some things take a dragon on and see how it goes
__________________
My online store - jdvaluestore.com A D&D shard - dodronline.com Last edited by drgsldr69; 11-11-2007 at 04:29 AM. |
|
|
|
|
|
#54 (permalink) |
|
Forum Expert
|
well it definatly buffed out the dragons..... i was doing over 4k dam a hit and it still managed to kill me in 2 hits with the dragon at lv 57 lol
ok there is definatly a problem tho i restarted my server and it wants me to delete the player.mobiles again cant have that everytime i reboot. here is the exception it threw me. Code:
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
__________________
My online store - jdvaluestore.com A D&D shard - dodronline.com Last edited by drgsldr69; 11-11-2007 at 04:39 AM. |
|
|
|
|
|
#55 (permalink) |
|
Forum Expert
|
ummmmm ok this is weird as hell now my server is constantly restartign itself. any clues? i deleted my saves and started over and now it is staying loaded. something it must ot of liked lol ok it either aint liking hte dragon or someting else is worng it is now locking up when i kill hte dragon wont even send a error it just freeses
ok ifi use the command kill it don't lock up but if i kill it normally it locks up and that is with ANY creature i kill
__________________
My online store - jdvaluestore.com A D&D shard - dodronline.com Last edited by drgsldr69; 11-11-2007 at 05:08 AM. |
|
|
|
|
|
#56 (permalink) |
|
Forum Expert
|
the reason it wants you to delete all mobs on startup every time is because you have either a bad serialize or deserialize in your PM. From what it sounds like you have one of them out of order from the other.
if you have one like Level Exp NextLevel Ect. Ect. you have to have the other one exactly like it. for your lock up problem, im not to sure.... you may want to download the reset file (its in this thread somewhere... either end-ish of page one or start-ish on page 2) and follow the directions for it. After you do those 2 things, and if its still freezing, then its more than likely something else that you did...
__________________
|
|
|
|
|
|
#57 (permalink) |
|
Forum Expert
|
i might not of merged the files correctly. i also have gd13's sickness,hunting, and auction scripts which heavily moddified the files. specially the basecreature and playermobile. So either it aint compatable with them OR i didn't merge them right one of the two. the way i did the serial stuff is i just copied and pasted that way it would be right lol. here is a copy of my playermobile and basecreature. can ya let me know if you see a problem?
oh yeah i had to change the case 26 to 27 cause gd13's effect system uses the case 26 also.
__________________
My online store - jdvaluestore.com A D&D shard - dodronline.com |
|
|
|
|
|
#60 (permalink) |
|
Forum Expert
|
ok, 2 problems in your pm.
one is that when you changed the case from 26 to 27 you didnt change the goto number. It should be 26 not 25. Code:
case 27:
{
m_Level = reader.ReadInt();
m_MaxLevel = reader.ReadInt();
m_Exp = reader.ReadInt();
m_ToLevel = reader.ReadInt();
m_kxp = reader.ReadInt();
goto case 26; //goto case 25;
}
Code:
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*/
//writer.Write( (int) 26 ); // version
writer.Write( (int)m_HuntMode );
writer.Write( (int)m_HuntRank );
also, when posting information multiple times, use the edit button on your post ![]()
__________________
|
|
|
|
|
|
#61 (permalink) |
|
Forum Expert
|
actually i tried the edit button it wouldnt let me post them . so i just said screw it and reposted again
ok i did those fixes but now im getting a error i wasnt getting before Code:
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/Distros/PlayerMobile.cs:
CS1513: Line 3688: } expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
ok i tried different ways of doing it and still can't figure that one out. if i add another } at that line then it says invalid case and mising; this is the lines it is talking about Code:
if (Hidden) //Hiding is the only buff where it has an effect that's serialized.
AddBuff(new BuffInfo(BuffIcon.HidingAndOrStealth, 1075655));
} <--line 3688
public override void Serialize(GenericWriter writer)
Code:
Errors:
+ custom/other/Level System - 3/Distros/PlayerMobile.cs:
CS1525: Line 3398: Invalid expression term 'case'
CS1002: Line 3398: ; expected
CS1525: Line 3398: Invalid expression term ':'
CS1002: Line 3398: ; expected
CS1525: Line 3446: Invalid expression term 'case'
CS1002: Line 3446: ; expected
CS1525: Line 3446: Invalid expression term ':'
CS1002: Line 3446: ; expected
CS1525: Line 3463: Invalid expression term 'case'
CS1002: Line 3463: ; expected
CS1525: Line 3463: Invalid expression term ':'
CS1002: Line 3463: ; expected
CS1525: Line 3468: Invalid expression term 'case'
CS1002: Line 3468: ; expected
CS1525: Line 3468: Invalid expression term ':'
CS1002: Line 3468: ; expected
CS1525: Line 3473: Invalid expression term 'case'
CS1002: Line 3473: ; expected
CS1525: Line 3473: Invalid expression term ':'
CS1002: Line 3473: ; expected
CS1525: Line 3478: Invalid expression term 'case'
CS1002: Line 3478: ; expected
CS1525: Line 3478: Invalid expression term ':'
CS1002: Line 3478: ; expected
CS1525: Line 3484: Invalid expression term 'case'
CS1002: Line 3484: ; expected
CS1525: Line 3484: Invalid expression term ':'
CS1002: Line 3484: ; expected
CS1525: Line 3491: Invalid expression term 'case'
CS1002: Line 3491: ; expected
CS1525: Line 3491: Invalid expression term ':'
CS1002: Line 3491: ; expected
CS1525: Line 3502: Invalid expression term 'case'
CS1002: Line 3502: ; expected
CS1525: Line 3502: Invalid expression term ':'
CS1002: Line 3502: ; expected
CS1525: Line 3508: Invalid expression term 'case'
CS1002: Line 3508: ; expected
CS1525: Line 3508: Invalid expression term ':'
CS1002: Line 3508: ; expected
CS1525: Line 3509: Invalid expression term 'case'
CS1002: Line 3509: ; expected
CS1525: Line 3509: Invalid expression term ':'
CS1002: Line 3509: ; expected
CS1525: Line 3539: Invalid expression term 'case'
CS1002: Line 3539: ; expected
CS1525: Line 3539: Invalid expression term ':'
CS1002: Line 3539: ; expected
CS1525: Line 3544: Invalid expression term 'case'
CS1002: Line 3544: ; expected
CS1525: Line 3544: Invalid expression term ':'
CS1002: Line 3544: ; expected
CS1525: Line 3553: Invalid expression term 'case'
CS1002: Line 3553: ; expected
CS1525: Line 3553: Invalid expression term ':'
CS1002: Line 3553: ; expected
CS1525: Line 3554: Invalid expression term 'case'
CS1002: Line 3554: ; expected
CS1525: Line 3554: Invalid expression term ':'
CS1002: Line 3554: ; expected
CS1525: Line 3559: Invalid expression term 'case'
CS1002: Line 3559: ; expected
CS1525: Line 3559: Invalid expression term ':'
CS1002: Line 3559: ; expected
CS1525: Line 3571: Invalid expression term 'case'
CS1002: Line 3571: ; expected
CS1525: Line 3571: Invalid expression term ':'
CS1002: Line 3571: ; expected
CS1525: Line 3586: Invalid expression term 'case'
CS1002: Line 3586: ; expected
CS1525: Line 3586: Invalid expression term ':'
CS1002: Line 3586: ; expected
CS1525: Line 3598: Invalid expression term 'case'
CS1002: Line 3598: ; expected
CS1525: Line 3598: Invalid expression term ':'
CS1002: Line 3598: ; expected
CS1525: Line 3605: Invalid expression term 'case'
CS1002: Line 3605: ; expected
CS1525: Line 3605: Invalid expression term ':'
CS1002: Line 3605: ; expected
CS1525: Line 3610: Invalid expression term 'case'
CS1002: Line 3610: ; expected
CS1525: Line 3610: Invalid expression term ':'
CS1002: Line 3610: ; expected
CS1525: Line 3615: Invalid expression term 'case'
CS1002: Line 3615: ; expected
CS1525: Line 3615: Invalid expression term ':'
CS1002: Line 3615: ; expected
CS1525: Line 3620: Invalid expression term 'case'
CS1002: Line 3620: ; expected
CS1525: Line 3620: Invalid expression term ':'
CS1002: Line 3620: ; expected
CS1525: Line 3626: Invalid expression term 'case'
CS1002: Line 3626: ; expected
CS1525: Line 3626: Invalid expression term ':'
CS1002: Line 3626: ; expected
CS1525: Line 3633: Invalid expression term 'case'
CS1002: Line 3633: ; expected
CS1525: Line 3633: Invalid expression term ':'
CS1002: Line 3633: ; expected
CS1525: Line 3638: Invalid expression term 'case'
CS1002: Line 3638: ; expected
CS1525: Line 3638: Invalid expression term ':'
CS1002: Line 3638: ; expected
CS1525: Line 3645: Invalid expression term 'case'
CS1002: Line 3645: ; expected
CS1525: Line 3645: Invalid expression term ':'
CS1002: Line 3645: ; expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
__________________
My online store - jdvaluestore.com A D&D shard - dodronline.com Last edited by drgsldr69; 11-11-2007 at 04:57 PM. |
|
|
|
|
|
#65 (permalink) |
|
Newbie
Join Date: Dec 2005
Posts: 26
|
well as your still supporting this im just curious if it's possible to make like a teleporter/ or a moongate require a player to be a certain level to use it (kinda like how u can set the mounts)
Any Simple quick way to do this, and if not, will you include something in a future update that allows you to? ![]() |
|
|
|
|
|
#66 (permalink) |
|
Forum Expert
|
sure. its actually rather simple the way its setup. all you have to do is something like this:
Code:
public override void OnDoubleClick(Mobile from)
{
if (!from.Player)
return;
if (from.InRange(GetWorldLocation(), 1))
{
PlayerMobile pm = from as PlayerMobile;
if (pm.Level >= 15)
CheckGate(from, 1);
else
from.SendMessage("You are not a high enough level!");
}
else
from.SendLocalizedMessage(500446); // That is too far away.
}
public override bool OnMoveOver(Mobile m)
{
if (m.Player)
{
PlayerMobile pm = m as PlayerMobile;
if (pm.Level >= 15)
CheckGate(m, 0);
else
m.SendMessage("You are not a high enough level!");
}
return true;
}
NOTE: I made that code using Moongate.cs ![]()
__________________
|
|
|
|
|
|
#68 (permalink) |
|
Newbie
Join Date: Apr 2007
Age: 29
Posts: 12
|
hmm ki frost that is just freakking monumental ... how about leveling items ? :P
![]() ur like age 18 ... and coding like that ... GEEZ .. way to go!! ![]()
__________________
:p
Last edited by used212; 12-12-2007 at 05:02 PM. Reason: monumental |
|
|
|
|
|
#69 (permalink) | |
|
Forum Expert
|
Quote:
![]()
__________________
Last edited by Ki Frost; 12-12-2007 at 06:04 PM. |
|
|
|
|
|
|
#70 (permalink) |
|
Newbie
Join Date: Dec 2007
Age: 30
Posts: 39
|
Hi, I'm new and setting up my first shard. This level system was super easy to implement and it was easy to follow the changes in this thread. One question though: Is there a way to implement a reward system for leveling? Like for level 1 or if you do the range option, say levels 1-5, you get a skill ball, a special item, and some gold?
|
|
|
|