• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Changing catch rate number to % capture rate

Elite Diviner
Joined
Dec 23, 2008
Messages
425
Reaction score
15
What's the formula to change the Catch rate (For example: 45 for bulbasaur) to 5.9%?
 
Elite Diviner
Joined
Dec 23, 2008
Messages
425
Reaction score
15
for any specific source? some of these sources have catch rate included in the encounter rate.
This is for the pokemon-arena browser game, there's a table only with the catch rate (example:45) and not with the %
so I'm making a new pokedex that will show the %, but I can't find how to do so..
 
RaGEZONER || Webdevloper
Banned
Joined
Oct 6, 2011
Messages
614
Reaction score
130
Code:
$result = mysql_query("SELECT wild_id, vangbaarheid FROM pokemon_wild WHERE wild_id='".$_GET['pokemon']."'");
	$szamok = mysql_fetch_assoc($result);
	$egesz = 765.7657657657659;
	$egy = $egesz/100;
	$kerdeses_szam = $szamok['vangbaarheid'];
	$eredmeny = $kerdeses_szam/$egy;
	number_format($eredmeny, 2, '.', '');
	$a = $eredmeny;
	$b = 50;
   
	$felkerekites = ceil($a*$b)/$b;
	echo "Success catch rate: ".number_format($felkerekites, 1, '.', '')."%</br>";
 
Last edited:
Joined
Jul 29, 2012
Messages
527
Reaction score
71
This is for the pokemon-arena browser game, there's a table only with the catch rate (example:45) and not with the %
so I'm making a new pokedex that will show the %, but I can't find how to do so..

So... jsut add the % in with a string, just like Kiru's code:
Code:
echo "Success catch rate: ".number_format($felkerekites, 1, '.', '')."%</br>";
see the % before the <br>?
 
Elite Diviner
Joined
Dec 23, 2008
Messages
425
Reaction score
15
Code:
$result = mysql_query("SELECT wild_id, vangbaarheid FROM pokemon_wild WHERE wild_id='".$_GET['pokemon']."'");
	$szamok = mysql_fetch_assoc($result);
	$egesz = 765.7657657657659;
	$egy = $egesz/100;
	$kerdeses_szam = $szamok['vangbaarheid'];
	$eredmeny = $kerdeses_szam/$egy;
	number_format($eredmeny, 2, '.', '');
	$a = $eredmeny;
	$b = 50;
   
	$felkerekites = ceil($a*$b)/$b;
	echo "Success catch rate: ".number_format($felkerekites, 1, '.', '')."%</br>";
Thanks I saw that you gave me it in skype it works perfectly :D

So... jsut add the % in with a string, just like Kiru's code:
Code:
echo "Success catch rate: ".number_format($felkerekites, 1, '.', '')."%</br>";
see the % before the <br>?

This is the easy part, Thanks anyway :p
 
Back
Top