
Ragnar
Members-
Posts
150 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Ragnar
-
Has any one ever had there crons suddenly stop working, with out changing anything, where the cron files work just fine if you load them, but cron doesn't do it's job right? What did you do to get them running again?
-
Re: crystal market Go to function crystal_buy It should be... $db->query("UPDATE users SET crystals=crystals+{$r['cmQTY']} where userid=$userid"); if that's what it currently is, try $db->query("UPDATE users SET crystals=crystals+'{$r['cmQTY']}' where userid=$userid"); {$r['cmQTY']} is what's not being registered.
-
Re: Multiple Item Use Mod {v1} Can you add some restrictions to it? For example.. IF item name is 'Jail Key' AND 'Player not in jail' THEN you can't use it. IF item itmtypename is 'Medical' AND 'Player not in hospital' THEN you can't use it. IF item itmtypename is 'Energy' AND 'Player has 100% energy' THEN you can't use it.
-
'QUERY ERROR: Duplicate entry '100' for key 2' Help please
Ragnar replied to HarryB's topic in General Discussion
Re: 'QUERY ERROR: Duplicate entry '100' for key 2' Help please Did you get it fixed? I just registered and didn't get any errors. (BTW, the images with text are hard to read.) -
Re: ipn_donator.php not crediting! Yep, I quickly noticed that and decided to dump ipn_donator.php That's what I ended up doing after buying myself donations to test it out! I got donatordone.php doing everthing. Right now I got it so after paying, they click the image to the site, get the donation if PayPal provides a tx code, and then redirect to another URL that doesn't show the long URL that PayPal goes to... domain.com/donatordone.php?tx=2VS123455TX6789666&...SNIPED...&sig=hJudUOMoYD.... hiding the tx code. The script has if(!$_GET['tx']) { //Log people trying to cheat.... $db->query("INSERT INTO logsdonation VALUES('','Die-Donator Pack.','$userid','$ir[username]',unix_timestamp())"); $db->query("UPDATE userstats SET donator=yes where userid=$userid",$c); die ("PayPal did not confirm the order. If you just made an order, contact <A HREF=DOMAIN.com/mailbox.php?action=compose&ID=1>the admin</a> with your PayPal E-mail address and transaction number."); } //tx provided, credit player... $db->query("INSERT INTO logsdonation VALUES('','Donator Pack','$userid','$ir[username]',unix_timestamp())"); $db->query("INSERT INTO inventory VALUES('',1,$userid,25)"); $db->query("INSERT INTO inventory VALUES('',3,$userid,1)"); $db->query("INSERT INTO inventory VALUES('',5,$userid,25)"); $db->query("INSERT INTO inventory VALUES('',51,$userid,1)"); $db->query("UPDATE userstats SET donator='yes' where userid='$userid'",$c); event_add($userid,"You receive a Donator Pack. Check your inventory.",$c); header("Location: donatordone.php?action=packdone"); } and there's just one exploit. A player can press back on his browser to go to PayPal again, click the button linking to the donatordone.php page again...and get the donation again!! Is there a way to have the tx number from the URL (tx=2VS123455TX6789666 in this example.) be added to the logsdonation table and when ever some one loads donatordone.php it checks to see if the tx number is unique?? One idea I had was to only allow a donation every XX minutes, so they can't donate again until they are loged out of PayPal, or the cache on PayPal expires, though I would love to make it secure with out having donation time restrictions!
-
[V2] Reward the active. - Punish the inactive.
Ragnar replied to Ragnar's topic in Free Modifications
Re: [V2] Reward the active. - Punish the inactive. http://criminalexistence.com/ceforums/i ... ic=17686.0 to ummm, delete players. Last part of the code. -
Re: [mccodes] Anti-cheat/injection mod - Lose money/crystals if you get too much Mods been updated. If you already got it installed, just take $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); $db->query("UPDATE users SET moneyabuse=money+moneyabuse WHERE money > 9000000000000000000"); $db->query("UPDATE users SET moneyabuse=money+moneyabuse WHERE moneyabuse > 9000000000000000000 AND money < 9000000000000000000"); $db->query("UPDATE users SET money=0 WHERE moneyabuse > 9000000000000000000"); $db->query("UPDATE users SET crystalabuse=crystals+crystalabuse WHERE crystals > 9234567891011121314"); $db->query("UPDATE users SET crystalabuse=crystals+crystalabuse WHERE crystalabuse > 9234567891011121314 AND crystals < 9234567891011121314"); $db->query("UPDATE users SET crystals=0 WHERE crystalabuse > 9234567891011121314"); out of header.php and in attackwon.php attackwin.php (What ever name your file is if players can take crystals.) attacktake.php attacklost.php attackbeat.php and any other files that let players take money or crystals from players, right below include "globals.php"; add the code. This is way more server friendly!!! It'll now only check every single player right BEFORE some one tries to take something from the player after battle, instead of every single time some one loads a page, most of them being where players arn't taking money or crystals, but are doing stuff like crime and training, where this isn't needed.
-
Re: Mysql injection that actually works $_GET['ID'] = abs((int) $_GET['ID']); for markets. $_GET['viewforum'] = abs(@intval($_GET['viewforum'])); $_GET['viewtopic'] = abs(@intval($_GET['viewtopic'])); for forums.php.
-
I keep buying myself a Will Potion to test it out, and I'm not geting credited or the event. if($pack==1) { $db->query("INSERT INTO inventory VALUES('',3,$userid,1)",$c); $db->query("INSERT INTO logsdonation VALUES('','Pack 1 Will Potion','$userid','$ir[username]',unix_timestamp())"); event_add($userid,"You receive a Will Potion. Check your inventory.",$c); $d=0; $t="willpotion"; } The normal donator days donation code is else if($pack==5) { $db->query("INSERT INTO inventory VALUES('',1,$userid,25)"); $db->query("INSERT INTO inventory VALUES('',3,$userid,1)"); $db->query("INSERT INTO inventory VALUES('',5,$userid,25)"); $db->query("INSERT INTO inventory VALUES('',51,$userid,1)"); $db->query("INSERT INTO logsdonation VALUES('','Donator Days','$userid','$ir[username]',unix_timestamp())"); event_add($userid,"You receive a Donator Status Mega Pack. Check your inventory.",$c); $d=30; $t="donatordays"; } I'm guessing <input type="hidden" name="item_name" value="{$domain}|DP|1|{$userid}"> tells it it's Pack 1. When done with the order, PayPal links to domain.com/donatordone.php?tx=XXXX&st=Completed&amt=1.00&cc=USD&cm=&item_number=&action=done&type=willpotion&sig=jhdfbgjfLONGCODE&merchant_return_link=Return+to+John+Smith&form_charset=UTF-8 generating the thank you message. Any one know what's wrong? :?
-
Re: How Do I Lower Stat Gained In Gym Um...more like you're giving the property too much will.
-
Re: Advanced Merit System [$25] Even I thought the price was too low! $5 is for 10 line mods. Not great mods like this!!! I say up the price to $25!
-
Re: Simple SQL Injection protection Read the post while awake!!! :-D I wasn't posting a price cap! I was posting a way to delete listings over a price cap if there is already a price cap! That code works just find with deleting listings over the price cap!
-
Re: Count Users Clicks There's an easy solution to abuse. Don't let the visitiors know clicks give you the reward. Use something like this.... if($_SESSION['clicksmade'] > 100) { mysql_query("UPDATE users SET money=money+10000 WHERE userid=$userid"); echo 'You found some random cash and gain $10,000.'; } This can be a nice simple version of the random cash mod and random items mod.
-
Re: Swim Mod For V1&V2 [Free] Nice mod! I'm making a video game RPG and I'll name this Super Mario Bros World -1 (The never ending water level!) It's like having the Money Gym, for strength and agility...with a different twist! For advanced ideas...adding some random stuff to it, like some times find enemies or almost drown and lose HP. Swim and find random items.
-
Re: Simple SQL Injection protection If any ones still worried about SQL injections after adding $_GET['ID'] = abs((int) $_GET['ID']); if you have price caps on the markets, you can easily have it automatically delete listings over the price cap. For example on the Crystal Market with a $1,000 price cap... ALTER TABLE `crystalmarket` ADD `cmEACH` bigint(25) NOT NULL default 0; Replace global $db,$ir,$c,$userid,$h; with global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM crystalmarket WHERE cmEACH > 1000"); Replace $db->query("INSERT INTO crystalmarket VALUES('',{$_POST['amnt']},$userid,$tp)"); with $db->query("INSERT INTO crystalmarket VALUES('',{$_POST['amnt']},$userid,$tp,{$_POST['price']})");
-
Re: Simple SQL Injection protection Is killah's code safe? If not, can you post one that is, if it is possible to make one that's better than the simple market codes... if(isset($_GET['ID']) AND eregi("[^0-9]", $_GET['ID'])) { echo "Invalid Request"; and $_GET['ID'] = abs((int) $_GET['ID']);
-
Re: Advanced Merit System [$5] Very nice script! Very easy to edit what players get! For example, I changed mine to give out 100 in stats per level, 1 for crystals per level, $1000 per level, or two doner days per Merit. For example, a level 100 player could gain 10,000 of a stat, 100 crystals, or $100,000. If you can do simple editing (For example adding *$ir['level'] to $reward ) you can let your economy tell you what the rewards should be to make it a nice addition to the game. It doesn't have to for example be just 10 of a stat, which wouldn't be much for a player with millions, billions...of a stat or cash!! It's well worth the money, just counting the time you would need to make it. Yes, the code is very efficient! I only added the 17 letters/space to global_func, did one table alter, edited and uploaded the script, and added a link to the script in explore.php. Nothing that would come even close to slowing the server down!
-
Re: Marriage Script [$10] Does this include property sharing?
-
Mccodes V2 Normal Bank.php NO FEES!
Ragnar replied to ~Destiny-Gaming~'s topic in Free Modifications
Re: Mccodes V2 Normal Bank.php NO FEES! One name: MCcodes! Some one that creates a php game and has never hurd of $_GET['ID'] = abs((int) $_GET['ID']); is a ultra n00bie! :-D Of course an ultra n00bie has to start some where! Every one was once an ultra n00bie! I was one of those just three months ago...and made an anti-exploit mod at the same time!! :-o :-o -
Re: [site tools] auto backup your site Take a look at the last part of my post. chmod 777 Directory with back-up files has to have permission to create the file for it to exist. No permission, there for no such file error!!!
-
Re: Game Monitor [$200]
-
Re: Game Monitor [$200]
-
Re: [v2]Attack Ban[v2] A better idea would be 'Max attacks on a player per day?' Where for example, if you attack a player 10 times, when you try to attack that player an 11th time that day, you get an error message. This way it would keep every one from being able to attack a player too many times. (Of course Clan wars should be an exception to the attacking restriction!)
-
[mccode] Reset your users without deleating them
Ragnar replied to Redeye's topic in Free Modifications
Re: [v1 & v2]Reset your users without deleating them For stats and NPCs, I think the easiest way would be to create user_level in the userstats ALTER TABLE `userstats` ADD `user_level` int(11) NOT NULL default 1; and change the user_level there for any one not at Level 1. Then mysql_query("UPDATE userstats SET strength=10,agility=10,guard=10,labour=10,IQ=10 WHERE user_level=1", $c) or die(mysql_error()); would work. -
Re: [mccode] Streets for v2.0 Here's some code for adding stats to this kool mod. Of course you change the chance numbers and update $chance = rand(1,36); if ($chance == 32) { //Gain strength. $gainstrength = rand(1,10)*$ir['level']; print "[b]You decide to do a little training and gain $gainstrength in strength.[/b]"; $db->query("UPDATE userstats SET strength=strength+$gainstrength where userid=$userid",$c); } if ($chance == 33) { //Gain agility. $gainagility = rand(1,10)*$ir['level']; print "[b]You decide to do a little training and gain $gainagility in agility.[/b]"; $db->query("UPDATE userstats SET agility=agility+$gainagility where userid=$userid",$c); } if ($chance == 34) { //Gain guard. $gainguard = rand(1,10)*$ir['level']; print "[b]You decide to do a little training and gain $gainguard in guard.[/b]"; $db->query("UPDATE userstats SET guard=guard+$gainguard where userid=$userid",$c); } if ($chance == 35) { //Gain labour. $gainlabour = rand(1,10)*$ir['level']; print "[b]You decide to do a little training and gain $gainlabour in labour.[/b]"; $db->query("UPDATE userstats SET labour=labour+$gainlabour where userid=$userid",$c); } if ($chance == 36) { //Gain IQ. $gainIQ = rand(1,10)*$ir['level']; print "[b]You decide to do a little training and gain $gainIQ in IQ.[/b]"; $db->query("UPDATE userstats SET IQ=IQ+$gainIQ where userid=$userid",$c); } Only you can do that. Go look in your mySQL database. You'll see something like this.. -- -- Dumping data for table `items` -- INSERT INTO items VALUES (1,5,'Energy Potion','Get your energy back.', The first number is the item ID. The item name is after the second number.