Jump to content
MakeWebGames

arcticfang

Members
  • Posts

    8
  • Joined

  • Last visited

    Never

arcticfang's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. got it to work by simply adding ">/dev/null 2>&1" to the end. :D thanks for all your help everyone!! much appreciated!!!
  2. Thanks for the replies! The '?' is not supposed to be included. It will corrupt the cron. How would I use wget to do this? And how would I go about automatically cleaning up after itself? That cron above works for EVERYTHING but the day script, btw. :/
  3. Hmm.. it seems to work then. :/ It must be the cron job.. can you tell me if there's anything wrong with this? php -q /home/starwars/public_html/cron_day.php code=yadayadayada
  4. Hey everyone. For some reason, my day cron script isn't working. :/ It's being run successfully, but something in the php is faulty and I just can't place it. Any help is greatly appreciated!!   <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $db->query("UPDATE fedjail set fed_days=fed_days-1"); $q=$db->query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['fed_userid']; } if(count($ids) > 0) { $db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")"); } $db->query("DELETE FROM fedjail WHERE fed_days=0"); $db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0"); $db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0"); $db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0"); $db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0"); $db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0"); $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0"); $db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0"); $q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0"); while($r=$db->fetch_row($q)) { $cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}"); $coud=$db->fetch_row($cd); $userid=$r['userid']; $db->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) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid"); } $db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')"); } $db->query("UPDATE users SET course=0 WHERE cdays=0"); $db->query("TRUNCATE TABLE votes;"); ?>
  5. Great mod! With a few modifications, I had this up and running perfectly in 5 minutes. ^_^
  6. Thanks for your help illusions :D I'll look more into this. Hopefully I'll have a great game on my hands. ^_^
  7. Thanks for the replies :D I have a good deal of knowledge of CSS, so I believe that will come in handy.   Thanks for your suggestions Illusions. :) I'm in the process of adding all the items, cities, jobs, etc. etc. Currently the only way for users to get cash is through jobs and mugging.. could you suggest some ways to add for them to gain money? Same thing for crystals, I'm not sure how I would go about implementing those into the game. Gaining them I mean. I can think of many uses of them, but I'm not sure how I would let the user gain them. I want it to be more than just voting. :) Health/Energy refills every 5 minutes by 8% or so. I'd say that's a good pace ^_^
  8. Hey everyone. I'm new to the mccode scene, but hope to do much coding of mods in the future. :) But to get my game started off, I want it to look good. I have the design in mind, but I'm wondering if there is any working mod that will allow me to quickly change the layout. Or will I have to go through each individual file and change the attributes? Any help is greatly appreciated, thanks!!
×
×
  • Create New...