Jump to content
MakeWebGames

Analog

Members
  • Posts

    244
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Analog

  1. Re: Enhance course for V2   Yes, that project of mine is helping quite a bit. That and slowing down to look things over helps extremely.   Yes there is a bit, but really sql injection is as much of a problem is this case as its a staff function that was added. Had it been something accessible but players I would have checked for injections in a different manner.
  2. Re: Enhance course for V2 Continued...Mod for editing courses BACKUP FILES BEFORE MAKING ANY CHANGES Open staff_courses.php (looking at function editcourse()) Find: $iq=abs((int) $_POST['iq']);   After add: $mle=abs((int) $_POST['mlevel']); $ms=abs((int) $_POST['mstrength']); $ma=abs((int) $_POST['magility']); $mg=abs((int) $_POST['mguard']); $mla=abs((int) $_POST['mlabour']); $miq=abs((int) $_POST['miq']); $mag=abs((int) $_POST['mage']);   Find: $db->query("UPDATE courses SET crNAME='$name', crDESC='{$_POST['desc']}', crCOST=$cost, crENERGY=$energy, crDAYS=$days, crSTR=$str, crGUARD=$gua, crLABOUR=$lab, crAGIL=$agil, crIQ=$iq WHERE crID={$_POST['id']}");   Replace with: $db->query("UPDATE courses SET crNAME='$name', crDESC='{$_POST['desc']}', crCOST=$cost, crENERGY=$energy, crDAYS=$days, crSTR=$str, crGUARD=$gua, crLABOUR=$lab, crAGIL=$agil, crIQ=$iq, crMinLEVEL=$mle, crMinSTRENGTH=$ms, crMinAGILITY=$ma, crMinGUARD=$mg, crMinLABOUR=$mla, crMinIQ=$miq, crMinAGE=$mag WHERE crID={$_POST['id']}");   Find: IQ Gain: <input type='text' name='iq' value='{$old['crIQ']}' />   After add: <h3>Required to take course</h3> Min Level: <input type='text' name='mlevel' value='{$old['crMinLEVEL']}' /> Min Strength: <input type='text' name='mstrength' value='{$old['crMinSTRENGTH']}' /> Min Agility: <input type='text' name='magility' value='{$old['crMinAGILITY']}' /> Min Guard: <input type='text' name='mguard' value='{$old['crMinGUARD']}' /> Min Labour: <input type='text' name='mlabour' value='{$old['crMinLABOUR']}' /> Min IQ: <input type='text' name='miq' /><br value='{$old['crMinIQ']}' /> Min Age: <input type='text' name='mage' value='{$old['crMinAGE']}' />   Save and upload
  3. This mod enhances the courses for McCodes Version 2. It adds the ability to require users to meet certain requirements in order to take the course. Follow the steps below to add this mod to your game. BACKUP FILES BEFORE MAKING ANY CHANGES Mod suggested by DeathCookie of Amendment Mafia 1. Run the following query ALTER TABLE `courses` ADD `crMinLEVEL` INT( 10 ) NOT NULL DEFAULT '0', ADD `crMinSTRENGTH` INT( 10 ) NOT NULL DEFAULT '0', ADD `crMinAGILITY` INT( 10 ) NOT NULL DEFAULT '0', ADD `crMinGUARD` INT( 10 ) NOT NULL DEFAULT '0', ADD `crMinLABOUR` INT( 10 ) NOT NULL DEFAULT '0', ADD `crMinIQ` INT( 10 ) NOT NULL DEFAULT '0', ADD `crMinAGE` INT( 10 ) NOT NULL DEFAULT '0';   2a. Open staff_courses.php (looking at function addcourse()) 2b. Find: $iq=abs((int) $_POST['iq']);   2c. After add: $mle=abs((int) $_POST['mlevel']); $ms=abs((int) $_POST['mstrength']); $ma=abs((int) $_POST['magility']); $mg=abs((int) $_POST['mguard']); $mla=abs((int) $_POST['mlabour']); $miq=abs((int) $_POST['miq']); $mag=abs((int) $_POST['mage']);   2d. Find: $db->query("INSERT INTO courses VALUES(NULL, '{$_POST['name']}', '{$_POST['desc']}', '$cost', '$energy', '$days', '$str', '$gua', '$lab', '$agil', '$iq')");   2e. Replace with: $db->query("INSERT INTO courses VALUES(NULL, '{$_POST['name']}', '{$_POST['desc']}', '$cost', '$energy', '$days', '$str', '$gua', '$lab', '$agil', '$iq', '$mle', '$ms', '$ma', '$mg', '$mla', '$miq', '$mag')");   2f. Find: IQ Gain: <input type='text' name='iq' />   2g. After add: <h3>Required to take course</h3> Min Level: <input type='text' name='mlevel' /> Min Strength: <input type='text' name='mstrength' /> Min Agility: <input type='text' name='magility' /> Min Guard: <input type='text' name='mguard' /> Min Labour: <input type='text' name='mlabour' /> Min IQ: <input type='text' name='miq' /> Min Age: <input type='text' name='mage' />   2h. Save staff_courses.php 3a. Open education.php 3b Find: if($db->num_rows($cdo) > 0) { print "You have already done this course."; $h->endpage(); exit; }   3c After add: if($ir['level'] < $coud['crMinLEVEL']) { print "You must be at least level {$coud['crMinLEVEL']} to take this course."; $h->endpage(); exit; } if($ir['strength'] < $coud['crMinSTRENGTH']) { print "You must have at least {$coud['crMinSTRENGTH']} Strength to take this course."; $h->endpage(); exit; } if($ir['agility'] < $coud['crMinAGILITY']) { print "You must have at least {$coud['crMinAGILITY']} Agility to take this course."; $h->endpage(); exit; } if($ir['guard'] < $coud['crMinGUARD']) { print "You must have at least {$coud['crMinGUARD']} Guard to take this course."; $h->endpage(); exit; } if($ir['labour'] < $coud['crMinLABOUR']) { print "You must have at least {$coud['crMinLABOUR']} Labour to take this course."; $h->endpage(); exit; } if($ir['IQ'] < $coud['crMinIQ']) { print "You must have at least {$coud['crMinIQ']} IQ to take this course."; $h->endpage(); exit; } if($ir['daysold'] < $coud['crMinAGE']) { print "You must be at least {$coud['crMinAGE']} days old to take this course."; $h->endpage(); exit; }   3d. Save education.php 4. Upload files to server
  4. Re: How would i set level requirements?? thats what I was thinking
  5. Re: How would i set level requirements?? post a couple lines previous to that one
  6. Re: I need help with explore.php and logo's   Should be: <u style='color: yellow; font-family: arial;'>Serious Money Makers</u>
  7. Re: How would i set level requirements?? 1. Find where the brave refill is performed at else if($_GET['spend'] == 'brave')   2. Add the code that will set the price else if($_GET['spend'] == 'brave') { $cost = 20; if($ir['level'] >= 50 && $ir['level'] <= 99) { $cost = 50; } if($ir['level'] >= 100 && $ir['level'] <= 174) { $cost = 100; } if($ir['level'] >= 175) { $cost = 200; }   3. Update check that determines if user has enough crystals if($ir['crystals'] < $cost)   4. Update total price $nowcrys = $ir['crystals']-$cost;   5. Update query that sets the users crystals after they refill brave mysql_query("UPDATE users SET brave=maxbrave,crystals=crystals-$cost WHERE userid=$userid",$c);   Thats all Folks!
  8. Re: How would i set level requirements?? This starts by sitting $cost at 20, then proceeds to check if level falls into any of them. If it does, then $cost is changed to meet the desired results   $cost = 20; if($ir['level'] >= 50 && $ir['level'] <= 99) { $cost = 50; } if($ir['level'] >= 100 && $ir['level'] <= 174) { $cost = 100; } if($ir['level'] >= 175) { $cost = 200; }
  9. Re: How would i set level requirements?? I'm trying to work something out here but confused on what you are wanting. if level x then cost is x if level between x and x then cost y etc..... is that what you are wanting?
  10. Re: Count Backwards :D 4992
  11. Re: Guess the next poster Nope Adajo
  12. Re: Counting (nr game) 1834
  13. Re: Count Backwards :D 4994
  14. Re: Count Backwards :D 4996
  15. Re: Count Backwards :D LOL, 4998
  16. Re: unexpected t string Version 2 uses the class files
  17. Re: unexpected t string open up your original download for the engine...there should be a folder named "class" in that folder is a file named "class_db_mysql.php" Have you uploaded that folder to your host? The error is saying that it can NOT include the file, most likely because it is missing.
  18. Re: unexpected t string do you have class_db_mysql.php in the /class directory on your server
  19. Re: houses I'm sure people will help, but like before. Need more info about what you are working with... what version of code? Are you getting error messages? Lines of code you think may be the problem? Not everyone has every system, or experienced every problem. Some detail is needed in order to offer assistance.
  20. Re: need help please line 278: OUT try making it: OUT;
  21. Re: Ive got One Problem I'm gonna say its probably this line: <td width="20%" bgcolor="#$bgcolor" valign="top">   Several times in the table >>> bgcolor="#$bgcolor" $bgcolor is probably set at #000000
  22. Re: Need help quickly Please Find: print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>';   Replace With: (replace filename.ext with your background file info) print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" style="background-image:url(filename.ext);" valign="top"> <center>';
  23. Re: Ive got One Problem set the table background to transparent
  24. Re: Problem with criminal.php V2 is the db table empty?
  25. Re: would this be possible   Not everyone in the world has access to high speed broadband or dsl....some areas may get a poor satellite signal, or lack of a provider and are unable to go that route...thus having to resort to whats left...dial up!
×
×
  • Create New...