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 04-17-2004, 02:02 AM   #1 (permalink)
Forum Expert
 
Join Date: Feb 2003
Age: 30
Posts: 515
Default How Do you make Luck better?

I looked through the scripts, found LootPack.cs and noticed theres different levels of the luck like rich, ultra rich and so on. is there a way to make luck work better ( give better stuff then what it does now) by editing something different then all the levels (Rich, FilthyRich, UltraRich etc..)
Found these lines

Code:
		public void Generate( Mobile from, Container cont, bool spawning, int luckChance )
		{
			if ( cont == null )
				return;

			bool checkLuck = Core.AOS;

			for ( int i = 0; i < m_Entries.Length; ++i )
			{
				LootPackEntry entry = m_Entries[i];

				bool shouldAdd = ( entry.Chance > Utility.Random( 10000 ) );

				if ( !shouldAdd && checkLuck )
				{
					checkLuck = false;
					shouldAdd = LootPack.CheckLuck( luckChance );
				}

				if ( !shouldAdd )
					continue;

				Item item = entry.Construct( from, luckChance, spawning );

				if ( item != null )
				{
					if ( !item.Stackable || !cont.TryDropItem( from, item, false ) )
						cont.DropItem( item );
				}
			}
		}

In this line im not sure what its doing

Code:
				bool shouldAdd = ( entry.Chance > Utility.Random( 10000 ) );
If I change the 10000 to 5000 what is that going to do? or if I made it greater then 10000 whats that going to do?
habitat85 is offline   Reply With Quote
Old 04-19-2004, 09:28 AM   #2 (permalink)
 
Join Date: Nov 2003
Posts: 12
Default

try it and let us know...... seriously
drackous is offline   Reply With Quote
Old 04-19-2004, 10:58 PM   #3 (permalink)
Newbie
 
Join Date: Apr 2004
Location: Alabama
Age: 19
Posts: 91
Send a message via ICQ to weaselboy246 Send a message via AIM to weaselboy246
Default

you could make a ring that adds 10000 luck...lol.. theres the cheap way out..
weaselboy246 is offline   Reply With Quote
Old 04-21-2004, 12:05 AM   #4 (permalink)
Forum Expert
 
Join Date: Feb 2003
Age: 30
Posts: 515
Default

lol no thanks.

Ive already tested luck and its just like OSI.... Worthless lol I tested it with 1000 luck, 2000 luck and 5000 luck, and killed random levels of monsters by the 100's
Think my players like it better when I beef monsters loot up without dealing with luck since you dont get anything good with luck no matter how high you have on

PackMagicItems( 3, 10 );

Seems better :P


But if I can get it so luck actually works better by dropping loot like that line will then HURAY for luck other wise its a usless attribute in my opinion
habitat85 is offline   Reply With Quote
Old 04-21-2004, 12:21 AM   #5 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

<sigh>

You should make the random smaller not larger if you want:

bool shouldAdd = ( entry.Chance > Utility.Random( 10000 ) );

That bool to be true

Trust me Luck does effect loot, you just have to adjust the code so it does what you want.

But do what you want.
Phantom is offline   Reply With Quote
Old 04-21-2004, 05:30 PM   #6 (permalink)
Forum Expert
 
Join Date: Feb 2003
Age: 30
Posts: 515
Default

So if I change the Utility.Random( 10000 )
to something like Utility.Random( 5000 )

that will make it better right?
habitat85 is offline   Reply With Quote
Old 04-21-2004, 06:03 PM   #7 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

Also don't forget to adjust the attribute cap per min/max attributes in the PackMagicWeapon or whatever they are.
XxSP1DERxX 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