
SlanderDesign
Members-
Posts
106 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by SlanderDesign
-
Nice mod.. But people could make this in like 1 hour... Good luck with sales!
-
No, I use GRPG and I guarantee that I have made this myself. However a reminder is that you cannot leak this script. If you made it.. It will need securing.
-
Pointless post? Anyway, you are using short tags EG:<? instead of normal tags <?php... They wont be used in php 6?
-
-.- If we are playing these games... I uploaded a c99 shell within 10 mins... Now... I know how you got the money.. I told you without even going on my game/cpanel...
-
Why would I use this when all of my pages use addslashes();? :S
-
I did mean to put that but couldn't remember ;P thanks DJK
-
My mysql database doesn't use magic quotes =/ Anyway to turn them on? :)
-
Sorry, but i have tested this and work well... I forgot to add, in GRPGusers data base tables.. change the value length to 255 :)
-
Okay, lets start, Open login.php and find line 15 and replace the whole line with this: if($worked['password'] =sha1('{$password}')){ Save and close! Open register.php and find line 34 and replace the whole thing with this: "VALUES ('".$_SERVER['REMOTE_ADDR']."', '$username', sha1('$password'), '$email', '$signuptime', '$signuptime')"); Not the best thing but it's a start! :D
-
Well, It lets donators get a free gift once a day. <?php /* Free Donator gift mod for GRPG Created by SlanderDesign Feel free to give out. The SQL ALTER table grpgusers ADD `Dgift` int(30) NOT NULL default '0'; in rollover.php near the bottom add `Dgift` = '0' */ include (DIRNAME(__FILE__) . '/header.php'); // includes header $randmoney = mt_rand(1,30000); // makes a random number $newmoney = $user_class->money + $randmoney; //changes the random number to money ?> <?php if ($user_class->Dgift > 0) { //checks to see if the player has already used his reward.?> <tr><td class="contenthead">donator Gift</td></tr> <tr><td class="contentcontent"> Sorry, you have already used your Donator gift today. Come tomorrow. </td></tr> <?php } else { //checks to see if the player has already used his reward. ?> <tr><td class="contenthead">donator Gift</td></tr> <?php if($user_class->rmdays > 0) { // checks to see if the user had RMdays ?> <tr><td class="contentcontent"> Thank You for donating! Here take this! <?php // gives out the random money, sets Dgift to 1 so it players cant keep getting money. $result = mysql_query("UPDATE `grpgusers` SET `money` = '".$newmoney."' WHERE `id`='".$_SESSION['id']."'"); $result2 = mysql_query("UPDATE `grpgusers` SET `Dgift` = 1 WHERE `id`='".$_SESSION['id']."'"); ?> </td></tr> <?php } else { ?> <tr><td class="contenthead">Your not Respected!</td></tr> <tr><td class="contentcontent"> You cant claim your free gift. Sorry... <?php } ?> </td></tr> <?php } include (DIRNAME(__FILE__) . '/footer.php'); // include footer ?> Any bugs mail me... Regards SlanderDesign
-
http://www.musicbattle.com http://www.darkmob.net (soon to be finished) They are many but most fail.
-
I secured some things.. NOT TESTED! <?php include (DIRNAME(__FILE) . '/header.php'); if (isset($_POST['submit'])) { $notepad = mysql_real_escape_string(strip_tags(addslashes($_POST["notepad"]))); //insert the values if (!isset($message)){ $result= mysql_query("UPDATE `grpgusers` SET `notepad`=".$notepad." WHERE `id`=".$user_class->id.""); echo Message('<center>Your notepad has been updated.</center><meta HTTP-EQUIV="REFRESH" content="2; url=notepad.php">'); die(); } } // removed the ?> and <? they was no need :S if (isset($message)) { echo Message($message); } ?> <tr><td class="contenthead">Notepad</td></tr> <tr><td class="contentcontent"> <center>Set yourself a reminder or something... Write anything you like here...</center> </td></tr> <tr><td class="contentcontent"> <center> <form method='post'> <textarea name='notepad' cols='53' rows='7'><?= stripslashes(htmlentities($user_class->notepad)); ?></textarea> <input type='submit' name='submit' value='Update Notepad'> </form> </center> </td></tr> <?php include (DIRNAME(__FILE__) . '/footer.php'); ?> Regards SlanderDesign
-
Well sorted some minor issues. <?php include (DIRNAME(__FILE__) . '/header.php'); $guess = abs(intval($_POST['guess'])); if($guess < 0 or $guess > 18){ echo Message("<center>Error. You must enter a number between 0 and 18. [[url='roulette.php']Go Back[/url]]"); include (DIRNAME(__FILE__) . "/footer.php"); die(); } if (isset($_POST['predict'])) { if ($user_class->money < 300){ echo Message("<center>You don't have enough money to spin.</center>"); } else { $newmoney = $user_class->money - 300; $result = mysql_query("UPDATE `grpgusers` SET `money` = ".$newmoney." WHERE `id`=".$user_class->id.""); $user_class = new User($_SESSION['id']); $roulette = rand(0,18); echo "<tr><td class='contenthead'>Spin Results</td></tr><tr><td class='contentcontent' align='center'> The result of the roulette was $roulette and you predicted it was $guess. </td></tr>"; if($roulette == $_POST['guess']){ $newmoney = $user_class->money + 2600; $result = mysql_query("UPDATE `grpgusers` SET `money` = ".$newmoney." WHERE `id`=".$user_class->id.""); $user_class = new User($_SESSION['id']); echo Message("<center>Congratulations, you have won $2500!</center>"); } else { echo Message("<center>Sorry. You didn't win anything.</center>"); } } } ?> <tr><td class="contenthead">Roulette (Cash)</td></tr> <tr><td class="contentcontent"> <center> [img=images/roulette.jpg] </center> </td></tr> <tr><td class="contentcontent"> <center> So, you fancy a spin at the roulette? Well, it just $300 a go, so have at it. <form method='post'> <table align="center"> <tr> <td>Predicted Number (0 - 18):</td><td><input type='text' name='guess' value='<?php echo("$guess"); ?>' size='10' maxlength='20'></td> </tr> <td colspan="2"><input type='submit' name='predict' value='Predict'> </form> </center> </td></tr> <?php include (DIRNAME(__FILE__) . '/footer.php'); ?> In some of the queries it uses '".$val."' This causes little exploits on some pages "attack.php" Remove all ' in the queries you don't need them!
-
I did infact make this. What ever you have heard is wrong. And for passing out mods? Why would I when all the mods I have are for GRPG and What I have made! Please enlighten me of who has told you this propaganda! Regards SlanderDesign
-
open inventory.php replace with this one <? include 'header.php'; if ($_GET['use'] == 14){ //if they are trying to use an awake pill $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='".$user_class->id."' AND `itemid`='14'"); $howmany = mysql_num_rows($result); if ($howmany > 0) { $result = mysql_query("UPDATE `grpgusers` SET `awake` = '".$user_class->maxawake."' WHERE `id`='".$_SESSION['id']."'"); Take_Item(14, $user_class->id);//take away an awake pill echo Message("You popped an awake pill."); } } ?> <tr><td class="contenthead">Your Inventory</td></tr> <tr><td class="contentcontent">Everything you have collected.</td></tr> <tr><td class="contenthead">Equipped</td></tr> <tr><td class="contentcontent"> <table width='100%'> <tr> <td width='25%' align='center'> <? if ($user_class->eqweapon != 0){?> [img=<?= $user_class->weaponimg ?>] <?= item_popup($user_class->weaponname, $user_class->eqweapon) ?> [url='equip.php?unequip=weapon'][unequip][/url] <? } else { echo "You don't have a weapon equipped."; } ?> </td> <td width='25%' align='center'> <? if ($user_class->eqarmor != 0){?> [img=<?= $user_class->armorimg ?>] <?= item_popup($user_class->armorname, $user_class->eqarmor) ?> [url='equip.php?unequip=armor'][unequip][/url] <? } else { echo "You don't have any armor equipped."; } ?> </td> <td width='25%' align='center'> <? if ($user_class->eqweapon2 != 0){?> [img=<?= $user_class->weaponimg ?>] <?= item_popup($user_class->weaponname, $user_class->eqweapon2) ?> [url='equip.php?unequip=weapon2'][unequip][/url] <? } else { echo "You don't have a second weapon equipped."; } ?> </tr> </table> </td></tr> <? $result = mysql_query("SELECT * FROM `inventory` WHERE `userid` = '".$user_class->id."' ORDER BY `userid` DESC"); while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $result2 = mysql_query("SELECT * FROM `items` WHERE `id`='".$line['itemid']."'"); $worked2 = mysql_fetch_array($result2); if ($worked2['offense'] > 0){ $sell = ($worked2['cost'] > 0) ? "[url='sellitem.php?id=".$worked2['][sell][/url]" : ""; $weapons .= " <td width='25%' align='center'> [img=". $worked2[] ". item_popup($worked2['itemname'], $worked2['id']) ." [x".$line['quantity']."] $". $worked2['cost'] ." $sell [url='putonmarket.php?id=".$worked2['][Market][/url] [url='senditem.php?id=".$worked2['][send][/url] [url='equip.php?eq=weapon2&id=".$worked2['][Equip][/url] </td> "; } if ($worked2['defense'] > 0){ $sell = ($worked2['cost'] > 0) ? "[url='sellitem.php?id=".$worked2['][sell][/url]" : ""; $armor .= " <td width='25%' align='center'> [img=". $worked2[] ". item_popup($worked2['itemname'], $worked2['id']) ." [x".$line['quantity']."] $". $worked2['cost'] ." $sell [url='putonmarket.php?id=".$worked2['][Market][/url] [url='senditem.php?id=".$worked2['][send][/url] [url='equip.php?eq=armor&id=".$worked2['][Equip][/url] </td> "; } if ($worked2['id'] == 14){ $misc .= " <td width='25%' align='center'> [img=". $worked2[] ". $worked2['itemname'] ." [x".$line['quantity']."] [url='inventory.php?use=14'][use][/url] [url='putonmarket.php?id=".$worked2['][Market][/url] [url='senditem.php?id=".$worked2['][send][/url] </td> "; } } //check for drugs if ($user_class->cocaine != 0){ $drugs .= " <td width='25%' align='center'> [img=images/noimage.png] Cocaine [x".$user_class->cocaine."] $0 [url='drugs.php?use=cocaine'][use][/url] </td> "; } if ($user_class->nodoze != 0){ $drugs .= " <td width='25%' align='center'> [img=images/noimage.png] No-Doze [x".$user_class->nodoze."] $0 [url='drugs.php?use=nodoze'][use][/url] </td> "; } if ($user_class->genericsteroids != 0){ $drugs .= " <td width='25%' align='center'> [img=images/noimage.png] Generic Steroids [x".$user_class->genericsteroids."] $0 [url='drugs.php?use=genericsteroids'][use][/url] </td> "; } //check for drugs if ($weapons != ""){ ?> <tr><td class="contenthead">Weapons</td></tr> <tr><td class="contentcontent"> <table width='100%'> <tr> <? echo $weapons; ?> </tr> </table> </td></tr> <? } if ($armor != ""){ ?> <tr><td class="contenthead">Armor</td></tr> <tr><td class="contentcontent"> <table width='100%'> <tr> <? echo $armor; ?> </tr> </table> </td></tr> <? } if ($misc != ""){ ?> <tr><td class="contenthead">Misc.</td></tr> <tr><td class="contentcontent"> <table width='100%'> <tr> <? echo $misc; ?> </tr> </table> </td></tr> <? } if ($drugs != ""){ ?> <tr><td class="contenthead">Drugs</td></tr> <tr><td class="contentcontent"> <table width='100%'> <tr> <? echo $drugs; ?> </tr> </table> </td></tr> <? } include 'footer.php' ?> Okay this is not tested at all... couldn't get on cpanel :/ any bugs please tell me
-
Open classes.php and replace with this one (may want to get rid of some things) <?php function Get_ID($username){ $result = mysql_query("SELECT * FROM `grpgusers` WHERE `username` = '".$username."'"); $worked = mysql_fetch_array($result); return $worked['id']; } function mrefresh($url, $time="1"){ echo '<meta http-equiv="refresh" content="'.$time.';url='.$url.'">'; } function car_popup($text, $id) { return "[url='#']".$text."[/url]"; } function item_popup($text, $id) { return "[url='#']".$text."[/url]"; } 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; } function Check_Item($itemid, $userid){ $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='$userid' AND `itemid`='$itemid'"); $worked = mysql_fetch_array($result); if($worked['quantity'] > 0){ return $worked['quantity']; } else { return 0; } } function Check_Land($city, $userid){ $result = mysql_query("SELECT * FROM `land` WHERE `userid`='".$userid."' AND `city`='".$city."'"); $worked = mysql_fetch_array($result); if($worked['quantity'] > 0){ return $worked['quantity']; } else { return 0; } } //userid companyid howmany function Give_Share($stock, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `shares` WHERE `userid`='".$userid."' AND `companyid`='".$stock."'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist == 0){ $result= mysql_query("INSERT INTO `shares` (`companyid`, `userid`, `amount`)"."VALUES ('$stock', '$userid', '$quantity')"); } else { $quantity = $quantity + $worked['amount']; $result = mysql_query("UPDATE `shares` SET `amount` = '".$quantity."' WHERE `userid`='$userid' AND `companyid`='$stock'"); } } function Take_Share($stock, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `shares` WHERE `userid`='".$userid."' AND `companyid`='".$stock."'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist != 0){ $quantity = $worked['amount'] - $quantity; if($quantity > 0){ $result = mysql_query("UPDATE `shares` SET `amount` = '".$quantity."' WHERE `userid`='$userid' AND `companyid`='$stock'"); } else { $result = mysql_query("DELETE FROM `shares` WHERE `userid`='$userid' AND `companyid`='$stock'"); } } } function Check_Share($stock, $userid){ $result = mysql_query("SELECT * FROM `shares` WHERE `userid`='".$userid."' AND `companyid`='".$stock."'"); $worked = mysql_fetch_array($result); if($worked['amount'] > 0){ return $worked['amount']; } else { return 0; } } function Give_Land($city, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `land` WHERE `userid`='".$userid."' AND `city`='".$city."'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist == 0){ $result= mysql_query("INSERT INTO `land` (`city`, `userid`, `amount`)"."VALUES ('$city', '$userid', '$quantity')"); } else { $quantity = $quantity + $worked['amount']; $result = mysql_query("UPDATE `land` SET `amount` = '".$quantity."' WHERE `userid`='$userid' AND `city`='$city'"); } } function Take_Land($city, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `land` WHERE `userid`='".$userid."' AND `city`='".$city."'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist != 0){ $quantity = $worked['amount'] - $quantity; if($quantity > 0){ $$result = mysql_query("UPDATE `land` SET `amount` = '".$quantity."' WHERE `userid`='$userid' AND `city`='$city'"); } else { $result = mysql_query("DELETE FROM `land` WHERE `userid`='$userid' AND `city`='$city'"); } } } function Give_Item($itemid, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='$userid' AND `itemid`='$itemid'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist == 0){ $result= mysql_query("INSERT INTO `inventory` (`itemid`, `userid`, `quantity`)"."VALUES ('$itemid', '$userid', '$quantity')"); } else { $quantity = $quantity + $worked['quantity']; $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='$userid' AND `itemid`='$itemid'"); } } function Take_Item($itemid, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='$userid' AND `itemid`='$itemid'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist != 0){ $quantity = $worked['quantity'] - $quantity; if($quantity > 0){ $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='$userid' AND `itemid`='$itemid'"); } else { $result = mysql_query("DELETE FROM `inventory` WHERE `userid`='$userid' AND `itemid`='$itemid'"); } } } function Message($text){ return '<tr><td class="contenthead">.: Important Message</td></tr> <tr><td class="contentcontent">'.$text.'</td></tr>'; } function Send_Event ($id, $text){ $timesent = time(); $result= mysql_query("INSERT INTO `events` (`to`, `timesent`, `text`)". "VALUES ('$id', '$timesent', '$text')"); } function Is_User_Banned ($id) { $result = mysql_query("SELECT * FROM `bans` WHERE `id`='$id'"); return mysql_num_rows($result); } function Why_Is_User_Banned ($id) { $result = mysql_query("SELECT * FROM `bans` WHERE `id`='$id'"); $worked = mysql_fetch_array($result); return $worked['reason']; } function Radio_Status () { $result = mysql_query("SELECT * FROM `serverconfig`"); $worked = mysql_fetch_array($result); return $worked['radio']; } function howlongago($ts) { $ts=time()-$ts; if ($ts<1) // <1 second return " NOW"; elseif ($ts==1) // <1 second return $ts." second"; elseif ($ts<60) // <1 minute return $ts." seconds"; elseif ($ts<120) // 1 minute return "1 minute"; elseif ($ts<60*60) // <1 hour return floor($ts/60)." minutes"; elseif ($ts<60*60*2) // <2 hour return "1 hour"; elseif ($ts<60*60*24) // <24 hours = 1 day return floor($ts/(60*60))." hours"; elseif ($ts<60*60*24*2) // <2 days return "1 day"; elseif ($ts<(60*60*24*7)) // <7 days = 1 week return floor($ts/(60*60*24))." days"; elseif ($ts<60*60*24*30.5) // <30.5 days ~ 1 month return floor($ts/(60*60*24*7))." weeks"; elseif ($ts<60*60*24*365) // <365 days = 1 year return floor($ts/(60*60*24*30.5))." months"; else // more than 1 year return floor($ts/(60*60*24*365))." years"; }; function howlongtil($ts) { $ts=$ts - time(); if ($ts<1) // <1 second return " NOW"; elseif ($ts==1) // <1 second return $ts." second"; elseif ($ts<60) // <1 minute return $ts." seconds"; elseif ($ts<120) // 1 minute return "1 minute"; elseif ($ts<60*60) // <1 hour return floor($ts/60)." minutes"; elseif ($ts<60*60*2) // <2 hour return "1 hour"; elseif ($ts<60*60*24) // <24 hours = 1 day return floor($ts/(60*60))." hours"; elseif ($ts<60*60*24*2) // <2 days return "1 day"; elseif ($ts<(60*60*24*7)) // <7 days = 1 week return floor($ts/(60*60*24))." days"; elseif ($ts<60*60*24*30.5) // <30.5 days ~ 1 month return floor($ts/(60*60*24*7))." weeks"; elseif ($ts<60*60*24*365) // <365 days = 1 year return floor($ts/(60*60*24*30.5))." months"; else // more than 1 year return floor($ts/(60*60*24*365))." years"; }; //level 2 - 500 //level 3 - 1500 //level 4 - 3500 //level 5 - 6000 function experience($L) { $a=0; $end=0; for($x=1; $x<$L; $x++) { $a += floor($x+1500*pow(4, ($x/7))); } return floor($a/4); } function Get_The_Level($exp) { $a=0; $end =0; for($x=1; ($end==0 && $x<100); $x++) { $a += floor($x+1500*pow(4, ($x/7))); if ($exp >= floor($a/4)){ } else { return $x; $end=1; } } } function Get_Max_Exp($L){ $end=0; if ($exp == 0){ return 457; $end =1; } for($L=1;($L<100 && $end==0);$L++) { $exp = experience($L); //echo $exp; if ($exp >= $user_class->exp){ return $exp; $end=1; } } } class User_Stats { function User_Stats($wutever){ $result = mysql_query("SELECT * FROM `grpgusers` ORDER BY `username` ASC"); $result3 = mysql_query("SELECT * FROM `grpgusers` ORDER BY `username` ASC"); while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $secondsago = time()-$line['lastactive']; if ($secondsago<=300) { $this->playersloggedin++; } } while($line3 = mysql_fetch_array($result3, MYSQL_ASSOC)) { $secondsago = time()-$line3['lastactive']; if ($secondsago<=86400) { $this->playersonlineinlastday++; } } $result2 = mysql_query("SELECT * FROM `grpgusers`"); $this->playerstotal = mysql_num_rows($result2); } } class Gang{ function Gang($id) { $result = mysql_query("SELECT * FROM `gangs` WHERE `id`='$id'"); $worked = mysql_fetch_array($result); $gangcheck = mysql_query("SELECT * FROM `grpgusers` WHERE `gang`='".$id."'"); $this->id = $worked['id']; $this->members = mysql_num_rows($gangcheck); $this->name = $worked['name']; $this->formattedname = "[url='viewgang.php?id=".$worked[']".$worked['name']."[/url]"; $this->description = $worked['description']; $this->leader = $worked['leader']; $this->tag = $worked['tag']; $this->exp = $worked['exp']; $this->level = Get_The_Level($this->exp); $this->vault = $worked['vault']; $this->vault2 = $worked['vault2']; $gangcheck = mysql_query("SELECT * FROM `grpgusers` WHERE `gang`='".$line['id']."'"); $members = mysql_num_rows($gangcheck); } } class User { function User($id) { $result = mysql_query("SELECT * FROM `grpgusers` WHERE `id`='$id'"); $worked = mysql_fetch_array($result); $result2 = mysql_query("SELECT * FROM `gangs` WHERE `id`='".$worked['gang']."'"); $worked2 = mysql_fetch_array($result2); $result3 = mysql_query("SELECT * FROM `cities` WHERE `id`='".$worked['city']."'"); $worked3 = mysql_fetch_array($result3); $result4 = mysql_query("SELECT * FROM `houses` WHERE `id`='".$worked['house']."'"); $worked4 = mysql_fetch_array($result4); $result5 = mysql_query("SELECT * FROM `inventory` WHERE `userid` = '".$id."' ORDER BY `userid` DESC"); $checkcocaine = mysql_query("SELECT * FROM `effects` WHERE `userid`='".$id."' AND `effect`='Cocaine'"); $cocaine = mysql_num_rows($checkcocaine); $speedbonus = ($cocaine > 0) ? (floor($worked['speed'] * .30)) : 0; $this->weaponoffense = 0; $this->weaponname = "fists"; $this->armordefense = 0; if($worked["eqweapon"] != 0){ $result6 = mysql_query("SELECT * FROM `items` WHERE `id`='".$worked['eqweapon']."' LIMIT 1"); $worked6 = mysql_fetch_array($result6); $this->eqweapon = $worked6['id']; $this->weaponoffense = $worked6['offense']; $this->weaponname = $worked6['itemname']; $this->weaponimg = $worked6['image']; } if($worked["eqweapon2"] != 0){ $result6 = mysql_query("SELECT * FROM `items` WHERE `id`='".$worked['eqweapon2']."' LIMIT 1"); $worked6 = mysql_fetch_array($result6); $this->eqweapon2 = $worked6['id']; $this->weaponoffense = $worked6['offense']; $this->weaponname = $worked6['itemname']; $this->weaponimg = $worked6['image']; } if($worked["eqarmor"] != 0){ $result6 = mysql_query("SELECT * FROM `items` WHERE `id`='".$worked['eqarmor']."' LIMIT 1"); $worked6 = mysql_fetch_array($result6); $this->eqarmor = $worked6['id']; $this->armordefense = $worked6['defense']; $this->armorname = $worked6['itemname']; $this->armorimg = $worked6['image']; } $this->moddedstrength = $worked['strength'] * ($this->weaponoffense * .01 + 1); $this->moddedstrength2 = $worked['strength'] * ($this->weaponoffense2 * .01 + 1); $this->moddeddefense = $worked['defense'] * ($this->armordefense * .01 + 1); $this->id = $worked['id']; $this->ip = $worked['ip']; $this->style = ($worked['style'] > 0) ? $worked['style'] : "1"; $this->speedbonus = $speedbonus; $this->username = $worked['username']; $this->marijuana = $worked['marijuana']; $this->potseeds = $worked['potseeds']; $this->cocaine = $worked['cocaine']; $this->nodoze = $worked['nodoze']; $this->genericsteroids = $worked['genericsteroids']; $this->hookers = $worked['hookers']; $this->exp = $worked['exp']; $this->level = Get_The_Level($this->exp); $this->maxexp = experience($this->level +1); $this->exppercent = ($this->exp == 0) ? 0 : floor(($this->exp / $this->maxexp) * 100); $this->formattedexp = $this->exp." / ".$this->maxexp." [".$this->exppercent."%]"; $this->money = $worked['money']; $this->bank = $worked['bank']; $this->Dgift = $worked['Dgift']; $this->whichbank = $worked['whichbank']; $this->hp = $worked['hp']; $this->maxhp = $this->level * 50; $this->hppercent = floor(($this->hp / $this->maxhp) * 100); $this->formattedhp = $this->hp." / ".$this->maxhp." [".$this->hppercent."%]"; $this->energy = $worked['energy']; $this->maxenergy = 9 + $this->level; $this->energypercent = floor(($this->energy / $this->maxenergy) * 100); $this->formattedenergy = $this->energy." / ".$this->maxenergy." [".$this->energypercent."%]"; $this->nerve = $worked['nerve']; $this->maxnerve = 4 + $this->level; $this->nervepercent = floor(($this->nerve / $this->maxnerve) * 100); $this->formattednerve = $this->nerve." / ".$this->maxnerve." [".$this->nervepercent."%]"; $this->workexp = $worked['workexp']; $this->strength = $worked['strength']; $this->defense = $worked['defense']; $this->speed = $worked['speed'] + $speedbonus; $this->totalattrib = $this->speed + $this->strength + $this->defense; $this->battlewon = $worked['battlewon']; $this->battlelost = $worked['battlelost']; $this->battletotal = $this->battlewon + $this->battlelost; $this->battlemoney = $worked['battlemoney']; $this->crimesucceeded = $worked['crimesucceeded']; $this->crimefailed = $worked['crimefailed']; $this->crimetotal = $this->crimesucceeded + $this->crimefailed; $this->crimemoney = $worked['crimemoney']; $this->lastactive = $worked['lastactive']; $this->age = howlongago($worked['signuptime']); $this->profileSIG = $worked['profileSIG']; $this->formattedlastactive = howlongago($this->lastactive) . " ago"; $this->points = $worked['points']; $this->rmdays = $worked['rmdays']; $this->signuptime = $worked['signuptime']; $this->lastactive = $worked['lastactive']; $this->house = $worked['house']; $this->housename = ($worked4['name'] == "") ? "Homeless" : $worked4['name']; $this->houseawake = ($worked4['name']== "") ? 100 : $worked4['awake']; $this->awake = $worked['awake']; $this->maxawake = $this->houseawake; $this->awakepercent = floor(($this->awake / $this->maxawake) * 100); $this->formattedawake = $this->awake." / ".$this->maxawake." [".$this->awakepercent."%]"; $this->email = $worked['email']; $this->house = $worked['house']; $this->admin = $worked['admin']; $this->quote = $worked['quote']; $this->avatar = $worked['avatar']; $this->gang = $worked['gang']; $this->gangname = $worked2['name']; $this->gangleader = $worked2['leader']; $this->gangtag = $worked2['tag']; $this->gangdescription = $worked2['description']; $this->formattedgang = "[url='viewgang.php?id=".$this->gang."']".$this->gangname."[/url]"; $this->city = $worked['city']; $this->cityname = $worked3['name']; $this->jail = $worked['jail']; $this->job = $worked['job']; $this->hospital = $worked['hospital']; $this->searchdowntown = $worked['searchdowntown']; if ($this->gang != 0){ $this->formattedname .= "[url='viewgang.php?id=".$this->gang."']formattedname .= ($this->gangleader == $this->username) ? " title='Gang Leader'>[[b]".$this->gangtag."[/b]][/url]" : ">[".$this->gangtag."]</a>"; } if ($this->rmdays != 0){ $this->type = "Respected Mobster"; $whichfont = "green"; } else { $this->type = "Regular Mobster"; } if ($this->admin == 1) { $this->type = "Admin"; $whichfont = "blue"; } if ($this->admin == 2) { $this->type = "Staff"; } if ($this->admin == 3) { $this->type = "Pre ent"; $whichfont = "red"; } if ($this->admin == 4) { $this->type = "Congress"; $whichfont = "red"; } if ($this->rmdays > 0){ $this->formattedname .= "[b]<a title='Respected Mobster [".$this->rmdays." RM Days Left]' href='profiles.php?id=".$this->id."'><font color = '".$whichfont."'>".$this->username."</a></font>[/b]"; } elseif ($this->admin != 0) { $this->formattedname .= "[b][url='profiles.php?id=".$this->id."']<font color = '".$whichfont."'>".$this->username."[/url]</font>[/b]"; } else { $this->formattedname .= "[url='profiles.php?id=".$this->id."']<font color = '".$whichfont."'>".$this->username."[/url]</font>"; } if (time() - $this->lastactive < 300) { $this->formattedonline= "<font style='color:green;padding:2px;font-weight:bold;'>[online]</font>"; } else { $this->formattedonline= "<font style='color:red;padding:2px;font-weight:bold;'>[offline]</font>"; } } } /* $result2 = mysql_query("SELECT * FROM `gangs` WHERE `id`='$gang'"); $worked2 = mysql_fetch_array($result2); $gangname = $worked2['name']; $gangleader = $worked2['leader']; */ ?> Open equip.php and replace with this one <? include 'header.php'; if ($_GET['unequip'] == "weapon" && $user_class->eqweapon != 0){ Give_Item($user_class->eqweapon, $user_class->id); $result = mysql_query("UPDATE `grpgusers` SET `eqweapon` = '0' WHERE `id`='".$_SESSION['id']."'"); echo Message("You have unequipped your weapon."); mrefresh("inventory.php"); include 'footer.php'; die(); } if ($_GET['unequip'] == "armor" && $user_class->eqarmor != 0){ Give_Item($user_class->eqarmor, $user_class->id); $result = mysql_query("UPDATE `grpgusers` SET `eqarmor` = '0' WHERE `id`='".$_SESSION['id']."'"); echo Message("You have unequipped your armor."); mrefresh("inventory.php"); include 'footer.php'; die(); } if ($_GET['id'] == ""){ echo Message("No item picked."); include 'footer.php'; die(); } $howmany = Check_Item($_GET['id'], $user_class->id);//check how many they have $result2 = mysql_query("SELECT * FROM `items` WHERE `id`='".$_GET['id']."'"); $worked = mysql_fetch_array($result2); $error = ($howmany == 0) ? "You don't have any of those." : $error; $error = ($worked['level'] > $user_class->level) ? "You aren't high enough level to use this." : $error; if (isset($error)){ echo Message($error); include 'footer.php'; die(); } Take_Item($_GET['id'], $user_class->id); if ($_GET['eq'] == "weapon"){ if($user_class->eqweapon != 0){ Give_Item($user_class->eqweapon, $user_class->id); } $result = mysql_query("UPDATE `grpgusers` SET `eqweapon` = '".$_GET['id']."' WHERE `id`='".$_SESSION['id']."'"); echo Message("You have succesfully equipped a weapon."); mrefresh("inventory.php"); } if ($_GET['eq'] == "weapon2"){ if($user_class->eqweapon2 != 0){ Give_Item($user_class->eqweapon2, $user_class->id); } $result = mysql_query("UPDATE `grpgusers` SET `eqweapon2` = '".$_GET['id']."' WHERE `id`='".$_SESSION['id']."'"); echo Message("You have succesfully equipped a weapon."); mrefresh("inventory.php"); } if ($_GET['eq'] == "armor"){ if($user_class->eqarmor != 0){ Give_Item($user_class->eqarmor, $user_class->id); } $result = mysql_query("UPDATE `grpgusers` SET `eqarmor` = '".$_GET['id']."' WHERE `id`='".$_SESSION['id']."'"); echo Message("You have succesfully equipped armor."); mrefresh("inventory.php"); } include 'footer.php'; ?>
-
Okay so here is 2 weapon slots mod requested by someone :S Run shit SQL ALTER TABLE `grpgusers` ADD `eqweapon2` INT( 1 ) NOT NULL AFTER `eqweapon` open attack.php and replace with this one <?php include (DIRNAME(__FILE__) . '/header.php'); $error = ($user_class->energypercent < 25) ? "You need to have at least 25% of your energy if you want to attack someone." : $error; $error = ($user_class->jail > 0) ? "You can't attack someone if you are in jail." : $error; $error = ($user_class->hospital > 0) ? "You can't attack someone if you are in the hospital." : $error; $error = ($_GET['attack'] == "") ? "You didn't choose someone to attack." : $error; $error = ($_GET['attack'] == $user_class->id) ? "You can't attack yourself." : $error; $attack_person = new User($_GET['attack']); $error = ($attack_person->city != $user_class->city) ? "You must be in the same city as the person you are attacking. Duh." : $error; $error = ($attack_person->username == "") ? "That person doesn't exist." : $error; $error = ($attack_person->hospital > 0) ? "You can't attack someone that is in the hospital." : $error; $error = ($attack_person->jail > 0) ? "You can't attack someone that is in jail." : $error; $error = ($user_class->level > 5 && $attack_person->level < 6) ? "You can't attack someone that is level 5 or below because you are higher than level 5." : $error; if (isset($error)){ echo Message($error); include 'footer.php'; die(); } $yourhp = $user_class->hp; $theirhp = $attack_person->hp; ?> <tr><td class="contenthead">Fight House</td></tr> <tr><td class="contentcontent">You are in a fight with <? echo $attack_person->formattedname ?>.</td></tr> <tr><td class="contentcontent"> <? $wait = ($user_class->speed > $attack_person->speed) ? 1 : 0; while($yourhp > 0 && $theirhp > 0){ $damage = $attack_person->moddedstrength - $user_class->moddeddefense; $damage = ($damage < 1) ? 1 : $damage; if($wait == 0){ $yourhp = $yourhp - $damage; echo $attack_person->formattedname . " hit you for " . $damage . " damage using their ".$attack_person->weaponname.". "; } else { $wait = 0; } if($yourhp > 0) { $damage = $user_class->moddedstrength + $user_class->moddedstrength2 - $attack_person->moddeddefense; $damage = ($damage < 1) ? 1 : $damage; $theirhp = $theirhp - $damage; echo "You hit " . $attack_person->formattedname . " for " . $damage . " damage using your ".$user_class->weaponname.". "; } if($theirhp <= 0){ // attacker won $winner = $user_class->id; $theirhp = 0; $moneywon = floor($attack_person->money /10); $battlewon = 1 + $user_class->battlewon; $battlemoney = $moneywon + $user_class->battlemoney; $expwon = 150 - (25 * ($user_class-> level - $attack_person->level)); $expwon = ($expwon < 0) ? 0 : $expwon; $newexp = $expwon + $user_class->exp; $newmoney = $user_class->money + $moneywon; $result = mysql_query("UPDATE `grpgusers` SET `exp` = '".$newexp."', money = '".$newmoney."', `battlewon` = '".$battlewon."', `battlemoney` = '".$battlemoney."' WHERE `id`='".$user_class->id."'") or die(mysql_error()); $newmoney = $attack_person->money - $moneywon; $battlelost = $user_class->battlelost + 1; $battlemoney = $user_class->battlemoney - $moneywon; $result = mysql_query("UPDATE `grpgusers` SET `money` = '".$newmoney."', `hwho` = '".$user_class->username."', `hhow` = 'wasattacked', `hwhen` = '".date(g.":".i.":".sa,time())."', `hospital` = '1200', `battlelost` = '".$battlelost."', `battlemoney` = '".$battlemoney."' WHERE `id`='".$attack_person->id."'") or die(mysql_error()); Send_Event($attack_person->id, "You were hospitalized by ".$user_class->username." for 20 minutes."); echo Message("You hospitalized " . $attack_person->formattedname . ". You gain $expwon exp and stole $".$moneywon." from " . $attack_person->formattedname . "."); //give gang exp if ($user_class->gang != 0) { $gang = New Gang($user_class->gang); $newgangexp = $gang->exp + $expwon; $result = mysql_query("UPDATE `gangs` SET `exp` = '".$newgangexp."' WHERE `id`='".$gang->id."'"); } } if($yourhp <= 0){ // defender won $winner = $attack_person->id; $yourhp = 0; $battlewon = 1 + $attack_person->battlewon; $moneywon = floor($user_class->money /10); $battlemoney = $moneywon + $attack_person->battlemoney; $expwon = 100 - (25 * ($attack_person-> level - $user_class->level)); $expwon = ($expwon < 0) ? 0 : $expwon; $newexp = $expwon + $attack_person->exp; $newmoney = $attack_person->money + $moneywon; $result = mysql_query("UPDATE `grpgusers` SET `exp` = '".$newexp."', money = '".$newmoney."', `battlewon` = '".$battlewon."', `battlemoney` = '".$battlemoney."' WHERE `id`='".$attack_person->id."'") or die(mysql_error()); $newmoney = $user_class->money - $moneywon; $battlelost = $user_class->battlelost + 1; $battlemoney = $user_class->battlemoney - $moneywon; $result = mysql_query("UPDATE `grpgusers` SET `money` = '".$newmoney."', `hwho` = '".$attack_person->username."', `hhow` = 'attacked', `hwhen` = '".date(g.":".i.":".sa,time())."', `hospital` = '1200', `battlelost` = '".$battlelost."', `battlemoney` = '".$battlemoney."' WHERE `id`='".$user_class->id."'") or die(mysql_error()); Send_Event($user_class->id, "You were hospitalized by ".$attack_person->username." for 20 minutes."); echo Message($attack_person->formattedname . " Hospitalized you and stole $".$moneywon." from you."); //give gang exp if ($attack_user->gang != 0) { $gang = New Gang($attack_user->gang); $newgangexp = $gang->exp + $expwon; $result = mysql_query("UPDATE `gangs` SET `exp` = '".$newgangexp."' WHERE `id`='".$gang->id."'") or die(mysql_error()); } } } //put defense log into gang if ($attack_person->gang != 0) { $time = time(); $result= mysql_query("INSERT INTO `ganglog` (`timestamp`, gangid, attacker, defender, winner)"."VALUES ('".$time."', '".$attack_person->gang."', '".$user_class->id."', '".$attack_person->id."', '".$winner."')") or die(mysql_error()); } //update users $newenergy = $user_class->energy - floor($user_class->energy * .10); $result = mysql_query("UPDATE `grpgusers` SET `hp` = '".$theirhp."' WHERE `id`='".$attack_person->id."'") or die(mysql_error()); $result = mysql_query("UPDATE `grpgusers` SET `hp` = '".$yourhp."', `energy` = '".$newenergy."' WHERE `id`='".$user_class->id."'") or die(mysql_error()); echo "</td></tr>"; include (DIRNAME(__FILE__) . '/footer.php'); ?> Save close.
-
16 views and no one can give this new guy some help? Okay man, give me like 2 hours. got to finish something first then you will have this mod. :) [REQUESTED] Weapon slots If you need more help with GRPG add me on msn [email protected]
-
No offence meant here but X_forward is open to ip hacks...
-
grpg-v1 [GRPG] Gang Points Vault [MOD]
SlanderDesign replied to SlanderDesign's topic in Free Plugins
Updated The Post Edited main post, secured the $_POST so no +99999- attacks :) -
Looking to buy attack ladder
SlanderDesign replied to Hitman 25's topic in Requests & In Production
What is your way of doing this? I have never seen any of your coding or game... So I cant comment on your coding style. -
Looking to buy attack ladder
SlanderDesign replied to Hitman 25's topic in Requests & In Production
This is a big mod (for GRPG). What you would need: A new cron_hour.php; 1-2 php files. 6 new SQL's and 1 table Security! Explain exactly how you want the mod and I mite go do it for free ;) As well as give it to everyone on here :) :) This should be moved to "Wishes for new plugins" -
It is always the problem with GRPG...Beta bullshit ;) But well worth $50!
-
Read it again....
-
grpg-v1 [GRPG] Gang Points Vault [MOD]
SlanderDesign replied to SlanderDesign's topic in Free Plugins
LOL @ Puuda