View Single Post
Old 04-17-2004, 02:02 AM   #1 (permalink)
habitat85
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