Jump to content
MakeWebGames

kingdkknox

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by kingdkknox

  1. I know this is very old however i was wondering if anyone willing to show me how to allow this to use bbcode! Thanks!
  2. Okay this the deal I have an issue with my docrime.php as you can see I added a restriction that requires users to get certain stats before they can get exp to level up. IT was working fine until users got the required stats now they cant beat any crimes they go straight to jail or just fail. Even the simplest one which i tried with the best property I have. Pleas anyone have suggestions or any help. I'm a noob so I could of forgot to change something or whatever.     $macropage="docrime.php?c={$_GET['c']}";include "globals.php";$stats= $ir['level']*5000 ;$tstats= $ir['strength']+$ir['guard']+$ir['agility'] ;$estats= ($ir['level']*5000)-($ir['agility']+$ir['guard']+$ir['strength']) ; if($ir['jail'] or $ir['hospital']) { print "This page cannot be accessed while in jail or hospital."; $h->endpage(); exit; }$_GET['c']=abs((int) $_GET['c']);if(!$_GET['c']){print "Invalid crime";}else{$q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c);$r=mysql_fetch_array($q);if($ir['brave'] < $r['crimeBRAVE']){print " .style1 { color: #FF0000;} You do not have enough Brave to perform this crime. ";}else{$ec="\$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";";eval($ec);print $r['crimeITEXT'];$ir['brave']-=$r['crimeBRAVE'];mysql_query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c);if(rand(1,100) <= $sucrate && ($ir['strength']+$ir['guard']+$ir['agility']) < ($ir['level']*5000) && $ir['level'] > 2){print str_replace("{money}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT']);print " You will not recieve exp till you bring your stats up! You need $stats total of the following three stats right now you have... {$ir['strength']} strength, {$ir['guard']} guard, {$ir['agility']} agility Total= $tstats You need $estats more total";$ir['money']+=$r['crimeSUCCESSMUNY'];$ir['crystals']+=$r['crimeSUCCESSCRYS'];$ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8);mysql_query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']} WHERE userid=$userid",$c);if($r['crimeSUCCESSITEM']){ item_add($userid, $r['crimeSUCCESSITEM'], 1);}} if(rand(1,100) <= $sucrate && ($ir['strength']+$ir['guard']+$ir['agility']) >= ($ir['level']*5000) && $ir['level'] < 3){print str_replace("{money}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT']);$ir['money']+=$r['crimeSUCCESSMUNY'];$ir['crystals']+=$r['crimeSUCCESSCRYS'];$ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8);mysql_query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c);if($r['crimeSUCCESSITEM']){ item_add($userid, $r['crimeSUCCESSITEM'], 1);}}else{if(rand(1, 2) == 1){print $r['crimeFTEXT'];}else{ print $r['crimeJTEXT']; $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'");}} print " Try Again Crimes Gym";}} $h->endpage();?>
  3. Thanks bro! And Im glad you didnt get aggy wit me like most people do. Thanks for your help!
  4. Okay yall gonna laugh at me but Im trying... I try to add where my users have to have a certain amount of stats before they can get exp. points to prevent people from getting super high levels wit no stats. I get an error that I have an unexpected else. Any way this is what I did this what was there.   if($odata['hp'] <= 0){$odata['hp']=0;$_SESSION['attackwon']=$_GET['ID'];$db->query("UPDATE users SET hp=0 WHERE userid={$_GET['ID']}");print " [b]What do you want to do with {$odata['username']} now?[/b] <form action='attackwon.php?ID={$_GET['ID']}' method='post'><input type='submit' STYLE='color: white; background-color: red;' value='Mug Them' /> </form> <form action='attackbeat.php?ID={$_GET['ID']}' method='post'><input type='submit' STYLE='color: white; background-color: green;' value='Hospitalize Them' /> </form> <form action='attacktake.php?ID={$_GET['ID']}' method='post'><input type='submit' STYLE='color: black; background-color: white;' value='Leave Them' /> </form> NB:If you not choose any of the option above you lose all your EXP point ! If you and the enemy beaten are on the same battle ladder mug them to get points added to the ladder table ! "; right after that I added }else if ($odata['hp'] <= 0 and ($youdata['strength']+$youdata['guard']+$youdata['agility']) < ($youdata['level']*60000));{$odata['hp']=0;$_SESSION['attackwon']=$_GET['ID'];$db->query("UPDATE users SET hp=0 WHERE userid={$_GET['ID']}");print " [b]What do you want to do with {$odata['username']} now?[/b] <form action='attackwon.php?ID={$_GET['ID']}' method='post'><input type='submit' STYLE='color: white; background-color: red;' value='Mug Them' /> </form> <form action='attackbeat.php?ID={$_GET['ID']}' method='post'><input type='submit' STYLE='color: white; background-color: green;' value='Hospitalize Them' /> </form> Before you can get anymore exp. you have to work on your stats.NB:If you not choose any of the option above you lose all your EXP point ! If you and the enemy beaten are on the same battle ladder mug them to get points added to the ladder table ! ";} This is the line where the error is I just posted the whole thing. unexpected else else {//choose opp gun$eq=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$odata['equip_primary']}, {$odata['equip_secondary']})");if(mysql_num_rows($eq) == 0){$wep="Fists";$dam=(int)((((int) ($odata['strength']/$ir['guard']/100)) +1)*(rand(8000,12000)/10000));}else{$cnt=0;while($r=$db->fetch_row($eq)){$enweps[]=$r;$cnt++;}$weptouse=rand(0,$cnt-1);$wep=$enweps[$weptouse]['itmname'];$dam=(int) (($enweps[$weptouse]['weapon']*$odata['strength']/($youdata['guard']/1.5))*(rand(8000,12000)/10000));}$hitratio=max(10,min(60*$odata['agility']/$ir['agility'],95));if(rand(1,100) <= $hitratio)   If anyone has better way to do this that would be great also....
  5. Great mod I would love this. Thanks! Im having the same issue but neither is set to 1. Every page I put the code on gives a closed for maintenance message.
×
×
  • Create New...