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!

Young Player System BETA 1.0

jaynigs

Wanderer
Young Player System BETA 2.1

Jaynigs Young Player System BETA 2.1

This is currently for RUNUO 1.0 RCO only, i have not tested on any previous versions.

OK, its finally here for testing. :D

Its not complete and all input from testers will be appreciated, good or bad.

It involves changes to many base files but no serialization stress for novices.



Some Features of this system.


Young Players can not be attacked by Monsters or players, unless they attack first or are in a dungeon.
Young Players may not travel to felucca.
Young Players cannot harm blue npcs.
Young Players can not transfer pets to older players.
Older players may not transfer pets to younger players.
Young Players can not cast beneficial spells on older players.
Young Players May not join the thieves guild
Young players are ported to a healer in a nearby town with all their possesions should they die. (including current unstabled pets)
Wandering healers will heal young players every 30 mins.
Monsters cannot cast spells onto Young Players.
Young Players insta log anywhere.
You can renounce your young player status by saying "i renounce my young player status"
Young player time remaining is announced on login and worldsave.
Young status checked on world save.
Young player tickets added.

The gumps are probably not right and if anyone wants to improve them then please do so.

Some other missing features are included in the text file along with installation instructions and some needed scripts.


Please make sure you backup your files before you edit them.

This system has been running error free on Europa 2 for 3 Months

Hope you like it..

Thanks to cward and brodockbr for some information on the young system.


1.01 Update - Bug found in mageai, no creatures cast spells unless fighting a playermobile.

1.20 Update - All characters are now young and every player in your account will lose young status if any one of them meet the requirements.

1.30 Update - Following Cwards findings this minor update is now osi correct in respect of who gets and keeps young player status.

1.31 Update - Fixed Moongate bug, stopped young players being teleported to healer on death in ilshenar and a small display fix for people using pre aos.

1.32 Update - Forgot to include the instant young player logout code. Now added

1.33 Update - Added check to helpgump.cs and tidied up some code, also included replacement distro files for simple drag and drop installs.

2.0 Update - Young Status is now checked on world save.
Also included new player ticket ( for youngs only ).
Only Young players will be allowed to do the young player quests.

2.01 Update - Removed the quest only being available to youngs as it was found to be incorrect. Included the teleporting of young players pets when they are teleported on death.

2.02 Update
- Young players who are in felucca on login or worldsave will be offered a choice to remain in fel and lose young status, or return to trammel.

2.03 Update - Fixed a silly issue with notoriety.cs (thats the only file thats changed since 2.02)

2.1 Update - You will now lose young player status if any of your skills total 80 or above.

If you create an advanced character, you can no longer make additional young players on the same account.
 

Attachments

  • Young System 2.1 BETA.zip
    92.4 KB · Views: 364

brodock

Sorceror
and players that log in felucca will be teleported to haven (this is on OSI websites i think... like if players with young status bug in someway that they went to Felucca, they will be teleported to Haven in trammel...)

also will be good to change moonstones... (how can i get moonstones...? just a doubt)
 

bean56

Wanderer
Hey jaynigs, I did notice a little error that might screw people up. In your instructions with the baseai you said to change the function to that. Well you left out the end
Code:
m_Mobile.ControlTarget = null;
			m_Mobile.ControlOrder = OrderType.Stay;

			return true;
		}
Might want to change that.

I went with your instruction and got 9 errors.

First you need to add to add using Server.Mobiles; to moonstone.cs.

Second you need to add add using Server.Gumps; to all dungeon.cs scripts.

Third You need to add add using Server.Regions; to the playermobile.

After that if you do all your changes correctly everything should compile.
 

bean56

Wanderer
jaynigs said:
Thanks Bean , i knew id miss something :)

I will edit the istructions accordinglyl
No problem man. That's about all I can do to help eh. Hopefully I'll find some time to look at this playflag stuff and see if every character can be young on the account if that's how it's suppose to be. I'm curious though, how would you know if one character went over 80 in one skill if that is the case. You would have to let all the other characters on the account know and that doesn't sound fun.
 

jaynigs

Wanderer
bean56 said:
I'm curious though, how would you know if one character went over 80 in one skill if that is the case. You would have to let all the other characters on the account know and that doesn't sound fun.

Well thats the problem i have at the moment, ive added the AllowYoung Flag for that purpose to the playermobile, i was going to add an account tag instead, however i read that this isnt the best thing to do? who knows, only going by what i read.

Im also thinking of adding some checks on world save instead of totally relying on the onlogin method, its better than having a timer for every youngplayer tho
 

brodock

Sorceror
on my first try to implement myself the young system, i created a bool on account file...

somethig like:

public class Account : IAccount
{
private bool m_IsYoung;'


/// <summary>
/// Bool to Check if Is Young Or Not
/// </summary>
public bool IsYoung
{
get{ return m_IsYoung; }
set{ m_IsYoung = value; }
}
....
}

and serialize it...

i think it's the best way...
maybe phantom or another good one point a best way... (but phantom every time say only that "there is a better way to do this" but doesn't point what is! remembering i'm not attacking you, phantom... i learned to respect you cause you are a very good one programmer and knows what you are doing)
 

jaynigs

Wanderer
Well, like i said, im pretty sure an account tag would do the job, but maybe someone can explain a better way?

id like to avoid any serialization as im sure a young player system will be on a future runuo release and i dont want to cause any problems with my temporary system.
:cool:
 

bean56

Wanderer
There is nothing wrong with adding an account tag. I use a couple for different things. Also if you want to check something on world save you can look at the plant system as it has code to check plants growing every save. That would be easy to copy. Brods idea sounds pretty good to me, but like you said, it is nice to avoid changing the way things save and load as a lot of noob people will screw up there servers. Even a few of us smart people may screw it up. I did notice there were no saving or loading changes with all this that was quite nice.
 

bean56

Wanderer
Sorry for double post

I had a new player get on and they had isyoung or whatever was true, but that didn't seem to do anything. Allowyoung on the other hand was false and that was needed to be true for the system to work for them. So my question is when and where do you set their status to young because I guess it wasn't in the instructions and i'm too tired to mess with it. lol :D
 

jaynigs

Wanderer
If you have set it all up correct bean then it should give the 1st player on the account young status, if you want every character to have young status then remove the index check from playermobile, i only added that in since i could not find a way of making all players not young if another character renounced. But its still a beta version and im looking into adding an account tag
 

bean56

Wanderer
I set it up like you said and that was his first character so i'm not sure why the other bool wasn't true. Here is an example of adding an account tag if that helps you. Kudos to philantrop for that.
 

Attachments

  • TagChest.cs
    1.9 KB · Views: 37

cward

Wanderer
If I'm not mistaken, Young is per character not acount and is based off of online time per character. I'll check this tonight. I've not logged onto my other two young characters since My advanced character lost young status.
 

bean56

Wanderer
For anyone running preaos you need to add
Code:
public override void public override void OnSingleClick( Mobile from )
		{
			string name = this.Name;
			
			if ( YoungPlayer )
			{
				name += " [Young]";
				this.PublicOverheadMessage( Network.MessageType.Label, 187 ,false, name);
			}
			else
			{
				base.OnSingleClick( from );
			}
			return;
		}
to your player mobile if you want the young tag to display. Give me a few minutes to get the color right and everything.

On a side note. In order for my players to start as young I had to comment out this part.
Code:
if ( !((PlayerMobile)t).YoungPlayer && /*((PlayerMobile)t).AllowYoung &&*/ index == 1 )
I'm still not sure what exactly the point of allowyoung is. A bool to disable the young system?
 

jaynigs

Wanderer
cward said:
If I'm not mistaken, Young is per character not acount and is based off of online time per character. I'll check this tonight. I've not logged onto my other two young characters since My advanced character lost young status.

Hmm., if this is true then that would make things easier, but i have a feeling that as soon as one player isnt young, they all lose the young status, that was the way it was when i played but it was a while ago now and things may have changed.

I'll await your findings :D
 

Memnoch

Wanderer
cward said:
If I'm not mistaken, Young is per character not acount and is based off of online time per character. I'll check this tonight. I've not logged onto my other two young characters since My advanced character lost young status.


The way i was explained it the system was designed to work like this. When you log on your account is given 40 hours of young status. As you play it wears away. If you play off 5 hours, then make a new char when you log in it will say, you have 35 hours left. Well, every time you log in as a new char the timer is suposed to synch itself with the rest of your account, but for whatever reason (osi's amazing programing no doubt) this doesnt always happen as intended. So its possible to have some at 30 hours, some at 10 hours, or whatever. The only time it really seems to catch up well is when the first char loses its young status. Also, after saying "i renounce my young player status" no new char created on the account should have young status, but the ones that were created before, i believe get to keep it for the duration they have left.
 

Memnoch

Wanderer
Also while i'm thinking about it, i really hope if someone does recreate the newbie dungeon, the swastica shaped one someone refered to earlier, i hope that its not built into the young system. I've seen what some people have done making that a very nice newbie dungeon, and i personaly have no plans to use the osi design, but would like a working young player system.
 

bean56

Wanderer
Make sure you read all my other post. I think I may have found a bug kinda. If you are in a guild I don't think it will display the way it's currently set up. At least with pre aos that appears to be the case.
 
Top