UOGamers Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • To obtain new Razor updates, please reinstall Razor from our new website.

Question * noobs *

spok

Sorceror
Hi Nuclear Potato,

Here's a example of the code inside RunUO:

public static int GetLuckChance( Mobile killer, Mobile victim )
{
if ( !Core.AOS )
return 0;

int luck = killer.Luck;

PlayerMobile pmKiller = killer as PlayerMobile;
if( pmKiller != null && pmKiller.SentHonorContext != null && pmKiller.SentHonorContext.Target == victim )
luck += pmKiller.SentHonorContext.PerfectionLuckBonus;

if ( luck < 0 )
return 0;

if ( !Core.SE && luck > 1200 )
luck = 1200;

return (int)(Math.Pow( luck, 1 / 1.8 ) * 100);
}

As you can see in "red" color, there's a += to add PerfectionLuckBonus with Character Luck!!

Best Regard,
Spok
 
Top