
D T K
Members-
Posts
126 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by D T K
-
Re: [v2] New Header Nothing really just the fact i added everything and i think i added in the right spots just shows up funny
-
Re: [mccode V1 V2] Chat Mod same here
-
Re: [v2] New Header I tried im not the greatest Coder in the world can someone please do it for 2$ lol
-
Re: [v2] New Header 2$ to whoever can fix it
-
Re: [v2] New Header Game IE7 and its doing same for everyone
-
Re: [v2] New Header Ill give you 2$ to do it for me lol ill be back in bout 15mins
-
Re: [v2] New Header Hey i added this to my game and alot of the images are just squares with the red x box thing
-
Re: [V2] Cron Mods Request Tonka did you <a href='blank.php'> your links in Explor ethey dont work
-
Re: Mccodes V2 Request Name Changes ok i fail at SQL so can someone tell me how to add a Table manually for this one
-
Re: [mc code V2]Updated Lottery Right lol i forgot i put it there :P anyway should work now
-
Re: [mc code V2]Updated Lottery Lottery.php <?php require('globals.php'); $ticketPRICE = 50000; //Price of a lottery ticket, change this. if(!isset($_GET['buy'])) { $lotterySQL = sprintf("SELECT * FROM `lottery` WHERE `userID` = %d", abs((int)$userid)); $myTICKETS = mysql_num_rows(mysql_query($lotterySQL)); // Query checks how many tickets the user had. $tickets = mysql_num_rows(mysql_query("SELECT * FROM `lottery`")); // Query checks how many tickets have been purchased. echo'<h3>Weekly Lottery</h3> '; $jackpot = abs((int)$tickets*$ticketPRICE); // Jackpot formula echo'This is the current Jackpot. '; echo sprintf('<h2>$%d</h2>', $jackpot); // The current Jackpot echo sprintf('Welcome to the weekly lottery. Currently, [b]%d[/b] tickets have been purchased. You have [b]%d[/b] tickets ', abs((int)$tickets), abs((int)$myTICKETS)); // How many tickets have been purchased & how many user has echo' [url="' .$_SERVER['PHP_SELF']. '?buy=1"]Click here to buy a ticket (' .$ticketPRICE. ')[/url]'; } else if($_GET['a'] == buy) { if($ir['money'] < 50000) { die("You don't have enough cash"); }$tick = 6; // Ticket Amount $tickq = $db->query("SELECT * FROM `lottery` WHERE `userid` = '$ir['userid']'"); if($db->num_rows($tickq) > $tick) { die('You can olnly purchase ' .$tick. ' tickets maximum'); } $updateSQL = sprintf("UPDATE `users` SET `money` = `money` - %d WHERE `userid` = %d", abs((int)$ticketPRICE), abs((int)$userid)); $updateQUERY = mysql_query($updateSQL); $insertSQL = sprintf("INSERT INTO `lottery` VALUES ('', %d, %d)", abs((int)$userid), abs((int)1)); mysql_query($insertSQL); echo' You purchased a lottery ticket! [url="' .$_SERVER['PHP_SELF']. '?buy=1"]Click here to buy another ticket[/url]'; } else { echo'There has been an error. Please go [url="' .$_SERVER['PHP_SELF']. '"]back[/url] and try again'; } ?> Cron Weekly <?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; include('global_func.php'); $ticketPRICE = 50000; if(count($ids) > 0) $jpSQL = mysql_num_rows(mysql_query("SELECT * FROM `lottery`")) or die(mysql_error()); $jackpot = money_formatter(abs((int)$jpSQL*$ticketPRICE)); $winnerSQL = mysql_query("SELECT `userid` FROM `lottery` ORDER BY RAND() LIMIT 1"); $user = mysql_fetch_assoc($winnerSQL); $creditSQL = sprintf("UPDATE `users` SET `money` = `money` + %d WHERE `userid` = (%d)", $jackpot, abs((int)$user['userid'])); event_add($user['userid'],"You won the weekly lottery and were credited {$jackpot}",$c); mysql_query("TRUNCATE TABLE `lottery`"); ?> This should work i didnt test it. My game isnt up yet :P
-
Re: [mc code V2]Updated Lottery That SQL would give them a default of 6 tickets ill see if i can do the Max thing
-
Re: mafia city It would be nice if you secured your game i was albe to gain access to Mojo89 within 30 seconds
-
QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO items VALUES('',3,'Testttt','eee',111,111,1, '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount That is when i go to create new item i have standard Mc Codes script
-
Re: [mccodes V2] Review staff. CREATE TABLE IF NOT EXISTS `review` ( `id` int(11) NOT NULL auto_increment, `user` int (11) NOT NULL default 0 `review` int(11) NOT NULL default '1', `reason` varchar(266) NOT NULL default 'None', `time` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) CREATE TABLE IF NOT EXISTS `warnings` ( `id` int(11) NOT NULL auto_increment, `user` int (11) NOT NULL default '0', `warning` varchar(266) NOT NULL default 'none', `review` int(11) NOT NULL default '1', `reason` varchar(266) NOT NULL default 'None', `time` int(11) NOT NULL default '0', PRIMARY KEY (`id`) )
-
Re: [V1] Russian Roulette [V1] Yes thanks illusions lol and i wrote that bottom part very quickly and dont understand that myself lol but hey this is the first mod ive actually made
-
Re: Help gang delete [v2] Post your script
-
<?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("UPDATE users SET splatturns = 0"); $db->query("UPDATE users SET strategoturns = 0"); $db->query("UPDATE users SET kerplunkturns = 0"); $db->("UPDATE users SET redcross=0",$c); $db->query("UPDATE users SET islands=100"); $db->query("UPDATE users SET csmuggling=csmuggling+10 WHERE csmuggling > 0"); $db->query("UPDATE users SET player_week=-1 WHERE player_week > 0"); $db->query("TRUNCATE TABLE stepsmarket"); $db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0"); $db->query("UPDATE users SET turns=turns+100 WHERE turns < 1000"); $db->query("UPDATE users SET fishing_aloud=50"); $db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0"); $db->query("UPDATE users SET reward_done=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 ratesleft=1"); $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!')"); } $fo=fopen("jailshouts.txt","w"); fclose($fo); $db->query("UPDATE users SET course=0 WHERE cdays=0"); $db->query("TRUNCATE TABLE votes;"); $db->query("UPDATE passreset SET time=time-1 WHERE time > 0") or die($db->error()); $db->query("DELETE FROM passreset WHERE time<=0") or die($db->error()); //fetchs the npc info and makes them appear online $db->query("UPDATE users SET laston=unix_timestamp() WHERE user_level = 0"); //fetch ?> This is the error Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '{' or '$' in /home/ryan/public_html/cron_day.php on line 29 Please help as this is very urgent
-
Re: [V1] V1 Help Please Will do illusions :P didnt know your name here so posted what i thought :P and Danny i was honest about it like some people say they bout it when they aint done shit :P
-
Re: [V1] V1 Help Please Thanks Nightmare helped me out and it was my mysql.php lol
-
Re: V1 Help Please I beleive it is if anyone wants to help add me on MSN [email protected]
-
I bought V1 a long time ago when it came out but found a free version of V2 so didnt use V1 and i was wondering if it was the same to install as V2 because the one i got cost 100$ liscense included from someone that was a MC Codes Rep and i didnt get an installer file bump got a SQL dump file and on my register i get Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'mysql_host' (1) in /home/menice/public_html/mysql.php on line 3 Unknown MySQL server host 'mysql_host' (1) and on Authenticate Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'mysql_host' (1) in /home/menice/public_html/mysql.php on line 3 Unknown MySQL server host 'mysql_host' (1) Not sure what to do and ive already Converted TONS of my V2 mods and umm dont know what to do wanna help me BTW this is my test server
-
Re: Help With Header Post your whole Header Code
-
<?php require"globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } if ($_GET['action'] != 'Shoot') { print "Well. Here you are, sitting with a guy you dont know ready to die!! dont waist a shot you only got {$ir['shots']} shot left for the day . "; print " Choose how many turns you want to use <form method=post action=russian.php?action=Shoot><input type=hidden name=action value=Shoot><input type='text' name='pow' value='{$ir['shots']}'> <input type=submit value='Shoot'></form>"; } else { $pow=abs((int) $_POST['pow']); for($i=0;$i<$pow;$i++) { if ($ir['shots'] < 0) { print("You dont have enough shots to shoot!!! "); } else { $chance = rand(1,6); mysql_query("update users set shots=shots-1 where userid=$userid",$c); if ($chance == 1) { $hosptime = rand(1,10); $healthl = rand(50,100); { Print("you Grab the gun and Pull the trigger!!!![b]POW>>>>> WOW[b] YOUR DEAD MAN.....HE Wins You Lose {$healthl} Health and are in the hospital for {$hosptime} "); mysql_query("UPDATE users SET hp=hp-{$healthl} WHERE userid=$userid",$c); $ir['hospital']+=$hosptime; $ir['hp']=$healthl; $reason = "Lost russian roulette"; mysql_query("UPDATE users SET hospital=hospital+{$hosptime}, hospreason = '$reason' WHERE userid=$userid",$c); } } } if ($chance == 2) { $hosptime = rand(1,10); $healthl = rand(50,100); Print("You Grab the gun and Pull the trigger!!!![b]POW>>>>> WOW[b] YOUR DEAD MAN.....HE Wins You Lose {$healthl} Health and are in the hospital for {$hosptime} minutes!!! "); mysql_query("UPDATE users SET hp=hp-{$healthl} WHERE userid=$userid",$c); $ir['hospital']+=$hosptime; $ir['hp']=$healthl; $reason = "Lost russian roulette"; mysql_query("UPDATE users SET hospital=hospital+{$hosptime}, hospreason='$reason' WHERE userid=$userid",$c); print"you have [b]{$ir['shots']}[/b] Shots left "; } if ($chance == 3) { $amnt = rand(500,1000000); if($ir['money'] > $amnt) print "You Grab the gun and Pull the trigger!!!![b]CLICK.....CLICK WOW[b] The Man in the bar Pulls The trigger.....Pow you win the \$ {$amnt}!!!! "; mysql_query("update users set money=money+{$amnt} where userid=$userid",$c); $ir['money']=$amnt; print"you have [b]{$ir['shots']}[/b] Shots left "; } if ($chance == 6) { $hosptime = rand(1,10); $healthl = rand(50,100); Print("You Grab the gun and Pull the trigger!!!![b]POW>>>>> WOW[b] YOUR DEAD MAN.....HE Wins You Lose {$healthl} Health and are in the hospital for {$hosptime} minutes!!! "); mysql_query("UPDATE users SET hp=hp-{$healthl} WHERE userid=$userid",$c); $ir['hospital']+=$hosptime; $ir['hp']=$healthl; $reason ="Lost russian roulette"; mysql_query("UPDATE users SET hospital=hospital+{$hosptime}, hospreason = '$reason' WHERE userid=$userid",$c); print"you have [b]{$ir['shots']}[/b] Shots left "; } if ($chance == 5) { $hosptime = rand(1,10); $healthl = rand(50,100); Print("ou Grab the gun and Pull the trigger!!!![b]POW>>>>> WOW[b] YOUR DEAD MAN.....HE Wins You Lose {$healthl} Health and are in the hospital for {$hosptime} minutes!!! "); mysql_query("UPDATE users SET hp=hp-{$healthl} WHERE userid=$userid",$c); $ir['hospital']+=$hosptime; $ir['hp']=$healthl; $reason = "Lost russian roulette"; mysql_query("UPDATE users SET hospital=hospital+{$hosptime}, hospreason = '$reason' WHERE userid=$userid",$c); print"you have [b]{$ir['shots']}[/b] Shots left "; } if ($chance == 4) { $hosptime = rand(1,10); $healthl = rand(50,100); Print("ou Grab the gun and Pull the trigger!!!![b]POW>>>>> WOW[b] YOUR DEAD MAN.....HE Wins You Lose {$healthl} Health and are in the hospital for {$hosptime} minutes "); mysql_query("UPDATE users SET hp=hp-{$healthl} WHERE userid=$userid",$c); $ir['hospital']+=$hosptime; $ir['hp']=$healthl; $reason ="Lost russian roulette"; mysql_query("UPDATE users SET hospital=hospital+{$hosptime}, hospreason = '$reason' WHERE userid=$userid",$c); print"you have [b]{$ir['shots']}[/b] Shots left "; } print " Choose how many Shots you want to use <form method=post action=russian.php?action=Shoot><input type=hidden name=action value=Shoot><input type='text' name='pow' value='{$ir['shots']}'> <input type=submit value='Shoot'></form>"; } } if($ir['shots']==0) { print "Sorry, all turns used! "; } $h->endpage(); ?> Forgot Code Tags and cron query (day/24hr) $db->query("UPDATE users SET shots=6"); Make a table in users just like turns or crystals but use (shots int not null) put in place of globals.php for vers 1.1 mccodes session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); And your done