Jump to content
MakeWebGames

Strange attacking problem


ignite

Recommended Posts

Re: Strange attacking problem

Cheers works now thanks very much +1.

If you run from the fight you don't lose any exp low.

Would you happen to know whyt the max damage delt is always one no matter what the users stats are

Oh yer and it doesn't say the weapon name in the step so its "using your you hit..."

Link to comment
Share on other sites

Re: Strange attacking problem

(($r1['damage']*$youdata['strength']/$odata['guard'])*(rand(8000000,1200000)/10000));

$hitratio=min(50*$ir['agility']/$odata['agility'],95);

if($userid==1) { $hitratio=100; }

if(rand(1,100) <= $hitratio)

{

$q3=mysql_query("SELECT a.Defence FROM inventory iv LEFT JOIN items i ON iv.inv_itemid = i.itmid LEFT JOIN armour a ON i.itmid=a.item_ID WHERE i.itmtype=7 AND iv.inv_userid={$_GET['ID']} ORDER BY rand()", $c);

if(mysql_num_rows($q3))

{

$mydamage-=mysql_result($q3,0,0);

}

if($mydamage < 1) { $mydamage=1; }

 

Well this is what iv'e got ill edit and see what happens.

I think that the damge delt is always less than one so the formula just rounds it up to 1

Link to comment
Share on other sites

Re: Strange attacking problem

I'd say first compare your equipment and number crunching with the armor your enemy is using. Also another thing to consider is that you can set min. damage above that. Just make sure to change

if($mydamage < 1) { $mydamage=1; }

into something like

if($mydamage < 50) { $mydamage=50; }

. Also where your looking at for damage configuration is

(($r1['damage']*$youdata['strength']/$odata['guard'])*(rand(8000000,1200000)/10000));

which you CAN change. But if you want to make guard worth the same as strength for gym training change that into

(($r1['damage']*$youdata['strength']-$odata['guard'])*(rand(8000000,1200000)/10000));

This will make similar levels be more closely related instead of divided by.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...