// Process their chance of failure. $failure = 50; if ($action['maxrep'] >= $thefted['reputation']) { $addfailure = (($thefted['reputation'] / $action['maxrep']) * 50); $failure = ($failure + $addfailure); } else { $fail = 1; } $random = rand(0, 100); if ($random <= $failure) { $fail = 1; } if ($fail == 1) { $failtext = "Failed"; } else { $failtext = "Success!"; } if ($fail == 1) {
Show Your Support