Jump to content

Mcfarlin

Members
  • Content Count

    205
  • Joined

  • Last visited

  • Days Won

    4

Mcfarlin last won the day on January 23 2016

Mcfarlin had the most liked content!

Community Reputation

8 Neutral

About Mcfarlin

  • Rank
    Beginner

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. You cannot use that username, it is inappropriate.   LMAO tried to use the same name i have here. what is wrong with my name?
  2. I dont think its worth much. as its really my first actual mod, i was just sharing. I will look at uploading as you suggested. Has anyone used this? If so how is it working for you?
  3. And you should be done. If i missed anything or you are having issues with the mod i will be online a lot for the next few days. Inbox me here or post issues and i will help asap. And if anyone would care to edit the attack.php to include the bonuses to both players instead of only the attacker please feel free to do so and post here for everyone.   Thx.
  4. Now open up attack.php and find $db->free_result($qo); $mydamage = (int) (($r1['weapon'] * $youdata['strength'] / ($odata['guard'] / 1.5)) * (rand(8000, 12000) / 10000)); $hitratio = max(10, min(60 * $ir['agility'] / $odata['agility'], 95));   and replace it with $db->free_result($qo); $ustats = $db->query("SELECT `strength`, `agility`, `guard` FROM `userstats` WHERE `userid` = {$ir['userid']}"); $ugbonus = $db->query("SELECT `gangSTR`, `gangAGI`, `gangGRD` FROM `gangs` WHERE `gangID` = {$ir['gang']}"); $ugnewstat = $db->fetch_row($ugbonus); $ustat = $db->fetch_row($ustats); $unewstr = ($ustat['strength'] * $ugnewstat['gangSTR']); $unewagi = ($ustat['agility'] * $ugnewstat['gangAGI']); $unewgrd = ($ustat['guard'] * $ugnewstat['gangGRD']); $mydamage = (int) (($r1['weapon'] * ($youdata['strength'] * $ugnewstat['gangSTR']) / ($odata['guard'] / 1.5)) * (rand(8000, 12000) / 10000)); $hitratio = max(10, min(60 * ($ir['agility'] * $ugnewstat['gangAGI'])/ $odata['agility'] , 95));  
  5. Now open up Index.php and find echo "<hr /><h3>Stats Info:</h3>";   After it add $str = $db->query("SELECT `STR` FROM `gangs` WHERE `gangID` ={$ir['gang']}"); $agi = $db->query("SELECT `AGI` FROM `gangs` WHERE `gangID` ={$ir['gang']}"); $grd = $db->query("SELECT `GRD` FROM `gangs` WHERE `gangID` ={$ir['gang']}"); $gbonus = $db->query("SELECT `gangSTR`, `gangAGI`, `gangGRD` FROM `gangs` WHERE `gangID` = {$ir['gang']}"); $gnewstat = $db->fetch_row($gbonus); $stat = $db->fetch_row($stats); $newstr = ($stat['strength'] * $gnewstat['gangSTR']); $newagi = ($stat['agility'] * $gnewstat['gangAGI']); $newgrd = ($stat['guard'] * $gnewstat['gangGRD']);   then find echo " <table> <tr> <td><b>Strength:</b> {$ir['strength']} [Ranked: {$ir['strank']}]</td> <td><b>Agility:</b> {$ir['agility']} [Ranked: {$ir['agirank']}]</td> </tr> <tr><td><b>Guard:</b> {$ir['guard']} [Ranked: {$ir['guarank']}]</td><td><b>Labour:</b> {$ir['labour']} [Ranked: {$ir['labrank']}]</td></tr> <tr><td><b>IQ: </b> {$ir['IQ']} [Ranked: {$ir['IQrank']}]</td><td><b>Total stats:</b> {$ts} [Ranked: $tsrank]</td></tr></table>";   and replace it with if($ir['gang']) { echo " <h2>Stronghold Bonuses</h2> <table cellpadding='5' cellspacing='1' border='1'> <tr> <td>Strength</td> <td>Agility</td> <td>Gaurd</td> </tr> <tr> <td>{$groupstr['STR']}%</td> <td>{$groupagi['AGI']}%</td> <td>{$groupgrd['GRD']}%</td> </tr> </table> <small>(NOTE : Bonus to stats will not change your ranking in that stat.)</small><br /> <small>(Bonuses to stats are only for attacking players, they do not come into play if you are attacked.)</small><hr>"; echo " <table> <tr> <td><b>Strength:</b> {$newstr} [Ranked: {$ir['strank']}]</td> <td><b>Agility:</b> {$newagi} [Ranked: {$ir['agirank']}]</td> </tr> <tr><td><b>Guard:</b> {$newgrd} [Ranked: {$ir['guarank']}]</td><td><b>Labour:</b> {$ir['labour']} [Ranked: {$ir['labrank']}]</td></tr> <tr><td><b>IQ: </b> {$ir['IQ']} [Ranked: {$ir['IQrank']}]</td><td><b>Total stats:</b> {$ts} [Ranked: $tsrank]</td></tr></table>"; } else if ($ir['gang'] == 0) { echo " <table> <tr> <td><b>Strength:</b> {$ir['strength']} [Ranked: {$ir['strank']}]</td> <td><b>Agility:</b> {$ir['agility']} [Ranked: {$ir['agirank']}]</td> </tr> <tr><td><b>Guard:</b> {$ir['guard']} [Ranked: {$ir['guarank']}]</td><td><b>Labour:</b> {$ir['labour']} [Ranked: {$ir['labrank']}]</td></tr> <tr><td><b>IQ: </b> {$ir['IQ']} [Ranked: {$ir['IQrank']}]</td><td><b>Total stats:</b> {$ts} [Ranked: $tsrank]</td></tr></table>"; }   Index edits are completed.
  6. then add upgradestrong.php <?php require_once('globals.php'); echo " <table border='1' cellspacing='1' cellpadding='5'> <tr> <td colspan=3>Upgrades</td> </tr> <tr> <td>Stat</td> <td>Bonus Amount</td> <td>Buy Upgrade</td> </tr> <tr> <td>Strength</td> <td>5%</td> <td><a href='upgradebuy.php?spend=strength'>Buy<a/></td> </tr> <tr> <td>Agility</td> <td>5%</td> <td><a href='upgradebuy.php?spend=agility'>Buy<a/></td> </tr> <tr> <td>Guard</td> <td>5%</td> <td><a href='upgradebuy.php?spend=guard'>Buy<a/></td> </tr> </table>"; ?>   And buystronghold.php <?php require_once('globals.php'); $ganginfo = $db->query(" SELECT `gangID`, `gangNAME`, `gangDESC`, `gangPREF`, `gangSUFF`, `gangMONEY`, `gangCRYSTALS`, `gangRESPECT`, `gangPRESIDENT`, `gangVICEPRES`, `gangCAPACITY`, `gangCRIME`, `gangCHOURS`, `gangAMENT`, `gangSTRONGHOLD`, `gangSTR`, `gangAGI`, `gangGRD` , `STR`, `AGI`, `GRD` FROM `gangs` WHERE `gangID` = {$ir['gang']}"); $gangdata = $db->fetch_row($ganginfo); if ($_GET['spend'] == 'house') { if ($ir['gang'] == 0) { echo "You are not in a group to buy a stronghold for!"; exit($h->endpage()); } else if ($gangdata['gangPRESIDENT'] != $userid) { echo "You are not the Leader of your group, only your group leader is able to buy a stronghold."; exit($h->endpage()); } else if ($gangdata['gangCRYSTALS'] < 20000) { echo "Your group does not have the 20,000 Gold Coins needed to buy this stronghold."; exit($h->endpage()); } else if ($gangdata['gangSTRONGHOLD'] == 1) { echo "Your group already owns this stronghold, *** are you just wanting to give up your coins for nothing?"; exit($h->endpage()); } else if ($gangdata['gangSTRONGHOLD'] > 1) { echo "You dont really want to buy a lower stronghold now do you? This would be a step in the wrong direction for your group."; exit($h->endpage()); } else { $db->query( "UPDATE `gangs` SET `gangSTRONGHOLD` = 1, `gangGRD` = 1.05, `GRD` = 5, `gangCRYSTALS` = `gangCRYSTALS` - 20000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 20,000 Gold Coins to buy your group an abandoned House. <br /> This House comes with 5% Guard Boost to all Group members. "; } } if ($_GET['spend'] == 'highrise') { if ($ir['gang'] == 0) { echo "You are not in a group to buy a stronghold for!"; exit($h->endpage()); } else if ($gangdata['gangPRESIDENT'] != $userid) { echo "You are not the Leader of your group, only your group leader is able to buy a stronghold."; exit($h->endpage()); } else if ($gangdata['gangCRYSTALS'] < 20000) { echo "Your group does not have the 20,000 Gold Coins needed to buy this stronghold."; exit($h->endpage()); } else if ($gangdata['gangSTRONGHOLD'] == 2) { echo "Your group already owns this stronghold, *** are you just wanting to give up your coins for nothing?"; exit($h->endpage()); } else if ($gangdata['gangSTRONGHOLD'] > 2) { echo "You dont really want to buy a lower stronghold now do you? This would be a step in the wrong direction for your group."; exit($h->endpage()); } else { $db->query( "UPDATE `gangs` SET `gangSTRONGHOLD` = 2, `gangSTR` = 1.05, `STR` = 5, `gangCRYSTALS` = `gangCRYSTALS` - 20000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 20,000 Gold Coins to buy your group a highrise building. <br /> This House comes with 5% Strenght Boost to all Group members. "; } } if ($_GET['spend'] == 'prison') { if ($ir['gang'] == 0) { echo "You are not in a group to buy a stronghold for!"; exit($h->endpage()); } else if ($gangdata['gangPRESIDENT'] != $userid) { echo "You are not the Leader of your group, only your group leader is able to buy a stronghold."; exit($h->endpage()); } else if ($gangdata['gangCRYSTALS'] < 30000) { echo "Your group does not have the 20,000 Gold Coins needed to buy this stronghold."; exit($h->endpage()); } else if ($gangdata['gangSTRONGHOLD'] == 3) { echo "Your group already owns this stronghold, *** are you just wanting to give up your coins for nothing?"; exit($h->endpage()); } else if ($gangdata['gangSTRONGHOLD'] > 3) { echo "You dont really want to buy a lower stronghold now do you? This would be a step in the wrong direction for your group."; exit($h->endpage()); } else { $db->query( "UPDATE `gangs` SET `gangSTRONGHOLD` = 3, `gangSTR` = 1.05, `gangAGI` = 1.05, `STR` = 5, `AGI` = 5, `gangCRYSTALS` = `gangCRYSTALS` - 30000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 30,000 Gold Coins to buy your group a highrise building. <br /> This House comes with 5% Strenght and 5% Agility Boost to all Group members. "; } } if ($_GET['spend'] == 'base') { if ($ir['gang'] == 0) { echo "You are not in a group to buy a stronghold for!"; exit($h->endpage()); } else if ($gangdata['gangPRESIDENT'] != $userid) { echo "You are not the Leader of your group, only your group leader is able to buy a stronghold."; exit($h->endpage()); } else if ($gangdata['gangCRYSTALS'] < 30000) { echo "Your group does not have the 20,000 Gold Coins needed to buy this stronghold."; exit($h->endpage()); } else if ($gangdata['gangSTRONGHOLD'] == 4) { echo "Your group already owns this stronghold, *** are you just wanting to give up your coins for nothing?"; exit($h->endpage()); } else if ($gangdata['gangSTRONGHOLD'] > 4) { echo "You dont really want to buy a lower stronghold now do you? This would be a step in the wrong direction for your group."; exit($h->endpage()); } else { $db->query( "UPDATE `gangs` SET `gangSTRONGHOLD` = 4, `gangSTR` = 1.05, `gangGRD` = 1.05, `STR`= 5, `GRD`= 5, `gangCRYSTALS` = `gangCRYSTALS` - 30000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 30,000 Gold Coins to buy your group a highrise building. <br /> This House comes with 5% Strenght and 5% Guard Boost to all Group members. "; } } if ($_GET['spend'] == 'bunker') { if ($ir['gang'] == 0) { echo "You are not in a group to buy a stronghold for!"; exit($h->endpage()); } else if ($gangdata['gangPRESIDENT'] != $userid) { echo "You are not the Leader of your group, only your group leader is able to buy a stronghold."; exit($h->endpage()); } else if ($gangdata['gangCRYSTALS'] < 50000) { echo "Your group does not have the 20,000 Gold Coins needed to buy this stronghold."; exit($h->endpage()); } else if ($gangdata['gangSTRONGHOLD'] == 5) { echo "Your group already owns this stronghold, *** are you just wanting to give up your coins for nothing?"; exit($h->endpage()); } else { $db->query( "UPDATE `gangs` SET `gangSTRONGHOLD` = 5, `gangSTR` = 1.05, `gangGRD` = 1.05, `gangAGI` = 1.05, `STR`= 5, `GRD` = 5, `AGI` = 5, `gangCRYSTALS` = `gangCRYSTALS` - 50000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 30,000 Gold Coins to buy your group a highrise building. <br /> This House comes with 5% Strenght, 5% Guard and 5% Agility Boost to all Group members. "; exit($h->endpage()); } } $h->endpage();
  7. upgradebuy.php <?php require_once('globals.php'); $ganginfo = $db->query("SELECT `gangID`, `gangNAME`, `gangDESC`, `gangPREF`, `gangSUFF`, `gangMONEY`, `gangCRYSTALS`, `gangRESPECT`, `gangPRESIDENT`, `gangVICEPRES`, `gangCAPACITY`, `gangCRIME`, `gangCHOURS`, `gangAMENT`, `gangSTRONGHOLD`, `gangSTR`, `gangAGI`, `gangGRD`, `STR`, `AGI`, `GRD` FROM `gangs` WHERE `gangID` = {$ir['gang']}"); $gangdata = $db->fetch_row($ganginfo); if ($_GET['spend'] == 'strength') { if ($ir['gang'] == 0) { echo "You are not in a group to buy a stronghold upgrade for for!"; exit($h->endpage()); } if ($gangdata['gangPRESIDENT'] != $userid) { echo "You are not the Leader of your group, only your group leader is able to buy a stronghold upgrade."; exit($h->endpage()); } if ($gangdata['gangCRYSTALS'] < 10000) { echo "Your group does not have the 10,000 Gold Coins needed to buy this stronghold upgrade."; exit($h->endpage()); } if ($gangdata['STR'] == 25) { echo "Your group already has the max in this stat upgrade. 25% limit."; exit($h->endpage()); } else { if ($gangdata['gangSTR'] == 1.00) { $db->query( "UPDATE `gangs` SET `gangSTR` = 1.05, `STR` = `STR` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Strength bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangSTR'] == 1.05) { $db->query( "UPDATE `gangs` SET `gangSTR` = 1.10, `STR` = `STR` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Strength bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangSTR'] == 1.10) { $db->query( "UPDATE `gangs` SET `gangSTR` = 1.15, `STR` = `STR` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Strength bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangSTR'] == 1.15) { $db->query( "UPDATE `gangs` SET `gangSTR` = 1.20, `STR` = `STR` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Strength bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangSTR'] == 1.20) { $db->query( "UPDATE `gangs` SET `gangSTR` = 1.25, `STR` = `STR` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Strength bonus upgrade."; exit($h->endpage()); } } } if ($_GET['spend'] == 'agility') { if ($ir['gang'] == 0) { echo "You are not in a group to buy a stronghold upgrade for for!"; exit($h->endpage()); } if ($gangdata['gangPRESIDENT'] != $userid) { echo "You are not the Leader of your group, only your group leader is able to buy a stronghold upgrade."; exit($h->endpage()); } if ($gangdata['gangCRYSTALS'] < 10000) { echo "Your group does not have the 10,000 Gold Coins needed to buy this stronghold upgrade."; exit($h->endpage()); } if ($gangdata['AGI'] == 25) { echo "Your group already has the max in this stat upgrade. 25% limit."; exit($h->endpage()); } else { if ($gangdata['gangAGI'] == 1.00) { $db->query( "UPDATE `gangs` SET `gangAGI` = 1.05, `AGI` = `AGI` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Agility bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangAGI'] == 1.05) { $db->query( "UPDATE `gangs` SET `gangAGI` = 1.10, `AGI` = `AGI` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Agility bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangAGI'] == 1.10) { $db->query( "UPDATE `gangs` SET `gangAGI` = 1.15, `AGI` = `AGI` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Agility bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangAGI'] == 1.15) { $db->query( "UPDATE `gangs` SET `gangAGI` = 1.20, `AGI` = `AGI` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Agility bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangAGI'] == 1.20) { $db->query( "UPDATE `gangs` SET `gangAGI` = 1.25, `AGI` = `AGI` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Agility bonus upgrade."; exit($h->endpage()); } } } if ($_GET['spend'] == 'guard') { if ($ir['gang'] == 0) { echo "You are not in a group to buy a stronghold upgrade for for!"; exit($h->endpage()); } if ($gangdata['gangPRESIDENT'] != $userid) { echo "You are not the Leader of your group, only your group leader is able to buy a stronghold upgrade."; exit($h->endpage()); } if ($gangdata['gangCRYSTALS'] < 10000) { echo "Your group does not have the 10,000 Gold Coins needed to buy this stronghold upgrade."; exit($h->endpage()); } if ($gangdata['GRD'] == 25) { echo "Your group already has the max in this stat upgrade. 25% limit."; exit($h->endpage()); } else { if ($gangdata['gangGRD'] == 1.00) { $db->query( "UPDATE `gangs` SET `gangGRD` = 1.05, `GRD` = `GRD` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Guard bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangGRD'] == 1.05) { $db->query( "UPDATE `gangs` SET `gangGRD` = 1.10, `GRD` = `GRD` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Guard bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangGRD'] == 1.10) { $db->query( "UPDATE `gangs` SET `gangGRD` = 1.15, `GRD` = `GRD` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Guard bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangGRD'] == 1.15) { $db->query( "UPDATE `gangs` SET `gangGRD` = 1.20, `GRD` = `GRD` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Guard bonus upgrade."; exit($h->endpage()); } else if ($gangdata['gangGRD'] == 1.20) { $db->query( "UPDATE `gangs` SET `gangGRD` = 1.25, `GRD` = `GRD` + 5, `gangCRYSTALS` = `gangCRYSTALS` - 10000 WHERE `gangID` = {$ir['gang']}"); echo "You have paid 10,000 Gold Coins to buy your group a 5% Guard bonus upgrade."; exit($h->endpage()); } } } $h->endpage(); ?>   next is groupstronghold.php ( you will need five images of your strongholds. Change the names to what you would like them to be called for your game) <?php require_once('globals.php'); echo " <table border='1' cellpadding='5' cellspacing='1'> <tr colspan=4>Strongholds</tr> <tr> <td><img src='images/house.png' height='250px' width='250px'></td> <td>Abandoned House</td> <td>Take this <br />Stronghold</td> <td>+5% def</td> </tr> <tr> <td><img src='images/highrise.png' height='250px' width='250px'></td> <td>Highrise</td> <td>Take this <br />Stronghold</td> <td>+5% str</td> </tr> <tr> <td><img src='images/prison.png' height='250px' width='250px'></td> <td>Prison</td> <td>Take this <br />Stronghold</td> <td>+5% str/agi</td> </tr> <tr> <td><img src='images/base.png' height='250px' width='250px'></td> <td>Base</td> <td>Take this <br />Stronghold</td> <td>+5% def/str</td> </tr> <tr> <td><img src='images/bunker.png' height='250px' width='250px'></td> <td>Bunker</td> <td>Take this <br />Stronghold</td> <td>+5% all</td> </tr> </table> ";
  8. Mod Name: Gang Strongholds (PLEASE NOTE CRYSTALS ARE LISTED AS GOLD COINS AND GANGS AS GROUPS IN THESE FILES) you may want to change those to whatever you are using in your game. Mod Status: FREE; Availability: MCCodes Version 2.0.5b Licence/terms off use: General public licence (GPL)   About the mod and how it works: Gang Leaders will be able to buy a stronghold for a gang. Strongholds will cost XXX crystals to buy and come with a base stat bonus for all members. (5% STG, AGI ect.) Gang leaders can buy upgrades for the strongholds. Each upgrade will add another 5% to the selected stat bonus for all gang members. (while attacking) Bonuses will be capped at 25%. Bonuses to stats go only to an attacking player, the defending player does not use his or her bonuses while being attacked. Screen Shots: http://postimg.org/image/z7ub3cxrd/ http://s16.postimg.org/r4ewlzdat/pic2.png http://postimg.org/image/55pbexokt/ <--- stats here are without bonus applied. http://s24.postimg.org/pgpei1q05/pic4.png <--- stats in this image are with bonus applied. I currently have the costs set for each of the strongholds and the upgrades, they are easy to edit to fit your needs. First a few SQLs are needed ALTER TABLE `gangs` ADD `gangSTRONGHOLD` INT( 11 ) NOT NULL DEFAULT '0'; ALTER TABLE `gangs` ADD `gangSTR` DECIMAL( 5, 2 ) NOT NULL DEFAULT '1.00'; ALTER TABLE `gangs` ADD `gangAGI` DECIMAL( 5, 2 ) NOT NULL DEFAULT '1.00'; ALTER TABLE `gangs` ADD `gangGRD` DECIMAL( 5, 2 ) NOT NULL DEFAULT '1.00'; ALTER TABLE `gangs` ADD `STR` INT( 2 ) NOT NULL DEFAULT '0'; ALTER TABLE `gangs` ADD `AGI` INT( 2 ) NOT NULL DEFAULT '0'; ALTER TABLE `gangs` ADD `GRD` INT( 2 ) NOT NULL DEFAULT '0';   Then 4 new PHP files. and edits to Index.php and attack.php
  9. I will post it as is, if anyone would like to add the bonus to the defending player please feel free. I like it as is and will use it like it is set up in the post. Others may not want it this way, feel free to post your edits to the mod for others. Thx
  10. Okay all done and tested. I have it working fully with one tiny thing missing from the original posting.   I have not given the bonus to the defender in the attack. Only the attacker will get the bonus from the gangs stronghold in a fight. I want this to cause more fights, gang wars ect. . . Think of it this way, if you have 25% bonus and i have 25% bonus, what then is the point of the bonus in the first place? I feel this way it will matter more and be something players will want to have for the gang they are a part of. Heck might even get you a few more donations to get the crystals needed to buy the upgrades as well. I will test more and post tomorrow in the free mod section.
  11. I will PM you how i have done it in the screen shots above. I have this all running on a test server now, and all working 98% all i am missing now is tying the attacked players gang bonus into the attack. Hope to have this done and fully tested so i can post asap for all to have if they would like it. Turned out to be a lot more in depth than i had thought it was going to be to make it to this point i must say.   I was never modifying the userstats table, not a smart play i think to play around with that table with active users.
  12.   I do not get discouraged by feedback so please keep it coming. okay as to your question though. say i have 100 in all stats. STR 100 AGI 100 GRD 100 Then my gang leader buys a stronghold for the gang. this one he got comes with a 5% bonus to Agility. This in turn makes my agility AGI 105 As the gang leader buys upgrades for the stronghold the bonus goes up according. maxing out at 25% on each. so the max i could get from this would be. STR 125 AGI 125 GRD 125 and no if you already have a 5% bonus you will not get 10% on top of that when your gang leader buys an upgrade to the stronghold. If your sharing i am interested in how you have done your version of this. Most importantly how you tied it into userstats. <-- This being the hardest part of it all IMO.
  13. Mod Name: Gang Strongholds Progress:99% Completed (Testing Now, will post tomorrow in free mods section) Mod Developers/TradeMark: MCCodes Mod Status: FREE; Availability: MCCodes Version 2.0.5b Licence/terms off use: General public licence (GPL)   About the mod and how it works: Gang Leaders will be able to buy a stronghold for a gang. Strongholds will cost XXX crystals to buy and come with a base stat bonus for all members. (5% STG, AGI ect.) Gang leaders can buy upgrades for the strongholds. Each upgrade will add another 5% to the selected stat bonus for all gang members. (while attacking) Bonuses will be capped at 25%. Screen Shots: http://postimg.org/image/z7ub3cxrd/ http://s16.postimg.org/r4ewlzdat/pic2.png http://postimg.org/image/55pbexokt/ <--- stats here are without bonus applied. http://s24.postimg.org/pgpei1q05/pic4.png <--- stats in this image are with bonus applied.
  14. Just posting an update.   The mod has been completed and installed. Few minor tweaks to fit a little better (after thoughts really)   NonStopCoding has made a very nice business mod for me as requested. If you are in need of coding work i recommend him if he is willing to do the work for you. Not to say others here are not as good, i just have not had dealings with them. Thx for the mod and good work mate.
×
×
  • Create New...