Jump to content
MakeWebGames

2Pacalypse

Members
  • Posts

    63
  • Joined

  • Last visited

    Never

Everything posted by 2Pacalypse

  1. When testing this script I constantly get "You are not high enough level to go here!" It's written for MCCode V2 As far as I can see all is in perfect order... but obviously, something isn't Help is appreciated :)   <?php include "globals.php"; switch($_GET['city']) { case 'portadown': portadown(); break; case 'london': london(); break; case 'washington': washington(); break; case 'paris': paris(); break; case 'berlin': berlin(); break; case 'vegas': vegas(); break; case 'kathmandu': kathmandu(); break; } print " <table class='table' width='65%' cellpadding='2'> <tr> <th>City</th><th>Level</th><th>Cost</th><th>Travel</th> </tr> <tr> <td>Portadown</td><td>1</td><td>/$1,000</td><td>[url='airport.php?city=portadown']Go[/url]</td> </tr> <tr> <td>London</td><td>5</td><td>/$3,000</td><td>[url='airport.php?city=london']Go[/url]</td> </tr> <tr> <td>Washington</td><td>10</td><td>/$5,000</td><td>[url='airport.php?city=washington']Go[/url]</td> </tr> <tr> <td>Paris</td><td>20</td><td>/$7,500</td><td>[url='airport.php?city=paris']Go[/url]</td> </tr> <tr> <td>Berlin</td><td>30</td><td>/$10,000</td><td>[url='airport.php?city=berlin']Go[/url]</td> </tr> <tr> <td>Las Vegas</td><td>40</td><td>/$12,500</td><td>[url='airport.php?city=vegas']Go[/url]</td> </tr> <tr> <td>Kathmandu</td><td>50</td><td>/$15,000</td><td>[url='airport.php?city=vegas']Go[/url]</td> </tr> "; function portadown() { if ($ir['level'] > 0 and $ir['money'] >999) { $db->query("UPDATE users SET money=money-1000,location=1 WHERE userid=$userid"); print "You paid /$1,000 to travel to Portadown"; } elseif ($ir['level'] < 1) { print "You are not high enoguh level to go here!"; } elseif ($ir['money'] < 1000) { print "You don't have enough money to cover the ticket"; } } function london() { if ($ir['level'] > 4 and $r['money'] >2999) { $db->query("UPDATE users SET money=money-3000,location=2 WHERE userid=$userid"); print "You paid /$3,000 to travel to London"; } elseif (($ir['level']) < 5) { print "You are not high enough level to go here!"; } elseif ($r['money'] < 3000) { print "You don't have enough money to cover the ticket"; } } function washington() { if ($ir['level'] > 9 and $ir['money'] >4999) { $db->query("UPDATE users SET money=money-5000,location=3 WHERE userid=$userid"); print "You paid /$5,000 to travel to Washington"; } elseif ($ir['level'] < 10) { print "You are not high enoguh level to go here!"; } elseif ($ir['money'] < 5000) { print "You don't have enough money to cover the ticket"; } } function paris() { if ($ir['level'] > 19 and $ir['money'] >7499) { $db->query("UPDATE users SET money=money-7500,location=4 WHERE userid=$userid"); print "You paid /$7,500 to travel to Paris"; } elseif ($ir['level'] < 20) { print "You are not high enoguh level to go here!"; } elseif ($ir['money'] < 7500) { print "You don't have enough money to cover the ticket"; } } function berlin() { if ($ir['level'] > 29 and $ir['money'] >9999) { $db->query("UPDATE users SET money=money-10000,location=5 WHERE userid=$userid"); print "You paid /$10,000 to travel to Berlin"; } elseif ($ir['level'] < 30) { print "You are not high enough level to go here!"; } elseif ($ir['money'] < 10000) { print "You don't have enough money to cover the ticket"; } } function vegas() { if ($ir['level'] > 39 and $ir['money'] >12499) { $db->query("UPDATE users SET money=money-12500,location=6 WHERE userid=$userid"); print "You paid /$12,500 to travel to Las Vegas"; } elseif ($ir['level'] < 40) { print "You are not high enough level to go here!"; } elseif ($ir['money'] < 12500) { print "You don't have enough money to cover the ticket"; } } function kathmandu() { if ($ir['level'] > 49 and $ir['money'] >14999) { $db->query("UPDATE users SET money=money-15000,location=7 WHERE userid=$userid"); print "You paid /$12,500 to travel to Kathmandu This is a very cold place!"; } elseif ($ir['level'] < 50) { print "You are not high enough level to go here!"; } elseif ($ir['money'] < 15000) { print "You don't have enough money to cover the ticket"; } } $h->endpage(); ?> <?php include "globals.php"; $_GET['to'] = abs((int) $_GET['to']); if(!$_GET['to']) { print "Welcome to the Monorail Station. It costs \$1000 for a ticket. Where would you like to travel today? "; $q=$db->query("SELECT * FROM cities WHERE cityid != {$ir['location']} AND cityminlevel <= "); print "<table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Name</th><th>Description</th><th>Min Level</th><th> </th></tr>"; while($r=$db->fetch_row($q)) { print "<tr><td>{$r['cityname']}</td><td>{$r['citydesc']}</td><td>{$r['cityminlevel']}</td><td>[url='monorail.php?to={$r[']Go[/url]</td></tr>"; } print "</table>"; } else { if($ir['money'] < 1000) { print "You don't have enough money."; } else if( ((int) $_GET['to']) != $_GET['to']) { print "Invalid city ID"; } else { $q=$db->query("SELECT * FROM cities WHERE cityid = {$_GET['to']} AND cityminlevel <= {$ir['level']}"); if(!$db->num_rows($q)) { print "Error, this city either does not exist or you cannot go there."; } else { $db->query("UPDATE users SET money=money-1000,location={$_GET['to']} WHERE userid=$userid"); $r=$db->fetch_row($q); print "Congratulations, you paid \$1000 and travelled to {$r['cityname']} on the monorail!"; } } } $h->endpage(); ?>   Thanks for reading, look forward to your help :wink:
  2. Re: [REVIEW] Korporate Thugz! Fellow admin decided to add chat, he didn't realise it was in the same directory... Please wait while we fix it :D
  3. Re: [REVIEW] Korporate Thugz! Moved to kthugz.com
  4. Re: [REVIEW] Korporate Thugz! Thanks for your review :D Although not sure many visitors will have such a big screen :-D
  5. Re: [V2] Will Refill!   That means they get 1 Will point, per crystal....
  6. Re: [REVIEW] Korporate Thugz! Bump! Anyone else wanna review? Pweese?
  7. Re: [V2] Will Refill! Well they know the percentage they get... simply because they type it in to fill it up :roll:
  8. Re: [V2] Will Refill! gurpreet: not sure what you mean, but once you have hit the button to exchange points for Will, it tells you how much will you gained.
  9. Re: [V2] Current Status - What's going on? Can't edit posts after an hour! What a load of skit!
  10. Re: [V2] Current Status - What's going on? Ah, my apologies. Missed the line up at the near the top :( Your version does work, but I don't appreciate you trying to advertise your game on the thread. Mind editting please?
  11. Re: [V2] Current Status - What's going on? Now that I think of it, this is a thread for my mod, not for you to repost it, inncorrectly & to advertise your game! I'm telling you now there is a slight glitch in your code! Mines is the only one that properly works!
  12. Re: [V2] Current Status - What's going on? Or just use my version, seeing as all the ones posted have got bugs :)
  13. Re: [V2] Current Status - What's going on? lol There's a bit wrong with your version, gotta go now.. I'llcorrect it tomorrow
  14. Re: [V2] Current Status - What's going on? 0.0 What is the difference?   Added screenshot in first post!
  15. This little bad boy shows users what is happening, if they are in hospital, in jail, have new mail or new events. Or if they're doing fine - tells them they're doing fine! Screenshot! Find: include "mainmenu.php"; global $ir,$c; print '</td><td width="2" class="linegrad" bgcolor="#330000"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>';   After that, add: print "<table class=status> <tr><td> [b]Your current status[/b]: </td></tr>"; if($ir['hospital']) { print "<tr><td>You are currently in hospital for {$ir['hospital']} minutes.</td></tr>"; } elseif($ir['jail']) { print "<tr><td>You are currently in jail for {$ir['jail']} minutes.</td></tr>"; } if ($ir['new_mail'] > 0) { print "<tr><td>You have new mail! Check your [url='mailbox.php']mailbox[/url] to read it.</tr></td>"; } if ($ir['new_events'] > 0) { print "<tr><td>You have new events! Check your [url='events.php']events[/url] to check whats going on.</tr></td>"; } if ($ir['hospital'] == 0 and $ir['jail'] == 0 and $ir['new_mail'] == 0 and$ir['new_events'] == 0) { print "<tr><td>All is fine for you at the moment</td></tr>"; } print "</table>"; }   The style bit for that table is here: .status { background-color: #000000; border: 1px solid #663300; -moz-border-radius: 2px 2px 2px 2px; color: gold; text-align: center; filter: alpha(opacity=50); -moz-opacity:.50;opacity:.50; }   Feel free to edit in anyway!
  16. Re: [V2] Will Refill! My house has 1,150 Will or something like that, that's the number of Will, not the percentage it gives! Basically 57.5 Will = 5% Will :)
  17. Re: [V2]Updated Header[V2] As far as I know Crazy-T is a leecher, and actually charges for stolen mods lol
  18. Re: [V2] Will Refill! Added 2 screenshots :)
  19. With this, users can type in an amount of points to exchange for Will, by default, it is 1 Point per 1% Will. But this is easily changed! (My file is not crystaltemple.php, it is points.php so you will need to change a few links) Screenshots: Input Done Find: print "What would you like to spend your points on? [url='points.php?spend=refill']Energy Refill - {$set['ct_refillprice']} points[/url]   Then add: [url='points.php?spend=wrefill']Will Refill - 1% Will per point[/url]   Find: else if($_GET['spend'] == 'IQ') { print "Type in the amount of crystals you want to swap for IQ. You have [b]{$ir['crystals']}[/b] points. One point = {$set['ct_iqpercrys']} IQ.<form action='crystaltemple.php?spend=IQ2' method='post'><input type='text' name='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 points or did not fill out the form. [url='points.php?spend=IQ']Back[/url]"; } else { $iqgain=$_POST['crystals']*$set['ct_iqpercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid"); $db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid"); print "You traded {$_POST['crystals']} points for $iqgain IQ."; } }   Then add: else if($_GET['spend'] == 'wrefill') { print "How many points to refill will? You have [b]{$ir['crystals']}[/b] points. One point = 1% Will. <form action='points.php?spend=wrefill2' method='post'> <input type='text' name='points' /> <input type='submit' value='Trade' /></form>"; } else if($_GET['spend'] == 'wrefill2') { $_POST['crystals']=(int) $_POST['points']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough points or did not fill out the form. [url='points.php?spend=wrefill']Back[/url]"; } else { $wgain=(($ir['maxwill']/100) * $_POST['crystals']); $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid"); $db->query("UPDATE users SET will=will+$wgain WHERE userid=$userid"); print "You traded {$_POST['crystals']} points for $wgain Will."; if ($ir['will'] > $ir['maxwill']) {$db->query("UPDATE users SET will=maxwill WHERE userid=$userid") ;} }}   There is a line at the end that prevents users from going over 100% Will, so it's non-exploitable ;) If there's any major bugs, please post, or fix it and post it ;)
  20. Title: Korporate Thugz Site URL: http://www.kaspersky.org.uk - Temporary, just so happened to be the only domain I wasn't using :( Site Description: Still in "development", players get reset occassionally. Wanted to get a rating so I know if I've hit the right theme :) Please also aswell as posting a few comments, give a rating out of /10 please :D Thank you!
  21. Re: [Review] - Killah-City.net - Please Review   Gots to agree with Cronus! Although the bars aren't terribly bad... they're thin, which I like.... although if they were red they would look better with the banner ;) Other than that, nice!
  22. Re: [REVIEW] - TopRankinGames Cool, just submitted my game :) Looks liek a nice site, looks as though you made it yourself, not just a script, which I think is good. Although the graphics are.... :cry:
  23. Re: [REVIEW] Crime-Network.com - Please review! Very nice! GRPG has no mods made for it, but I see you've spent alot of time making mods for your script! :mrgreen:
  24. Re: [REVIEW] - Celtic Raids Pretty nice indeed ;)
  25. Re: [REVIEW] Cybermicro needs a review. Looks like a nice mod, although... "Address Not Found www.cybermicro.ca could not be found. Please check the name and try again." From what i see on the screenshot, looks like a nice layout
×
×
  • Create New...