|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
|
∙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;
}
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 ) ); 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 ); 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();
}
}
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. |
|
|
|
|
|
#2 (permalink) |
|
Forum Novice
|
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 Code:
public static bool CheckArtifactChance( Mobile boss )
{
return GetArtifactChance( boss ) > Utility.Random( 1000 );
}
Code:
public static bool CheckArtifactChance( Mobile boss )
{
return GetArtifactChance( boss ) > Utility.Random( 1 );
}
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 |
|
|
|
|
|
#3 (permalink) | |
|
Forum Expert
Join Date: Jun 2004
Age: 47
Posts: 775
|
Quote:
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 |
|
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: Dec 2006
Posts: 456
|
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 |
|
|
|
|
|
#5 (permalink) | |
|
Forum Expert
|
Quote:
ie, 12000 would be 1200.0, 7000 would be 700.0( osi ). |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|