Go Back   RunUO - Ultima Online Emulation > RunUO > Server Support on Windows

Server Support on Windows Get (and give) support on general questions related to the RunUO server itself.

Reply
 
Thread Tools Display Modes
Old 09-03-2005, 08:59 AM   #1 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default How can i change amount on champs?

hello i would like to know how i change amount of gold when u kill them?
shadow17_97038 is offline   Reply With Quote
Old 09-03-2005, 09:09 AM   #2 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

Quote:
Originally Posted by shadow17_97038
hello i would like to know how i change amount of gold when u kill them?
look at the GoodiesTimer in basechampion.cs
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon is offline   Reply With Quote
Old 09-03-2005, 10:18 AM   #3 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

here is the script from this one i get 300k in champ i want it to 100k i am not shure where to change it would anyone know?

Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Engines.CannedEvil;


namespace Server.Mobiles
{
	public abstract class BaseChampion : BaseCreature
	{
		public BaseChampion( AIType aiType ) : this( aiType, FightMode.Closest )
		{
		}

		public BaseChampion( AIType aiType, FightMode mode ) : base( aiType, mode, 18, 1, 0.1, 0.2 )
		{
		}

		public BaseChampion( Serial serial ) : base( serial )
		{
		}

		public abstract ChampionSkullType SkullType{ get; }

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}

		public void GivePowerScrolls()
		{
			if ( Map != Map.Felucca )
				return;

			ArrayList toGive = new ArrayList();
			ArrayList rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );

			for ( int i = rights.Count - 1; i >= 0; --i )
			{
				DamageStore ds = (DamageStore)rights[i];

				if ( ds.m_HasRight )
					toGive.Add( ds.m_Mobile );
			}

			if ( toGive.Count == 0 )
				return;

			// Randomize
			for ( int i = 0; i < toGive.Count; ++i )
			{
				int rand = Utility.Random( toGive.Count );
				object hold = toGive[i];
				toGive[i] = toGive[rand];
				toGive[rand] = hold;
			}

			for ( int i = 0; i < 6; ++i )
			{
				int level;
				double random = Utility.RandomDouble();

				if ( 0.1 >= random )
					level = 20;
				else if ( 0.4 >= random )
					level = 15;
				else
					level = 10;

				Mobile m = (Mobile)toGive[i % toGive.Count];

				PowerScroll ps = PowerScroll.CreateRandomNoCraft( level, level );

				m.SendLocalizedMessage( 1049524 ); // You have received a scroll of power!
				m.AddToBackpack( ps );

				if ( m is PlayerMobile )
				{
					PlayerMobile pm = (PlayerMobile)m;

					for ( int j = 0; j < pm.JusticeProtectors.Count; ++j )
					{
						Mobile prot = (Mobile)pm.JusticeProtectors[j];

						if ( prot.Map != m.Map || prot.Kills >= 5 || prot.Criminal || !JusticeVirtue.CheckMapRegion( m, prot ) )
							continue;

						int chance = 0;

						switch ( VirtueHelper.GetLevel( prot, VirtueName.Justice ) )
						{
							case VirtueLevel.Seeker: chance = 60; break;
							case VirtueLevel.Follower: chance = 80; break;
							case VirtueLevel.Knight: chance = 100; break;
						}

						if ( chance > Utility.Random( 100 ) )
						{
							prot.SendLocalizedMessage( 1049368 ); // You have been rewarded for your dedication to Justice!
							prot.AddToBackpack( new PowerScroll( ps.Skill, ps.Value ) );
						}
					}
				}
			}
		}

		public override bool OnBeforeDeath()
		{
			if ( !NoKillAwards )
			{
				GivePowerScrolls();

				Map map = this.Map;

				if ( map != null )
				{
					for ( int x = -12; x <= 12; ++x )
					{
						for ( int y = -12; y <= 12; ++y )
						{
							double dist = Math.Sqrt(x*x+y*y);

							if ( dist <= 12 )
								new GoodiesTimer( map, X + x, Y + y ).Start();
						}
					}
				}
			}

			return base.OnBeforeDeath();
		}

		public override void OnDeath( Container c )
		{
			if ( Map == Map.Felucca )
				c.DropItem( new ChampionSkull( SkullType ) );

			base.OnDeath( c );
		}

		private class GoodiesTimer : Timer
		{
			private Map m_Map;
			private int m_X, m_Y;

			public GoodiesTimer( Map map, int x, int y ) : base( TimeSpan.FromSeconds( Utility.RandomDouble() * 10.0 ) )
			{
				m_Map = map;
				m_X = x;
				m_Y = y;
			}

			protected override void OnTick()
			{
				int z = m_Map.GetAverageZ( m_X, m_Y );
				bool canFit = m_Map.CanFit( m_X, m_Y, z, 6, false, false );

				for ( int i = -3; !canFit && i <= 3; ++i )
				{
					canFit = m_Map.CanFit( m_X, m_Y, z + i, 6, false, false );

					if ( canFit )
						z += i;
				}

				if ( !canFit )
					return;

				Gold g = new Gold( 500, 1000 );
				
				g.MoveToWorld( new Point3D( m_X, m_Y, z ), m_Map );

				if ( 0.5 >= Utility.RandomDouble() )
				{
					switch ( Utility.Random( 3 ) )
					{
						case 0: // Fire column
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x3709, 10, 30, 5052 );
							Effects.PlaySound( g, g.Map, 0x208 );

							break;
						}
						case 1: // Explosion
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36BD, 20, 10, 5044 );
							Effects.PlaySound( g, g.Map, 0x307 );

							break;
						}
						case 2: // Ball of fire
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36FE, 10, 10, 5052 );

							break;
						}
					}
				}
			}
		}
	}
}
shadow17_97038 is offline   Reply With Quote
Old 09-03-2005, 01:14 PM   #4 (permalink)
 
Join Date: Aug 2005
Age: 28
Posts: 184
Default

Code tags are your friend.

Edit that big heap and I will be more than happy to help out.

-Nox
-Nox- is offline   Reply With Quote
Old 09-04-2005, 03:26 AM   #5 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

what is a big heap? hehe
shadow17_97038 is offline   Reply With Quote
Old 09-04-2005, 04:05 AM   #6 (permalink)
 
Join Date: Jan 2005
Age: 25
Posts: 219
Default

The "Heap" is your entire script. He, and pretty much anyone else who is willing to help you, will always want you to put your scripts in code tags. Below is the propper way to put a script in code tags...

[c ode]
Enter Script Here.
[/code]

Do that, except without puttig a space between the o and the c in the first word code, and you'll find help much easier to get.
imanewb is offline   Reply With Quote
Old 09-04-2005, 04:18 AM   #7 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

i have no idea how to script only my cousin does the scripting i didnt know this would be hard to do.
shadow17_97038 is offline   Reply With Quote
Old 09-04-2005, 04:25 AM   #8 (permalink)
 
Join Date: Aug 2005
Age: 28
Posts: 184
Default

It will not be a hard change, we'd just like to teach you how to do things properly on the forum and not get flamed/trolled/suspended/banned.

-Nox
-Nox- is offline   Reply With Quote
Old 09-04-2005, 04:32 AM   #9 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

oh oops ok i did not know this thank you for warning i just dont know how to put up those code things and where
shadow17_97038 is offline   Reply With Quote
Old 09-04-2005, 04:33 AM   #10 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

umm do i put them one on top and ending on bottom?
shadow17_97038 is offline   Reply With Quote
Old 09-04-2005, 04:44 AM   #11 (permalink)
 
Join Date: Aug 2005
Age: 28
Posts: 184
Default

Yes.
-Nox- is offline   Reply With Quote
Old 09-04-2005, 05:48 AM   #12 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

k i fixed it up so i have code on there ;]
shadow17_97038 is offline   Reply With Quote
Old 09-04-2005, 09:56 AM   #13 (permalink)
 
Join Date: Jan 2005
Location: At home. :)
Age: 34
Posts: 368
Send a message via ICQ to Tynsdale
Default

Quote:
Originally Posted by shadow17_97038
i have no idea how to script only my cousin does the scripting i didnt know this would be hard to do.
Shad. First of all, dont be afraid to change anything in your script. It can always be changed back. Usually what you want to edit is pretty easy to find and the best way to learn is by doing and learning to read compile errors. Give it a shot and post here what success or error you have and you will get more help here once people see you have at least tried first.
Tynsdale is offline   Reply With Quote
Old 09-05-2005, 03:29 AM   #14 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

thing is i have no idea about scripting. I do not see an amount to change or numbers to make it 100k all i see is 500 and 1000 that dont make since to me
shadow17_97038 is offline   Reply With Quote
Old 09-05-2005, 07:45 AM   #15 (permalink)
 
Join Date: Jan 2005
Location: At home. :)
Age: 34
Posts: 368
Send a message via ICQ to Tynsdale
Default



Code:
		public override void OnDeath( Container c )
		{
			if ( Map == Map.Felucca )
				c.DropItem( new ChampionSkull( SkullType ) );

			base.OnDeath( c );
		}

		private class GoodiesTimer : Timer
		{
			private Map m_Map;
			private int m_X, m_Y;

			public GoodiesTimer( Map map, int x, int y ) : base( TimeSpan.FromSeconds( Utility.RandomDouble() * 10.0 ) )
			{
				m_Map = map;
				m_X = x;
				m_Y = y;
			}

			protected override void OnTick()
			{
				int z = m_Map.GetAverageZ( m_X, m_Y );
				bool canFit = m_Map.CanFit( m_X, m_Y, z, 6, false, false );

				for ( int i = -3; !canFit && i <= 3; ++i )
				{
					canFit = m_Map.CanFit( m_X, m_Y, z + i, 6, false, false );

					if ( canFit )
						z += i;
				}

				if ( !canFit )
					return;

				Gold g = new Gold( 500, 1000 ); <---- This is the amount of gold per pile that hits the ground on death. Its saying that its going to drop anywhere from 500 to 1000 gold per pile.
				
				g.MoveToWorld( new Point3D( m_X, m_Y, z ), m_Map );

				if ( 0.5 >= Utility.RandomDouble() )
				{
					switch ( Utility.Random( 3 ) )
					{
						case 0: // Fire column
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x3709, 10, 30, 5052 );
							Effects.PlaySound( g, g.Map, 0x208 );

							break;
						}
						case 1: // Explosion
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36BD, 20, 10, 5044 );
							Effects.PlaySound( g, g.Map, 0x307 );

							break;
						}
						case 2: // Ball of fire
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36FE, 10, 10, 5052 );

							break;
						}
					}
				}
			}
		}
	}
}
What you want is here in the Champs script themselves:

Code:
		public Barracoon() : base( AIType.AI_Melee )
		{
			Name = "Barracoon";
			Title = "the piper";
			Body = 0x190;
			Hue = 0x83EC;

			SetStr( 305, 425 );
			SetDex( 72, 150 );
			SetInt( 505, 750 );

			SetHits( 4200 );
			SetStam( 102, 300 );

			SetDamage( 25, 35 );

			SetDamageType( ResistanceType.Physical, 100 );

			SetResistance( ResistanceType.Physical, 60, 70 );
			SetResistance( ResistanceType.Fire, 50, 60 );
			SetResistance( ResistanceType.Cold, 50, 60 );
			SetResistance( ResistanceType.Poison, 40, 50 );
			SetResistance( ResistanceType.Energy, 40, 50 );

			SetSkill( SkillName.MagicResist, 100.0 );
			SetSkill( SkillName.Tactics, 97.6, 100.0 );
			SetSkill( SkillName.Wrestling, 97.6, 100.0 );

			Fame = 22500;
			Karma = -22500;

			VirtualArmor = 70;

			AddItem( new FancyShirt( Utility.RandomGreenHue() ) );
			AddItem( new LongPants( Utility.RandomYellowHue() ) );
			AddItem( new JesterHat( Utility.RandomPinkHue() ) );
			AddItem( new Cloak( Utility.RandomPinkHue() ) );
			AddItem( new Sandals() );

			AddItem( new ShortHair( 148 ) );
		}

		public override void GenerateLoot() <-----
		{
			AddLoot( LootPack.UltraRich, 4 ); <-----
			AddLoot( LootPack.FilthyRich ); <-----
		}
What you have there is its saying its going to drop on the corpse UltraRich values 4 times plus 1 FilthyRich. To find out what these values are you need to look in Scripts/Misc/LootPack.cs.

Code:
		#region AOS definitions
		public static readonly LootPack AosPoor = new LootPack( new LootPackEntry[]// 10+10 = 20
			{
				new LootPackEntry(  true, Gold,			100.00, "1d10+10" ),
				new LootPackEntry( false, MagicItems,	  0.02, 1, 5, 0, 90 ),
				new LootPackEntry( false, Instruments,	  0.02, 1 )
			} );

		public static readonly LootPack AosMeager = new LootPack( new LootPackEntry[]// 30+20 = 50
			{
				new LootPackEntry(  true, Gold,			100.00, "3d10+20" ),
				new LootPackEntry( false, MagicItems,	  1.00, 1, 2, 0, 10 ),
				new LootPackEntry( false, MagicItems,	  0.20, 1, 5, 0, 90 ),
				new LootPackEntry( false, Instruments,	  0.10, 1 )
			} );

		public static readonly LootPack AosAverage = new LootPack( new LootPackEntry[]// 50+50 = 100
			{
				new LootPackEntry(  true, Gold,			100.00, "5d10+50" ),
				new LootPackEntry( false, MagicItems,	  5.00, 1, 4, 0, 20 ),
				new LootPackEntry( false, MagicItems,	  2.00, 1, 3, 0, 50 ),
				new LootPackEntry( false, MagicItems,	  0.50, 1, 5, 0, 90 ),
				new LootPackEntry( false, Instruments,	  0.40, 1 )
			} );

		public static readonly LootPack AosRich = new LootPack( new LootPackEntry[]// 100+150 = 250
			{
				new LootPackEntry(  true, Gold,			100.00, "10d10+150" ),
				new LootPackEntry( false, MagicItems,	 20.00, 1, 4, 0, 40 ),
				new LootPackEntry( false, MagicItems,	 10.00, 1, 5, 0, 60 ),
				new LootPackEntry( false, MagicItems,	  1.00, 1, 5, 0, 90 ),
				new LootPackEntry( false, Instruments,	  1.00, 1 )
			} );

		public static readonly LootPack AosFilthyRich = new LootPack( new LootPackEntry[]// 200+200 = 400
			{
				new LootPackEntry(  true, Gold,			100.00, "2d100+200" ),
				new LootPackEntry( false, MagicItems,	 33.00, 1, 4, 0, 50 ),
				new LootPackEntry( false, MagicItems,	 33.00, 1, 4, 0, 60 ),
				new LootPackEntry( false, MagicItems,	 20.00, 1, 5, 0, 75 ),
				new LootPackEntry( false, MagicItems,	  5.00, 1, 5, 0, 100 ),
				new LootPackEntry( false, Instruments,	  2.00, 1 )
			} );

		public static readonly LootPack AosUltraRich = new LootPack( new LootPackEntry[]// 500+500 = 1000
			{
				new LootPackEntry(  true, Gold,			100.00, "5d100+500" ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 25, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 25, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 25, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 25, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 25, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 35, 100 ),
				new LootPackEntry( false, Instruments,	  2.00, 1 )
			} );

		public static readonly LootPack AosSuperBoss = new LootPack( new LootPackEntry[]// 500+500 = 1000
			{
				new LootPackEntry(  true, Gold,			100.00, "5d100+500" ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 25, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 25, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 25, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 25, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 33, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 33, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 33, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 33, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 50, 100 ),
				new LootPackEntry( false, MagicItems,	100.00, 1, 5, 50, 100 ),
				new LootPackEntry( false, Instruments,	  2.00, 1 )
			} );
		#endregion
I hope this helps you get started on your way to being a great scripter.


Tynsdale is offline   Reply With Quote
Old 09-05-2005, 08:15 AM   #16 (permalink)
 
Join Date: May 2005
Location: london
Age: 21
Posts: 898
Send a message via MSN to etherkye
Default

i thought he was talking about the gold that is dropped all over the floor.
etherkye is offline   Reply With Quote
Old 09-05-2005, 10:24 AM   #17 (permalink)
 
Join Date: Jan 2005
Location: At home. :)
Age: 34
Posts: 368
Send a message via ICQ to Tynsdale
Default

Prolly was. I treied adding code sections for both
Tynsdale is offline   Reply With Quote
Old 09-06-2005, 06:10 AM   #18 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

oh so like in that list that last code has those anysettings i wish to change like

public static readonly LootPack AosAverage = new LootPack( new LootPackEntry[]// 50+50 = 100

so for that loot i would type aosaverage in that champ? for 100k
shadow17_97038 is offline   Reply With Quote
Old 09-10-2005, 03:51 AM   #19 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

this i rikktor i understand u put aosaverage and stuff for loot now how do i edit this to change the amount that the champ spits out after he dies?




Code:
using System;
using System.Collections;
using Server;
using Server.Items;
using Server.Spells;
using Server.Engines.CannedEvil;

namespace Server.Mobiles
{
	public class Rikktor : BaseChampion
	{
		public override ChampionSkullType SkullType{ get{ return ChampionSkullType.Power; } }

		[Constructable]
		public Rikktor() : base( AIType.AI_Melee )
		{
			Body = 172;
			Name = "Rikktor";

			SetStr( 701, 900 );
			SetDex( 201, 350 );
			SetInt( 51, 100 );

			SetHits( 3000 );
			SetStam( 203, 650 );

			SetDamage( 28, 55 );

			SetDamageType( ResistanceType.Physical, 25 );
			SetDamageType( ResistanceType.Fire, 50 );
			SetDamageType( ResistanceType.Energy, 25 );

			SetResistance( ResistanceType.Physical, 80, 90 );
			SetResistance( ResistanceType.Fire, 80, 90 );
			SetResistance( ResistanceType.Cold, 30, 40 );
			SetResistance( ResistanceType.Poison, 80, 90 );
			SetResistance( ResistanceType.Energy, 80, 90 );

			SetSkill( SkillName.Anatomy, 100.0 );
			SetSkill( SkillName.MagicResist, 140.2, 160.0 );
			SetSkill( SkillName.Tactics, 100.0 );

			Fame = 22500;
			Karma = -22500;

			VirtualArmor = 130;
		}

		public override void GenerateLoot()
		{
			AddLoot( LootPack.UltraRich, 3 );
		}

		public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
		public override ScaleType ScaleType{ get{ return ScaleType.All; } }
		public override int Scales{ get{ return 20; } }

		public override void OnGaveMeleeAttack( Mobile defender )
		{
			base.OnGaveMeleeAttack( defender );

			if ( 0.1 >= Utility.RandomDouble() )
				Earthquake();
		}

		public void Earthquake()
		{
			Map map = this.Map;

			if ( map == null )
				return;

			ArrayList targets = new ArrayList();

			foreach ( Mobile m in this.GetMobilesInRange( 8 ) )
			{
				if ( m == this || !CanBeHarmful( m ) )
					continue;

				if ( m is BaseCreature && (((BaseCreature)m).Controled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != this.Team) )
					targets.Add( m );
				else if ( m.Player )
					targets.Add( m );
			}

			PlaySound( 0x2F3 );

			for ( int i = 0; i < targets.Count; ++i )
			{
				Mobile m = (Mobile)targets[i];

				double damage = m.Hits * 0.6;

				if ( damage < 10.0 )
					damage = 10.0;
				else if ( damage > 75.0 )
					damage = 75.0;

				DoHarmful( m );

				AOS.Damage( m, this, (int)damage, 100, 0, 0, 0, 0 );

				if ( m.Alive && m.Body.IsHuman && !m.Mounted )
					m.Animate( 20, 7, 1, true, false, 0 ); // take hit
			}
		}

		public override int GetAngerSound()
		{
			return Utility.Random( 0x2CE, 2 );
		}

		public override int GetIdleSound()
		{
			return 0x2D2;
		}

		public override int GetAttackSound()
		{
			return Utility.Random( 0x2C7, 5 );
		}

		public override int GetHurtSound()
		{
			return 0x2D1;
		}

		public override int GetDeathSound()
		{
			return 0x2CC;
		}

		public Rikktor( Serial serial ) : base( serial )
		{
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
		}

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
		}
	}
}
shadow17_97038 is offline   Reply With Quote
Old 09-10-2005, 04:16 AM   #20 (permalink)
 
Join Date: Jun 2005
Location: Nebraska
Age: 30
Posts: 181
Default

you are referring to the shower of gold he creates after he dies? the piles that appear around him on the ground? that is what this part of code does that Tynsdale posted earlier:

Code:
	private class GoodiesTimer : Timer
		{
			private Map m_Map;
			private int m_X, m_Y;

			public GoodiesTimer( Map map, int x, int y ) : base( TimeSpan.FromSeconds( Utility.RandomDouble() * 10.0 ) )
			{
				m_Map = map;
				m_X = x;
				m_Y = y;
			}

			protected override void OnTick()
			{
				int z = m_Map.GetAverageZ( m_X, m_Y );
				bool canFit = m_Map.CanFit( m_X, m_Y, z, 6, false, false );

				for ( int i = -3; !canFit && i <= 3; ++i )
				{
					canFit = m_Map.CanFit( m_X, m_Y, z + i, 6, false, false );

					if ( canFit )
						z += i;
				}

				if ( !canFit )
					return;

				Gold g = new Gold( 500, 1000 ); <---- This is the amount of gold per pile that hits the ground on death. Its saying that its going to drop anywhere from 500 to 1000 gold per pile.				
				g.MoveToWorld( new Point3D( m_X, m_Y, z ), m_Map );

				if ( 0.5 >= Utility.RandomDouble() )
				{
					switch ( Utility.Random( 3 ) )
					{
						case 0: // Fire column
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x3709, 10, 30, 5052 );
							Effects.PlaySound( g, g.Map, 0x208 );

							break;
						}
						case 1: // Explosion
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36BD, 20, 10, 5044 );
							Effects.PlaySound( g, g.Map, 0x307 );

							break;
						}
						case 2: // Ball of fire
						{
							Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36FE, 10, 10, 5052 );

							break;
						}
					}
				}
			}
		}
	}

If you change the amount of gold per pile to say.... 100 to 500 instead of 500 to 1000 then your overall gold count goes down. it is done randomly for a pile it isnt set that 300k gp pops out total... to find out the total you have to do the math, find out how many piles are made each time then take the total amount of gold YOU want to have appear and divide it by the amount of piles, then you will know how much you want per pile and that will give you the numbers to place in there where it says 500, 1000 (500 is the lowest amount it can drop in a single pile and 1000 is the most it can drop in a single pile.)
I hope that explaination helped some.
Krystyl_Rose is offline   Reply With Quote
Old 09-10-2005, 04:22 AM   #21 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Smile

oh thank you very much i will do some math and see what i get hehe ;
shadow17_97038 is offline   Reply With Quote
Old 09-10-2005, 04:26 AM   #22 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

so umm this setting is set to 500k ?
shadow17_97038 is offline   Reply With Quote
Old 09-10-2005, 04:29 AM   #23 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 23
Posts: 274
Default

hmm i how i does the math work?
shadow17_97038 is offline   Reply With Quote
Old 09-10-2005, 04:58 AM   #24 (permalink)
 
Join Date: Jun 2005
Location: Nebraska
Age: 30
Posts: 181
Default

yes you can set it to 300 and 300 but what that does is takes away any variable.... it would be 300 every time (you could also just have it say 300 and not have the second number)

I am unsure how many piles a champ creates when he falls so I cant tell you that 300 would get you the number you are looking for.... but you can always try it and if it doesnt end up being the right number edit it again until it does reach the number you want

I find trial and error works well for me cause I learn the methods best that way



*edit*
Quote:
hmm how would i times this and divide?
ok ill run it out in steps for you
step 1. find out how many piles a champ creates when it falls (2 ways to do this... search long and hard for the line in the script and you will know definitively, or go onto you shard and kill champs and count the piles and get an average to work with ...not as accurate but at least it gives you a starting point)

step 2. Decide on the total you want to have drop

step 3. take the amount you wish to have drop and divide it by the total piles (the number you got in step 1) the answer is the number you need to input where the 500, 1000 is currently
Krystyl_Rose is offline   Reply With Quote
Old 09-10-2005, 05:26 AM   #25 (permalink)
 
Join Date: Jun 2005
Location: Nebraska
Age: 30
Posts: 181
Default

ok I just killed a champ on my shard and counted the piles that popped up as I deleted them to be sure I didnt double count one.... (now as I said before this is not going to be as accurate... but it is a starting point) rikktor showered 442 piles of gold ranging between 500 and 1000 in value

so currently he gives 221k minimum and 442k max
(442 x 500 = 221k 442 x 1000 = 442k)


so lets say your ideal value is 100k
100,000 / 442 = 226.25 so you would want the 500 to be around 200 and the 1000 to be around 250 that would give you some randomness to your piles and still stay around your target total... did all of that make sense to you?
Krystyl_Rose 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