Options

# Mersenne Prime Item Gain

• #### Index

• Mersenne Prime Item Gain
• Mersenne Prime Item Gain
Author: Soulpour777
Script Version 1.0
February 18, 2015

Description:

For those who are wondering what Mersenne Prime is, here is a brief explanation:
for p an odd prime, the Mersenne number 2p − 1 is prime if and only if 2p − 1 divides S(p − 1) where S(n + 1) = (S(n))2 − 2, and S(1) = 4.
This script allows you to execute and check the Mersenne Primes and adds item, weapon and armor variation item gain. This script calculate all Mersenne primes up to the implementation's maximum precision, or the 47th Mersenne prime. (Which ever comes first) and adds that item on your inventory.

Instructions:

Script Calls:

Code:
prime_change_number(prime_number_value)
where prime_number_value is the value you want to change the UPB_Prime dividing number. For example, the default UPB_Prime = (Long_Bits_Width - 1).to_i / 2 - 0 has no changes of how many item is given. If you do: UPB_Prime = (Long_Bits_Width - 1).to_i / 2 - 5, this will give only 1 item. Since the default gives you 6 items. 6 - 5, simple, gives you 1.

Script Example:
Code:
prime_change_number(4)
gives you 2 items in either item, weapon or armor.

Code:
mersenne_gain_item
^ This calls the script's main function, creates the Mersenne Prime and adds item according to this algorithm.

Author's Note:

Someone of you would surely ask, why on earth are you, Soulpour777 make this kind of script? The answer is because I am tired using the old style of randomizing items to gain. This script allows me to make more changes than the usual randomizing of things. I also want to apply some kind of math into my games, so here's one I could think of. You can use this script if you want...but if no one does, I would.