Yeah, I can see what it is. It's repeated a lot of times for different attack circumstances (bot vs player, bot perspective, bot is using magic, is seperate from bot vs player, bot perspective, bot is using a phyiscal attack (there's 16 different attack codes) but it's a random Integer between 1 and your attack - 1/3 of your opponents defence for normal attacks.
Edit: To find the start of the relevant section do a search for: // Calculate Attack Data , the actually attack defence stuff looks like this: (it probably varies for different attack types though haven't looked thoroughly (if it doesn't it SHOULD)).
$hp_dmg=rand(1,$P2['bot_str']);
// Opposition Defence
$def=$P1['def']/3;
$hp_def=rand(0,$def);
$hp_dmg=(int)$hp_dmg;
$hp_def=(int)$hp_def;
$hp_dmg=$hp_dmg-$hp_def;
if($hp_dmg<0){$hp_dmg=0;}
$mp_dmg=$hp_dmg/2;
$mp_dmg=(int)$mp_dmg;
if($mp_dmg<0){$mp_dmg=0;}