Jump to content
MakeWebGames

Sindikit

Members
  • Posts

    29
  • Joined

  • Last visited

    Never

Sindikit's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: Businesses Mod [Mccode V2] Thanks :) Feky, that is happening because the sql query has a syntax error. Do the following below..you can see in the sql statement that it says "FROM WHERE" blah blah. Well you need to specify where you are getting the information from within the SQL, so you need to say "FROM businesses_members WHERE" blah and you won't get the error anymore. Find: else { $send_event = mysql_query(sprintf("SELECT `bmembMember` FROM WHERE `bmembBusiness` = '%u' ORDER BY `bmembId` DESC", $bs['busId']));   Replace with: else { $send_event = mysql_query(sprintf("SELECT `bmembMember` FROM businesses_members WHERE `bmembBusiness` = '%u' ORDER BY `bmembId` DESC", $bs['busId']));
  2. Re: Businesses Mod [Mccode V2]   Find: else { $send_event = mysql_query(sprintf("SELECT `bmembMember` FROM WHERE `bmembBusiness` = '%u' ORDER BY `bmembId` DESC", $bs['busId']));   Replace with: else { $send_event = mysql_query(sprintf("SELECT `bmembMember` FROM businesses_members WHERE `bmembBusiness` = '%u' ORDER BY `bmembId` DESC", $bs['busId']));
  3. Re: Businesses Mod [Mccode V2] For the bankruptcy to work, in business_manage.php: Find: > [url="business_home.php?p=bankrupt&confirm=1"]Bankrupt the business[/url]';   Replace with: [url="business_manage.php?p=bankrupt&confirm=1"]Bankrupt the business[/url]';
  4. Re: Businesses Mod [Mccode V2] For those of you having trouble with your vault money getting overwritten each day, this will fix your problem: Find:   mysql_query(sprintf("UPDATE `businesses` SET `busYCust` = `busCust`, `busYProfit` = `busProfit`, `busCust` = '%d', `busProfit` = '%d', `busCash` = `busCash` + '%d' WHERE `busId` = '%u'", $new_customers, $new_profit, ($new_profit - $bs['busCash']), $bs['busId'])) OR die('Cron not run');   Replace with:   mysql_query(sprintf("UPDATE `businesses` SET `busYCust` = `busCust`, `busYProfit` = `busProfit`, `busCust` = '%d', `busProfit` = '%d', `busCash` = '%d' WHERE `busId` = '%u'", $new_customers, $new_profit, ($new_profit + $bs['busCash']), $bs['busId'])) OR die('Cron not run');
  5. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling Ok, my continue learning link should have reappeared by now with my cron_hour...so then it's a cron problem?
  6. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling Not the whole users table, just the 4 that affect the mod ie course_clicks, cpercent, etc.
  7. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling Ok, I just dropped my users SQLS and reran it and my clicks updated to 18 and I was able to do my 3 clicks..let's see if it comes back in an hour. :)
  8. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling Trying to get this to work..the course shows up and when I click "take" the course, it tells me I need to come back in an hour to continue the course. The I click back on the link for the course and the clicks say "0". I never even got to do my 3 clicks, it just automatically told me I got the 1% allocated without doing any clicks. Any ideas?
  9. Re: Displaying a random $ within Crime text Awesome, I changed my code around a bit like you had yours structured and it works like a charm! Thanks! +1 8-)
  10. Re: Displaying a random $ within Crime text I'll try what you have, but here's my docrime.php: Basically I have: print str_replace("{money}",$r['crimeSUCCESSMUNY'],"<font color='green'> {$r['crimeSTEXT']} </font>"); $muny = rand($r['crimeMINMONEY'],$r['crimeMAXMONEY']);   <?php $macropage="docrime.php?c={$_GET['c']}"; include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("You can't do that while in jail or hospital."); } $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) { print "Invalid crime"; } else { $q=$db->query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=$db->fetch_row($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You don't have enough Intensity to perform this action."; } else { $ec="\$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); print " [b]{$r['crimeITEXT']}[/b]"; $ir['brave']-=$r['crimeBRAVE']; $db->query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); if(rand(1,100) <= $sucrate) { print str_replace("{money}",$r['crimeSUCCESSMUNY'],"<font color='green'> [b]{$r['crimeSTEXT']}[/b] </font>"); $muny = rand($r['crimeMINMONEY'],$r['crimeMAXMONEY']); $ir['money']+=$muny; $ir['crystals']+=$r['crimeSUCCESSCRYS']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); $db->query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp=exp+{$r['crimeXP']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c); if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } } else { if(rand(1, 2) == 1) { print "<font color='orange'> [b]{$r['crimeFTEXT']}[/b] </font>"; } else { print "<font color='red'> [b]{$r['crimeJTEXT']} [/b] </font>"; $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'"); } } print " [url='docrime.php?c={$_GET[']Try again.[/url] [url='criminal.php']Choose a different action.[/url]"; } } $h->endpage(); ?>
  11. I have the mod that removes crimeSUCESSMUNY and replaces it with a minmoney and maxmoney value for entering a high and low amount for crime payouts. My question is, how can I display whatever random amount of money is earned through the success text..through the use of the staff panel edit crime page.. For example..when I'm making a crime through the staff panel..I enter in all the info, etc. I want to have a crime payout anywhere from $5-$10. In my success text, I'd like it to say: "You searched around and found $7." It's easy to just type in the success text that you found $7, but since I'm using a random number for my payout, I can't necessarily type a flat rate, since I don't know what that would be. I was wondering if there was some code I could enter into the success text box to have it display whatever value is given to the result. I've tried all different variations of the values I could think of and nothing is working for me..anyone know how to make this work?
  12. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling I had that part already correct for some reason. I am running into a cron problem..I can add a class, start it, do all the clicks allowed, and it disappears, but doesn't return within the hour. Would this be a problem with the two lines of code I added to cron_day with the minus clicks, or is this a school_cron problem?
  13. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling Thanks illusions, it works just fine now! Awesome mod!
  14. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling Ok, here's the error now that I added a few of the missing lines in the initializing code..I think percent, perclick, etc were missing: QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO courses VALUES(NULL, 'test course', 'test descr', 'test start', 'test comp', '1', '100', '3', '1', '5', '0', '10', '18', '3', '1', '1', '1', '1', '1')
  15. Re: [MCCODES V2] 100% Working Copy Enhanced Schooling QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO courses VALUES(NULL, 'test course', 'test descr', 'test start', 'test end', '1', '1', '3', '1', '5', '', '', '', '', '1', '1', '1', '1', '1')   When I try to add a course, I get this. Any ideas?
×
×
  • Create New...