Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 12-06-2005, 04:55 PM   #1 (permalink)
Newbie
 
Join Date: Nov 2005
Age: 21
Posts: 94
Default Lootpack

AddLoot( LootPack.Average );

how do i change items in each lootpack? i mean in wich file and place?

i want to add tokens to lootpacks
----------------------------
i found that in lootpack.cs

Code:
public static readonly LootPack AosFilthyRich = new LootPack( new LootPackEntry[]
			{
				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 )
			} );
should i just add

new LootPackEntry( true, Tokens, wtf, wtf? ),

Last edited by Nataq; 12-06-2005 at 05:00 PM.
Nataq is offline   Reply With Quote
Old 12-06-2005, 05:10 PM   #2 (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

Have you tried it, to see if thats what you should do?
Phantom is offline   Reply With Quote
Old 12-06-2005, 05:36 PM   #3 (permalink)
Newbie
 
Join Date: Nov 2005
Age: 21
Posts: 94
Default

new LootPackEntry( true, Gold, 100.00, "2d100+200" )

what that means?
Nataq is offline   Reply With Quote
Old 12-06-2005, 06:26 PM   #4 (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

Quote:
Originally Posted by Nataq
new LootPackEntry( true, Gold, 100.00, "2d100+200" )

what that means?
Look in the documentation and then test it in game to see the effect it has.
Phantom is offline   Reply With Quote
Old 12-06-2005, 08:31 PM   #5 (permalink)
Newbie
 
Join Date: Nov 2005
Age: 21
Posts: 94
Default

geez, ppl need help needed.... just try to help me
Nataq is offline   Reply With Quote
Old 12-06-2005, 08:43 PM   #6 (permalink)
 
Join Date: Oct 2004
Age: 37
Posts: 46
Default Stuff, just stuff

Nataq,

without a little better explanation of exactly what you are trying to do, its hard to provide any direction.

As to support, Phantom has already provided some.

Your suggested code probably wont throw any errors (assuming you have defined a "Token" somewhere as an item. So, things should compile fine.

Then, load up a few monsters with that lootpack, and kill them. Look at their loot. If you want more or fewer tokens, try playing with the numbers. If you want tokens to show up 80.0 percent of the time, try playing with the numbers.

15 minutes of testing, and you will understand far more about how that little section of code works, than if someone simply tells you "do X"

- Whitestone (like a rock)

P.S. You might want to continue this in script support if and when you run up against a brick wall. In which case, please post any compiler error messages you get, and your complete script in code brackets.

You may also want to look more closely at the documentation. When I look at my Documentation, under Server - LootPack - LootPackEntry I see some things that look like this:

(ctor) LootPackEntry( bool atSpawnTime, LootPackItem[] items, double chance, int quantity )

and this:

(ctor) LootPackEntry( bool atSpawnTime, LootPackItem[] items, double chance, string quantity )


that seem to match your snippet of code. Consider that a hint.
Whitestone is offline   Reply With Quote
Old 12-06-2005, 08:59 PM   #7 (permalink)
Newbie
 
Join Date: Nov 2005
Age: 21
Posts: 94
Default

Code:
		#region AOS definitions
		public static readonly LootPack AosPoor = new LootPack( new LootPackEntry[]
			{
				new LootPackEntry(  true, Gold,			100.00, "1d10+10" ),
				new LootPackEntry(  true, Tokens,		100.00, "1d10+5" ),
				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[]
			{
				new LootPackEntry(  true, Gold,			100.00, "3d10+20" ),
				new LootPackEntry(  true, Tokens,		100.00, "1d10+10" ),
				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[]
			{
				new LootPackEntry(  true, Gold,			100.00, "5d10+50" ),
				new LootPackEntry(  true, Tokens,		100.00, "1d10+25" ),
				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[]
			{
				new LootPackEntry(  true, Gold,			100.00, "10d10+150" ),
				new LootPackEntry(  true, Tokens,		100.00, "1d10+75" ),
				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[]
			{
				new LootPackEntry(  true, Gold,			100.00, "2d100+200" ),
				new LootPackEntry(  true, Tokens,		100.00, "1d10+100" ),
				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[]
			{
				new LootPackEntry(  true, Gold,			100.00, "5d100+500" ),
				new LootPackEntry(  true, Tokens,		100.00, "1d10+250" ),
				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[]
			{
				new LootPackEntry(  true, Gold,			100.00, "5d100+600" ),
				new LootPackEntry(  true, Tokens,		100.00, "1d10+300" ),
				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 did something like this with tokens and i got error message
'Server.Items.Tokens' denotes a 'clas' where a 'varaiable' was expected
Nataq is offline   Reply With Quote
Old 12-06-2005, 09:32 PM   #8 (permalink)
 
Join Date: Oct 2004
Age: 37
Posts: 46
Default This should be in "Script Support"

You rerror message just told you that there is something wrong with the way your Tokens are defined.

So why don't you look at your Tokens code next.

Since you are trying to have it apear in LootPack the same way Gold is generated, you might want to look at Scripts/Items/Misc/Gold.cs

Just an idea.

- Whitestone
Whitestone is offline   Reply With Quote
Old 12-07-2005, 02:20 AM   #9 (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

LootPackEntrys don't accept clases, they accept other Loot pakages.

This is clearly the case considering MagicItems is not a classname.
Phantom is offline   Reply With Quote
Old 12-07-2005, 03:03 AM   #10 (permalink)
 
Join Date: Oct 2004
Age: 37
Posts: 46
Default and I learn something new today.

Thank you Phantom. Didn't even think to check that.

- Whitestone
Whitestone 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