peterisgb Posted November 23, 2011 Share Posted November 23, 2011 on attack php, you can change the attack units, Default it /2 which is 50% i've changed mine into /5 which is 20 Energy , is there a way that it can only just use one attack though something like this would work but i'm not sure now, print "<table width=100%><tr><td colspan=2 align=center>"; if($_GET['wepid']) { if($_SESSION['attacking']==0 && $ir['attacking'] == 0) { if ($youdata['energy'] >= $youdata['maxenergy']/10000) { $db->query("UPDATE users SET energy=energy-1 WHERE userid=$userid"); $_SESSION['attacklog']=""; $_SESSION['attackdmg']=0; } else { print "You can only attack someone when you have 1 energy"; $h->endpage(); exit; this wont work i beleive, but is it possible and how would i go about doing this? Quote Link to comment Share on other sites More sharing options...
peterisgb Posted November 23, 2011 Author Share Posted November 23, 2011 and what would the database access for the Items be, i'm trying to put weapon,secondary weapons and armour into a seprate page but i dont know the database access. thanks Quote Link to comment Share on other sites More sharing options...
Uridium Posted November 23, 2011 Share Posted November 23, 2011 weapon/sec weapon/ armor are called from the user dbase If you wanted to take this away from the users table it then starts getting complex You would need 2 new tables one called weapons and one called userweapons You would then need to rewrite the attack.php so that it can grab info on userweapons if they are equipped or not. However this isnt a bad thing cos with the new setup you could add attributes to your new weapons that you couldnt really achieve with the mcc version. Files that would need changing are. staff_items.php you would need to remove the weapons section and create a new file called staff_weapons.php Inventory.php would need to be rewritten. as would equip_armor.php and equip_weapon.php so as you can see it does start getting very complicated.. BUT its do-able and could open a new way and an improved way of the attack system.. Quote Link to comment Share on other sites More sharing options...
peterisgb Posted November 23, 2011 Author Share Posted November 23, 2011 weapon/sec weapon/ armor are called from the user dbase If you wanted to take this away from the users table it then starts getting complex You would need 2 new tables one called weapons and one called userweapons You would then need to rewrite the attack.php so that it can grab info on userweapons if they are equipped or not. However this isnt a bad thing cos with the new setup you could add attributes to your new weapons that you couldnt really achieve with the mcc version. Files that would need changing are. staff_items.php you would need to remove the weapons section and create a new file called staff_weapons.php Inventory.php would need to be rewritten. as would equip_armor.php and equip_weapon.php so as you can see it does start getting very complicated.. BUT its do-able and could open a new way and an improved way of the attack system.. oh, well that was the idea, cos i was wanting something like, go mining and get minerals like iron, copper, tin etc to be able upgrade the weapons, but i cant do this, my knowledge of php aint that good yetm i'm still learning as of yet Quote Link to comment Share on other sites More sharing options...
gurpreet Posted November 24, 2011 Share Posted November 24, 2011 Well if you can't do that, then offer someone some cash to complete this because, as illusions said, this would get quite complicated Quote Link to comment Share on other sites More sharing options...
peterisgb Posted November 25, 2011 Author Share Posted November 25, 2011 Well if you can't do that, then offer someone some cash to complete this because, as illusions said, this would get quite complicated Well if someone is offering to make it and PM me a price, if its a good price i dont mind paying, :) Quote Link to comment Share on other sites More sharing options...
peterisgb Posted December 2, 2011 Author Share Posted December 2, 2011 Anyone have an offer to make this, i dont mind paying, name the price 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.