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 04-11-2004, 06:59 PM   #1 (permalink)
Forum Novice
 
Join Date: Dec 2003
Location: The Restaruant at the End of the Universe
Age: 34
Posts: 289
Default Can someone explain this...

I was looking trhough the lootpack.cs at the different types of loot you can get. I was wondering if someone could explain this line of code to me:

Code:
new LootPackEntry(  true, Gold,			100.00, "5d10+25" ),
That is line 267 of LootPack.cs. Mainly the 100.00 and "5d10+25".
Thanks to anyone who can answer this for me.
Almassey is offline   Reply With Quote
Old 04-11-2004, 07:06 PM   #2 (permalink)
Forum Expert
 
Join Date: Jan 2004
Posts: 1,377
Default

The docs are your friend.


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

Code:
new LootPackEntry(  true, Gold,			100.00, "5d10+25" );
Meaning, 5d10+25 Gold will be added at spawn time with a chance of 100%.

5d10+25 should be something like (at least was in D&D ^^): "Throw a dice with 10 side 5 times, add all points and add 25".

The last part can also be an integer.
__________________
Dracarys
retired - consider me dead to these boards
Dracarys is offline   Reply With Quote
Old 04-11-2004, 07:11 PM   #3 (permalink)
Greatwizard
 
sidsid's Avatar
 
Join Date: Mar 2004
Location: orange county, CA
Age: 27
Posts: 1,111
Post

Quote:
Originally Posted by Almassey
I was looking trhough the lootpack.cs at the different types of loot you can get. I was wondering if someone could explain this line of code to me:

Code:
new LootPackEntry(  true, Gold,			100.00, "5d10+25" ),
That is line 267 of LootPack.cs. Mainly the 100.00 and "5d10+25".
Thanks to anyone who can answer this for me.
The true indicates this item spawns in the backpack at the time it is spawned (false will spawn after it is killed and use the player's data to determine properties, but in the case of Gold that doesnt matter (at least to OSI style), Gold is obvious, the 100.00 is the % chance to receive this loot, the 5d10+25 indicates the quantity which will be based upon 5 rolls of a 10 sided die, then add 25 to that total. So 5d10+25 would be a range of 30 to 75.
sidsid is offline   Reply With Quote
Old 04-11-2004, 07:12 PM   #4 (permalink)
Greatwizard
 
sidsid's Avatar
 
Join Date: Mar 2004
Location: orange county, CA
Age: 27
Posts: 1,111
Default

damnation dracarys, you must type fast.
sidsid is offline   Reply With Quote
Old 04-11-2004, 07:17 PM   #5 (permalink)
Forum Expert
 
Join Date: Jan 2004
Posts: 1,377
Default

Quote:
Originally Posted by sidsid
damnation dracarys, you must type fast.
^^
__________________
Dracarys
retired - consider me dead to these boards
Dracarys is offline   Reply With Quote
Old 04-11-2004, 07:18 PM   #6 (permalink)
Forum Novice
 
Join Date: Dec 2003
Location: The Restaruant at the End of the Universe
Age: 34
Posts: 289
Default

Thanks guys...I thought the 100.00 was 100% but that other just blew me away.
Thanks for explaining it. I just wanted to add tokens to my loot at 1/10th the gold. Think I can figure it out now. Thanks again.
Almassey 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