Jump to content
MakeWebGames

Attack Modification help


S.Cosmin

Recommended Posts

Hello everyone,

I want to make a change, but im not experimentedet, and i cant do this.

So, i want when onyones attack another user to take from him Level, IQ, Strength, Labor, Agility and Guard, obout 10% or 15% from his stats...

Can anyone help me to done this modification please?

Sorry for my bad english

Link to comment
Share on other sites

  • 3 weeks later...

you could do something like:

$takestr=($r['strength']/10);
$takeagil=($r['agility']/10);
$takegua=($r['guard']/10);
$db->query("UPDATE userstats SET strength=strength-$takestr, agility=agility-$takeagil, guard=guard-$takegua WHERE userid={$r['userid']}");

 

Its not tested i just wrote it up in the past couple minutes but it should take 10% from from each stat of the user that got beaten, provided it placed in the right spot.

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...