Jump to content
MakeWebGames

MafiaHeros

Members
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

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

MafiaHeros's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Exactly...   //Leveling stuff if ($this->exp >= $this->maxexp && $this->exp != 0 && $this->level < 501){ $newlvl = $this->level + 1; $newnerve = $this->maxnerve + 1; $newenergy = $this->maxenergy + 1; $newhp = ($this->level+1) * 50; if($newlvl % 10 == 0 && $newlvl < 500){ $newpoints = rand(2,50); $pts_message = "[+".$newpoints." Points]"; } else { $newpoints = 0; } $expleft = $this->exp - $this->maxexp; Send_Event ($this->id, "You have gained a level! [Level $newlvl] $pts_message", $this->id); RecentGameEvents($this->id, "[-_USERID_-] has gained a level."); $number = isdiv($newlvl, 10); if($number == 1) { $newupgrades = $this->upgradetimes + 1; $result162 = mysql_query("UPDATE `grpgusers` SET `upgradetimes` = '".$newupgrades."' WHERE `id` = '".$this->id."'"); } $result2345 = mysql_query("UPDATE `grpgusers` SET `level`='".$newlvl."', `hp`='".$newhp."', `energy`='".$newenergy."', `nerve`='".$newnerve."', `points`= points + ".$newpoints.", `exp` = '".$expleft."' WHERE `id`='".$this->id."'"); } //End
  2. Silent Mafia is a brand new Mafia Styled MMORPG (Massive Multiplayer Online Role Playing Game). In Silent Mafia, you choose your own path whether you're a nice player who helps out, or roams the streets looking for thugs to pick on, it's your own game and you play it how you decide. Whether you're training at the Gym, or Robbing a Local store, there is never a dull moment on Silent Mafia. With a casino to try your luck and win some points, and even Missions for you try and complete specific tasks within a time period to earn hundreds on points. Can you take it to the top? http://silent-mafia.eu/
  3. MafiaHeros

    Input

    Not sure if this is what you ment...   [CSS] input[type=text], input[type=password] { background-color:#1A1A1A; border: 1px #444444; border-style: solid; color:#FFFFFF; } input[type=text]:hover, input[type=password]:hover { background-color:#222222; border: 1px #555555; border-style: solid; color:#FFFFFF; } input[type=submit] { background-color:#1A1A1A; border: 2px #1A1A1A; border-style:ridge; color:#FFFFFF; } input[type=submit]:hover { background-color:#222222; border: 2px #222222; border-style:ridge; color:#FFFFFF; } textarea { background-color:#1A1A1A; border: 1px #444444; border-style: solid; color:#FFFFFF; } textarea:hover { background-color:#222222; border: 1px #555555; border-style: solid; color:#FFFFFF; } select { background-color:#1A1A1A; border: 1px #444444; border-style: solid; color:#FFFFFF; } [/CSS]
  4. Signed up! Thank you for the service :D
  5. Plus, in crime.php $crimecounter = 1 + $user_class->crimecounter; $result = mysql_query("UPDATE `grpgusers` SET `exp` = '".$exp."', `crimesucceeded` = '".$crimesucceeded."', `crimemoney` = '".$crimemoney."', `money` = '".$money."', `nerve` = '".$nerve."', `todaysexp` = '".$todaysexp."', `expcount` = '".$expcount."' , `crimecounter` = '".$crimecounter."' WHERE `id`='".$_SESSION['id']."'");   in attack.php $killcounter = 1 + $user_class->killcounter; $result = mysql_query("UPDATE `grpgusers` SET `todaysexp` = '".$todaysexp."', `exp` = '".$newexp."', money = '".$newmoney."', `battlewon` = '".$battlewon."', `battlemoney` = '".$battlemoney."', `killcounter` = '".$killcounter."', `todayskills` = '".$todayskills."' WHERE `id`='".$user_class->id."'");   And this in the rollover file, //reset missions so they can be earned again after server update. $reset = mysql_query("UPDATE `grpgusers` SET `levelmission2reward` = '0'"); $reset1 = mysql_query("UPDATE `grpgusers` SET `levelmission1reward` = '0'"); $reset2 = mysql_query("UPDATE `grpgusers` SET `killmission1reward` = '0'"); $reset3 = mysql_query("UPDATE `grpgusers` SET `killcounter` = '0'"); $reset4 = mysql_query("UPDATE `grpgusers` SET `crimecounter` = '0'");
  6. I took a few samples from this code, and modified it to daily missions. So each rollover players can do these missions and get rewarded for them.   <?php include "header.php"; $crimecounter = ($user_class->crimecounter > 249); $crimecounter1 = ($user_class->crimecounter > 749); $killcounter = ($user_class->killcounter > 99); if ($_GET['action'] == "killmission1"){ if ($user_class->killmission1reward == 1) { echo Message("You have already been rewarded for this mission. Come back tomorrow!"); include 'notloggedinf.php'; die(); } $points = 150; mysql_query("UPDATE grpgusers SET points=points+$points, killmission1reward=1 WHERE id = '".$user_class->id."'"); echo Message("You have been rewarded 150 points for completing the 100 battles mission.<br><br> <a href='index.php'>Back</a>"); include 'notloggedinf.php'; die(); } if ($_GET['action'] == "levelmission1"){ if ($user_class->levelmission1reward == 1) { echo Message("You have already been rewarded for this mission. Come back tomorrow!"); include 'notloggedinf.php'; die(); } $points = 100; mysql_query("UPDATE grpgusers SET points=points+$points, levelmission1reward=1 WHERE id = '".$user_class->id."'"); echo Message("You have been rewarded 100 points for completing the 250 crimes mission.<br><br> <a href='index.php'>Back</a>"); include 'notloggedinf.php'; die(); } if ($_GET['action'] == "levelmission2"){ if ($user_class->levelmission2reward == 1) { echo Message("You have already been rewarded for this mission. Come back tomorrow!"); include 'notloggedinf.php'; die(); } $points = 400; mysql_query("UPDATE grpgusers SET points=points+$points, levelmission2reward=1 WHERE id = '".$user_class->id."'"); echo Message("You have been rewarded 400 points for completing the 750 crimes mission.<br><br> <a href='index.php'>Back</a>"); include 'notloggedinf.php'; die(); } ?> <div id="right_c"> <div class="g_content"> <h3> Missions</h3> <div class="g_text"> <br> <br> <table class='save' align='center'> <tr> <td> <?php if($crimecounter){ echo "You have gained 250 crimes for today.<br>"; if ($user_class->levelmission1reward == 0) { ?> <center>Click <a href='missions_test.php?action=levelmission1'>here</a> for a reward.</center> <? } ?> <? } else { echo"Gain 250 crimes to complete this mission.<br><br><div class='save1'>You currently have ". prettynum($user_class->crimecounter)." crimes gained today.</div>"; } ?> </td> </tr> </table> <br><br> <table class='save' align='center'> <tr> <td> <?php if($crimecounter1){ echo "You have gained 750 crimes for today.<br>"; if ($user_class->levelmission2reward == 0) { ?><center>Click <a href='missions_test.php?action=levelmission2'>here</a> for a reward.</center> <? } ?> <? } else { echo"Gain 750 crimes to complete this mission.<br><br><div class='save1'>You currently have ". prettynum($user_class->crimecounter)." crimes gained today.</div>"; } ?> </td> </tr> </table> <br> <br> <table class='save' align='center'> <tr> <td> <?php if($killcounter){ echo "You have gained 100 battles for today.<br>"; if ($user_class->killmission1reward == 0) { ?><center>Click <a href='missions_test.php?action=killmission1'>here</a> for a reward.</center> <? } ?> <? } else { echo"Gain 100 battles to complete this mission.<br><br><div class='save1'>You currently have ". prettynum($user_class->killcounter)." battles gained today.</div>"; } ?> </td> </tr> </table> </div> </div> </div> <div id="right_c"> <div class="g_content"> <h3> Missions Info</h3> <div class="g_text"> <br><br> <center><b><i>Mission counters are being reset at each server update.</i></b></center> <HR> <br><br> <p class="missionbar"><b>Mission Payouts</b></p> </div> </div> </div> <?php include "notloggedinf.php"; ?>   Thank you. :)
  7. Lots of things have been updated! Check it out. ;)
  8. Hi there, I'm currently working on a Badge/Milestone page, So im listing with this code how many users are above level 5 $result = mysql_query("SELECT * FROM `grpgusers` WHERE `level` > '5'"); $resultmobsters = mysql_num_rows($result);   Now i'm trying to list the total mobsters that are below level 5 by using this code $result1 = mysql_query("SELECT * FROM `grpgusers` WHERE `level` < '5'"); $howmany = ($result1);   But for that line I get this error, Warning: strrev() expects parameter 1 to be string, resource given in /home/rjd/domains/mafiaheros.com/public_html/classes.php on line 51 Line 51 is my prettynum function: function prettynum($num,$dollar="0") { // Basic send a number or string to this and it will add commas. If you want a dollar sign added to the // front and it is a number add a 1 for the 2nd variable. // Example prettynum(123452838,1) will return $123,452,838 take out the ,1 and it looses the dollar sign. $out=strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,' , strrev( $num ) ) ); if ($dollar && is_numeric($num)){ $out= "$".$out; } return $out; }   I'm echo'ing the ranks like this: <td align="right"><i><? echo prettynum($resultmobsters) ?> mobsters have achieved this milestone, <? echo prettynum($howmany) ?> mobsters still need to!</i></td>   Would anyone know how I display the amount of grpgusers that are below level 5? Much appreciated :)
  9. Woot, that worked!!! Thanks alot!!!!
  10. Forget my last post, now its blocking any IP that try's to register.
  11. Because I was still fixing it, thats why I did the queries in 3 lines, makes it easier for me to see what im doing wrong. :)
  12. Allright, it works now. Thanks for the help :) This worked:   $ip = $_GET['REMOTE_ADDR']; $checkuser2 = mysql_query("SELECT * FROM `grpgusers` WHERE `ip`='$ip'"); $ip_exist2 = mysql_num_rows($checkuser2); if($ip_exist2 > 0){ $message = "<div>Your IP is already being used by another account on MafiaHeros.</div>"; } if (isset($message)) { echo Message($message); }
  13.   When I do that, its showing nothing just the page itself saying I registered...
  14. Set it like this and its still not working   $ip = $_SERVER['REMOTE_ADDR']; $checkip = mysql_query("SELECT * FROM `grpgusers` WHERE `signupip` = '".$ip."'"); $ip_exist = mysql_num_rows($checkip); if($ip_exist > 0) { $message = "That IP is already being used for an account on MafiaHeros."; }
  15. MafiaHeros

    IP's

    So i'm trying to fix that only 1 IP per account is allowed to create an account, yet players are still able to create accounts on the same ip... I have added this to register.php $checkip = mysql_query("SELECT * FROM `grpgusers` WHERE `signupip` = '".$ip.""); $ip = $_SERVER['REMOTE_ADDR']; $ip_exist = mysql_num_rows($checkip); if($ip_exist > 0) { $message = "That IP is already being used for an account on MafiaHeros."; }   Anyone know what i'm doing wrong?
×
×
  • Create New...