
jpoke5
Members-
Posts
26 -
Joined
-
Last visited
Never
jpoke5's Achievements
Newbie (1/14)
0
Reputation
-
Re: New Host needed Urgently I use http://www.mymicrohost.net The prices are a bit high but well worth it. My game site is always on and the tech support is awesome. Never had one problem with them at all in the past 2 years.
-
total noob looking for basic setup of items/options/affects manual
jpoke5 replied to jpoke5's topic in General Discussion
Re: total noob looking for basic setup of items/options/affects manual Hey, Nyna first of all, I don't need your stupid comments on my post. FYI i purchased this code way before i even known about mccodes. The only way i found out about having a revised mccode script was from searching around the net then finding this forum after i already bought it. and 2nd...KMA -
Re: Help with edit job rank. job.php that did it, thanks guys!!
-
I have v2 and when i try and edit a job rank i get this error that i dont know how to fix. Anyone know how to fix this? im not very good at php. Thanks!! QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'jrID=6' at line 1 Query was UPDATE jobranks SET jrNAME='1cabby', jrJOB = 5, jrPAY= 25, jrIQG=1, jrLABOURG=3, jrSTRG=2, jrIQN=10, jrLABOURN=10, jrSTRN=10WHERE jrID=6 my code <?php $jobquery=1; include "globals.php"; $_GET['interview'] = abs((int) $_GET['interview']); if(!$ir['job']) { if(!$_GET['interview']) { print "You do not yet have a job. A list of jobs is available below. "; $q=$db->query("SELECT * FROM jobs"); while($r=$db->fetch_row($q)) { print "> {$r['jNAME']} - {$r['jDESC']} - [url='job.php?interview={$r[']Go to interview[/url] "; } } else { $q=$db->query("SELECT j.*,jr.* FROM jobs j LEFT JOIN jobranks jr ON j.jFIRST = jr.jrID WHERE j.jID={$_GET['interview']}"); $r=$db->fetch_row($q); print "{$r['jOWNER']}: So {$ir['username']}, you were looking for a job with us? {$ir['username']}: Yes please! "; if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN']) { $db->query("UPDATE users SET job={$_GET['interview']},jobrank={$r['jrID']} WHERE userid=$userid;"); print "{$r['jOWNER']}: Okay {$ir['username']}, we're good to go, see you tomorrow. {$ir['username']}: Thanks! [url='job.php']:)[/url]"; } else { print "{$r['jOWNER']}: Sorry {$ir['username']}, you're not far enough in the game to work in this job. You'll need:"; if($ir['strength'] < $r['jrSTRN']) { $s=$r['jrSTRN']-$ir['strength']; print " $s more strength, "; } if($ir['labour'] < $r['jrLABOURN']) { $s=$r['jrLABOURN']-$ir['labour']; print " $s more labour, "; } if($ir['IQ'] < $r['jrIQN']) { $s=$r['jrIQN']-$ir['IQ']; print " $s more IQ, "; } print "before you'll be able to work here! [url='index.php']:'([/url]"; } } } else { switch($_GET['action']) { case 'quit': quit_job(); break; case 'promote': job_promote(); break; default: job_index(); break; } } function job_index() { global $db, $ir,$c,$userid,$h; print "<h3>Your Job</h3> You currently work in the {$ir['jNAME']}! You receive \${$ir['jrPAY']} each day at 5pm! You also receive {$ir['jrIQG']} IQ, {$ir['jrSTRG']} strength, and {$ir['jrLABOURG']} labour! <table width=50% cellspacing=1 class='table'><tr><td>Strength: {$ir['strength']}</td><td>IQ: {$ir['IQ']}</td></tr><tr><td>Labour: {$ir['labour']}</td><td>Job Rank: {$ir['jrNAME']}</td></tr></table> [b]Job Ranks[/b] <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Title</th><th>Pay</th><th>Strength Reqd</th><th>IQ Reqd</th><th>Labour Reqd</th></tr>"; $q=$db->query("SELECT * FROM jobranks WHERE jrJOB={$ir['job']} ORDER BY jrPAY ASC;"); while($r=$db->fetch_row($q)) { print "<tr><td>{$r['jrNAME']}</td><td>\${$r['jrPAY']}</td><td>{$r['jrSTRN']}</td><td>{$r['jrIQN']}</td><td>{$r['jrLABOURN']}</td></tr>"; } print "</table> [url='job.php?action=promote']> Try To Get Promoted[/url] [url='job.php?action=quit']> Quit[/url]"; } function job_promote() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM jobranks WHERE jrPAY > {$ir['jrPAY']} AND jrSTRN <= {$ir['strength']} AND jrLABOURN <= {$ir['labour']} AND jrIQN <= {$ir['IQ']} AND jrJOB = {$ir['job']} ORDER BY jrPAY DESC LIMIT 1"); if($db->num_rows($q) == 0) { print "Sorry, you cannot be promoted at this time. [url='job.php']> Back[/url]"; } else { $r=$db->fetch_row($q); $db->query("UPDATE users SET jobrank= {$r['jrID']} WHERE userid=$userid"); print "Congrats, you have been promoted to {$r['jrNAME']} [url='job.php']> Back[/url]"; } } function quit_job() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET job=0,jobrank=0 WHERE userid=$userid"); print "You have quit your job! [url='job.php']> Back[/url]"; } $h->endpage(); ?>
-
Re: Items Pic mod [v2] test
-
Re: [mccode v2] Items Pic mod Well here my problem when i change that in there and try to add a item i get a query error. It only happens when i change the obove lines and yes i did add the table into the database and everything and i have no idea y its not working its geting a bit frustrated but bewow ill post my staff_items where the problem is and anyhelp that u guys can give me i really apreciate it Error QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO items VALUES('',3,'Test','test',2147483647,3500,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";i:0;}', 0, 0,'Knife.jpg') Staff_items.php problem $db->query("DELETE FROM items WHERE itmid={$_POST['itmid']}",$c); $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor,'{$_POST['itmpic']}')"); print "The {$_POST['itmname']} Item was edited successfully."; stafflog_add("Edited item {$_POST['itmname']}"); } function newitemtype() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) Second Part if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor,'{$_POST['itmpic']}')"); print "The {$_POST['itmname']} Item was added to the game."; stafflog_add("Created item {$_POST['itmname']}"); } function give_item_form() { global $db,$ir,$c; if($ir['user_level'] > 3) Anyhelp That u guys can provide me with would be greatly helpfull thank u there are 3 code boxes on the fist post and 2 on the second post that have no code in them, it shows the slider tab and thats it. even the select tag does not work. why would i post about no code if it was there? im not that stupid.
-
Re: [mccode v2] Items Pic mod anyone have input for my post. sure would like to add this mod but dont know how??
-
Re: [mccode v2] Items Pic mod i would like to use this mod but i see some of the find and replace code boxes are empty. whats up with that? how can i install this mod if the boxes are empty?
-
Re: Simple register edit awesome, Thanks for the help!! Lots of people on this forum get mad because a noob dont know his way around. Then there is guys like you who dont mind the stupid noob questions and help out when a guy is stuck. Jeff
-
Re: Simple register edit This is great but i dont see a way to up the starting money> $sm How can i adjust the money a user starts the game with?? Thanks!! Jeff
-
Re: [mccode v2] ADVANCED USERSONLINE MOD fixed, my mistake!! great mod
-
Re: [mccode v2] ADVANCED USERSONLINE MOD the mod looks good but i seem to have an error? far as i know i have v2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mymicro/public_html/usersonline.php:3) in /home/mymicro/public_html/globals.php on line 6
-
Re: edit new user items...Money,crystals Just awesome, I love the detail you explain. When i ask a question like.... Where and how to edit donator packs they tend to answer with "go here and learn php" or " Its in your files" or " you can edit inventory here" LOL BTW, Where and how do I edit donator packs? Thanks for the help my friend!! J
-
I searched the forums but cant seem to find where i can edit the items a new user gets when they join up. i wanted to up the money,crystals,etc... thanks
-
Re: exp not working <?php $macropage="docrime.php?c={$_GET['c']}"; include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) { print "Invalid crime"; } else { $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } 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 $r['crimeITEXT']; $ir['brave']-=$r['crimeBRAVE']; mysql_query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); if(rand(1,100) <= $sucrate) { print str_replace("{money}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT']); $ir['money']+=$r['crimeSUCCESSMUNY']; $ir['crystals']+=$r['crimeSUCCESSCRYS']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); mysql_query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c); if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } } else { if(rand(1, 2) == 1) { print $r['crimeFTEXT']; } else { print $r['crimeJTEXT']; $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']Crimes[/url]"; } } $h->endpage(); ?> Thats what i have in the docrimes.php but not sure if thats correct?