Jump to content

Magictallguy

Moderators
  • Content Count

    1,750
  • Joined

  • Last visited

  • Days Won

    43

Magictallguy last won the day on November 4

Magictallguy had the most liked content!

Community Reputation

156 Excellent

About Magictallguy

  • Rank
    Intermediate
  • Birthday 08/07/1991

Personal Information

  • Location
    Bolton, UK
  • Occupation
    Freelance Website Developer

Recent Profile Visitors

15,695 profile views
  1. The servers I manage are dotted around the planet. Only 2 of them are local (to the UK). That being said, I'm not paying specifically for servers to be located elsewhere, it just so happens that they're not in the UK. It can be used for providing a closer-to-home mirror of a site to doing things otherwise illegal on home soil - not that I would know, of course. Personally, I have no issue with offshore hosting, nor do I have much of an opinion on using them specifically because they're not homegrown. If you require an offshore host, you do you. In most cases you're likely to find here, (almost) any webserver will suffice
  2. .. you didn't run the installer, did you? The `settings` table in your site's database is missing a few rows - including game_name
  3. Why not run it on the command line? Everyone has their preferred method of administration 😉
  4. Assuming you followed the instructions, you'd be correct - it's in viewuser.php
  5. Your comments.php doesn't SELECT a COUNT() at any given point - you're looking in the wrong file
  6. And the URL you're attempting to use? Chances are you're not using an action (the "?action=wutever" bit) that's in the switch() statement near the top of the file. In v2 and v2.0.5b, the case is "repclear". and that function requires a POST value of ID. In reports_view(), the default form reads as <form action='staff_users.php?action=repclear'> <input type='hidden' name='ID' value='{$r['prID']}' /> {$csrf} <input type='submit' value='Clear' /> </form> and is part of an echo statement
  7. Hi Elessair! Is there anything in your error_log?
  8. You want something to mess around with that's easily modifiable? A subjective question - "ease" changes from person to person. However.. If you're after a testing ground of sorts and want something familiar and it works out of the box? MCCv2's got my vote. gRPG v1 comes with its own set of challenges if you'd like the learning curve (and don't mind a few bald spots). NEAB's a little less known (shame, really.. decent enough code) and could be considered "harder to modify", but that's using MCC as a basis of comparison There are also thousands more TBRPG engines available that I haven't mentioned either - not for preference, but for lacking memory Each engine has pros and cons. I feel MCCv2 would have the most gradual learning curve - it pulls apart and goes back together again simply enough
  9. Magictallguy

    Just do it.

    Tentatively, yes.
  10. Magictallguy

    Just do it.

    I.. uh.. I've gotta know now >.>
  11. Magictallguy

    Just do it.

    What does your gratitude get me?
  12. That would seem to fit the logic - not a clue what the crons are, I didn't make this mod
  13. Change $i=mysqli_fetch_array($query); to $i = $db->fetch_row($query); mine_globals.php <?php require_once 'globals.php'; //Call upon database for mining values. //Item ID's can be altered. They are //located at the bottom of this file. $q = $db->query("SELECT `m_power`, `m_Mpower`, `m_mopower`, `m_level`, `mEXP`, `mNEXP` FROM `Mining` WHERE `userid` = $userid"); $row = $db->fetch_row($q); $power = $row['m_power']; $maxpower = $row['m_Mpower']; $mopower = $row['m_mopower']; $level = $row['m_level']; $exp = $row['mEXP']; $nexp = $row['mNEXP']; $laber = $ir['IQ']; $place = $ir['location']; $db->free_result($q); //End DB. //Status bars. //Mining power bar $mpower = min((int) ($power / $maxpower * 100), 100); //Mining Bar Not Used $mpower2 = 100 - $mpower; //Mining bar used7 //End Mining bar //Start experience bar $miexp = min((int) ($exp / $nexp * 100), 100); $miexp2 = 100 - $miexp; //End experience bar //End Status Bars //Experience gained? if ($nexp <= $exp) { $db->query("UPDATE `Mining` SET `m_level` = `m_level` + 1, `mEXP` = 0, `mNEXP` = (`mNEXP`*1.25)+50, `m_mopower` = `m_mopower` + 1 WHERE `userid` = $userid"); } if ($ir['hospital'] > 0) { die('Mining is for those who are healthy! You are in the infirmary, thus, you are not healthy.'); } if ($ir['jail'] > 0) { die("Mining is for the good warrior. You're in the dungeon, so thus, you are not a good warrior."); } //Edit below for items. $pick = 3; //Mining pickaxe value. $silverflakesid = 9; //Silver flakes ID $copperflakeid = 10; //Copper Flakes ID $goldflakeid = 11; //Gold Flakes ID $rocksid = 12; //Rocks item id $sapphireitem = 13; //Small Sapphire item id $bpick = 14; //Broken pickaxe item id $diamonditem = 15; //Small diamond item id. $emeralditem = 16; //Small emerald item. mine.php <?php /* Mining Mod by TheMasterGeneral Cost: FREE Use: Allows users to mine up flakes and gems, which can be used to create items*. *=Does not include crafting mod. If you want to use a crafting mod, I use Sniko's crafting mod along side this. SQL: CREATE TABLE IF NOT EXISTS `Mining` ( `userid` bigint(11) NOT NULL DEFAULT '1' COMMENT 'Userid', `m_level` bigint(11) NOT NULL DEFAULT '1' COMMENT 'Mining Level', `mEXP` decimal(11,0) NOT NULL DEFAULT '0' COMMENT 'Mining Exp', `mNEXP` decimal(11,0) NOT NULL DEFAULT '100' COMMENT 'Exp needed to level', `m_power` bigint(11) NOT NULL DEFAULT '100' COMMENT 'User''s mining power.', `m_Mpower` bigint(11) NOT NULL DEFAULT '100' COMMENT 'User''s MAX mining power.', `m_mopower` bigint(11) NOT NULL DEFAULT '1' COMMENT 'How much more power can one buy? (In 10 power sets)', PRIMARY KEY (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; */ $macropage = 'mine.php'; require_once 'globals.php'; require 'mine_globals.php'; echo '<h3>Dangerous Mines</h3><hr />'; if (!isset($_GET['action'])) { $_GET['action'] = ''; } switch ($_GET['action']) { case 'mine': mine1(); break; case 'mine2': mine2(); break; case 'mine3': mine3(); break; case 'buyp': minepb(); break; case 'mine4': mine4(); break; case 'mine5': mine5(); break; case 'mine6': mine6(); break; default: mine_home(); break; } function minepb() { global $db, $ir, $c, $userid, $h; require 'mine_globals.php'; echo '<h3>Dangerous Mines</h3><hr />'; if ($level <= 10) { //If mining level is 1-10, 100 is the cost to add more power. $cost = 10; } if ($level <= 20 && $level >= 10) { //If mining level is 10-20, 1000 is the cost to add more power. $cost = 100; } if ($level <= 30 && $level >= 20) { //If mining level is 20-30, 5000 is the cost to add more power. $cost = 1000; } if ($level <= 75 && $level >= 30) { //If mining level is 75-30, 2000 is the cost to add more power. $cost = 2000; } if ($level <= 125 && $level >= 75) { //If mining level is 125-75, 5000 is the cost to add more power. $cost = 5000; } if (!isset($_POST['amount'])) { echo "<form action='mine.php?action=buyp' method='post'> You can currently buy $mopower sets of 10 mining power. How many do you wish to buy? Each set will cost you $cost IQ. <br><input type='text' name='amount' /><br> <input type='submit' value='Buy Power (No Prompt, so be sure!)' /> </form>"; } else { //Secure the ID input. $_GET['amount'] = (isset($_GET['amount']) && is_numeric($_GET['amount'])) ? abs(intval($_GET['amount'])) : ''; if ($_POST['amount'] > $mopower) { echo 'You do not have that many sets available to you. Try again.'; exit; } //Fix: Checks the input for negative values //To prevent users from inputting negative //values and give themselves labor //at the cost of losing mining power. if ($_POST['amount'] < 0) { echo 'Stop trying to abuse a game bug. You can be placed in Federal Jail for that.'; exit; } if (0 == $_POST['amount']) { echo 'Input must be a number larger than zero.'; exit; } if ($laber < $cost) { echo "You do not have enough IQ to add {$_POST['amount']} sets of mining power."; exit; } $poweradd = (10 * $_POST['amount']); $subtractlaber = ($cost * $_POST['amount']); $db->query("UPDATE `userstats` SET `IQ` = `IQ` - {$subtractlaber} WHERE `userid` = $userid"); $db->query("UPDATE `Mining` SET `m_Mpower` = `m_Mpower` + {$poweradd}, `m_mopower` = `m_mopower` - {$_POST['amount']} WHERE `userid` = $userid"); echo "You have purchased {$_POST['amount']} sets of mining power for $subtractlaber IQ."; } } function mine_home() { global $db, $ir, $c, $userid, $h; require 'mine_globals.php'; echo " This here be the ye'old mining shack. The mining hole is out back. Feel free to use it if ye got the right gear. There's six mining locations. You've gotta have the minimum level to mine there AND be within the same location. You also gotta make sure you've got the right gear! You will be able to purchase more mining power as well! You can mine up gems, rocks, and of course, <font color=silver>Silver Flakes</font>!<br> <hr /> You have $power / $maxpower mining power.<br> <img src='yellowbar.png' width='$mpower' height='10' /><img src='redbar.png' width='$mpower2' height='10' /><br /> You currently have $miexp % experience.<br> <img src='yellowbar.png' width='$miexp' height='10' /><img src='redbar.png' width='$miexp2' height='10' /><br /> You are level $level in mining.<br> <br> <br> <br> [<a href='mine.php?action=mine'>Cornrye - Level 1</a>]<br> [<a href='mine.php?action=mine2'>Falconworth - Level 10</a>]<br> [<a href='mine.php?action=mine3'>Rome - Level 20</a>]<br> [<a href='mine.php?action=mine4'>Timberwolf - Level 40</a>]<br> [<a href='mine.php?action=mine5'>Tel Yaga - Level 75</a>]<br> [<a href='mine.php?action=mine6'>Dion - Level 125</a>]<br> <br> <br> [<a href='mine.php?action=buyp'>Buy Mining Power</a>]<br> "; } function mine6() { global $db, $ir, $c, $userid, $h; $chance = rand(1, 130); require 'mine_globals.php'; $query = $db->query('SELECT `inv_itemid` FROM `inventory` WHERE `inv_itemid` = '.$pick." && `inv_userid` = $userid"); $i = $db->fetch_row($query); if (9 != $place) { echo 'You are not in Dion!'; exit; } //if ($level > 124) //{ //echo "This mine is way too easy for you. Leave it to the kiddies.<br> //<a href='mine.php'>Back</a>"; //exit; //} if ($level < 125) { die('Your mining level is too low for this mine.'); } if ($power < 100) { die("You need 100 mining power to mine here. You have $power."); } if (!$i['inv_itemid'] == $pick) { echo 'You need a basic pickaxe before you can even consider mining.'; exit; } if ($laber < 50000) { echo 'You need 50000 IQ to mine here! Come back when you have it!'; exit; } //Copper Flakes if ($chance <= 35) { $flakes = rand(250, 290); $expgain = (2.5 * $flakes); echo "While mining away, you have uncovered {$flakes} <font color=brown>Copper Flakes</font>!"; item_add($userid, $copperflakeid, $flakes); } //Rocks if (($chance >= 36) && ($chance <= 50)) { $rocks = rand(60, 80); $expgain = (2.25 * $rocks); echo "While mining away, you have managed to break away {$rocks} rock(s)!"; item_add($userid, $rocksid, $rocks); } //Infirmary if (($chance >= 51) && ($chance <= 55)) { $hosptime = (int) rand(550, 750); echo "You collapse a column holding the mineshaft up and caused a cave-in. You are later found under the rubble, barely breathing. You have been escorted to the infirmary for {$hosptime} minutes."; $reasonhosp = 'Mining Cave In'; $db->query("UPDATE users SET `hospital`=$hosptime,`hospreason`='$reasonhosp',`hp`=1 WHERE userid=$userid", $c); } //Dungeon if (($chance >= 56) && ($chance <= 60)) { $jailtime = (int) rand(550, 800); echo "While mining, a swarm of bugs overcrowd you. In attempt to get rid of them, you rip off your clothing and run into the nearest source of water. A guard sees you and escorts you into the dungeon for {$jailtime} minutes on the account of indecency exposure."; $reasonjail = 'Indecency Exposure'; $db->query("UPDATE users SET `jail` = $jailtime, `jail_reason` = '$reasonjail' WHERE userid=$userid", $c); } //Failed if (($chance >= 61) && ($chance <= 90)) { echo 'You gained nothing by mining.'; } //Gem if (($chance >= 91) && ($chance <= 93)) { $expgain = (2000); echo 'While mining away, you chip away a <font color=silver>Medium Sized Emerald</font>. Hold on this, you can use this in crafting!'; item_add($userid, 149, 1); //Replace 71 with your Small Sapphire item id. } //Break if (($chance >= 94) && ($chance <= 95)) { echo "While mining away, you struck a tough rock and broke your pickaxe. You're going to need to fix that before you can mine again."; item_add($userid, $bpick, 1); item_remove($userid, $pick, 1); } //Gold Flakes if (($chance >= 96) && ($chance <= 110)) { $gflake = rand(120, 200); $expgain = (3.5 * $gflake); echo "While mining away, you have managed to break away {$gflake} <font color=yellow>Gold Flakes</font>!"; item_add($userid, $goldflakeid, $gflake); } //Silver Flakes if (($chance >= 111) && ($chance <= 130)) { $sflake = rand(150, 250); $expgain = (3 * $sflake); echo "While mining away, you have managed to break away {$sflake} <font color=silver>Silver Flakes</font>!"; item_add($userid, $silverflakesid, $sflake); } //All done. Run this! if ($expgain) { $db->query("UPDATE `Mining` SET `mEXP` = `mEXP` + {$expgain} WHERE `userid` = $userid"); } $db->query("UPDATE `Mining` SET `m_power` = `m_power` - 100 WHERE `userid` = $userid"); die("<hr /> <a href='mine.php?action=mine6'>Mine Again</a><br /> <a href='mine.php'>>Back</a>"); } function mine5() { global $db, $ir, $c, $userid, $h; $chance = rand(1, 130); require 'mine_globals.php'; $query = $db->query('SELECT `inv_itemid` FROM `inventory` WHERE `inv_itemid` = '.$pick." && `inv_userid` = $userid"); $i = $db->fetch_row($query); if (6 != $place) { echo'You are not in Timberwolf!'; exit; } if ($level > 124) { echo "This mine is way too easy for you. Leave it to the kiddies.<br> <a href='mine.php'>Back</a>"; exit; } if ($level < 75) { die('Your mining level is too low for this mine.'); } if ($power < 50) { die("You need 50 mining power to mine here. You have $power."); } if (!$i['inv_itemid'] == $pick) { echo 'You need a basic pickaxe before you can even consider mining.'; exit; } if ($laber < 10000) { echo 'You need 1000 IQ to mine here! Come back when you have it!'; exit; } //Copper Flakes if ($chance <= 35) { $flakes = rand(220, 260); $expgain = (2 * $flakes); echo "While mining away, you have uncovered {$flakes} <font color=brown>Copper Flakes</font>!"; item_add($userid, $copperflakeid, $flakes); } //Rocks if (($chance >= 36) && ($chance <= 50)) { $rocks = rand(40, 56); $expgain = (1.75 * $rocks); echo "While mining away, you have managed to break away {$rocks} rock(s)!"; item_add($userid, $rocksid, $rocks); } //Infirmary if (($chance >= 51) && ($chance <= 55)) { $hosptime = (int) rand(300, 550); echo "You collapse a column holding the mineshaft up and caused a cave-in. You are later found under the rubble, barely breathing. You have been escorted to the infirmary for {$hosptime} minutes."; $reasonhosp = 'Mining Cave In'; $db->query("UPDATE users SET `hospital`=$hosptime,`hospreason`='$reasonhosp',`hp`=1 WHERE userid=$userid", $c); } //Dungeon if (($chance >= 56) && ($chance <= 60)) { $jailtime = (int) rand(330, 550); echo "While mining, a swarm of bugs overcrowd you. In attempt to get rid of them, you rip off your clothing and run into the nearest source of water. A guard sees you and escorts you into the dungeon for {$jailtime} minutes on the account of indecency exposure."; $reasonjail = 'Indecency Exposure'; $db->query("UPDATE users SET `jail` = $jailtime, `jail_reason` = '$reasonjail' WHERE userid=$userid", $c); } //Failed if (($chance >= 61) && ($chance <= 90)) { echo 'You gained nothing by mining.'; } //Gem if (($chance >= 91) && ($chance <= 93)) { $expgain = (1500); echo 'While mining away, you chip away a <font color=silver>Medium Sized Diamond</font>. Hold on this, you can use this in crafting!'; item_add($userid, 148, 1); //Replace 71 with your Small Sapphire item id. } //Break if (($chance >= 94) && ($chance <= 95)) { echo "While mining away, you struck a tough rock and broke your pickaxe. You're going to need to fix that before you can mine again."; item_add($userid, $bpick, 1); item_remove($userid, $pick, 1); } //Gold Flakes if (($chance >= 96) && ($chance <= 110)) { $gflake = rand(60, 160); $expgain = (2.75 * $gflake); echo "While mining away, you have managed to break away {$gflake} <font color=yellow>Gold Flakes</font>!"; item_add($userid, $goldflakeid, $gflake); } //Silver Flakes if (($chance >= 111) && ($chance <= 130)) { $sflake = rand(110, 230); $expgain = (2.5 * $sflake); echo "While mining away, you have managed to break away {$sflake} <font color=silver>Silver Flakes</font>!"; item_add($userid, $silverflakesid, $sflake); } //All done. Run this! if ($expgain) { $db->query("UPDATE `Mining` SET `mEXP` = `mEXP` + {$expgain} WHERE `userid` = $userid"); } $db->query("UPDATE `Mining` SET `m_power` = `m_power` - 50 WHERE `userid` = $userid"); die("<hr /> <a href='mine.php?action=mine5'>Mine Again</a><br /> <a href='mine.php'>>Back</a>"); } function mine1() { global $db, $ir, $c, $userid, $h; $chance = rand(1, 130); require 'mine_globals.php'; $query = $db->query('SELECT `inv_itemid` FROM `inventory` WHERE `inv_itemid` = '.$pick." && `inv_userid` = $userid"); $i = $db->fetch_row($query); if (1 != $place) { echo'You are not in Cornrye!'; exit; } if ($level > 9) { echo "This mine is way too easy for you. Leave it to the kiddies.<br> <a href='mine.php'>Back</a>"; exit; } if ($power < 10) { die("You need 10 mining power to mine here. You have $power."); } if (!$i['inv_itemid'] == $pick) { echo 'You need a basic pickaxe before you can even consider mining.'; exit; } if ($laber < 10) { echo 'You need 10 IQ to mine here! Come back when you have it!'; exit; } //Copper Flakes if ($chance <= 35) { $flakes = rand(20, 120); $expgain = (0.5 * $flakes); echo "While mining away, you have uncovered {$flakes} <font color=brown>Copper Flakes</font>!"; item_add($userid, $copperflakeid, $flakes); } //Rocks if (($chance >= 36) && ($chance <= 50)) { $rocks = rand(2, 10); $expgain = (0.3 * $rocks); echo "While mining away, you have managed to break away {$rocks} rock(s)!"; item_add($userid, $rocksid, $rocks); } //Infirmary if (($chance >= 51) && ($chance <= 55)) { $hosptime = (int) rand(30, 120); echo "You collapse a column holding the mineshaft up and caused a cave-in. You are later found under the rubble, barely breathing. You have been escorted to the infirmary for {$hosptime} minutes."; $reasonhosp = 'Mining Cave In'; $db->query("UPDATE users SET `hospital`=$hosptime,`hospreason`='$reasonhosp',`hp`=1 WHERE userid=$userid", $c); } //Dungeon if (($chance >= 56) && ($chance <= 60)) { $jailtime = (int) rand(30, 180); echo "While mining, a swarm of bugs overcrowd you. In attempt to get rid of them, you rip off your clothing and run into the nearest source of water. A guard sees you and escorts you into the dungeon for {$jailtime} minutes on the account of indecency exposure."; $reasonjail = 'Indecency Exposure'; $db->query("UPDATE users SET `jail` = $jailtime, `jail_reason` = '$reasonjail' WHERE userid=$userid", $c); } //Failed if (($chance >= 61) && ($chance <= 90)) { echo 'You gained nothing by mining.'; } //Gem if (($chance >= 91) && ($chance <= 93)) { $expgain = (35); echo 'While mining away, you chip away a <font color=blue>Small Sapphire</font>. Hold on this, you can use this in crafting!'; item_add($userid, $sapphireitem, 1); //Replace 71 with your Small Sapphire item id. } //Break if (($chance >= 94) && ($chance <= 95)) { echo "While mining away, you struck a tough rock and broke your pickaxe. You're going to need to fix that before you can mine again."; item_add($userid, $bpick, 1); item_remove($userid, $pick, 1); } //Gold Flakes if (($chance >= 96) && ($chance <= 110)) { $gflake = rand(5, 50); $expgain = (1 * $gflake); echo "While mining away, you have managed to break away {$gflake} <font color=yellow>Gold Flakes</font>!"; item_add($userid, $goldflakeid, $gflake); } //Silver Flakes if (($chance >= 111) && ($chance <= 130)) { $sflake = rand(15, 75); $expgain = (0.75 * $sflake); echo "While mining away, you have managed to break away {$sflake} <font color=silver>Silver Flakes</font>!"; item_add($userid, $silverflakesid, $sflake); } //All done. Run this! if ($expgain) { $db->query("UPDATE `Mining` SET `mEXP` = `mEXP` + {$expgain} WHERE `userid` = $userid"); } $db->query("UPDATE `Mining` SET `m_power` = `m_power` - 10 WHERE `userid` = $userid"); die("<hr /> <a href='mine.php?action=mine'>Mine Again</a><br /> <a href='mine.php'>>Back</a>"); } function mine2() { global $db, $ir, $c, $userid, $h; $chance = rand(1, 130); require 'mine_globals.php'; $query = $db->query('SELECT `inv_itemid` FROM `inventory` WHERE `inv_itemid` = '.$pick." && `inv_userid` = $userid"); $i = $db->fetch_row($query); if (4 != $place) { echo'You are not in Falconworth!'; exit; } if ($level > 19) { echo "This mine is way too easy for you. Leave it to the kiddies.<br> <a href='mine.php'>Back</a>"; exit; } if ($level < 10) { die('Your mining level is too low for this mine.'); } if ($power < 20) { die("You need 20 mining power to mine here. You have $power."); } if (!$i['inv_itemid'] == $pick) { echo 'You need a basic pickaxe before you can even consider mining.'; exit; } if ($laber < 100) { echo 'You need 100 IQ to mine here! Come back when you have it!'; exit; } //Copper Flakes if ($chance <= 35) { $flakes = rand(40, 140); $expgain = (0.75 * $flakes); echo "While mining away, you have uncovered {$flakes} <font color=brown>Copper Flakes</font>!"; item_add($userid, $copperflakeid, $flakes); } //Rocks if (($chance >= 36) && ($chance <= 50)) { $rocks = rand(5, 12); $expgain = (0.5 * $rocks); echo "While mining away, you have managed to break away {$rocks} rock(s)!"; item_add($userid, $rocksid, $rocks); } //Infirmary if (($chance >= 51) && ($chance <= 55)) { $hosptime = (int) rand(50, 150); echo "You collapse a column holding the mineshaft up and caused a cave-in. You are later found under the rubble, barely breathing. You have been escorted to the infirmary for {$hosptime} minutes."; $reasonhosp = 'Mining Cave In'; $db->query("UPDATE users SET `hospital`=$hosptime,`hospreason`='$reasonhosp',`hp`=1 WHERE userid=$userid", $c); } //Dungeon if (($chance >= 56) && ($chance <= 60)) { $jailtime = (int) rand(50, 200); echo "While mining, a swarm of bugs overcrowd you. In attempt to get rid of them, you rip off your clothing and run into the nearest source of water. A guard sees you and escorts you into the dungeon for {$jailtime} minutes on the account of indecency exposure."; $reasonjail = 'Indecency Exposure'; $db->query("UPDATE users SET `jail` = $jailtime, `jail_reason` = '$reasonjail' WHERE userid=$userid", $c); } //Failed if (($chance >= 61) && ($chance <= 90)) { echo 'You gained nothing by mining.'; } //Gem if (($chance >= 91) && ($chance <= 93)) { $expgain = (150); echo 'While mining away, you chip away a <font color=silver>Small Diamond</font>. Hold on this, you can use this in crafting!'; item_add($userid, $diamonditem, 1); //Replace 71 with your Small Sapphire item id. } //Break if (($chance >= 94) && ($chance <= 95)) { echo "While mining away, you struck a tough rock and broke your pickaxe. You're going to need to fix that before you can mine again."; item_add($userid, $bpick, 1); item_remove($userid, $pick, 1); } //Gold Flakes if (($chance >= 96) && ($chance <= 110)) { $gflake = rand(10, 55); $expgain = (1.25 * $gflake); echo "While mining away, you have managed to break away {$gflake} <font color=yellow>Gold Flakes</font>!"; item_add($userid, $goldflakeid, $gflake); } //Silver Flakes if (($chance >= 111) && ($chance <= 130)) { $sflake = rand(25, 85); $expgain = (1 * $sflake); echo "While mining away, you have managed to break away {$sflake} <font color=silver>Silver Flakes</font>!"; item_add($userid, $silverflakesid, $sflake); } //All done. Run this! if ($expgain) { $db->query("UPDATE `Mining` SET `mEXP` = `mEXP` + {$expgain} WHERE `userid` = $userid"); } $db->query("UPDATE `Mining` SET `m_power` = `m_power` - 20 WHERE `userid` = $userid"); die("<hr /> <a href='mine.php?action=mine2'>Mine Again</a><br /> <a href='mine.php'>>Back</a>"); } function mine3() { global $db, $ir, $c, $userid, $h; $chance = rand(1, 130); require 'mine_globals.php'; $query = $db->query('SELECT `inv_itemid` FROM `inventory` WHERE `inv_itemid` = '.$pick." && `inv_userid` = $userid"); $i = $db->fetch_row($query); if (5 != $place) { echo'You are not in Rome!'; exit; } if ($level > 39) { echo "This mine is way too easy for you. Leave it to the kiddies.<br> <a href='mine.php'>Back</a>"; exit; } if ($level < 20) { die('Your mining level is too low for this mine.'); } if ($power < 20) { die("You need 20 mining power to mine here. You have $power."); } if (!$i['inv_itemid'] == $pick) { echo 'You need a basic pickaxe before you can even consider mining.'; exit; } if ($laber < 500) { echo 'You need 500 IQ to mine here! Come back when you have it!'; exit; } //Copper Flakes if ($chance <= 35) { $flakes = rand(60, 160); $expgain = (1 * $flakes); echo "While mining away, you have uncovered {$flakes} <font color=brown>Copper Flakes</font>!"; item_add($userid, $copperflakeid, $flakes); } //Rocks if (($chance >= 36) && ($chance <= 50)) { $rocks = rand(8, 16); $expgain = (0.75 * $rocks); echo "While mining away, you have managed to break away {$rocks} rock(s)!"; item_add($userid, $rocksid, $rocks); } //Infirmary if (($chance >= 51) && ($chance <= 55)) { $hosptime = (int) rand(75, 175); echo "You collapse a column holding the mineshaft up and caused a cave-in. You are later found under the rubble, barely breathing. You have been escorted to the infirmary for {$hosptime} minutes."; $reasonhosp = 'Mining Cave In'; $db->query("UPDATE users SET `hospital`=$hosptime,`hospreason`='$reasonhosp',`hp`=1 WHERE userid=$userid", $c); } //Dungeon if (($chance >= 56) && ($chance <= 60)) { $jailtime = (int) rand(75, 225); echo "While mining, a swarm of bugs overcrowd you. In attempt to get rid of them, you rip off your clothing and run into the nearest source of water. A guard sees you and escorts you into the dungeon for {$jailtime} minutes on the account of indecency exposure."; $reasonjail = 'Indecency Exposure'; $db->query("UPDATE users SET `jail` = $jailtime, `jail_reason` = '$reasonjail' WHERE userid=$userid", $c); } //Failed if (($chance >= 61) && ($chance <= 90)) { echo 'You gained nothing by mining.'; } //Gem if (($chance >= 91) && ($chance <= 93)) { $expgain = (500); echo 'While mining away, you chip away a <font color=green>Emerald</font>. Hold on this, you can use this in crafting!'; item_add($userid, $emeralditem, 1); //Replace 71 with your Small Sapphire item id. } //Break if (($chance >= 94) && ($chance <= 95)) { echo "While mining away, you struck a tough rock and broke your pickaxe. You're going to need to fix that before you can mine again."; item_add($userid, $bpick, 1); item_remove($userid, $pick, 1); } //Gold Flakes if (($chance >= 96) && ($chance <= 110)) { $gflake = rand(10, 55); $expgain = (1.5 * $gflake); echo "While mining away, you have managed to break away {$gflake} <font color=yellow>Gold Flakes</font>!"; item_add($userid, $goldflakeid, $gflake); } //Silver Flakes if (($chance >= 111) && ($chance <= 130)) { $sflake = rand(25, 85); $expgain = (1.25 * $sflake); echo "While mining away, you have managed to break away {$sflake} <font color=silver>Silver Flakes</font>!"; item_add($userid, $silverflakesid, $sflake); } //All done. Run this! if ($expgain) { $db->query("UPDATE `Mining` SET `mEXP` = `mEXP` + {$expgain} WHERE `userid` = $userid"); } $db->query("UPDATE `Mining` SET `m_power` = `m_power` - 20 WHERE `userid` = $userid"); die("<hr /> <a href='mine.php?action=mine3'>Mine Again</a><br /> <a href='mine.php'>>Back</a>"); } function mine4() { global $db, $ir, $c, $userid, $h; $chance = rand(1, 130); require 'mine_globals.php'; $query = $db->query('SELECT `inv_itemid` FROM `inventory` WHERE `inv_itemid` = '.$pick." && `inv_userid` = $userid"); $i = $db->fetch_row($query); if (6 != $place) { echo'You are not in Timberwolf!'; exit; } if ($level > 74) { echo "This mine is way too easy for you. Leave it to the kiddies.<br> <a href='mine.php'>Back</a>"; exit; } if ($level < 40) { die('Your mining level is too low for this mine.'); } if ($power < 50) { die("You need 50 mining power to mine here. You have $power."); } if (!$i['inv_itemid'] == $pick) { echo 'You need a basic pickaxe before you can even consider mining.'; exit; } if ($laber < 1000) { echo 'You need 1000 IQ to mine here! Come back when you have it!'; exit; } //Copper Flakes if ($chance <= 35) { $flakes = rand(80, 180); $expgain = (1.5 * $flakes); echo "While mining away, you have uncovered {$flakes} <font color=brown>Copper Flakes</font>!"; item_add($userid, $copperflakeid, $flakes); } //Rocks if (($chance >= 36) && ($chance <= 50)) { $rocks = rand(20, 36); $expgain = (1.25 * $rocks); echo "While mining away, you have managed to break away {$rocks} rock(s)!"; item_add($userid, $rocksid, $rocks); } //Infirmary if (($chance >= 51) && ($chance <= 55)) { $hosptime = (int) rand(200, 300); echo "You collapse a column holding the mineshaft up and caused a cave-in. You are later found under the rubble, barely breathing. You have been escorted to the infirmary for {$hosptime} minutes."; $reasonhosp = 'Mining Cave In'; $db->query("UPDATE users SET `hospital`=$hosptime,`hospreason`='$reasonhosp',`hp`=1 WHERE userid=$userid", $c); } //Dungeon if (($chance >= 56) && ($chance <= 60)) { $jailtime = (int) rand(225, 325); echo "While mining, a swarm of bugs overcrowd you. In attempt to get rid of them, you rip off your clothing and run into the nearest source of water. A guard sees you and escorts you into the dungeon for {$jailtime} minutes on the account of indecency exposure."; $reasonjail = 'Indecency Exposure'; $db->query("UPDATE users SET `jail` = $jailtime, `jail_reason` = '$reasonjail' WHERE userid=$userid", $c); } //Failed if (($chance >= 61) && ($chance <= 90)) { echo 'You gained nothing by mining.'; } //Gem if (($chance >= 91) && ($chance <= 93)) { $expgain = (1000); echo 'While mining away, you chip away a <font color=blue>Medium Sized Sapphire</font>. Hold on this, you can use this in crafting!'; item_add($userid, 147, 1); //Replace 71 with your Small Sapphire item id. } //Break if (($chance >= 94) && ($chance <= 95)) { echo "While mining away, you struck a tough rock and broke your pickaxe. You're going to need to fix that before you can mine again."; item_add($userid, $bpick, 1); item_remove($userid, $pick, 1); } //Gold Flakes if (($chance >= 96) && ($chance <= 110)) { $gflake = rand(30, 85); $expgain = (2.25 * $gflake); echo "While mining away, you have managed to break away {$gflake} <font color=yellow>Gold Flakes</font>!"; item_add($userid, $goldflakeid, $gflake); } //Silver Flakes if (($chance >= 111) && ($chance <= 130)) { $sflake = rand(55, 115); $expgain = (2 * $sflake); echo "While mining away, you have managed to break away {$sflake} <font color=silver>Silver Flakes</font>!"; item_add($userid, $silverflakesid, $sflake); } //All done. Run this! if ($expgain) { $db->query("UPDATE `Mining` SET `mEXP` = `mEXP` + {$expgain} WHERE `userid` = $userid"); } $db->query("UPDATE `Mining` SET `m_power` = `m_power` - 50 WHERE `userid` = $userid"); die("<hr /> <a href='mine.php?action=mine4'>Mine Again</a><br /> <a href='mine.php'>>Back</a>"); }
  14. In your error class (in, uh.., /lib, I think), there's a line like define('DEBUG', false); Change that false to true and attempt to access the mines again. Note that all users will be able to see the error messages if encountered.
  15. Have you edited mine_globals.php to configure your corresponding item IDs?
×
×
  • Create New...