
Godhand
Members-
Posts
448 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Godhand
-
Re: door shoot Few problems looking over the code heres the patch <?php /*----------------------------------------------------- -- Made by iseeyou94056. -- Door Shoot Modificiation (Free) -- Please do not remove this -- Please do not resell -- doorshoot.php -----------------------------------------------------*/ include "globals.php"; if ($ir['doorshoot'] ==0) {echo "You have already done Door Shoot today."; EXIT;} if ($ir['hospital']) {echo "You cannot Door Shoot while in hospital."; EXIT;} if ($ir['jail']) {echo "You cannot Door Shoot while in Jail."; EXIT;} if (!isset($_GET['action'])){ echo "<center>Hi and welcome to the Door Shoot, please choose one of the six doors you would like to open and receive prizes, but be careful, not all of the doors have good rewards. <table Border='1' class='table'><tr><td class='table'> [url='doorshoot.php?action=do']Try a door[/url]</td></tr></table>";} else { if($_GET['action']=='do') { $rand=(int) (rand(1,6)); //code start// //door 1 start// if ($rand==1) { echo "You kick open Door 1 and shoot some guy and take [b]$100[/b] from his wallet. [url='index.php']> Back[/url]"; $db->query("UPDATE users SET money=money+100 WHERE userid=$userid"); $db->query("UPDATE users SET doorshoot=doorshoot-1 Where userid=$userid");}//// //door 1 end// //door 2 start// if ($rand==2) {echo "You open Door 2 and shoot some kid in the head, later that day his dad finds you and kicks the crap out of you and takes [b]$200[/b] from your wallet."; $db->query("UPDATE users SET hospital=hospital+15 WHERE userid=$userid"); $db->query("UPDATE users SET hospreason='Beat up by a dad.' WHERE userid=$userid"); $db->query("UPDATE users SET money=money-200 WHERE userid=$userid"); $db->query("UPDATE users SET doorshoot=doorshoot-1 Where userid=$userid");}//// //door 2 end// //door 3 start// if ($rand==3) {echo "You kick open Door 3 and shoot a lady in her head and take [b]4[/b] Crystals out of her purse."; $db->query("UPDATE users SET crystals=crystals+4 Where userid=$userid"); $db->query("UPDATE users SET doorshoot=doorshoot-1 WHERE userid=$userid");}//// //door 3 end// //door 4 start// if ($rand==4) {echo "You kick open Door 4 and shoot, but the bullet hits a metal bar bounces back into you, the bum who you should of hit takes [b]6[/b] Crystals from your wallet while you was waiting for the ambulance."; $db->query("UPDATE users SET crystals=crystals-6 WHERE userid=$userid"); $db->query("UPDATE users SET hospital=hospital+15 WHERE userid=$userid"); $db->query("UPDATE users SET hospreason='Got hit by boucning bullet.' WHERE userid=$userid"); $db->query("UPDATE users SET doorshoot=doorshoot-1 Where userid=$userid");}//// //door 4 end// //door 5 start// if ($rand==5) {echo "You kick open Door 5 and shoot some guy and take [b]$100[/b] and [b]10[/b] Crystals from him."; $db->query("UPDATE users SET money=money+100 WHERE userid=$userid"); $db->query("UPDATE users SET crystals=crystals+10 WHERE userid=$userid"); $db->query("UPDATE users SET doorshoot=doorshoot-1 Where userid=$userid");}//// //door 5 end// //door 6 start// if ($rand==6) {echo "You kick open Door 6 and a man hits you with a sledge hammer and puts you to the ground taking [b]$300[/b] and [b]15[/b] Crystals from you while you was waiting for the ambulance."; $db->query("UPDATE users SET money=money-300 WHERE userid=$userid"); $db->query("UPDATE users SET crystals=crystals-15 WHERE userid=$userid"); $db->query("UPDATE users SET hospital=hospital+30 WHERE userid=$userid"); $db->query("UPDATE users SET hospreason='Got hit with sledge hammer.' WHERE userid=$userid"); $db->query("UPDATE users SET doorshoot=doorshoot-1 WHERE userid=$userid");}//// //door 6 end// //code end// } elseif($_GET['action']!='do') { echo "Hacking attempt"; $h->endpage(); exit; } } ?> also in cron_day.php somewhere add $db->query("UPDATE users SET doorshoot=100 WHERE doorshoot=0"); Note if you want to change the amount that you get per day change doorshoot=100 into doorshoot=x where x= number you want per day. Ie- if you want one per day set it to doorshoot=1. I edited so it would work for that.I saw a few glitches while actually reading over the code and thats why I edited it. mostly just was changing Where into WHERE.
-
Re: Updated jail features [V2] well just was having a long day...
-
Re: V2 a custom gym problem well that was strange... well I guess the next thing I'm going to pull off is just going to customize the gym even more. I'll let everyone know how it goes in a while.
-
Re: V2 a custom gym problem well its the updating stats. QUERY ERROR: Unknown column '' in 'field list' Query was UPDATE `userstats` SET ``=`` + 0 WHERE `userid` = 1 . I know I'm trying to get it similar to the tc gym as far as effect wise. Yes I'll trial and error to make the real formula fit my game though I just mean the stat gain by it. Edit: I compared with my gym.php and the query for that is ok. What could be wrong then?
-
Re: door shoot yea there ya go thats looking a lot better. I was just reading the code to tell that exploit. Looking over it should be good although I won't use it.
-
Re: V2 a custom gym problem Yea I know except one problem I just ran into is QUERY ERROR: Unknown column '' in 'field list' Query was UPDATE `userstats` SET `` = `` + 0 WHERE `userid` = 1 I'm fairly sure it was just me plugging stuff in wrong... but than again its like 2:20 a.m here so it might be that heres the whole page <?php $macropage="superenergygym.php"; include "globals.php"; $statnames=array( 'Strength' => 'strength', 'Agility' => 'agility', 'Guard' => 'guard', 'Labour' => 'labour'); $_POST['amnt']=abs((int) $_POST['amnt']); if(!$ir['jail']) { print "<h3>Super energy Gym</h3><hr />"; } else { print "<h3>Super energy Jail Gym</h3><hr />"; } if($_POST['stat'] && $_POST['amnt']) { if($_POST['stat']=='Strength') { $boost=$ir['strength']; } else if($_POST['stat']=='Agility') { $boost=$ir['agility']; } else if($_POST['stat']=='Guard') { $boost=$ir['guard']; } else if($_POST['stat']=='Labour') { $boost=$ir['labour']; } else { die("Invalid Stat"); } } if($_POST['amnt'] > ($ir['superenergy'])/10) { print("You do not have enough super energy to train that much.<hr />"); } else { $gain=0; for($i=0; $i<$_POST['amnt']; $i++) { $gain+=(rand(1,3)/rand(450,650)*rand(749,751)*rand(800,1000)*$boost*1000*$ir['will']*$boost*1/4+92)/450; $ir['will']-=rand(1,3); if($ir['will'] < 0) { $ir['will']=0; } } if($ir['jail']) { $gain/=2; } $db->query("UPDATE `userstats` SET `{$stat}`=`{$stat}` + $gain WHERE `userid` = $userid"); $db->query("UPDATE `users` SET `exp` = (`exp`+$gain/40) WHERE `userid` = $userid"); $db->query("UPDATE `users` SET `will` = {$ir['will']}, superenergy = superenergy - ({$_POST['amnt']}*10) WHERE `userid` = $userid"); $inc=$ir[$stat]+$gain; $inc2=$ir['superenergy']-($_POST['amnt']*10); if($stat=="strength") { print "You begin lifting some weights. You have gained {$gain} strength by doing {$_POST['amnt']} sets of weights. Note that it takes 10 super energy per one train You now have {$inc} strength and {$inc2} super energy left. Note that it takes 10 super energy per one train"; } elseif($stat=="agility") { print "You begin running on a treadmill. You have gained {$gain} agility by doing {$_POST['amnt']} minutes of running. Note that it takes 10 super energy per one train You now have {$inc} agility and {$inc2} super energy left. Note that it takes 10 super energy per one tran"; } elseif($stat=="guard") { print "You jump into the pool and begin swimming. You have gained {$gain} guard by doing {$_POST['amnt']} minutes of swimming. You now have {$inc} guard and {$inc2} super energy left. Note that it takes 10 super energy per one train"; } elseif($stat=="labour") { print "You walk over to some boxes filled with gym equipment and start moving them. You have gained {$gain} labour by moving {$_POST['amnt']} boxes. You now have {$inc} labour and {$inc2} super energy left. Note it takes 10 super energy per one train."; } print "<hr />"; $ir['superenergy']-=$_POST['amnt']; $ir[$stat]+=$gain; } $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); print "Choose the stat you want to train and the times you want to train it. You can train one time per 10 super energy.<hr /> <form action='superenergygym.php' method='post'> Stat: <select type='dropdown' name='stat'> <option style='color:red;' value='Strength'>Strength (Have {$ir['strength']}, Ranked {$ir['strank']}) <option style='color:blue;' value='Agility'>Agility (Have {$ir['agility']}, Ranked {$ir['agirank']}) <option style='color:green;' value='Guard'>Guard (Have {$ir['guard']}, Ranked {$ir['guarank']}) <option style='color:brown;' value='Labour'>Labour (Have {$ir['labour']}, Ranked {$ir['labrank']}) </select> Times to train Note this amount is the max you can at full super energy: <input type='text' name='amnt' value='{$ir['maxsuperenergy']}' /> <input type='submit' value='Train' /></form>"; $h->endpage(); ?> I don't think the rest could've gotten too messed up though from just revamping it from the normal gym.
-
Re: V2 a custom gym problem Well I was experimenting with some thoughts. Of course this isn't my normal gym or I'd be freaking out 8-). Thanks
-
Re: Tabbed Browsing Now that would also do it. Although I will say 3 page per second still is pushing it for some gamers (without tabs). For instance refreshing for the daily cron.
-
Re: Updated jail features [V2] well whats $jj1per do? or is that just your way for crime xp?
-
Re: door shoot One problem is players can memorize the doors and well take advantage of that. Although it is a cool idea there should be a $door=rand(1,6) and make it random so door 1 wouldn't always get the same thing.
-
Re: Guess the next poster Nope Matt?
-
I was trying to make a gym where the higher you are in a stat the more you would gain. I was trying to code this and got an error. This is the code for that area in question error "Parse error: syntax error, unexpected '{' in /bla/db/my_html/superenergygym.php on line 25 " When I removed the {s I get another error which is Parse error: syntax error, unexpected T_VARIABLE in /bla/db/my_html/superenergygym.php on line 26 I have spent time into fixing it i just don't know what exactly is wrong. $boost is used later in the gym equation so I don't have to format it for each stat. $statnames=array( 'Strength' => 'strength', 'Agility' => 'agility', 'Guard' => 'guard', 'Labour' => 'labour'); $_POST['amnt']=abs((int) $_POST['amnt']); if(!$ir['jail']) { print "<h3>Super energy Gym</h3><hr />"; } else { print "<h3>Super energy Jail Gym</h3><hr />"; } if($_POST['stat'] && $_POST['amnt']) { $stat=$statnames[$_POST['stat']]; if(!$stat) { die("This stat cannot be trained."); if($_POST['stat']=strength { $boost={$ir['strength']} { else if($_POST['stat']=agility { $boost={$ir['agility']} { else if($_POST['stat']=guard { $boost={$ir['guard']} { else if($_POST['stat']=labour { $boost={$ir['labour']} { } } } Any help would be appreciated
-
Re: v2 adding new item effects like for instance creating a new stat to add to maxwill that could be upgraded. And increasing max hp along with max brave. I know one way I could do it but I'd rather avoid setting it up in php since I could limit the growth easier in form of items.
-
Re: Where did everything go? same here
-
Re: Tabbed Browsing Another idea for how they can exploit it is using the top tab functions and click extremely fast before the page even loads for them though. The best way to avoid that is to make almost every page refresh before they can get the coding. I know that I've seen that on a game before. What that does is basically when they use an item it revamps to inventory.php but they can still hit the stop button
-
Re: v2 adding new item effects bump
-
Re: [Free] [v1] Monkey Slaves Yes but with the "flat" randoms you can make your players go in the negatives. It all depends on what YOU want for the players im your game. Let there be a risk of loss on a flat rate negative or a risk of a large loss.....
-
Re: [Free] [v1] Monkey Slaves Well yes but make sure to base the loss of a RANDOM PERCENTAGE or else people will be able to go into the red which is what I'm trying to say. If you make the loss generator be a percentage then the other query is safe.
-
Re: Strange attacking problem I'd say first compare your equipment and number crunching with the armor your enemy is using. Also another thing to consider is that you can set min. damage above that. Just make sure to change if($mydamage < 1) { $mydamage=1; } into something like if($mydamage < 50) { $mydamage=50; } . Also where your looking at for damage configuration is (($r1['damage']*$youdata['strength']/$odata['guard'])*(rand(8000000,1200000)/10000)); which you CAN change. But if you want to make guard worth the same as strength for gym training change that into (($r1['damage']*$youdata['strength']-$odata['guard'])*(rand(8000000,1200000)/10000)); This will make similar levels be more closely related instead of divided by.
-
Re: Free (v2) money market banking Also note that there is now a cron problem with the function rand(1,20)/100 just so people know if they used my cron code....
-
Re: Emergency Broadcast System (Spam Thread) ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? ???????????????????????????????????????????????????????????????????????? If you can read this after all that crap you have very good eyesight. YAY SPAM
-
Re: Free (v2) money market banking Yes it is in the cron. Also so far that doesn't fully patch it up. I've found that you fixed a few problems but there still is some there. After fixing (some) of them the moneymarket.php is like this <?php include "globals.php"; print "<h3>Money Market account</h3>"; if($ir['mmarket']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>9999999) { print "Congratulations, you bought a bank account for \$10000000! [url='moneymarket.php']Start using my account[/url]"; $db->query("UPDATE users SET money=money-10000000,mmarket=0 WHERE userid=$userid"); } else { print "You do not have enough money to open an account. [url='explore.php']Back to town...[/url]"; } } else { print "Open a bank account today, just \$10,000,000! [url='moneymarket.php?buy']> Yes, sign me up but I'm aware I will only be able to withdraw 5 times a day![/url]"; } } function index() { global $db, $ir,$c,$userid,$h; print "\n[b]You currently have \${$ir['mmarket']} in the bank.[/b] At the end of each day, your bank balance will go up by a RANDOM percentage. <table width='75%' cellspacing=1 class='table'> <tr> <td width='50%'>[b]Deposit Money[/b] It will cost you 5% of the money you deposit, rounded up. The maximum fee is \$3,000.<form action='moneymarket.php?action=deposit' method='post'> Amount: <input type='text' name='deposit' value='{$ir['money']}' /> <input type='submit' value='Deposit' /></form></td> <td> [b]Withdraw Money[/b] There is no fee on withdrawals.<form action='moneymarket.php?action=withdraw' method='post'> Amount: <input type='text' name='withdraw' value='{$ir['mmarket']}' /> <input type='submit' value='Withdraw' /></form></td> </tr> </table>"; } function deposit() { global $db,$ir,$c,$userid,$h; $_POST['deposit']=abs((float) $_POST['deposit']); if($_POST['deposit'] > $ir['money']) { print "You do not have enough money to deposit this amount."; } else { $fee=ceil($_POST['deposit']*5/100); if($fee > 3000) { $fee=3000; } $gain=$_POST['deposit']-$fee; $ir['mmarket']+=$gain; $db->query("UPDATE users SET mmarket=mmarket+$gain, money=money-{$_POST['deposit']} where userid=$userid"); print "You hand over \${$_POST['deposit']} to be deposited, after the fee is taken (\$$fee), \$$gain is added to your account. [b]You now have \${$ir['mmarket']} in the bank.[/b] [url='moneymarket.php']> Back[/url]"; } } function withdraw() { global $db,$ir,$c,$userid,$h; $_POST['withdraw']=abs((float) $_POST['withdraw']); if($_POST['withdraw'] > $ir['mmarket']) { print "You do not have enough banked money to withdraw this amount."; } else if ($ir['mlim']<1 ) { print "You don't have enough withdrawels left."; } { $gain=$_POST['withdraw']; $ir['mmarket']-=$gain; $db->query("UPDATE users SET mmarket=mmarket-$gain, money=money+$gain,mmlim=mmlim-1 where userid=$userid"); >"); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have \${$ir['mmarket']} in the bank.[/b] [url='moneymarket.php']> Back[/url]"; } } $h->endpage(); ?> with an error on line 99 unexpected >
-
Re: Strange attacking problem I know I customized my damage formula because I didn't like some of it.
-
Re: error carnt divorce people Haha I was seeing if he'd be stupid enough to try it...... :-D
-
Sql ALTER TABLE `users` ADD `mmarket` BIGINT( 42 ) NOT NULL DEFAULT '-3000000000' FIRST ; ALTER TABLE `users` ADD `mmlim` BIGINT( 42 ) NOT NULL DEFAULT '5'; Create a file called moneymarket.php put this in it its an modified bank.php file. <?php include "globals.php"; print "<h3>Money Market account</h3>"; if($ir['mmarket']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>9999999) { print "Congratulations, you bought a bank account for \$10000000! [url='moneymarket.php']Start using my account[/url]"; $db->query("UPDATE users SET money=money-10000000,mmarket=0 WHERE userid=$userid"); } else { print "You do not have enough money to open an account. [url='explore.php']Back to town...[/url]"; } } else { print "Open a bank account today, just \$10,000,000! [url='moneymarket.php?buy']> Yes, sign me up but I'm aware I will only be able to withdraw 5 times a day![/url]"; } } function index() { global $db, $ir,$c,$userid,$h; print "\n[b]You currently have \${$ir['mmarket']} in the bank.[/b] At the end of each day, your bank balance will go up by a RANDOM percentage. <table width='75%' cellspacing=1 class='table'> <tr> <td width='50%'>[b]Deposit Money[/b] It will cost you 5% of the money you deposit, rounded up. The maximum fee is \$3,000.<form action='moneymarket.php?action=deposit' method='post'> Amount: <input type='text' name='deposit' value='{$ir['money']}' /> <input type='submit' value='Deposit' /></form></td> <td> [b]Withdraw Money[/b] There is no fee on withdrawals.<form action='moneymarket.php?action=withdraw' method='post'> Amount: <input type='text' name='withdraw' value='{$ir['mmarket']}' /> <input type='submit' value='Withdraw' /></form></td> </tr> </table>"; } function deposit() { global $db,$ir,$c,$userid,$h; $_POST['deposit']=abs((float) $_POST['deposit']); if($_POST['deposit'] > $ir['money']) { print "You do not have enough money to deposit this amount."; } else { $fee=ceil($_POST['deposit']*5/100); if($fee > 3000) { $fee=3000; } $gain=$_POST['deposit']-$fee; $ir['mmarket']+=$gain; $db->query("UPDATE users SET mmarket=mmarket+$gain, money=money-{$_POST['deposit']} where userid=$userid"); print "You hand over \${$_POST['deposit']} to be deposited, after the fee is taken (\$$fee), \$$gain is added to your account. [b]You now have \${$ir['mmarket']} in the bank.[/b] [url='moneymarket.php']> Back[/url]"; } } function withdraw() { global $db,$ir,$c,$userid,$h; $_POST['withdraw']=abs((float) $_POST['withdraw']); if($_POST['withdraw'] > $ir['mmarket']) { print "You do not have enough banked money to withdraw this amount."; } else if ($ir['mlim']<1 ) { print "You don't have enough withdrawels left."; } { $gain=$_POST['withdraw']; $ir['mmarket']-=$gain; $db->query("UPDATE users SET mmarket=mmarket-$gain,money=money+$gain,mmlim=mmlim-1 where userid=$userid"); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have \${$ir['mmarket']} in the bank.[/b] [url='moneymarket.php']> Back[/url]"; } } $h->endpage(); ?> Now in cron day find $db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney*(8/100)) WHERE cybermoney>0"); $int=(int) rand(2,20); $db->query("UPDATE users SET mmarket=mmarket+mmarket*$int/100 WHERE mmarket> -1"); (in cron day) Now if you want to see what it is make a setting with conf_id=100. $db->query("UPDATE settings SET conf_value=$int WHERE conf_id=100"); (also in cron day) n explore.php find [url='estate.php']Estate Agent[/url] [url='bank.php']City Bank[/url] And (careful now easy part to screw up) replace with [url='estate.php']Estate Agent[/url] [url='bank.php']City Bank[/url] [url='moneymarket.php']Money market account[/url] Tell me your opinions. I have not fully tested this. I am installing this as mainly off a rewrite from a bank. I also am attempted to make random interest as I said and limiting withdrawals.