
KDawg08
Members-
Posts
294 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by KDawg08
-
Re: How would i set level requirements?? Some people are such critics... It was posted at like 4pm my time. in which is the time i'm usually sleeping because of my work hours... What do you expect from someone working 18hours a day then working on scripting?
-
Re: [site Tools] Site Radio if anyone still uses this i've returned my radio. Sonic Xplosion Radio aka SXR I put a link in my header for users. If you wish to let them tune in you can add: [url="http://twisteddenial.net/radio.html"]SXR Live Radio[/url] to your header or anywhere in your game if u want music browser based.
-
Re: Updated Mailbox [v1] DELETE READ MESSAGES ONLY!!! Posted for V2!!! (Old one is for v1, I just converted it for any users that would like it for v2.) OPEN MAILBOX.PHP Find case 'send': mail_send(); break; After it add case 'delread': mail_delread(); break; case 'delread2': mail_delread2(); break; THEN FIND function mail_delete() { global $ir,$c,$userid,$h; $db->query("DELETE FROM mail WHERE mail_id={$_GET['ID']} AND mail_to=$userid",$c); print "Message deleted. [url='mailbox.php']> Back[/url]"; } Under it add function mail_delread() { global $ir,$c,$userid,$h; print "This will delete all the READ messages in your inbox. There is [b]NO[/b] undo, so be sure. [url='mailbox.php?action=delread2']> Yes, delete all READ messages[/url] [url='mailbox.php']> No, go back[/url]"; } function mail_delread2() { global $ir,$c,$userid,$h; $ccc=$db->query("SELECT * FROM mail WHERE mail_to=$userid AND mail_read=1",$c); $db->query("DELETE FROM mail WHERE mail_to=$userid AND mail_read=1",$c); print "All ".$db->num_rows($ccc)." READ mails in your inbox were deleted. [url='mailbox.php']> Back[/url]"; } FIND <td width=20% align=center>> [url='mailbox.php?action=archive'] Save[/url]</td> and under it add <td width=20% align=center>> [url='mailbox.php?action=delread'] Delete Read[/url]</td> I WOULD ALSO RECOMMEND CHANGING THE td width=20% to 16.6% if u want them to be centered properly. :) I'm not a great coder as I'm self teaching at the moment so feel free to let me know your thoughts on it. TESTED V1 version and worked wonderfully. V2 Version Untested so please let me know if it works.
-
Re: Game Monitor [$200] it doesn't run, it's oxi that manually checks all your files and alters them as he finds security issues. so you pay his time, if it's to expensive just check on CE, all mccode security issues are posted with solutions I wasn't trying to sound rude or anything, if that's how it came out, Sorry. I was basically just trying to get it spoken out in lamens terms, such as... "I basically spend X amount of time per day X amount of days per week scanning your files for any bugs/glitches sql injections etc." Something a little more basic might help the more php illiterate understand exactly what is done and who/how it is done. Specifics basically.
-
Re: Crime Problem check again in docrime.php as many people have created this error to their own script. If it comes down use your original backup of docrime.php and see how that works.(Assuming u didn't add more coding into docrime.php)
-
Re: Please Help! Personally I would make a simple suggestion... Look at your userlist.php. It converts over to multiple pages, just learn from reading that code.
-
Re: Game Monitor [$200] So I see that you are saying this runs security basically... But what exactly makes it worth $200-$300+?
-
Re: New Amazing Register Page I don't remember where, but i've seen this registration page somewhere before. The only difference i see is that you added rules to the bottom.
-
Re: [v1]Attack Stats FREE[v1] One more edit... Hospitalized is spelt wrong, so u may want to change it from Hospilatized the L and the T are backwards. Add the last post and this one into your original post for those that are too lazy to scroll for the updates :)
-
Re: Enhance course for V2 Very Nicely Coded... I even see a few sql injection security piece in the code... (I'm still learnin) But while learning i'm learning alot more about security right now than anything as i feel it is most necessary in game coding let alone php in general.
-
Re: Honour Awards Help As I said you say this everywhere, now you're just being harassing posting it everywhere he posts. Harassment is also against the rules. You are just as bad as him...
-
Re: How would i set level requirements?? sry my bad, i forgot to add an extra }
-
Re: How would i set level requirements?? That causes an error on this line: LINE 135 - else if($_GET['spend'] == 'health') Error is... Parse error: syntax error, unexpected T_ELSE in /home/teamms/public_html/tradement.php on line 135
-
Re: [v1]Attack Stats FREE[v1] I found one bug... in attacklost.php you said put: mysql_query("UPDATE users SET alost=alost+1 WHERE userid=$userid",$c); There was one thing you forgot though... It won't add that to Total Attacks It also won't add total times attacked... I did this for mine... INPUT THIS IN ATTACKLOST.PHP mysql_query("UPDATE users SET alost=alost+1 WHERE userid=$userid",$c); mysql_query("UPDATE users SET atotal=atotal+1 WHERE userid=$userid",$c); mysql_query("UPDATE users SET tattacked=tattacked+1 WHERE userid={$r['userid']}",$c); just replace the mysql_ with $db->
-
Re: Jail Bust Help Thanks, and good way to put it as I am still a noob. just learning from other free mods and such! After i have an error and find the solution I like to give others the code that i did so they can learn from it also :)
-
Re: How would i set level requirements?? I know this is a definate noob question. How would i set that up into the script?
-
Re: How would i set level requirements?? Here lemme try to explain easier.. For levels 49 and under, i want it to cost 20crystals for brave refill For levels 50 to 99, i want it to cost 50crystals for brave refill For levels 100 to 174, i want it to cost 100crystals for brave refill For levels 175 and up, i want it to cost 200crystals for brave refill
-
Re: How would i set level requirements?? won't work like that... I want one for 50 to 100 and one for 101 to 150 etc. look at the coding so far... <?php session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $req=($ir['crystals']>49 AND $ir['level']>49); $req1=($ir['crystals']>49 AND $ir['level']<99); $req2=($ir['level']>49); $req3=($ir['level']<99); if($ir['hospital'] || $ir['jail']) { print "You would have to be joking. You cant get into here through hospital."; exit; } if(!$_GET['spend']) { if($ir['crystals']>14) { $ea="[url='tradement.php?spend=refill']Buy[/url]"; } else { $ea="N/A"; } if($req AND $req1) { $ba="[url='tradement.php?spend=brave']Buy[/url]"; } else if($req2 AND $req3) { $ba="N/A"; } else { $ba="Lvl Req."; } if($ir['crystals']>24) { $ha="[url='tradement.php?spend=health']Buy[/url]"; } else { $ha="N/A"; } if($ir['crystals']>9999999) { $dpa="[url='tradement.php?spend=dp']Buy[/url]"; } else { $dpa="N/A"; } print "The Tradement Yard. What Do You Want To Spend Your {$ir['crystals']} Crystals On? Well it's back up and no mods other than fixing the crystals needed in hand. <table width=100% border=1> <tr><th>Reward</th><th>Crystals Needed</th><th>Level Requirement</th><th>Buy</th></tr> <tr><td>Energy Refill</td><td>15</td><td><center>N/A</center></td><td>$ea</td></tr> <tr><td>Brave Refill</td><td>20 <td><center>Level Must Be Under 50</center></td></td><td>$ba</td></tr> <tr><td>Health Refill</td><td>25</td><td><center>N/A</center></td><td>$ha</td></tr> <tr><td>IQ</td><td>1 Crystal for 5 IQ</td><td><center>N/A</center></td><td>[url='tradement.php?spend=IQ']Buy[/url]</td></tr> <tr><td>Money</td><td>1 Crystal per \$1000</td><td><center>N/A</center></td><td>[url='tradement.php?spend=money']Buy[/url]</td></tr> </table>"; } else { if($_GET['spend'] == 'refill') { if($ir['crystals'] <15) { print "You don't have enough crystals!"; } else if($ir['energy'] == $ir['maxenergy']) { print "You already have full energy."; } else { mysql_query("UPDATE users SET energy=maxenergy,crystals=crystals-15 WHERE userid=$userid",$c) or die("Energy refill area is down, please retry in 5 minutes."); print "Your energy is now full and you have paid 15 crystals."; } } else if($_GET['spend'] == 'IQ') { $amm=$ir['crystals']*5; print "Type in the amount of crystals you want to swap for IQ. You can get [b]$amm[/b] IQ with all your [b]{$ir['crystals']}[/b] crystals One crystal = 5 IQ.<form action='tradement.php?spend=IQ2' method='post'><input type='text' name='crystals' value='{$ir['crystals']}' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'IQ2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough crystals or did not fill out the form. [url='tradement.php?spend=IQ']Back[/url]"; } else { $iqgain=$_POST['crystals']*5; mysql_query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid",$c); mysql_query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid",$c); print "You have gained $iqgain IQ and have just spent {$_POST['crystals']} crystals."; } } else if($_GET['spend'] == 'money') { $acm=$ir['crystals']*1000; print "Type in the amount of crystals you want to trade for cash. You can get \$$acm Cash for {$ir['crystals']} Crystals. One crystal = \$1000.<form action='tradement.php?spend=money2' method='post'><input type='text' name='crystals' value='{$ir['crystals']}' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'money2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough crystals or did not fill out the form. [url='tradement.php?spend=money']Back[/url]"; } else { $iqgain=$_POST['crystals']*1000; mysql_query("UPDATE users SET crystals=crystals-{$_POST['crystals']},money=money+$iqgain WHERE userid=$userid",$c); print "You have recieved \$$iqgain and have spent {$_POST['crystals']}."; } } else if($_GET['spend'] == 'brave') { if($ir['crystals'] <20) { print "You don't have enough crystals!"; } else if($ir['brave'] == $ir['maxbrave']) { print "You already have full brave."; } else { $nowcrys=$ir['crystals']-20; mysql_query("UPDATE users SET brave=maxbrave,crystals=crystals-20 WHERE userid=$userid",$c); print "You now have full brave and have spent 20 crystals. You now have $nowcrys Crystals."; } } else if($_GET['spend'] == 'health') { if($ir['crystals'] <25) { print "You don't have enough crystals!"; } else if($ir['health'] == $ir['maxhealth']) { print "You already have full health."; } else { $nowcs=$ir['crystals']-25; mysql_query("UPDATE users SET health=maxhealth,crystals=crystals-50 WHERE userid=$userid",$c); print "You now have full health and have spent 25 crystals. You now have $nowcs crystals."; } } else if($_GET['spend'] == 'dp') { if($ir['crystals'] < 10000000000) { print "You don't have enough crystals!"; } else { $noww=$ir['crystals']-10000000; if($noww = 0) { $noww="no"; } mysql_query("UPDATE users SET donatordays=donatordays+30,crystals=crystals-100000000 WHERE userid=$userid",$c); print "You have a DP (Pack One) and have spent 1000 crystals.You wont recieve any benefits with this donator-pack. You now have $noww crystals."; } } } $h->endpage(); ?> NOTICE that it will work for lvl 50-100 but i need one working for lower levels and one for 101-175 and one for 176and up... Any suggestions? ONE problem that i would have with it would be this part of the code towards the bottom... else if($_GET['spend'] == 'brave') { if($ir['crystals'] <20) { print "You don't have enough crystals!"; } else if($ir['brave'] == $ir['maxbrave']) { print "You already have full brave."; } else { $nowcrys=$ir['crystals']-20; mysql_query("UPDATE users SET brave=maxbrave,crystals=crystals-20 WHERE userid=$userid",$c); print "You now have full brave and have spent 20 crystals. You now have $nowcrys Crystals."; }
-
Re: How would i set level requirements?? OK so i've come up with this so far... $req=($ir['crystals']>49 AND $ir['level']>49); $req1=($ir['crystals']>49 AND $ir['level']<99); $req2=($ir['level']>49); $req3=($ir['level']<99); if($req A[code]ND $req1) { $ba="[url='tradement.php?spend=brave']Buy[/url]"; } else if($req2 AND $req3) { $ba="N/A"; } else { $ba="Lvl Req."; } how do i make it completely disappear for users not within those limits?[/code]
-
Re: [v1]Attack Stats FREE[v1] I am currently using this mod. Works wonderfully, Thanks a lot! :) Members Love it.
-
What would be the easiest way to set a level limit... FOR EXAMPLE... if($ir['crystals']>24) { $ha="[url='tradement.php?spend=health']Buy[/url]"; } else if($ir['level']>75 AND $ir['level']<125) { $ba="N/A"; } else if($ir['level']>125) { $ba="Lvl Req."; } how would i set this PROPERLY? OR to make it so i don't have to do a SEPERATE tradement.php set it so if userlvl is 74 or lower they pay 25 crystals, 75-124 50crystals, 125-199 100crystals, etc. (PREFERABLY LIKE THIS)
-
Re: Jail Bust Help FOUND OUT HOW TO DO IT ON MY OWN :) Here it is for anyone that might need/want it. $id = abs((int) $_GET['bust']); $z=mysql_query("SELECT * FROM users WHERE userid = $id",$c) or die(mysql_error()); $user = mysql_fetch_array($z); if(!$user['jail']) { print "Error: The player you selected is not in jail."; $h->endpage(); die(""); }
-
Re: bounty hunter Time would go down if u setup the crons for the bounty hunter script, as for no money rewarded, that's part of the crons also. I use v1 and don't use the bounty hunter mod so i'm not sure what the crons are and cba to search.
-
I've got a custom Jail Bust script that runs a 50% chance of success at the moment. I am trying to get it so people can't use the bug... The bug is basically this: You can bust a user out and then refresh to keep busting them out even if they aren't in jail... This is the script I setup but doesn't work... Any suggestions? $dur=mysql_query("SELECT * FROM users WHERE userid={$_GET['bust']}",$c); if ($dur['jail']="0") { die("You cannot bust someone out of jail if they aren't in jail! <a href=jail.php>back</a>"); exit; } $_GET['bust'] = grabs userid of the user in jail. $dur being the user you're trying to bust outta jail. $dur['jail'] being the user you're trying to bust out's time left in jail...
-
Re: Gangs and Gang Wars This is a little late but you could always limit amount of upgrades in the gang meaning a MAX GANG MEMBERS setup.