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 01-07-2007, 01:44 PM   #1 (permalink)
Forum Expert
 
Hazey's Avatar
 
Join Date: Dec 2006
Location: Just floatin along 'Cloud 9'
Age: 20
Posts: 373
Send a message via AIM to Hazey
Default Frequent Script Edit Requests

∙New RunUO users are always asking the same basic script editing questions.
∙I made this thread because the community has helped me so much and I just wan't to give back to the community and help these new users solve any of there problems.
∙If you have any further questions for basic script editing you are welcome to ask me at any time.
- Email: explicitkilla@yahoo.com
- AIM: explicit killa


____________________________________________
[1] Removing Regeants from Spell Casting
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[1] Around Line-224 in Spells.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
		public virtual bool ConsumeReagents()
		{
			if ( m_Scroll != null || !m_Caster.Player )
				return true;

			if ( AosAttributes.GetValue( m_Caster, AosAttribute.LowerRegCost ) > Utility.Random( 100 ) )
				return true;

			Container pack = m_Caster.Backpack;

			if ( pack == null )
				return false;

			if ( pack.ConsumeTotal( m_Info.Reagents, m_Info.Amounts ) == -1 )
				return true;

			if ( GetType().BaseType == typeof( Spell ) )
			{
				if ( ArcaneGem.ConsumeCharges( m_Caster, ( Core.SE ? 1 : 1 + (int)Circle ) ) )
					return true;
			}

			return false;
		}
Change to:
Code:
		public virtual bool ConsumeReagents()
		{
				return true;
		}

____________________________________________
[2] Ethereal Mount Cast-Time
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[2] Around Line-363 in Ethereals.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
return TimeSpan.FromSeconds( ( (m_Mount.IsDonationItem && RewardSystem.GetRewardLevel( m_Rider ) < 3 )? 12.5 : 1.0 ) );
Change:
Code:
You will edit the end part where it says "1.0" - 1.0 is one second.
____________________________________________
[3] Full Health/Mana/Stama on Resurrection
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[3] Around Line-158 in ResurrectGump.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[3] Add this under "from.Resurrect();"
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
				from.Hits = from.HitsMax;
				from.Stam = from.StamMax;
				from.Mana = from.ManaMax;
____________________________________________
[4] Full Health/Mana/Stamina on Pet Resurrection
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[4] Around Line-54 in PetResurrectGump.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[4] Add this under "m_Pet.ResurrectPet();"
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
				m_Pet.Hits = m_Pet.HitsMax;
				m_Pet.Stam = m_Pet.StamMax;
				m_Pet.Mana = m_Pet.ManaMax;
____________________________________________
[5] Removal of AOS and SE
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[5] Around Line-8 in CurrentExpansion.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
		private static readonly Expansion Expansion = Expansion.None;
____________________________________________
[5] Expansion.None controls this change:
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯



____________________________________________
[6] Start Location
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[6] Around Line-721 in CharacterCreation.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
//CityInfo city = GetStartLocation( args, young );
CityInfo city = new CityInfo( "Britain", "The first bank of Britain", 1415, 1687, 5, Map.Felucca );
Change:
Code:
 - The first line allows character to begin at random location.
 - The second line is set for the character to begin where you want them to.
 - "//" Comments that line out, meaning disables it.
 - You can only enable 1 of the 2 lines.
Change: 1415, 1687, 5, Map.Felucca to set where you wan't them to begin.
1415 - X
1687 - Y
5    - Z

____________________________________________
[7] Save Time
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[7] Around Line-10/12 in AutoSave.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[7]
- First line represents the time it takes till next save - 60.0 = 1 hour
- The second line im not sure - somebody correct me
- The third still not sure - somebody correct me / I believe its a timer that will say "2 minutes untill next save" and thats what the 2.0 represents, but its comments out by the // so if you want that line to function remove that.

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
		private static TimeSpan m_Delay = TimeSpan.FromMinutes( 60.0 );
		private static TimeSpan m_Warning = TimeSpan.Zero;
		//private static TimeSpan m_Warning = TimeSpan.FromSeconds( 2.0 );

____________________________________________
[8] Welcome Messages
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[8] Around Line-18 in WelcomeTimer.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[8] Every message must be placed between quotes.
- "The dog drank all my beer"

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[8] To change the time between messages you will edit this line:
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
public WelcomeTimer( Mobile m, int count ) : base( TimeSpan.FromSeconds( 5.0 ), TimeSpan.FromSeconds( 10.0 ) )
____________________________________________
[8] To change the text color you will change the part labeled in red on this line:
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
m_Mobile.SendMessage( 0x44, m_Messages[m_State++] );

____________________________________________
[9] Player Login Message
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[9] Around Line-24 in LoginStats.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

____________________________________________
[10] Test Center
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[10] Around Line-11 in TestCenter.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[10] Change the section in red from true/false on this line:
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
		private const bool m_Enabled = true;

____________________________________________
[11] Enabling and Disabling Mark/Teleport/Gating and Recalling in regions
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[11] Around Line-475 in SpellHelper.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[11]
- Lines represented in false do not allow this and true is the opposite
- On my example, I have every location gate,recall,teleport and mark enabled

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
			/*T2A(Fel)	Ilshenar		Wind(Tram),	 	Wind(Fel),	Dungeons(Fel),		Solen(Tram),		Solen(Fel), 	CrystalCave(Malas),			Gauntlet(Malas),		Gauntlet(Ferry),		Stronghold,		ChampionSpawn, 		Dungeons(Tokuno[Malas]) */
/* Recall From */	{ true,		true,			true,			true,		true,			true,			true,		true,					true,				true,				true,			true,			true	 },
/* Recall To */		{ true,		true,			true,			true,		true,			true,			true,		true,					true,				true,				true,			true,			true	 },
/* Gate From */		{ true,		true,			true,			true,		true,			true,			true,		true,					true,				true,				true,			true,			true	 },
/* Gate To */		{ true,		true,			true,			true,		true,			true,			true,		true,					true,				true,				true,			true,			true	 },
/* Mark In */		{ true,		true,			true,			true,		true,			true,			true,		true,					true,				true,				true,			true,			true	 },
/* Tele From */		{ true,		true,			true,			true,		true,			true,			true,		true,					true,				true,				true,			true,			true	 },
/* Tele To */		{ true,		true,			true,			true,		true,			true,			true,		true,					true,				true,				true, 			true,			true	 },
			};

____________________________________________
[12] Changing Light cycles in the world and in dungeons
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[12] Around Line-10/13 in LightCycle.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[12]
- The lower the number the brighter your world is
- The higher the number the darker it would be, I wouldnt recommend setting it to high.
- In my example, everything is set to be as bright as it gets all the time for each setting except jail, why should criminals enjoy there surroundings in penitentiary...

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
		public const int DayLevel = 0;
		public const int NightLevel = 0;
		public const int DungeonLevel = 0;
		public const int JailLevel = 30;
____________________________________________
[13] Removing Death Robes
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[13] Around Line-1769 in PlayerMobile.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
public override void Resurrect()
		{
			bool wasAlive = this.Alive;

			base.Resurrect();

			if ( this.Alive && !wasAlive )
			{
				Item deathRobe = new DeathRobe();

				if ( !EquipItem( deathRobe ) )
					deathRobe.Delete();
			}
		}
Change:
Code:
public override void Resurrect()
		{
			bool wasAlive = this.Alive;

			base.Resurrect();

			if ( this.Alive && !wasAlive )
			{
			}
		}
____________________________________________
[14] Statcap and Skillcap
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[14] Around Line-662 in CharacterCreation.cs
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
____________________________________________
[14] Add this under "newChar.Hunger = 20;"
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Code:
newChar.SkillsCap = 8000;
newChar.StatCap = 325;
____________________________________________
If any errors in my fixes are found, let me know and ill change them. Also, if there are any common script edits you think I should add send me your suggestions through PM. Thanks
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
__________________
∙∙∙∙ A demon spawn, child of a bastard son
Seven born at seven and the seventh child fathered one..∙∙∙∙
∙∙∙∙A soul black full of pain.
Bodies in the field, blood pourin like rain∙∙∙∙

Last edited by Hazey; 01-24-2007 at 07:57 AM.
Hazey is offline   Reply With Quote
Old 10-22-2007, 11:06 PM   #2 (permalink)
Forum Novice
 
AntKneeM's Avatar
 
Join Date: Sep 2007
Location: Lost somewhere in the trees......
Age: 17
Posts: 217
Send a message via AIM to AntKneeM
Default ADd This

I Suggest adding this to the frequent questions post...In advance sorry if we wernt suppose to post in this thread i just found that alot of people and including my self have asked this question

How to adjust doom drop rate percentage...!!

First Find: DemonKnight.cs scripts should be under
Code:
Scripts/Mobiles/Monsters/AoS/DemonKnight.cs
Then here is the code you want to look for :

Code:
public static bool CheckArtifactChance( Mobile boss )
		{
			return GetArtifactChance( boss ) > Utility.Random( 1000 );
		}
Change it to :


Code:
public static bool CheckArtifactChance( Mobile boss )
		{
			return GetArtifactChance( boss ) > Utility.Random( 1 );
		}
if your trying to have 100% drop rate...

Utility Random iam taking a guess using random numbers has a 1/100000 chance of getting an artifact is the set defualt so w/e the chance you want you would have to change it on that line of code.. so changing it to one makes it 1/1 chance of getting an artifact meaing you will get an artifact every time ..!! Hope this is helpful
__________________
If someone asks for help its your job to help them.......words of a wise man!

Quote:
Originally Posted by TMSTKSBK View Post
Stabbing your monitor in the face is the solution for a lot of problems.
AntKneeM is offline   Reply With Quote
Old 10-23-2007, 12:25 AM   #3 (permalink)
CEO
Forum Expert
 
CEO's Avatar
 
Join Date: Jun 2004
Age: 47
Posts: 775
Default

Quote:
Originally Posted by AntKneeM View Post
I Suggest adding this to the frequent questions post...In advance sorry if we wernt suppose to post in this thread i just found that alot of people and including my self have asked this question

How to adjust doom drop rate percentage...!!
I wrote this quite awhile ago about that, it still applies:

Easy question, im just confused
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list.
Please don't add me to your friends list, I have enough friends. Thx
CEO is online now   Reply With Quote
Old 11-27-2007, 09:35 AM   #4 (permalink)
Forum Expert
 
typhoonbot's Avatar
 
Join Date: Dec 2006
Posts: 456
Default

Hey, I want to edit the skillcap and stat cap for all characters on my shard, so I put those two lines under what I was told to put them under, it looks like this:

//newChar.Hue = Utility.ClipSkinHue( args.Hue & 0x3FFF ) | 0x8000;
newChar.Hue = newChar.Race.ClipSkinHue( args.Hue & 0x3FFF ) | 0x8000;

newChar.Hunger = 20;
newChar.SkillsCap = 150;
newChar.StatCap = 150;

bool young = false;


also I set my characters not to start off being young.

is that the right thing I should dont for the skill cap to be 150.0 or not ?

regards
typhoonbot is offline   Reply With Quote
Old 11-27-2007, 10:27 AM   #5 (permalink)
Forum Expert
 
o0_Sithid_0o's Avatar
 
Join Date: Nov 2004
Location: Hiding his old posts from Daat99.
Age: 22
Posts: 2,309
Send a message via AIM to o0_Sithid_0o Send a message via MSN to o0_Sithid_0o
Default

Quote:
Originally Posted by typhoonbot View Post
Hey, I want to edit the skillcap and stat cap for all characters on my shard, so I put those two lines under what I was told to put them under, it looks like this:

//newChar.Hue = Utility.ClipSkinHue( args.Hue & 0x3FFF ) | 0x8000;
newChar.Hue = newChar.Race.ClipSkinHue( args.Hue & 0x3FFF ) | 0x8000;

newChar.Hunger = 20;
newChar.SkillsCap = 150;
newChar.StatCap = 150;

bool young = false;


also I set my characters not to start off being young.

is that the right thing I should dont for the skill cap to be 150.0 or not ?

regards
You should start your own thread for this. But really, setting that line to 150 for skillcap would make it 15.0. Skillcap is odd, the last digit represents the decimal place.

ie, 12000 would be 1200.0, 7000 would be 700.0( osi ).
__________________

Quote:
Originally Posted by Radwen View Post
Give me a reason... to like you.
Quote:
Originally Posted by excuse me miss, but uh... View Post
11/f/n.korea
Priceless.
o0_Sithid_0o is offline   Reply With Quote
Old 11-28-2007, 05:49 AM   #6 (permalink)
Forum Expert
 
typhoonbot's Avatar
 
Join Date: Dec 2006
Posts: 456
Default

yes i realised that after I had posted, can someone tell me exactly how and where to change the skill cap of EACH skill on my shard to 150.0

atm its 100.0 I wanna change it to 150.0 PER SKILL

thanks
typhoonbot is offline   Reply With Quote
Old 11-28-2007, 06:35 PM   #7 (permalink)
Forum Novice
 
AntKneeM's Avatar
 
Join Date: Sep 2007
Location: Lost somewhere in the trees......
Age: 17
Posts: 217
Send a message via AIM to AntKneeM
Default

Suggest looking into SkillCheck.cs Caps should be in there and self explanitory on how to change
__________________
If someone asks for help its your job to help them.......words of a wise man!

Quote:
Originally Posted by TMSTKSBK View Post
Stabbing your monitor in the face is the solution for a lot of problems.
AntKneeM is offline   Reply With Quote
Old 11-29-2007, 08:19 AM   #8 (permalink)
Forum Expert
 
typhoonbot's Avatar
 
Join Date: Dec 2006
Posts: 456
Default

Hehe, I cannot find anything to do with caps in that files, thanks for the reply tho,

anywhere else I can look ?

ta
typhoonbot is offline   Reply With Quote
Old 11-30-2007, 06:53 AM   #9 (permalink)
Newbie
 
Join Date: Nov 2007
Posts: 13
Default

i need a script to choose where ppl ressurect... do you haVE?
fezimn is offline   Reply With Quote
Old 11-30-2007, 05:44 PM   #10 (permalink)
Forum Novice
 
AntKneeM's Avatar
 
Join Date: Sep 2007
Location: Lost somewhere in the trees......
Age: 17
Posts: 217
Send a message via AIM to AntKneeM
Default

...My mistake i think it was the SkillHandlers.cs
__________________
If someone asks for help its your job to help them.......words of a wise man!

Quote:
Originally Posted by TMSTKSBK View Post
Stabbing your monitor in the face is the solution for a lot of problems.
AntKneeM 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