S.Cosmin Posted September 16, 2011 Share Posted September 16, 2011 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 Quote Link to comment Share on other sites More sharing options...
S.Cosmin Posted September 18, 2011 Author Share Posted September 18, 2011 No ideea or no understand? Hmm.... Quote Link to comment Share on other sites More sharing options...
gurpreet Posted September 18, 2011 Share Posted September 18, 2011 Just create a few queries to take the stats from the other user, and add it to the first users stats Quote Link to comment Share on other sites More sharing options...
S.Cosmin Posted September 18, 2011 Author Share Posted September 18, 2011 Can somebody to gave me an example please? I have tried a few times (9999) but doesnt work... Thank you Quote Link to comment Share on other sites More sharing options...
Lithium Posted September 18, 2011 Share Posted September 18, 2011 attack_power = stat+stat+stat+whatever defense_power = stat+stat+stat+whatever outcome = attack_power-defense_power Maybe with some random factor in the middle and you're done Quote Link to comment Share on other sites More sharing options...
Smokey Posted October 3, 2011 Share Posted October 3, 2011 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.