mr_shuu Posted July 30, 2009 Posted July 30, 2009 I set up explore page to only offer monorail... I need a rewrite of monorail.php so that it will offer a selection of one of seven cities... request an item to travel to cities 4 5 6 & 7 and after a selection is made the player is sent to the city they selected which is an explore page for that city... (city 1 explore page1) Quote
shrek1609 Posted July 30, 2009 Posted July 30, 2009 Re: rewrite of monorail needed why not leave the explore page as it is and just edit the links if ($ir['location'] ==3) { print" Search the Streets "; } Quote
CrazyT Posted July 30, 2009 Posted July 30, 2009 Re: rewrite of monorail needed why not leave the explore page as it is and just edit the links if ($ir['location'] ==3) { print" Search the Streets "; } Why not use in array if you want the Search the streets in other locations.. if (in_array($ir['location'], array(3))) { echo "Search the Streets "; } Quote
mr_shuu Posted August 1, 2009 Author Posted August 1, 2009 Re: rewrite of monorail needed Both of your suggestions are probably the better way to go. I wanted to have instead of an explore page that has the monorail and then fixes the explore to whatever city... I wanted monorail as the starting point... then depending on which city they select they go to that city's own explore page... I guess I just want to have more art in the game... have maps for each city.... Quote
mr_shuu Posted August 1, 2009 Author Posted August 1, 2009 Re: rewrite of monorail needed but when I mess with the explore it gets screwed up... when I have tried to change explore page I get it screwed up and cannot get the look I want. Quote
Nicholas Posted August 3, 2009 Posted August 3, 2009 Re: rewrite of monorail needed here is a monorail.php coding, which should work... <?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 <= {$ir['level']}"); 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(); ?> Quote
mr_shuu Posted August 6, 2009 Author Posted August 6, 2009 Re: rewrite of monorail needed Thank you. I guess it's the explore page I need to work out... so it reflects changes... I thought it would be cool if explore shows more locations based on user level... do away with monorail...have sections of a city open up with levels... have the images appear on the explore page with the areas with levels achieved.... Quote
wolfe Posted August 6, 2009 Posted August 6, 2009 Re: rewrite of monorail needed Yeah, then its definitely not monorail you need. Use some of the suggestions and have the explore only show options after certain levels are hit. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.