Jump to content
MakeWebGames

realmoflegends

Members
  • Posts

    240
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by realmoflegends

  1. These are the functions: function cavein() { function nothing() { for the variable things that may happen during a mine search. Each type of mine is also a separate function, that way the odds and awards can be varied.
  2. No problem, I know in the beginning the learning curve can be rough. I had the advantage of a C++/Visual programming background to speed me up a bit, but even I get stuck sometimes still. I learn something new about PHP every day though.
  3. I believe this should fix it; two sets of double quotes inside one another are something PHP doesn't like: echo "Stop You have been detained due to your illegal activities Please follow me to the <a href='http://monorail3.php?action=stopped' target='_blank'> security center</a>";
  4. Uh oh, bug squashing time: I gained 10 crystals from the Donator award, and it set my existing 50 Crystals to only 10. That brings me to Browser Game Rule #1: Test everything to make sure it works. :) I have a variety of things I would do to build on the nice game you already have, PM me if you're interested.
  5. It's not a bad start actually, looks decent. But there needs to be more to do really, more features in the Explore area. Hopefully you plan on adding more 'meat' to it to separate it from the Mccodes crowd. Also, there are few ways to make money really aside from 'Actions', making all those expensive things like the Housing and Education out of reach for awhile. And I wouldn't hand new players 14 days of Upgraded status right off the bat, maybe start off with 2-3, whetting their appetite for more but not allowing people to power up to a point where they don't need to upgrade to get ahead by the time the 14 days wears off. Just some rebalancing needed, IMHO.
  6. Well...shouldn't that documentation come with it for $120 (or even $40 more tacked onto a purchased license)? Maybe i'm being petty, but with even stuff that used to work out of the box (crimes, etc) throwing errors, and reported bugs being basically ignored on release despite a long timeframe...just seems a little weird.
  7. Eww. I purchased a license, but glad I didn't bother with 'redux' now. Sounds like a bit of a money grab with lack of backwards mod compatibility in some cases and bug issues.
  8. I should note about 85% of this was written ages ago, not by me, and not changed since it worked fine. My intent with this free mod was to correct clear bugs that kept it from working. Yes, I know <center> is being depreciated, but it works, and using CSS for this task is a little more cumbersome. :) ruler and Dominion, some good calls on small stuff (I like to learn too), but the bottom line on this one was to fix stuff that didn't work so the mod could just plug in and work, without all the bug hunting that seems to happen much of the time with the free mods.
  9. Hey all, I decided to go ahead and offer this one for free: Here's a Mine Mod where players can search for cash and crystals, with power levels and experience needed to advance that change over time. I've never posted a free mod before too, so I wanted to offer this to the community. This one is an altered and bug fixed version of the 'Mines--Fixed' thread that was posted over a year ago now. The main difference: This one actually works. That code was buggy, not attractive and required numerous fixes to work correctly. The leveling system didn't really work, and max power wasn't being updated when you gained levels either. Now i've fixed it and all of that works great and has been tested a lot with my new game. Some text tailored to my game (Crowns, Gems, etc.) may need to be changed obviously. This new mod is nicely formatted, and has even added possible events too: a chance of finding nothing when you dig, or a chance for a cave-in and going to the hospital, all easily adjustable. Create mine.php with this code (no spaces should be in the word power, ignore any that are there, forum software inserts those strangely): <?php require_once("globals.php"); $thug = mysql_query("SELECT `userid`,`power`,`jail`,`hospital`,`max_power`,`power`,`mine_level`,`mine_exp`,`mine_needed` FROM `users` WHERE (`userid`=".$_SESSION['userid'].")",$c); $s = mysql_fetch_array($thug); mine_check(); $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : false; switch($_GET['action']) { case 'mine': mine_1(); break; case 'minesub': mine_1_sub(); break; case 'mine2': mine_2(); break; case 'mine2sub': mine_2_sub(); break; case 'mine3': mine_3(); break; case 'mine3sub': mine_3_sub(); break; case 'mine4': mine_4(); break; case 'mine4sub': mine_4_sub(); break; case 'mine5': mine_5(); break; case 'mine5sub': mine_6_sub(); break; case 'mine6': mine_6(); break; case 'mine6sub': mine_6_sub(); break; default: mine_index(); break; } /** ** Calls the cases so mine.php?mine **/ function mine_index() { global $h,$s,$c; echo '<center><img src="mines.jpg"></center><br>'; echo "<center><hr /> <center>Current Mining Power: <b>".number_format($s['power'])."/".number_format($s['max_power'])."</b> <center>Mining Level: <b>".number_format($s['mine_level'])."</b> <center>Mining Experience: <b>".number_format($s['mine_exp'])."/".number_format($s['mine_needed'])."</b> <hr /> </center> <u><p><b>Gemstone Mines (Look for Gems)</u></b><br> [<a href='mine.php?action=mine'>Level 1 mine</a>]<br> [<a href='mine.php?action=mine2'>Level 20 mine</a>]<br> [<a href='mine.php?action=mine3'>Level 40 mine</a>]<p> <u><b>Gold Mines (Look for Crowns)</u></b><br> [<a href='mine.php?action=mine4'>Level 10 mine</a>]<br> [<a href='mine.php?action=mine5'>Level 30 mine</a>]<br> [<a href='mine.php?action=mine6'>Level 40 mine</a>]<br> </center>"; } if ($s['jail'] > 0) { echo "<center>The mine is closed to people in the Dungeon.</center>"; $h->endpage(); exit; } if ($s['hospital'] > 0) { echo "<center>You cant go mining while at the Healer.</center>"; $h->endpage(); exit; } // -- CODE function cavein() { global $s,$h,$c,$userid; $HOSPTIME=rand(5,10); // HOSPITAL TIME mysql_query("UPDATE users SET hospital=$HOSPTIME, hospreason='Cave-in while searching Mines' WHERE userid=$userid"); echo "After a few minutes of searching the ground begins to rumble...the walls begin to collapse around you! You barely escape and wake up at the Healer."; $h->endpage(); exit; } function nothing() { global $s,$h,$c,$userid; echo "You did not find anything while searching the mines. <br /> [<a href='mine.php?action=mine'>Mine again</a>]"; $h->endpage(); exit; } function mine_1() { global $s,$h,$c,$userid; if($s['power'] < 10) { echo "You need 10 power to mine here, and you have ".number_format($s['power']).""; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-10 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_gems = rand(1,5); $rand_exp = rand(5,30); echo "<center>You begin mining in the level 1 mine and found $rand_gems Gem(s).</center> "; mysql_query("UPDATE `users` SET `crystals`=`crystals`+".abs((int) $rand_gems).",`mine_exp`=`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; } function mine_2() { global $s,$h,$c,$userid; if($s['power'] < 15) { echo "<center>You need 15 power to mine here, and you have ".number_format($s['power'])."</center>"; $h->endpage(); exit; } if($s['mine_level'] < 20) { echo "<center>You need to be mining level 20 to mine here, and you are mining level ".number_format($s['mine_level'])."</center>"; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-15 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_gems = rand(5,25); $rand_exp = rand(10,70); echo "<center>You begin mining in the level 20 mine and found ".number_format($rand_gems)." Gem(s).</center> "; mysql_query("UPDATE `users` SET `crystals`=`crystals`+".abs((int) $rand_gems).",`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine2'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; } function mine_3() { global $s,$h,$c,$userid; if($s['power'] < 25) { echo "<center>You need 25 power to mine here, and you have {$s['power']}</center>"; $h->endpage(); exit; } if($s['mine_level'] < 40) { echo "<center>You need to be mining level 40 to mine here, and you are mining level ".number_format($s['mine_level'])."</center>"; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-25 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_gems = rand(15,50); $rand_exp = rand(25,100); echo "<center>You begin mining in the level 40 mine and found ".abs((int) $rand_gems)." Gem(s).</center> "; mysql_query("UPDATE `users` SET `crystals`=`crystals`+".abs((int) $rand_gems).",`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine3'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; } function mine_4() { global $s,$h,$c,$userid; if($s['power'] < 10) { echo "You need 10 power to mine here, and you have ".number_format($s['power']).""; $h->endpage(); exit; } if($s['mine_level'] < 10) { echo "<center>You need to be mining level 10 to mine here, and you are mining level ".number_format($s['mine_level'])."</center>"; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-10 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_money = rand(50,400); $rand_exp = rand(5,30); echo "<center>You begin mining in the level 10 mine and found ".number_format($rand_money)." Crowns worth of gold.</center> "; mysql_query("UPDATE `users` SET `money`=`money`+".abs((int) $rand_money).",`mine_exp`=`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine4'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; } function mine_5() { global $s,$h,$c,$userid; if($s['power'] < 15) { echo "<center>You need 15 power to mine here, and you have {$s['power']}</center>"; $h->endpage(); exit; } if($s['mine_level'] < 30) { echo "<center>You need to be mining level 30 to mine here, and you are mining level ".number_format($s['mine_level'])."</center>"; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-15 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_money = rand(100,1000); $rand_exp = rand(10,70); echo "<center>You begin mining in the level 30 mine and found ".number_format($rand_money)." Crowns worth of gold.</center> "; mysql_query("UPDATE `users` SET `money`=`money`+".abs((int) $rand_money).",`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine5'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; } function mine_6() { global $s,$h,$c,$userid; if($s['power'] < 25) { echo "<center>You need 25 power to mine here, and you have ".number_format($s['power'])."</center>"; $h->endpage(); exit; } if($s['mine_level'] < 40) { echo "<center>You need to be mining level 40 to mine here, and you are mining level ".number_format($s['mine_level'])."</center>"; $h->endpage(); exit; } mysql_query("UPDATE `users` SET `power`=`power`-25 WHERE (`userid`=".$_SESSION['userid'].")",$c); // ** ADDED CODE $CAVEIN=rand(1,10); $NOTHING=rand(1,3); if ($CAVEIN==9) { cavein(); } if($NOTHING==2) { nothing(); } // ** END $rand_money = rand(500,2000); $rand_exp = rand(25,100); echo "<center>You begin mining in the level 40 mine and found ".number_format($rand_money)." Crowns worth of gold.</center> "; mysql_query("UPDATE `users` SET `money`=`money`+".abs((int) $rand_money).",`mine_exp`+".abs((int) $rand_exp)." WHERE (`userid`=".$_SESSION['userid'].")",$c); echo "<center>[<a href='mine.php?action=mine6'>Mine again</a>]</center> "; echo "<center>[<a href='mine.php'>Back</a>]</center> "; } ?>   - Open up cron_fivemins and in your queries add: $thug = "UPDATE `users` SET `power`=`power`+(max_power/(12.5)) WHERE `power`<`max_power`"; mysql_query($thug); - Open phpmyadmin and run this query: ALTER TABLE `users` ADD`mine_level` INT(11) NOT NULL DEFAULT '1'; ALTER TABLE `users` ADD`mine_exp` INT(11) NOT NULL DEFAULT '0'; ALTER TABLE `users` ADD`mine_needed` INT(11) NOT NULL DEFAULT '100'; ALTER TABLE `users` ADD`power` INT(11) NOT NULL DEFAULT '0'; ALTER TABLE `users` ADD`max_power` INT(11) NOT NULL DEFAULT '10'; - Insert this at the bottom of your global_func.php file:   function mine_check() { $thug = mysql_query("SELECT `mine_level`,`mine_exp`,`mine_needed`, `max_power`, `power` FROM `users` WHERE (`userid`=".$_SESSION['userid'].")"); $s = mysql_fetch_array($thug); if($s['mine_exp'] >= $s['mine_needed']) { $expu=$s['mine_exp']-$s['mine_needed']; $s['mine_level']+=1; $s['mine_exp']=$expu; $s['power']=+2; $s['max_power']=+2; mysql_query("UPDATE `users` SET `mine_level`=`mine_level`+1,`mine_exp`=$expu, `power`=`power`+2, `max_power`=`max_power`+2, `mine_needed`=`mine_needed`*1.1 WHERE (`userid`=".$_SESSION['userid'].")"); } }   3. Set the max_power and mine_needed increments where you want them. 4. Link to the mine.php where you want players to access it. That's it. Screenshot of the mod in action: Screenshot Easy to install and adjust for any economy, and its for v2 or higher of McCodes. Enjoy! Derek
  10. My feedback: Graphics are rudimentary at best, the mechanics and gameplay are almost exactly like Magic: The Gathering (right down to the colors of mana, 'mana burn' and names of the elements, like Graveyard and abilities like Flying for creatures), and the duel requirements to obtain the 'promo cards' are a bit on the high side. Needs more time in the oven, IMHO.
  11. Cool, bought a few. I figured he might not be a crook, but since he doesn't get on here often, might be one of those that checks his stuff once a week or something....dealt with a few of those buying mods and it was a real pain.
  12. Has anyone bought from him recently and got the mods?
  13. Curt is outstanding, if anyone has any doubts as to his coding skills. He's helped me out a few times very nicely.
  14. Can't wait, his mod is excellent if you haven't used it already. It's in my game and working well in my tests so far.
  15. Some truly cool and smart mods there! A shame he isn't here more.
  16. It's free now!
  17. I like to add 'flavor text' and little tidbits to whet the player's appetite as to what the game is about and features, etc. Make them excited to play it.
  18. Heh, the script itself is wonderful and makes it easy to put together a very nice store, but if you try to run a store with it on a crappy (or even just a so-so) host, you'll be rewarded with page slowness, errors and problems. It tends to be a memory hog. McCodes can be a little the same way. I moved my upcoming MCC-based game to much better hosting than I had as I approach beta, and its like night and day. Pages pop up quickly and smoothly, no lag at all.
  19. McCodes is one of those web apps where the quality of the host can impact the playing (and development) experience of the whole thing (the Magento shopping cart is another). Putting a busy game on a free host is usually not a good idea long-term.
  20. Too much grey and angular shapes. That is all. :)
  21. I tried that, nothing. Turns out the array had to be rewritten/phased out in order to work, failed on several servers with older and newer PHP and MySQL versions (mccodes might want to make a note of this for the Car mod they have on their site, the 'Tune' part really doesn't work, at least anymore).
  22. Hey all, This is the the cars mod given away by McCodes site, in the 'Tune' area. This section used to work just fine, but now gives these errors (nothing at all changed except hosting/PHP/MySQL version): Warning: Cannot use a scalar value as an array in tune.php on line 20 Warning: Cannot use a scalar value as an array in tune.php on line 21 Warning: Cannot use a scalar value as an array in tune.php on line 22 Warning: Cannot use a scalar value as an array in tune.php on line 23 Warning: Invalid argument supplied for foreach() in tune.php on line 37 Code section is here: <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ function power($num1, $num2) { return pow($num1, $num2); } session_start(); include "globals.php"; print "<h3>The Enhancement and Upgrade Shoppe</h3><hr /> > <a href='garage.php'>Back To Race Track</a><hr />"; if(!$_GET['id']) { die("Invalid Usage"); } $q=mysql_query("SELECT cp.*,ct.* FROM cars_playercars cp LEFT JOIN cars_types ct ON ct.carID=cp.cpcCAR WHERE cp.cpcID={$_GET['id']} AND cp.cpcPLAYER=$userid", $c); if(mysql_num_rows($q) == 0) { die("Invalid Car"); } $r=mysql_fetch_array($q); $cost['acc']=$r['carACC']*power($r['cpcACCLV']+1,4)*($r['cpcACCLV']*$r['carACC']*2); $cost['han']=$r['carHAN']*power($r['cpcHANLV']+1,4)*($r['cpcHANLV']*$r['carHAN']*2); $cost['spd']=$r['carSPD']*power($r['cpcSPDLV']+1,4)*($r['cpcSPDLV']*$r['carSPD']*2); $cost['shd']=$r['carSHD']*power($r['cpcSHDLV']+1,4)*($r['cpcSHDLV']*$r['carSHD']*2); if($_GET['buy']) { if($_GET['buy'] != "acc" && $_GET['buy'] != "han" && $_GET['buy'] != "spd" && $_GET['buy'] != "shd") { die("Abusers suck."); } $upgr_cost=$cost[$_GET['buy']]; if($ir['money'] < $upgr_cost) { die("You don't have enough money to upgrade this stat."); } mysql_query("UPDATE users SET money=money-{$upgr_cost} WHERE userid=$userid", $c); $stat="cpc".strtoupper($_GET['buy'])."LV"; mysql_query("UPDATE cars_playercars SET $stat=$stat+1 WHERE cpcID={$_GET['id']}", $c); print "Upgrade Complete!<br /> > <a href='tune.php?id={$_GET['id']}'>Tune More</a>"; } else { foreach($cost as $k => $v) { $costf[$k]='$'.number_format($v); } $acc=$r['cpcACCLV']*$r['carACC']; $han=$r['cpcHANLV']*$r['carHAN']; $spd=$r['cpcSPDLV']*$r['carSPD']; $shd=$r['cpcSHDLV']*$r['carSHD'];   Help would be greatly appreciated, and there may be a few dollars rewards money involved. 23 people viewed this, someone must know :D
  23. A few comments: - The layout is a little messed up on wider monitors such as mine (1920x1080), the one side has lots of white blank space on it in FF4. Might want to 'center' it so it adjusts to wider monitors, mine adjusts automatically. - It's pretty, but there isn't much content on there really, so a buyer would have to do a lot of actual content work on it. Any idea what you're looking for price wise?
  24. Yep, constantly changing prices and asking customers if you should charge something or not makes you look a little unsure of yourself, not the best attribute for someone you'd want to hire to perform a service. :)
  25. Nice site, redeye (corruptcity that is). I'd like to see the inside of it, except it says my IP has been used to signup already, which is not true to my knowledge, never signed up to your site. IP is: 24.23.19.72
×
×
  • Create New...