
Eternal
Members-
Posts
305 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Eternal
-
Hello i have seen mods out there about rating users and they only allowed them to rate 1 person per day :/ this allows a player to rate a few people once per day :D CREATE TABLE IF NOT EXISTS `usrate` ( `rater` int(11) NOT NULL, `rated` int(11) NOT NULL ); Then create / replace rating.php <?php include "globals.php"; $ID = (int) ($_GET['ID']); $action = $_GET['action']; $ar=$db->query("SELECT * FROM usrate WHERE rater={$userid} AND rated={$ID}"); if($db->fetch_row($ar)) { print "You Already Rated This Person Today"; $h->endpage(); } switch($action) { case 'goodrating': good_rating(); break; case 'badrating': good_rating(); break; } if(!$ID) { echo "Error - invaild player id."; $h->endpage(); exit; } if(!$action) { echo "Error - invaild action."; $h->endpage(); exit; } function good_rating() { global $ir,$userid; $ID = $_GET['ID']; if($ID == $userid) { echo "You cannot rate yourself."; } else { $result = mysql_query("SELECT * FROM users WHERE userid='{$ID}'"); while($row = mysql_fetch_row($result)) { $gratings = $row['goodratings']; } mysql_query("UPDATE users SET goodratings = {$gratings}+1 WHERE userid='{$ID}'"); mysql_query("INSERT INTO usrate values ({$userid},{$ID})"); echo "You gave the user a good rating"; } } function bad_rating() { $ID = $_GET['ID']; if($ID == $userid) { echo "You cannot rate yourself."; } else { $result = mysql_query("SELECT * FROM users WHERE userid='{$ID}'"); while($row = mysql_fetch_row($result)) { $bratings = $row['badratings']; } mysql_query("UPDATE users SET badratings = {$bratings}+1 WHERE userid='{$ID}'"); mysql_query("INSERT INTO usrate values ({$userid},{$ID})"); echo "You gave the user a bad rating"; } } $h->endpage(); ?> then in View User put print "<center>Ratings: [url='rating.php?ID={$r['][img=thumbsup.gif][/url][url='rating.php?ID={$r['][img=thumbsdown.gif][/url] [b]{$r['goodratings']}[/b] [b]{$r['badratings']}[/b] down </center> "; Create Two images one rate up one rate down :P then in cron_day put $db->query("TRUNCATE TABLE usrate;"); /// Thanx to karlos for listening to my mumbo jumbo crap xD Edit for alter users :: ALTER TABLE users ADD badratings INT(11) NOT NULL DEFAULT 0; ALTER TABLE users ADD goodratings INT(11) NOT NULL DEFAULT 0;
-
Re: [mccode] gang levels Yes that would be more sensible for the people that are using the old way of gaining respect. since i use UPDATE gangs set gangrespect=".$expgang." then $expgang = $expwon/100*15 which is 15% of the total exp they gained in the battle for gang wars i am in the middle of setting a capture the flag sort of layout where they can Own own other peoples gangs in a way without having access to them like on main page for that users gang GangFlag: owned by Other persons gang.. Then they have the chance to buy it back for a set price the other gang asks or beat them in battle...
-
Re: Updated forums [mccodes v2] And it does secure the forums. ^LAWL i used that when some anonymous injector logged into my game as admin.. Also i would put in $_GET['reply'] = abs(@intval($_GET['reply'])); maybe one day someone will post theirs up here if it is allowed :P
-
Re: [V2]Donator Packs as Items[V2] I know what you on about i used to be that person duping packs and putting $0.01 that is why i secure each payment with if($pack == '30dayrc' && $payment_amount != "3.00") { fclose ($fp);die(""); } also the paypal email And also if the transaction is in some foreign languange like africa or so where you can get 300 their currency is $300 in US i have gone through and tested spending other amounts editing the links
-
Re: [V2]Donator Packs as Items[V2] Double post due to this forum doesnt like 2000 letters or more I Have donator packs to items which all is done is a blank item and the effects are on dp_use.php to give them their Stuff Also if someone refunds the payment and you see it in your paypal just check in admin panel on what donations have been processed and then delete or ban that user
-
Re: [V2]Donator Packs as Items[V2] MY ipn donator works like a charm note that this is suited to my game so most of it needs changing <? include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; require 'global_func.php'; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30); // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { // check the payment_status is Completed if($payment_status != "Completed") { fclose ($fp);die(""); } if($db->num_rows($db->query("SELECT * FROM dps_accepted WHERE dpTXN='{$txn_id}'")) > 0) { fclose ($fp);die(""); } // check that txn_id has not been previously processed // check that receiver_email is your Primary PayPal email if($receiver_email != $set['paypal']) { fclose ($fp);die(""); } // check that payment_amount/payment_currency are correct if($payment_currency != "USD") { fclose ($fp);die(""); } // parse for pack $packr=explode('|',$item_name); if(str_replace("www.","",$packr[0]) != str_replace("www.","",$_SERVER['HTTP_HOST'])) { fclose($fp); die(""); } if($packr[1] != "DP") { fclose($fp);die(""); } $pack=$packr[2]; if( $pack != '30dayrc' and $pack != '60dayrc' and $pack != '90dayrc' and $pack != 'WP5' and $pack != 'WP25' and $pack != 'WP100' and $pack != 'crystals250' and $pack != 'crystals1k' and $pack != 'crystals5k' and $pack != 'crystals10k' and $pack != 'LTOITEM' and $pack != 'HTMLGAMENAME' and $pack != 'PNGGameNAME' and $pack != 'Beginners' and $pack != 'UltimatePack' and $pack != 'Insanepack' ) { fclose($fp);die(""); } if($pack == '30dayrc' && $payment_amount != "3.00") { fclose ($fp);die(""); } if($pack == '60dayrc' && $payment_amount != "6.00") {fclose ($fp);die(""); } if($pack == '90dayrc' && $payment_amount != "9.00") {fclose ($fp);die(""); } if($pack == 'WP5' && $payment_amount != "3.00") {fclose ($fp);die(""); } if($pack == 'WP25' && $payment_amount != "10.00") {fclose ($fp);die(""); } if($pack == 'WP100' && $payment_amount != "28.50") {fclose ($fp);die(""); } if($pack == 'crystals250' && $payment_amount != "3.00") {fclose ($fp);die(""); } if($pack == 'crystals1k' && $payment_amount != "9.00") {fclose ($fp);die(""); } if($pack == 'crystals5k' && $payment_amount != "29.00") {fclose ($fp);die(""); } if($pack == 'crystals10k' && $payment_amount != "45.00") {fclose ($fp);die(""); } if($pack == 'LTOITEM' && $payment_amount != "15.00") {fclose ($fp);die(""); } if($pack == 'HTMLGAMENAME' && $payment_amount != "75.00") {fclose ($fp);die(""); } if($pack == 'PNGGameNAME' && $payment_amount != "125.00") {fclose ($fp);die(""); } if($pack == 'Beginners' && $payment_amount != "9.00") {fclose ($fp);die(""); } if($pack == 'UltimatePack' && $payment_amount != "55.00") {fclose ($fp);die(""); } if($pack == 'Insanepack' && $payment_amount != "199.00") {fclose ($fp);die(""); } // grab IDs $buyer=$packr[3]; $for=$buyer; // all seems to be in order, credit it. if($pack=='30dayrc') { $db->query("INSERT INTO inventory VALUES('',26,{$for},1,0)",$c); $t="30dayrc"; } else if($pack=='60dayrc') { $db->query("INSERT INTO inventory VALUES('',27,{$for},1,0)",$c); $t="60dayrc"; } else if($pack=='90dayrc') { $db->query("INSERT INTO inventory VALUES('',28,{$for},1,0)",$c); $t="90dayrc"; } else if($pack=='WP5') { $db->query("INSERT INTO inventory VALUES('',29,{$for},1,0)",$c); $t="WP5"; } else if($pack=='WP25') { $db->query("INSERT INTO inventory VALUES('',30,{$for},1,0)",$c); $t="WP25"; } else if($pack=='WP100') { $db->query("INSERT INTO inventory VALUES('',31,{$for},1,0)",$c); $t="WP100"; } else if($pack=='crystals250') { $db->query("INSERT INTO inventory VALUES('',32,{$for},1,0)",$c); $t="crystals250"; } else if($pack=='crystals1k') { $db->query("INSERT INTO inventory VALUES('',33,{$for},1,0)",$c); $t="crystals1k"; } else if($pack=='crystals5k') { $db->query("INSERT INTO inventory VALUES('',34,{$for},1,0)",$c); $t="crystals5k"; } else if($pack=='crystals10k') { $db->query("INSERT INTO inventory VALUES('',35,{$for},1,0)",$c); $t="crystals10k"; } else if($pack=='LTOITEM') { $db->query("INSERT INTO inventory VALUES('',36,{$for},1,0)",$c); $t="LTOITEM"; } else if($pack=='Beginners') { $db->query("INSERT INTO inventory VALUES('',37,{$for},1,0)",$c); $t="Beginners"; } else if($pack=='UltimatePack') { $db->query("INSERT INTO inventory VALUES('',38,{$for},1,0)",$c); $t="UltimatePack"; } else if($pack=='Insanepack') { $db->query("INSERT INTO inventory VALUES('',39,{$for},1,0)",$c); $t="Insanepack"; } // process payment event_add($for, "Your \${$payment_amount} Pack {$pack} has been successfully credited to you.", $c); $db->query("INSERT INTO dps_accepted VALUES('', {$buyer}, {$for}, '$t', unix_timestamp(), '$txn_id')"); } else if (strcmp ($res, "INVALID") == 0) { } } fclose ($fp); } ?>
-
Re: Updated forums [mccodes v2] I have recently Came aware that that would not solve your problems on injecting the forums. That is a type of fix yes but you should get into the forums and get all down and dirty with it :P
-
Re: [V2]Donator Packs as Items[V2] LAWL But what about people Sql injection items and duping the packs?? The ipn_donator isnt as insecure as you think! Just re-write it to give out what you want to Check all $ make sure the user isnt puting $0.01 in the donator screen. i personally hate having to go into paypal check the reciept and then go to the game and give it out. So your idea is ok but there is a better solution :) i would post my ipn_donator if it wasnt so included into my site.
-
Re: [mccode V2] Item Descryption. That is the main idea lol Replace the image src with the one you have placed in the item pic mod..
-
Re: [Mccode v2] better Voting Page lol Radio Give it to him i know it is something basic but atleast he is giving it a go and Learning...
-
Re: [Mccode v2] better Voting Page OK since i noticed a few errors on how you done things i decided to create it so you know how it should be <?php /*----------------------------------------------------- Made by Mafia-Club Practicing -----------------------------------------------------*/ include "globals.php"; echo " <hr>VOTING</hr> <table cellspacing='1' width=60% border='0' cellpadding='1' class='table'> <tr style='background:white'> <th>Site Name</th> <th>Website Link</th> <th>Rewards</th> <tr> <td>name</td> <td>link</td> <td>rewards</td> </tr> <tr> <td>name</td> <td>link</td> <td>rewards</td> </tr> <tr> <td>name</td> <td>link</td> <td>rewards</td> </tr> <tr> <td>name</td> <td>link</td> <td>rewards</td> </tr> </table>"; $h->endpage(); ?>
-
Re: [Mccode v2] better Voting Page Pretty nice I would suggest putting in some links in your screen shot so people know how it looks complete :) Maybe work on some function in the staff pannel where you can add a link name and reward type :)
-
Re: [mccode V2] Item Descryption. lol i am sure it is just done with tool tips will be awesome when i check it out and write it up :)
-
Re: [mccode V2] Item Descryption. i will have a look into mousover image boxes i have seen on fallen sword that the use that tecnique so il have a look
-
Re: [mccode V2] Item Descryption. Yes that or you can make the items click able and take out an extra space for info [url='#']".$i['itmname']."[/url][/b]</font></a>"; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FOR ITEM CLICKABLE FOR INFO OR [[url='#']INFO[/url][/b]</font></a>]"; in the links section
-
Re: [mccode V2] Item Descryption. Try this :wink: [url='iteminfo.php?ID={$i[']<font color=black>[b]{$i['itmname']}[/b]</font>[/url] Replace with: [url='description.php?id={$i[']Info[/url] Untested! Dose not open a new window??? Since people are not reading the way it is formed replace the section with this <tr><td>[url='#']".$i['itmname']."[/url][/b]</font></a>"; :P lol
-
Re: [mccode V2] Item Descryption. Well Thank you verry much people since zero wanted to prove his little way which would be 100% better than what i done .. but i will return with better which i am still learning .. And a big thanx to the dude who sql injected my game if it wasnt for you my game would be a big F***k up right now..
-
Needed... v2 forums sql queries for the db
Eternal replied to ajgraves's topic in General Discussion
Re: Needed... v2 forums sql queries for the db LAWL Dude ! so Aj Graves is you and your brother is named Aj Graves i have seen your name everywhere rambling about and your grpg codes -
Needed... v2 forums sql queries for the db
Eternal replied to ajgraves's topic in General Discussion
Re: Needed... v2 forums sql queries for the db Aj Graves is not a noob at this he used to own www.mafiacorruption.com plus he works with a different engine so i don't know why he wants the mccodes forum sql for.. -
Another Mod By me i replicated this mod from a game i saw First insert in global_func.php before the end ?> closing function item_popup($text, $id) { return "[url='#']".$text."[/url]"; } Then Create a file Called description.php and insert this <? require "global_func.php"; $userid=$_SESSION['userid']; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $result= $db->query("SELECT * FROM `items` WHERE `itmid` = '".$_GET['id']."'"); $worked= $db->fetch_row($result); ?> <html> <head> <title><?= $worked['itmname'] ?></title> <style> * { font-family: tahoma; font-size: 12px; color: #FFFFFF; } body { background-color: #000000; margin: 15px; } .wrap { background-color: #202020; border: 1px solid #444; } .header { background-color: #111; border: 1px solid #444; } .head_text { padding: 5px; border: 1px solid #444; background-color: #111; color: #999999; font-weight: bold; } .head_text2l { padding: 5px; border-left: 1px solid #444; border-bottom: 1px solid #444; background-color: #555555; color: #999999; font-weight: bold; } .head_text2r { padding: 5px; border-right: 1px solid #444; border-bottom: 1px solid #444; background-color: #555555; color: #999999; font-weight: bold; } .head_text2 { padding: 5px; border-bottom: 1px solid #444; background-color: #555555; color: #999999; font-weight: bold; } .head_text3 { padding: 5px; border-left: 1px solid #444; border-right: 1px solid #444; border-bottom: 1px solid #444; background-color: #333333; color: #333333; } .textl { padding: 5px; border-left: 1px solid #444; border-bottom: 1px solid #444; background-color: #333333; } .textr { padding: 5px; border-right: 1px solid #444; border-bottom: 1px solid #444; background-color: #333333; } .text { padding: 5px; border-bottom: 1px solid #444; background-color: #333333; } .textl2 { padding: 5px; border-left: 1px solid #444; border-bottom: 1px solid #444; background-color: #444444; } .textr2 { padding: 5px; border-right: 1px solid #444; border-bottom: 1px solid #444; background-color: #444444; } .text2 { padding: 5px; border-bottom: 1px solid #444; background-color: #444444; } .textm { padding: 5px; background-color: #333333; border-left: 1px solid #444; border-right: 1px solid #444; border-bottom: 1px solid #444; } .textm2 { padding: 5px; background-color: #333333; border-left: 1px solid #444; border-right: 1px solid #444; border-bottom: 1px solid #444; } .style1 {padding: 5px; border: 1px solid #444444; background-color: #111; color: #FFFFFF; font-weight: bold; } .style2 {padding: 5px; border: 1px solid #444; background-color: #111; color: #FFFFFF; font-weight: bold; } </style> </head> <body> <table class='wrap' width='100%' height='100%' cellpadding='5' cellspacing='0' align='center'> <tr> <td valign='top'> <table class='header' width='100%' cellpadding='5' cellspacing='0' align='center'> <tr> <td><p style='color:white;font-size:16px;font-weight:bold;'><center><?= $worked['itmname'] ?></center></p></td> </tr> </table> <table width='100%' cellpadding='4' cellspacing='0'> <tr> <td colspan='2' class='style1'>.: Description</td> </tr> <tr> <td class='textl' align='center'>[img=<?= $worked[]' width='100' height='100' style='border: 1px solid #333333'></td> <td class='textm2'><?= $worked['itmdesc'] ?></td> </tr> </table> <table width='100%' cellpadding='4' cellspacing='0'> <tr> <td colspan='4' class='style2'>.: Details</td> </tr> <tr> <td class='textm'>Name: </td> <td class='textr'><?= $worked['itmname'] ?></td> </tr> <tr> <td class='textm'>Sell Value: </td> <td class='textr'>$<?= $worked['itmsellprice'] ?></td> </tr> <tr> <td class='textm'>Shop Cost: </td> <td class='textr'>$<?= $worked['itmbuyprice'] ?></td> </tr> <tr> <td class='textm' valign='top'>Attack Modifier: </td> <td class='textr'> +<?= $worked['weapon'] ?>% </td> </tr> <tr> <td class='textm' valign='top'>Defense Modifier: </td> <td class='textr'> +<?= $worked['armor'] ?>% </td> </tr> </table> </td> </tr> </table> </body> </table> ^^^^^^^^^Color can be defined to your liking Then in inventory.php replace [url='iteminfo.php?ID={$i[']<font color=black>[b]{$i['itmname']}[/b]</font>[/url] Just Where it says the link to iteminfo and the name REPLACE with [".item_popup($i['itmname'], $i['itmid'])."] Like always Any questions or errors post here
-
Re: exp in negative??? Try not to rely on other people to fix your own problems. people are here to help you out but posting about something that can be fixed in seconds is pointless savager told you what is wrong and i am positive he is correct. i noticed the same problem when i changed my level from 1 to 1600 i jumped an extra 300 levels
-
Re: exp in negative??? LAWL cause his level jumped so high in one hit it goes to minus if he refreshes a few more times it will go to normal depending on how much he tried to increase his level i wouldn't suggest having something where the user can do that...
-
Re: [mccode V2] Search Islands Well i coded this from Scratch. and it looks nothing like my streets. if your streets look basic like gaining a bit of cash then so be it. my streets have finding items cash attacking jail hospital.. this is just another feature people have to have a little fun. i am still learning to code so don't punk out on me with your stupid punk ass comments if you don't like it don't use it!!!!!!!
-
Another Mod by me as i am learning quickly.. first add this to database.. ALTER TABLE `users` ADD `islands` INT(11) NOT NULL DEFAULT '0' Then Create theisland.php <?php include "globals.php"; echo '<h3>The Ilses<h3>'; if ($ir['islands'] != 0) { for ($i=1; $i<=100; $i++) { echo $i.".) "; $randnum = rand(0,1000); if ($randnum == 0){ echo "You didn't find anything."; } else { echo "You found $".$randnum."!"; } $total+= $randnum; echo " "; } echo " You found a total of $".$total." searching The island!"; $newmoney = $ir['money'] + $total; $result = $db->query("UPDATE `users` SET `money` = '".$newmoney."', `islands` = '0' WHERE userid=$userid"); } else { echo "You have already searched the isles as much as you can today."; } $h->endpage(); ?> then add this into cron day $db->query("UPDATE users SET islands=100"); *note modify what you need to fit it into your games theme i chose islands cause i am running a pirate game..
-
Re: [mccode] another sql protection to help LAWL Was pointing an example.. i am still learning that at this current moment..