Jump to content
MakeWebGames

castle

Members
  • Posts

    97
  • Joined

  • Last visited

    Never

Everything posted by castle

  1. Re: hour cron negative v2 thanks for the lesson on global_func. I understand this a little more. I still get the same error, even when I include it. You only get the error when you complete the course
  2. Re: [mccodes V1'2] gang levels i think i did something wrong, just displays one under respect in gang central, no matter who or how many times you attack another player, gang or not
  3. Re: [mccodes V1'2] gang levels would that top part still go in global_func for v2?
  4. Re: [v1] local school help you just change that one line of code
  5. Re: hour cron negative v2 now I get : Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/m/o/b/mobsterworld/html/images2/cron_hour.php on line 38   line 38 is:   while($rm=mysql_fetch_array($qm))   but not getting negative anymore :lol:
  6. I have searched the forums for an answer on how to fix the hour cron v2 from making the gang crimes go into the negative, can't find it..or figure it out.   <?php include "config.php"; include "mysql.php"; mysql_query("UPDATE gangs SET gangCHOURS=gangCHOURS-1 WHERE gangCRIME>0",$c); $q=mysql_query("SELECT g.*,oc.* FROM gangs g LEFT JOIN orgcrimes oc ON g.gangCRIME=oc.ocID WHERE g.gangCRIME > 0 AND g.gangCHOURS = 0",$c); while($r=mysql_fetch_array($q)) { $suc=rand(0,1); if($suc) { $log=$r['ocSTARTTEXT'].$r['ocSUCCTEXT']; $muny=(int) (rand($r['ocMINMONEY'],$r['ocMAXMONEY'])); $log=str_replace(array("{muny}","'"),array($muny,"''"),$log); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+$muny,gangCRIME=0 WHERE gangID={$r['gangID']}",$c); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'success', $muny, '{$r['ocNAME']}', unix_timestamp())",$c); $i=mysql_insert_id($c); $qm=mysql_query("SELECT * FROM users WHERE gang={$r['gangID']}",$c); while($rm=mysql_fetch_array($qm)) { $db->("INSERT INTO events VALUES ('',{$rm['userid']},unix_timestamp(),'0',\"Your gang's Organised Crime Succeeded. Go [url='oclog.php?ID=$i']here[/url] to view the details.\")"); } } else { $log=$r['ocSTARTTEXT'].$r['ocFAILTEXT']; $muny=0; $log=str_replace(array("{muny}","'"),array($muny,"''"),$log); $db->query("UPDATE gangs SET gangCRIME=0 WHERE gangID={$r['gangID']}",$c); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'failure', $muny, '{$r['ocNAME']}', unix_timestamp())",$c); $i=mysql_insert_id($c); $qm=mysql_query("SELECT * FROM users WHERE gang={$r['gangID']}",$c); while($rm=mysql_fetch_array($qm)) { event_add($rm['userid'],"Your Gang's Organised Crime Failed. Go [url='oclog.php?ID=$i']here[/url] to view the details.",$c); } } } if(date('G')==17) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET u.money=u.money+jr.jrPAY, u.jobpoints=u.jobpoints+jr.jrPOINTS, u.exp=u.exp+(jr.jrPAY/20) WHERE u.job > 0 AND u.jobrank > 0"); $db->query("UPDATE userstats us LEFT JOIN users u ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET us.strength=(us.strength+1)+jr.jrSTRG-1,us.labour=(us.labour+1)+jr.jrLABOURG-1,us.IQ=(us.IQ+1)+jr.jrIQG-1 WHERE u.job > 0 AND u.jobrank > 0"); } if($set['validate_period'] == 60 && $set['validate_on']) { $db->query("UPDATE users SET verified=0"); } ?>
  7. Re: [mccode] [TGM] Delete Gang Option [TGM] the link is dead :-(
  8. Re: [mccode v2] Revamped RentaSpy Now I am getting: Warning: sprintf() [function.sprintf]: Too few arguments in /home/content/m/o/b/mobsterworld/html/rentaspy.php on line 339 line 339 being:   );   Just learning coding, never seen this error before, any research I do on it mostly says to change all the % to %%
  9. Re: [mccode v2] Revamped RentaSpy when i run it I get: Parse error: syntax error, unexpected T_VARIABLE in /home/content/m/o/b/mobsterworld/html/rentaspy.php on line 104   this is line 104   $arm=$db->fetch_row($we2);
  10. Re: Full Crimes Commited in docrime change   mysql_query("UPDATE users SET money={$ir['money']}, points={$ir['points']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c);   to   mysql_query("UPDATE users SET money={$ir['money']}, points={$ir['points']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']},crimes=crimes+1 WHERE userid=$userid",$c);   points are my crystals, you may need to change that
  11. Re: Gang Market Question This does not give an error:   if($ir['userid'] != ($gangdata['gangPRESIDENT'])){ echo 'You need to be president to do this!'; $h->endpage(); exit; }   However after testing it, whether your president or not, it will not allow you to sell your gang, it just gives you the echo message.
  12. Re: Gang Market Question should be:   if($ir['userid'] != ($gangdata['gangPRESIDENT'])) { die ("You need to be president to do this!"); }
  13. Re: day cron error This worked minus the {   $well = $r['course']; $cd = sprintf("SELECT * FROM `courses`` WHERE crID` = %d",$well); $that = mysql_fetch_array($cd);   thanks
  14. I am getting this in my day cron file, can't figure out why: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/content/m/o/b/mobsterworld/html/cron_day.php on line 43 this is line 43:   $coud=mysql_fetch_row($cd);   This is my day cron (changing to mysql_ works where the db-> does not)   <?php include "config.php"; include "mysql.php"; mysql_query("UPDATE fedjail set fed_days=fed_days-1"); $q=mysql_query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=mysql_fetch_row($q)) { $ids[]=$r['fed_userid']; } if(count($ids) > 0) { mysql_query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")"); } mysql_query("DELETE FROM fedjail WHERE fed_days=0"); mysql_query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0"); mysql_query("UPDATE users SET daysold=daysold+1, boxes_opened=0"); mysql_query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0"); mysql_query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0"); mysql_query("UPDATE users SET cdays=cdays-1 WHERE course > 0"); mysql_query("UPDATE users SET turns=25"); mysql_query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0"); mysql_query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0"); mysql_query("UPDATE users SET lotterycap=10",$c); mysql_query("UPDATE mod_slots SET Tokens = 75"); mysql_query("UPDATE users SET rates=1"); mysql_query("UPDATE users SET reward_done=0"); mysql_query("DELETE FROM mail WHERE mail_time < (unix_timestamp() -2592000)",$c); mysql_query("UPDATE users SET userCONTRACT = userCONTRACT - 1 WHERE userCONTRACT > 0"); mysql_query("UPDATE users SET userBANKAMMT = userBANKAMMT + (userBANKAMMT/100*5.5) WHERE userBANKAMMT > 0 AND investlevel = 1"); mysql_query("UPDATE users SET userBANKAMMT = userBANKAMMT + (userBANKAMMT/100*3.0) WHERE userBANKAMMT > 0 AND investlevel = 0"); mysql_query("UPDATE users SET userBANKAMMT = userBANKAMMT + (userBANKAMMT/100*7.2) WHERE userBANKAMMT > 0 AND investlevel = 2"); mysql_query("UPDATE users SET userDAYS = userDAYS - 1 WHERE userDAYS != 0"); mysql_query("UPDATE users SET happiness=happiness-1 WHERE married != 0"); mysql_query("UPDATE users SET tired=0"); mysql_query("UPDATE users SET daysmarried=daysmarried+1 WHERE married !=0"); $q=mysql_query("SELECT * FROM users WHERE cdays=0 AND course > 0"); while($r=mysql_fetch_row($q)) { $cd=mysql_query("SELECT * FROM courses WHERE crID={$r['course']}"); $coud=mysql_fetch_row($cd); $userid=$r['userid']; mysql_query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})"); $upd=""; $ev=""; if($coud['crSTR'] > 0) { $upd.=",us.strength=us.strength+{$coud['crSTR']}"; $ev.=", {$coud['crSTR']} strength"; } if($coud['crGUARD'] > 0) { $upd.=",us.guard=us.guard+{$coud['crGUARD']}"; $ev.=", {$coud['crGUARD']} guard"; } if($coud['crLABOUR'] > 0) { $upd.=",us.labour=us.labour+{$coud['crLABOUR']}"; $ev.=", {$coud['crLABOUR']} labour"; } if($coud['crAGIL'] > 0) { $upd.=",us.agility=us.agility+{$coud['crAGIL']}"; $ev.=", {$coud['crAGIL']} agility"; } if($coud['crIQ'] > 0) { $upd.=",us.IQ=us.IQ+{$coud['crIQ']}"; $ev.=", {$coud['crIQ']} IQ"; } $ev=substr($ev,1); if ($upd) { mysql_query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid"); } mysql_query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')"); } mysql_query("UPDATE users SET course=0 WHERE cdays=0"); mysql_query("TRUNCATE TABLE votes;"); ?>
  15. Re: Gang OCs v2 what is the fix for that?
  16. Re: Gang OC not working oops, thinking of the negative bug...never mind. what needs fixed in this:   mysql_query("UPDATE gangs SET gangCHOURS=gangCHOURS-1 WHERE gangCRIME>0"); $q=mysql_query("SELECT g.*,oc.* FROM gangs g LEFT JOIN orgcrimes oc ON g.gangCRIME=oc.ocID WHERE g.gangCRIME > 0 AND g.gangCHOURS = 0");   to keep it from going into the negative?
  17. Re: [mccode v2] Simple Job Specials Small change to the last line in specials, thought it might clarify why you are redeeming the job points in the first place. Change this:   print "You successfully redeemed the {$r['jsNAME']} Special for {$r['jsCOST']} Job Points.";   To this:   print "You successfully redeemed the {$r['jsNAME']} Special for {$r['jsCOST']} Job Points. Adding a bonus of {$r['jsSTR']} strength, {$r['jsIQ']} IQ, {$r['jsAGILITY']} agility, and {$r['jsLABOUR']} labor.";
  18. Re: [mccode v2] Donator and Non-Donator Lottery what about a way to post the winner?
  19. Re: [mccode v2] Numbers Game no i ate all my corn
  20. Re: [mccode v2] Numbers Game it's not that the number of people playing, i tested it, filled each slot with a player. it's how the event is written in the cron
  21. Re: MailBox Problem i have the same problem, don't think it's the crons. in admin the newmail field is in the negative...it's within the php on your mailbox page...but not strong enough coder to figure it out
  22. Re: [mccode v2] Numbers Game this is what i get: Call to undefined function event_add() for this line:   event_add($n['userid'],"You won 5 Points in the number game by picking number {$n['number']}",$c);   points are my crystals
  23. Re: game ideas lol
  24. Re: Donator and Non-Donator Lottery [V2] no, thank you...nice mod
  25. Re: Donator and Non-Donator Lottery [V2] should there be something in the day cron to buy tickets daily? or is it just 10 per month?
×
×
  • Create New...