Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 08-06-2008, 06:51 PM   #1 (permalink)
Newbie
 
Join Date: Nov 2006
Posts: 94
Default Is there a way to change the str/hp ratio?

Like say if someone had 100str they would have 200-250 hp? I would like to give the people on my shard more HP so they are not cheap 1 hit killed.
peepeetree is offline   Reply With Quote
Old 08-06-2008, 07:05 PM   #2 (permalink)
Forum Expert
 
Karmageddon's Avatar
 
Join Date: Jul 2003
Location: NY
Age: 37
Posts: 928
Default

Yes you can do that. In an unmodified playermobile.cs look around line 977 you will be able to find what you need there.
__________________

Your fate is sealed in the end of Time.....
Karmageddon is offline   Reply With Quote
Old 08-06-2008, 07:08 PM   #3 (permalink)
Newbie
 
Join Date: Nov 2006
Posts: 94
Default

Hey what does everyone use for editing? I keep seeing people say check line such and such but word and notepad don't give me lines lol
peepeetree is offline   Reply With Quote
Old 08-06-2008, 07:13 PM   #4 (permalink)
Forum Expert
 
Karmageddon's Avatar
 
Join Date: Jul 2003
Location: NY
Age: 37
Posts: 928
Default

I ussually use Win32Pad for editing. But if I have a real problem I dump it into Microsoft Visual C# 2005 Express Edition.
__________________

Your fate is sealed in the end of Time.....
Karmageddon is offline   Reply With Quote
Old 08-06-2008, 07:30 PM   #5 (permalink)
Newbie
 
Join Date: Nov 2006
Posts: 94
Default

hmm i am looking around line 977 and not finding anything that looks like it would allow me to change the hp/str ratio. Here is what my code looks like from 952-1046


Code:
public override bool CheckContextMenuDisplay( IEntity target )
		{
			return ( m_DesignContext == null );
		}

		public override void OnItemAdded( Item item )
		{
			base.OnItemAdded( item );

			if ( item is BaseArmor || item is BaseWeapon )
			{
				Hits=Hits; Stam=Stam; Mana=Mana;
			}

			if ( this.NetState != null )
				CheckLightLevels( false );

			InvalidateMyRunUO();
		}

		public override void OnItemRemoved( Item item )
		{
			base.OnItemRemoved( item );

			if ( item is BaseArmor || item is BaseWeapon )
			{
				Hits=Hits; Stam=Stam; Mana=Mana;
			}

			if ( this.NetState != null )
				CheckLightLevels( false );

			InvalidateMyRunUO();
		}

		public override double ArmorRating
		{
			get
			{
				//BaseArmor ar;
				double rating = 0.0;

				AddArmorRating( ref rating, NeckArmor );
				AddArmorRating( ref rating, HandArmor );
				AddArmorRating( ref rating, HeadArmor );
				AddArmorRating( ref rating, ArmsArmor );
				AddArmorRating( ref rating, LegsArmor );
				AddArmorRating( ref rating, ChestArmor );
				AddArmorRating( ref rating, ShieldArmor );

				return VirtualArmor + VirtualArmorMod + rating;
			}
		}

		private void AddArmorRating( ref double rating, Item armor )
		{
			BaseArmor ar = armor as BaseArmor;

			if( ar != null && ( !Core.AOS || ar.ArmorAttributes.MageArmor == 0 ))
				rating += ar.ArmorRatingScaled;
		}

		#region [Stats]Max
		[CommandProperty( AccessLevel.GameMaster )]
		public override int HitsMax
		{
			get
			{
				int strBase;
				int strOffs = GetStatOffset( StatType.Str );

				if ( Core.AOS )
				{
					strBase = this.Str;	//this.Str already includes GetStatOffset/str
					strOffs = AosAttributes.GetValue( this, AosAttribute.BonusHits );

					if ( AnimalForm.UnderTransformation( this, typeof( BakeKitsune ) ) || AnimalForm.UnderTransformation( this, typeof( GreyWolf ) ) )
						strOffs += 20;
				}
				else
				{
					strBase = this.RawStr;
				}

				return (strBase / 2) + 50 + strOffs;
			}
		}

		[CommandProperty( AccessLevel.GameMaster )]
		public override int StamMax
		{
			get{ return base.StamMax + AosAttributes.GetValue( this, AosAttribute.BonusStam ); }
		}

I thought maybe this would be it

return (strBase / 2) + 50 + strOffs;


and I changed it to

return (strBase / 2) + 140 + strOffs;

and saw no change in the game. Or would this not effect existing players who have already created a character?

Last edited by peepeetree; 08-06-2008 at 07:33 PM.
peepeetree is offline   Reply With Quote
Old 08-06-2008, 08:45 PM   #6 (permalink)
Newbie
 
Join Date: Nov 2006
Posts: 94
Default

Ok I figured it out, for some reason it didn't do anything when I modified the + 50 so I had to change the / to a * and play with it that way
peepeetree is offline   Reply With Quote
Old 08-07-2008, 07:06 AM   #7 (permalink)
Forum Expert
 
Join Date: Nov 2004
Posts: 1,656
Send a message via ICQ to Murzin Send a message via AIM to Murzin Send a message via MSN to Murzin
Default

notepad does lines...

you have to use the ctrl+g or else edit - goto i think.

thats how i always went to lines

everything i wrote was using notepad. tried to use the visual studio but i couldnt ever figure out how to setup runuo as the project and it gave me lots of errors on stuff i was doing so it just got annoying.
Murzin is offline   Reply With Quote
Reply

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 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5