Go Back   RunUO - Ultima Online Emulation > RunUO > FAQ Forum

FAQ Forum A place to find answers to the most frequently asked questions, and a place to post said answers. Do NOT use this forum to ask questions.

Reply
 
Thread Tools Display Modes
Old 11-22-2009, 02:08 PM   #1 (permalink)
Lurker
 
Join Date: Nov 2009
Age: 18
Posts: 18
Default How to modify Resistance cap without playing in the core

Server default resistance for a player character is 70, here's how to change it.


Open your Playermobile.cs
path = ....\Scripts\Mobiles\Playermobiles.cs

CTRL+F and search the following word : Elf


This should take you around these lines


Quote:
public override int GetMaxResistance( ResistanceType type )
{
if ( AccessLevel > AccessLevel.Player )
return int.MaxValue;

int max = base.GetMaxResistance( type );

if ( type != ResistanceType.Physical && 60 < max && Spells.Fourth.CurseSpell.UnderEffect( this ) )
max = 60;

if( Core.ML && this.Race == Race.Elf && type == ResistanceType.Energy ) <=== This check the Elf race and state the Energy Resistance
max += 5; <==== Add 5 resistance cap to the default 70 resistance cap, wich would bring an elf to 75 max resistance for Energy.

return max;

To change resistance cap, for regular players (assuming they are human) change the part where it says Race.Elf to Race.Human and where it says max+= 5; put whatever you want to add to the current 70 cap. Here's an exemple i made for my server



Quote:

public override int GetMaxResistance( ResistanceType type )
{
if ( AccessLevel > AccessLevel.Player )
return int.MaxValue;

int max = base.GetMaxResistance( type );

if ( type != ResistanceType.Physical && 60 < max && Spells.Fourth.CurseSpell.UnderEffect( this ) )
max = 60;

if( Core.ML && this.Race == Race.Human && type == ResistanceType.Energy )
max += 10; //Intended to go after the 60 max from curse

if( Core.ML && this.Race == Race.Human && type == ResistanceType.Fire )
max += 10; //Intended to go after the 60 max from curse

if( Core.ML && this.Race == Race.Human && type == ResistanceType.Cold )
max += 10; //Intended to go after the 60 max from curse

if( Core.ML && this.Race == Race.Human && type == ResistanceType.Poison )
max += 10; //Intended to go after the 60 max from curse

if( Core.ML && this.Race == Race.Human && type == ResistanceType.Physical )
max += 10; //Intended to go after the 60 max from curse


return max;
}

I searched and have'nt found anyone that explain how to change max resistance cap without complication and going into the core n stuff, so here it is.



Tadah, no need to modify the core !



Edit : Also if you want to reduce the resistance cap i suppose you could use the value 10 and write max-= insteand.

You might aslo want to edit the curse spell if you still want to drop all resists to 60, since the script add +10 to max, and curse spell put the max at 60 it does 60 +10, in my case i modifyed the curse spell max resist at 50 so my 50+10 gives me the default value for the curse spell reduction.



Please post if it helped you !

Last edited by Loyd123; 11-23-2009 at 12:00 AM.
Loyd123 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 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5