|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
Join Date: Jun 2003
Location: ECU, Greenville, NC
Age: 25
Posts: 145
|
if i changed the 1500 to 1 would that make the artifacts super easy to get or super hard to get? i always forget.
thanks Code:
if ( boss is DemonKnight ) chance = 1500 + (luck / 5); |
|
|
|
|
|
#5 (permalink) |
|
Account Terminated
|
well they are just telling the truth! there is this thing on this forum called trail and error! you try it see what happens and if you get errors post them with the script here and then they will help you better!
Phantom, Daat, and others on this forum are like robots in chat rooms! no offence guys No one will script anything for you or tell you how if you dont at least try yourself first! and no they are not trying to be a ass to you but more on the line of helping you learn to script! We cant all be layz and ask other peole to do things for us! And only why to see hat does what is the Trail And Error i was talking about! |
|
|
|
|
|
#6 (permalink) | |
|
Forum Novice
Join Date: Jun 2004
Age: 48
Posts: 781
|
Quote:
I experimented with this quite alot on my testshard. The current default levels are pretty low. Here's what my research found out: First of all, the luck value is an index into this table: private static int[] m_LuckTable = new int[] So depending on your luck, which is setup at a high of 1200 the values are scaled up. As an example: With 1400 luck: The luck value is 5136 (1200 or higher will result with the same number) With 1000 luck: 4641 With 200 luck: 1898 With 0 luck: 0 BTW, the luck value that is used for the actual chance roll comes from whoever has the most luck in the group and has looting rights on the Champ, regardless of party totals or anything else. So looking at the initial default of the code, there are two parts to look at: Code:
if ( boss is DemonKnight ) chance = 1500 + (luck / 5); else chance = 750 + (luck / 10); return chance; } Code:
public static bool CheckArtifactChance( Mobile boss )
{
return GetArtifactChance( boss ) > Utility.Random( 100000 );
}
1500 + (5136 / 5) = 2527 or roughly a 2.5% chance to get an arti from a Dark Father. The else part of that equation above is for the champs in the side-rooms, as you can see the odds are greatly reduced for those with a maximum possiblity of: 750 + (5136 / 10) or roughly 1.2%. Very low! So changing that value from 1500 to 1 would be doing the complete OPPOSITE of what the person is wanting to accomplish, reducing the odds to about 1% and that's when someone with looting rights has 1200 luck! I ended up modifing this formula to skew upwards to about 10% max on our shard, but that is only if several other random numbers come up max and luck is still a factor. Here's what we're using: Code:
int luck = LootPack.GetLuckChanceForKiller( boss ) ;
int chance ;
int extrachance = 750 + Utility.Random(2750) + Utility.Random(luck/2) ;
if ( boss is DemonKnight )
chance = 2000 + (luck / 3) + extrachance ;
else
chance = 1000 + (luck / 10) + (extrachance/10) ;
__________________
If you PM me and ask me to write scripts for you I will add you to my ignore list. Please don't add me to your friends list, I have enough friends. Thx |
|
|
|
|
|
|
#7 (permalink) |
|
Forum Expert
|
Not to mention its basic math, its pretty self explanitory.
say luck is 1000 1500 + 1000 = 2500 / 5 = 500 Now try luck as 1 1500 + 1 = 1501 / 5 = 300.2 which is more often? once every 300 or once every 500? Sometimes sitting back and looking at your own question as if someone was asking you is the best way to get it answered )GL with your project though ![]() Father Time |
|
|
|
|
|
#8 (permalink) | |
|
Forum Master
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,260
|
Quote:
*dies* |
|
|
|
|
|
|
#13 (permalink) |
|
Forum Novice
Join Date: Jun 2003
Location: ECU, Greenville, NC
Age: 25
Posts: 145
|
i always try to fix my problems / find my solutions myself before coming to the forums, and a lot of times i have questions that would be easy for a lot of the people on here...its just a shame that because of some lazy people, the ones who honestly try have to have a lawyer draw up a declaration, the city mayor approve it and then have to have a state alchemist notorize it before anyone will believe you even tried.
|
|
|
|
|
|
#15 (permalink) |
|
Lurker
Join Date: Dec 2005
Posts: 9
|
can anyone tell me the exact part I must edit to, to make darkfather drop artys with a 20% Chance.... and Mini-Boss's 10% chance to drop arty? Thanks!
![]() public static int GetArtifactChance( Mobile boss ) { if ( !Core.AOS ) return 0; int luck = LootPack.GetLuckChanceForKiller( boss ); int chance; if ( boss is DemonKnight ) chance = 10000 + (luck / 5); else chance = 5000 + (luck / 5); return chance; } |
|
|
|
|
|
#16 (permalink) | |
|
Forum Expert
Join Date: Feb 2004
Age: 27
Posts: 2,047
|
Quote:
![]() |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|