gideon prewett
Members-
Posts
205 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by gideon prewett
-
Re: cron_hour help ty guys for ur help but im still stuck lol i thoght i fixed my oc's and it works when i run the cron but not when i leave it to update why isnt my oc's counting down? <?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; require("global_func.php"); $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $db->query("UPDATE gangs SET gangCHOURS=gangCHOURS-1 WHERE gangCRIME>0"); $q=$db->query("SELECT g.*,oc.* FROM gangs g LEFT JOIN orgcrimes oc ON g.gangCRIME=oc.ocID WHERE g.gangCRIME > 0 AND g.gangCHOURS = 0"); while($r=$db->fetch_row($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']}"); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'success', $muny, '{$r['ocNAME']}', unix_timestamp())"); $i=$db->insert_id(); $qm=$db->query("SELECT * FROM users WHERE gang={$r['gangID']}"); while($rm=$db->fetch_row($qm)) { event_add($rm['userid'],"Your Gang's Organised Crime Succeeded. Go [url='oclog.php?ID=$i']here[/url] to view the details.",$c); } } 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']}"); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'failure', $muny, '{$r['ocNAME']}', unix_timestamp())"); $i=$db->insert_id(); $qm=$db->query("SELECT * FROM users WHERE gang={$r['gangID']}"); while($rm=$db->fetch_row($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"); } $stock=$db->query("SELECT * FROM stock",$c); while($st=$db->fetch_row($stock)) { $rand1=(int) rand(1,2); $rand2=(int) rand(1,25); if($rand1 == 1) { $db->query("UPDATE stock SET stCOST=stCOST+$rand2,stPERC='$rand2' WHERE stID={$st['stID']}",$c); } else { $db->query("UPDATE stock SET stCOST=stCOST-$rand2,stPERC='-$rand2' WHERE stID={$st['stID']}",$c); } } $db->query("UPDATE stock SET stCOST=0 WHERE stCOST<0",$c); $db->query("DELETE FROM stock WHERE stCOST=0",$c); if($set['validate_period'] == 60 && $set['validate_on']) { $db->query("UPDATE users SET verified=0"); $db->query("UPDATE users SET tired=0 WHERE userid={$par['userid']}"); $db->query("UPDATE users SET tired=0 WHERE userid=$userid"); } ?>
-
Re: cron_hour help hmmmm its strange because my members get no gain
-
Re: v2 upgrading hosp time no u use ur crystals to increse ur hosp time
-
Re: cron_hour help thanks AlabamaHit ive got it working the only problem ive got now is my jobs dont payout any ideas?
-
Re: cron_hour help function eve_add($userid,$text,$connection=0) { global $db; $text=mysql_esca($text); $db->query("INSERT INTO events VALUES('',$userid,UNIX_TIMESTAMP(),0,'$text')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$userid}"); return 1; :?
-
why is this cron not updating my players with a event when they finish there gang quest? <?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; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $db->query("UPDATE gangs SET gangCHOURS=gangCHOURS-1 WHERE gangCRIME>0"); $q=$db->query("SELECT g.*,oc.* FROM gangs g LEFT JOIN orgcrimes oc ON g.gangCRIME=oc.ocID WHERE g.gangCRIME > 0 AND g.gangCHOURS = 0"); while($r=$db->fetch_row($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']}"); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'success', $muny, '{$r['ocNAME']}', unix_timestamp())"); $i=$db->insert_id(); $qm=$db->query("SELECT * FROM users WHERE gang={$r['gangID']}"); while($rm=$db->fetch_row($qm)) { eve_add($p['userid'],"Your Gang's Organised Crime Succeeded. Go [url='oclog.php?ID=$i']here[/url] to view the details.",$c); } } 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']}"); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'failure', $muny, '{$r['ocNAME']}', unix_timestamp())"); $i=$db->insert_id(); $qm=$db->query("SELECT * FROM users WHERE gang={$r['gangID']}"); while($rm=$db->fetch_row($qm)) { eve_add($p['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.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"); } $stock=$db->query("SELECT * FROM stock",$c); while($st=$db->fetch_row($stock)) { $rand1=(int) rand(1,2); $rand2=(int) rand(1,25); if($rand1 == 1) { $db->query("UPDATE stock SET stCOST=stCOST+$rand2,stPERC='$rand2' WHERE stID={$st['stID']}",$c); } else { $db->query("UPDATE stock SET stCOST=stCOST-$rand2,stPERC='-$rand2' WHERE stID={$st['stID']}",$c); } } $db->query("UPDATE stock SET stCOST=0 WHERE stCOST<0",$c); $db->query("DELETE FROM stock WHERE stCOST=0",$c); if($set['validate_period'] == 60 && $set['validate_on']) { $db->query("UPDATE users SET verified=0"); $db->query("UPDATE users SET tired=0 WHERE userid={$par['userid']}"); $db->query("UPDATE users SET tired=0 WHERE userid=$userid"); } ?>
-
Re: v2 upgrading hosp time incase ur wondering what this mod does basicly ur defult hosp time is 200 mins this allows u to upgrade it useing crystals i have seen a game that uses a system like this and its a big success ive seen people with 5000 hosp time and at my prices thats 100k crystals so its a good way to get extra crystals from ur game
-
mccode-v2 100% Working Copy Enhanced Schooling
gideon prewett replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] 100% Working Copy Enhanced Schooling i have recently added a free mod to ce http://criminalexistence.com/ceforums/i ... ic=28955.0 (v2 upgrade hosp time) and thought as a idea for ur mod u could add a corse to up hosp time -
thanks to melton_ricky14 for getting me started in this 1 open attackbeat.php find $db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Hospitalized by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}"); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] beat you up.",$c); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-1,'$atklog');"); $_SESSION['attackwon']=0; replace with $db->query("UPDATE users SET hp=1,hospital=hospital+200+{$ir['htime']},hospreason='Hospitalized by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}") or die("mysql_error"); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] Hospitalized you.",$c); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-1,'$atklog');"); $_SESSION['attackwon']=0; find $hosptime=rand(50,150)+floor($ir['level']/2); and delete open crystaltemple.php find [url='crystaltemple.php?spend=refill']Energy Refill - {$set['ct_refillprice']} Crystals[/url] add below [url='crystaltemple.php?spend=hospitaltime']Hospital time - {$set['htime']} Crystals[/url] later find if($_GET['spend'] == 'refill') { if($ir['crystals'] <$set['ct_refillprice']) { print "You don't have enough crystals!"; } else if($ir['energy'] == $ir['maxenergy']) { print "You already have full energy."; } else { $db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid"); print "You have paid {$set['ct_refillprice']} crystals to refill your energy bar."; } } add below else if($_GET['spend'] == 'htime') { print "Type in the amount of Crystals you want to swap for Extra Hospitalize Time. You have [b]{$ir['crystals']}[/b] Crystals. You currently have [b]$blah[/b] Minutes Hospitalize Time. [b]20 Crystals = 1 Extra Minute Hospitalize Time.[/b]<form action='blackmarket.php?spend=htime2' method='post'><input type='text' name='crystals' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'htime2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough crystals or did not fill out the form. [url='crystaltemple.php?spend=htime']> Back[/url]"; } else { $iqgain=$_POST['crystals']*0.05; mysql_query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid",$c); mysql_query("UPDATE users SET htime=htime+$iqgain WHERE userid=$userid",$c); print "You traded {$_POST['crystals']} Crystals for $iqgain Extra Hospitalize Time. "; } } run this sql ALTER TABLE `users` ADD `htime` int(11) NOT NULL default '0'; and ur done i think lol
-
Re: hosp time ok this is what i have so far ive tested it on my site and it scemes to work for me open attackbeat.php find $db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Hospitalized by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}"); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] beat you up.",$c); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-1,'$atklog');"); $_SESSION['attackwon']=0; replace with $db->query("UPDATE users SET hp=1,hospital=hospital+200+{$ir['htime']},hospreason='Hospitalized by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}") or die("mysql_error"); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] Hospitalized you.",$c); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-1,'$atklog');"); $_SESSION['attackwon']=0; find $hosptime=rand(50,150)+floor($ir['level']/2); and delete open crystaltemple.php find [url='crystaltemple.php?spend=refill']Energy Refill - {$set['ct_refillprice']} Crystals[/url] add below [url='crystaltemple.php?spend=hospitaltime']Hospital time - {$set['htime']} Crystals[/url] later find if($_GET['spend'] == 'refill') { if($ir['crystals'] <$set['ct_refillprice']) { print "You don't have enough crystals!"; } else if($ir['energy'] == $ir['maxenergy']) { print "You already have full energy."; } else { $db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid"); print "You have paid {$set['ct_refillprice']} crystals to refill your energy bar."; } } add below else if($_GET['spend'] == 'htime') { print "Type in the amount of Crystals you want to swap for Extra Hospitalize Time. You have [b]{$ir['crystals']}[/b] Crystals. You currently have [b]$blah[/b] Minutes Hospitalize Time. [b]20 Crystals = 1 Extra Minute Hospitalize Time.[/b]<form action='blackmarket.php?spend=htime2' method='post'><input type='text' name='crystals' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'htime2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough crystals or did not fill out the form. [url='crystaltemple.php?spend=htime']> Back[/url]"; } else { $iqgain=$_POST['crystals']*0.05; mysql_query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid",$c); mysql_query("UPDATE users SET htime=htime+$iqgain WHERE userid=$userid",$c); print "You traded {$_POST['crystals']} Crystals for $iqgain Extra Hospitalize Time. "; } } run this sql ALTER TABLE `users` ADD `htime` int(11) NOT NULL default '0'; and ur done i think lol ty melton_ricky14 for ur imput but it confused what i was doing but if u want to add a admin feature to what i have done feel free i will also be posting this in the free mod section
-
Re: Any ideas? every thread like this i post the same idea maybe i will get lucky with this 1 lol apear offline basicly so u as owner so id1 when u sighn in it doesnt tell people ur online till u click a button to show urself
-
Re: marquee with admin function you can do it that way tolk but this way u dont have to worry about getting on the cpanel so i can change it wherever i want
-
Re: hosp time kind of but rather than i refilling it adds it on so u have 200 mins defult then u spend 20 crystals for 1 min then u have 201 hosp time
-
basicly ive had an idea for a addon for the crystal exchange up hosp time so say the defult hosp time is 200 mins u can up it with crystals ive seen it in other games working well with members who love it and upp there hosp times regularly im gunna try to figure it out myself but thought i would post it here to because i was going to put it up as a free mod when i was done anyway so i figure why not get u guys to help 2 :wink:
-
Re: marquee with admin function any reason why u wouldnt use it? or just because lol
-
Re: marquee with admin function oh right well i will look in to updating it
-
Re: marquee with admin function whats the diffrence? its a bit of scrolling txt lol
-
mccode-v2 100% Working Copy Enhanced Schooling
gideon prewett replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] 100% Working Copy Enhanced Schooling the only thing ive found wrong so far is those 2 blank places in ur table why not add somthing else to fill the gaps like increseing brave and hp? just an idea to add to ur great mod -
Re: Events Recode Diane beat you up. thats what i see on my event page has anyone else had this problem?
-
Run This SQL: INSERT INTO `settings` ( `conf_id` , `conf_name` , `conf_value` ) VALUES ( '', 'game_marquee', 'default' ) Find In staff.php Game Description: <textarea rows='7' cols='50' name='game_description'>{$set['game_description']}</textarea> Add Under: Game MARQUEE: <textarea rows='7' cols='50' name='game_marquee'>{$set['game_marquee']}</textarea> add this to your header where u would like it to display <hr color='lime'> <MARQUEE bgcolor='black' loop=-5 scrollamount=4 width=100%><font color=lime><font size=4> [b] {$set['game_marquee']}</th> [/b] </font></font></MARQUEE><hr color='lime'> and Ur done
-
mccode-v2 Honor Awards - Modified by HarryB
gideon prewett replied to HarryB's topic in Free Modifications
Re: [mccode v2] Honor Awards - Modified by HarryB it will only let me accept the honour point for the donator days once so i got the 1 for 15 days but it wont let me get the 1 for 30 -
mccode-v2 100% Working Copy Enhanced Schooling
gideon prewett replied to Uridium's topic in Free Modifications
Re: [MCCODES V2] 100% Working Copy Enhanced Schooling this looks like a really good mod +1 and another +1 for it being free the only thing ive found wrong so far is those 2 blank places in ut table why not add somthing else to fill the gaps like increseing brave and hp? just an idea to add to ur great mod -
Re: sql help i will have to start buying from u then lol
-
Re: sql help kk ty AH i did mail the person i bought it off but i just like to get new mods in quickly
-
Re: sql help am i aloud to post it here as its from a paid mod?