seanybob
Members-
Posts
666 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by seanybob
-
bug report mod hmm... nope it works fine for me. Id try deleting ur bug report, and re adding it, just in case you accidentally deleted something
-
validation mod you... rock!
-
Counting (nr game) 786
-
MCcode game mods
-
MCcode game mods thanks, that one worked perfectly :thumbs_up: :thumbs_up: :thumbs_up:
-
MCcode game mods i attempted to, but ran into some snags. its actually more complicated than it looks plus its 5$, and i get like 4 times that donated everyday... so no biggie
-
MCcode game mods coldblooded, i bought the advanced search mod, but there are a LOT of bugs in it... can you take a look at it? maybe you sent me an older version or something...
-
[mccode] adding a crime panel in admin panel
seanybob replied to seanybob's topic in Free Modifications
adding a crime panel in admin panel k guys, updated my first post with just about everything posted here, and fixed crime groups. it all should be working now -
Re: User Notepad ok so heres how to change it so only a user can change their own SQL query ALTER TABLE `users` ADD `usernotes` LONGTEXT NOT NULL ; open viewuser.php find this if($ir['user_level'] == 6) { print " IP Address: {$r['lastip']}"; print "<form action='staffnotes.php' method='post'> Staff Notes: <textarea rows=7 cols=40 name='staffnotes'>{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Change' /></form>"; } after add print "<form action='usernotes.php' method='post'> [b]User Notes:[/b] <textarea rows=7 cols=40 name='usernotes'>{$r['usernotes']}</textarea>"; if($ir['userID'] == $r['userID']) { print" <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Update' />"; } print"</form>"; usernotes.php <?php 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(); mysql_query("UPDATE users SET usernotes='{$_POST['usernotes']}' WHERE userid='{$_POST['ID']}'",$c); print "User notes updated! [url='viewuser.php?u={$_POST[']> Back To Profile[/url]"; $h->endpage(); ?> or something close to that i imagine... anyone wanna test it and find out? :P
-
[mccode] adding a crime panel in admin panel
seanybob replied to seanybob's topic in Free Modifications
adding a crime panel in admin panel ok i made a crimegroup panel... but for some reason, adding a new crimegroup doesnt work. i prolly left off an s somewhere... admin.php add this somewhere with all the other functions function new_crimegroup_form() { global $ir, $c; print "Adding a new crimegroup. <form action='admin.php?action=newcrimegroupsub' method='post'> Crimegroup Name: <input type='text' name='cgNAME' /> Crimegroup Order Number: <input type='text' name='cgORDER' /> <input type='submit' value='Create CrimeGroup' /></form>"; } function new_crimegroup_submit() { global $ir,$c,$userid; if(!isset($_POST['cgNAME']) || !isset($_POST['cgORDER'])) { print "You missed one or more of the required fields. Please go back and try again. [url='admin.php?action=newcrimegroup']> Back[/url]"; $h->endpage(); exit; } mysql_query("INSERT INTO crimegroups (cgNAME, cgORDER) VALUES( '{$_POST['cgNAME']}', '{$_POST['cgORDER']})", $c); print "Crimegroup created!"; } function edit_crimegroup_begin() { global $ir,$c,$h,$userid; print "<h3>Editing Crimegroups</h3> Edit Crimegroups here. <form action='admin.php?action=editcrimegroupform' method='post'> Crimegroup: ".crimegroup_dropdown($c,'crimeGROUP')." <input type='submit' value='Edit Crimegroup' /></form>"; } function edit_crimegroup_form() { global $ir,$c,$h,$userid; $d=mysql_query("SELECT * FROM crimegroups WHERE cgID={$_POST['crimeGROUP']}",$c); $itemi=mysql_fetch_array($d); print "<h3>Editing CrimeGroup</h3> <form action='admin.php?action=editcrimegroupsub' method='post'> <input type='hidden' name='cgID' value='{$_POST['crimeGROUP']}' /> Crimegroup Name: <input type='text' name='cgNAME' value='{$itemi['cgNAME']}' /> Crimegroup Order Number: <input type='text' name='cgORDER' value='{$itemi['cgORDER']}' /> <input type='submit' value='Edit CrimeGroup' /></form>"; } function edit_crimegroup_sub() { global $ir,$c,$h,$userid; if(!isset($_POST['cgORDER']) || !isset($_POST['cgNAME'])) { print "You missed one or more of the required fields. Please go back and try again. [url='admin.php?action=newcrimegroup']> Back[/url]"; $h->endpage(); exit; } else { $oq=mysql_query("SELECT * FROM crimegroups WHERE cgID={$_POST['cgID']}",$c); $rm=mysql_fetch_array($oq); mysql_query("UPDATE crimegroups SET cgNAME='{$_POST['cgNAME']}', cgORDER='{$_POST['cgORDER']}'", $c) or die(mysql_error()); print "Crimegroup edited..."; } } function delcrimegroup() { global $ir,$c,$h,$userid; switch ($_GET['step']) { default: echo "<h3>Deleting Crimegroups</h3> Here you can delete a crimegroup. <form action='admin.php?action=delcrimegroup&step=2' method='post'> Crimegroup: ".crimegroup_dropdown($c,'crimeGROUP')." <input type='submit' value='Delete Crimegroup' /></form>"; break; case 2: $target = $_POST['crime']; $d=mysql_query("SELECT cgNAME FROM crimegroups WHERE cgID='$target'") or die(mysql_error()); $itemi=mysql_fetch_array($d); print "<h3>Confirm</h3> Delete crimegroup - ".$itemi[0]."? <form action='admin.php?action=delcrimegroup&step=3' method='post'> <input type='hidden' name='cgID' value='$target' /> <input type='submit' name='yesorno' value='Yes' /> <input type='submit' name='yesorno' value='No' onclick=\"window.location='admin.php';\" /></form>"; break; case 3: $target = $_POST['crimeID']; if($_POST['yesorno']=='No') { die("Crimegroup not deleted. [url='admin.php']>Back to main admin page.[/url]"); } if ($_POST['yesorno'] != ("No" || "Yes")) die('Eh'); mysql_query("DELETE FROM crimegroups WHERE cgID='$target'") or die(mysql_error()); echo "Crimegroup Deleted. [url='admin.php']>Back to main admin page.[/url]"; break; } } find case 'delcrime': delcrime(); break; after it add case 'newcrimegroup': new_crimegroup_form(); break; case 'newcrimegroupsub': new_crimegroup_submit(); break; case 'editcrimegroup': edit_crimegroup_begin(); break; case 'editcrimegroupform': edit_crimegroup_form(); break; case 'editcrimegroupsub': edit_crimegroup_sub(); break; case 'delcrime': delcrime(); break; find [[url='admin.php?action=delcrime']Delete Crime[/url]] after it add [[url='admin.php?action=newcrimegroup']Create New Crimegroup[/url]] [[url='admin.php?action=editcrimegroup']Edit Crimegroup[/url]] [[url='admin.php?action=delcrimegroup']Delete Crimegroup[/url]] so... any ideas where i went wrong? i havent even tested the edit crimegroups yet, since i couldnt make a new one lol -
[mccode] adding a crime panel in admin panel
seanybob replied to seanybob's topic in Free Modifications
adding a crime panel in admin panel o, this only works if u have my crimeITEM mod installed too... its in these mod forums somewhere -
[mccode] adding a crime panel in admin panel
seanybob replied to seanybob's topic in Free Modifications
adding a crime panel in admin panel DougK and tranz_fusion, you guys mind if i add ur changes to my first post with the mods? ill add ur guys names to that post too if its ok -
User Notepad you could change it so that only the user can edit their textpad... then it would be like a kinda signature in their profile :)
-
[mccode] adding a crime panel in admin panel
seanybob replied to seanybob's topic in Free Modifications
adding a crime panel in admin panel ok, when ill get home ill fix editcrime so it shows IText, and also ill work on making a crimegroups thing for admin.php. shouldnt be too hard, just gotta edit a few things what i already posted :) -
[mccode] adding a crime panel in admin panel
seanybob replied to seanybob's topic in Free Modifications
adding a crime panel in admin panel should be... -
[mccode] adding a crime panel in admin panel
seanybob replied to seanybob's topic in Free Modifications
adding a crime panel in admin panel *smacks head* its always the little things fixed now :burp: -
[mccode] adding a crime panel in admin panel
seanybob replied to seanybob's topic in Free Modifications
adding a crime panel in admin panel ooops DJ i accidentally hit enter while typing the crime dropdown box, fixed it now, copy/paste code again -
[mccode] adding a crime panel in admin panel
seanybob replied to seanybob's topic in Free Modifications
adding a crime panel in admin panel added. but how do u set a value to a textarea field? -
Everyone post any mod ideas you have that you would like to see implemented here... perhaps one of these days while im bored ill write some of them lol
-
[mccode] adding a crime panel in admin panel
seanybob replied to seanybob's topic in Free Modifications
adding a crime panel in admin panel anyone who wants to add to this, or sees a way to change something for the better, post!!! lol, i dont claim to be perfect, and to admit it i did this half drunk (although sometimes i find that the best time to code is while drinking) -
thanks to everyone who contributed to this, including Dougk and tranz_fusion *note-this requires that the mod for adding items to crimes is up and running, it can be found here http://www.criminalexistence.com/viewtopic.php?t=1392 first open up global_func.php find function user_dropdown($connection,$ddname="user",$selected=-1) { $ret=""; $q=mysql_query("SELECT * FROM users ORDER BY username ASC",$connection); if($selected == -1) { $first=0; } else { $first=1; } while($r=mysql_fetch_array($q)) { $ret.="\nif ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}"; } $ret.="\n"; return $ret; } after that add function crime_dropdown($connection,$ddname="crime",$selected=-1) { $ret=""; $q=mysql_query("SELECT * FROM crimes ORDER BY crimeNAME ASC",$connection); if($selected == -1) { $first=0; } else { $first=1; } while($r=mysql_fetch_array($q)) { $ret.="\nif ($selected == $r['crimeID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['crimeNAME']}"; } $ret.="\n"; return $ret; } function crimegroup_dropdown($connection,$ddname="crimegroups",$selected=-1) { $ret=""; $q=mysql_query("SELECT * FROM crimegroups ORDER BY cgID ASC",$connection); if($selected == -1) { $first=0; } else { $first=1; } while($r=mysql_fetch_array($q)) { $ret.="\nif ($selected == $r['cgID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['cgNAME']}"; } $ret.="\n"; return $ret; } now open up admin.php find case 'massmailer': massmailer(); break; after it add case 'newcrime': new_crime_form(); break; case 'newcrimesub': new_crime_submit(); break; case 'editcrime': edit_crime_begin(); break; case 'editcrimeform': edit_crime_form(); break; case 'editcrimesub': edit_crime_sub(); break; case 'delcrime': delcrime(); break; case 'newcrimegroup': new_crimegroup_form(); break; case 'newcrimegroupsub': new_crimegroup_submit(); break; case 'editcrimegroup': edit_crimegroup_begin(); break; case 'editcrimegroupform': edit_crimegroup_form(); break; case 'editcrimegroupsub': edit_crimegroup_sub(); break; case 'delcrimegroup': delcrimegroup(); break; find Items [[url='admin.php?action=newitem']Create New Item[/url]] [[url='admin.php?action=giveitem']Give Item To User[/url]] [[url='admin.php?action=edititem']Edit Item[/url]] [[url='admin.php?action=killitem']Delete An Item[/url]] after it add Crimes [[url='admin.php?action=newcrime']Create New Crime[/url]] [[url='admin.php?action=editcrime']Edit Crime[/url]] [[url='admin.php?action=delcrime']Delete Crime[/url]] [[url='admin.php?action=newcrimegroup']Create New Crimegroup[/url]] [[url='admin.php?action=editcrimegroup']Edit Crimegroup[/url]] [[url='admin.php?action=delcrimegroup']Delete Crimegroup[/url]] find function adnewspaper_submit() { global $ir,$c,$h,$userid; $l=fopen("admin.news","w"); fwrite($l,stripslashes($_POST['newspaper'])); fclose($l); print "Admin News updated!"; } after that add function new_crime_form() { global $ir, $c; print "Adding a new crime. Crime Name: Crime Brave Cost: Crime PERCFORM: Success Money: Crime Group: ".crimegroup_dropdown($c,'crimeGROUP')." CrimeITEXT: Crime Success TEXT: Crime Failure TEXT: crime ITEM Number(0 for none): "; } function new_crime_submit() { global $ir,$c,$userid; if(!isset($_POST['crimeNAME']) || !isset($_POST['crimeBRAVE']) || !isset($_POST['crimePERCFORM']) || !isset($_POST['crimeSUCCESSMUNY']) || !isset($_POST['crimeGROUP']) || !isset($_POST['crimeITEXT']) || !isset($_POST['crimeSTEXT']) || !isset($_POST['crimeFTEXT'])) { print "You missed one or more of the required fields. Please go back and try again. [url='admin.php?action=newcrime']> Back[/url]"; $h->endpage(); exit; } mysql_query("INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeITEM) VALUES( '{$_POST['crimeNAME']}', '{$_POST['crimeBRAVE']}', '{$_POST['crimePERCFORM']}', '{$_POST['crimeSUCCESSMUNY']}', '{$_POST['crimeGROUP']}', '{$_POST['crimeITEXT']}', '{$_POST['crimeSTEXT']}', '{$_POST['crimeFTEXT']}', '{$_POST['crimeITEM']}')", $c); print "Crime created!"; } function edit_crime_begin() { global $ir,$c,$h,$userid; print "Editing Crime You can edit any aspect of this crime. Crime: ".crime_dropdown($c,'crime')." "; } function edit_crime_form() { global $ir,$c,$h,$userid; $d=mysql_query("SELECT * FROM crimes WHERE crimeID={$_POST['crime']}",$c); $itemi=mysql_fetch_array($d); print "Editing Crime Crime Name: Crime Brave Cost: Crime PERCFORM: Success Money: Crime Group: ".crimegroup_dropdown($c,'crimeGROUP')." CrimeITEXT: '{$itemi['crimeITEXT']}' Crime Success TEXT: '{$itemi['crimeSTEXT']}' Crime Failure TEXT: '{$itemi['crimeFTEXT']}' crime ITEM Number(0 for none): "; } function edit_crime_sub() { global $ir,$c,$h,$userid; if(!isset($_POST['crimeNAME']) || !isset($_POST['crimeBRAVE']) || !isset($_POST['crimePERCFORM']) || !isset($_POST['crimeSUCCESSMUNY']) || !isset($_POST['crimeGROUP']) || !isset($_POST['crimeITEXT']) || !isset($_POST['crimeSTEXT']) || !isset($_POST['crimeFTEXT'])) { print "You missed one or more of the required fields. Please go back and try again. [url='admin.php?action=newcrime']> Back[/url]"; $h->endpage(); exit; } else { $oq=mysql_query("SELECT * FROM crimes WHERE crimeID={$_POST['crimeID']}",$c); $rm=mysql_fetch_array($oq); mysql_query("UPDATE crimes SET crimeNAME='{$_POST['crimeNAME']}', crimeBRAVE='{$_POST['crimeBRAVE']}', crimePERCFORM='{$_POST['crimePERCFORM']}', crimeSUCCESSMUNY='{$_POST['crimeSUCCESSMUNY']}', crimeGROUP='{$_POST['crimeGROUP']}', crimeITEXT='{$_POST['crimeITEXT']}', crimeSTEXT='{$_POST['crimeSTEXT']}', crimeFTEXT='{$_POST['crimeFTEXT']}', crimeITEM='{$_POST['crimeITEM']}' WHERE crimeID={$_POST['crimeID']}", $c) or die(mysql_error()); print "Crime edited..."; } } function delcrime() { global $ir,$c,$h,$userid; switch ($_GET['step']) { default: echo "Deleting Crimes Here you can delete a crime. Crime: ".crime_dropdown($c,'crime')." "; break; case 2: $target = $_POST['crime']; $d=mysql_query("SELECT crimeNAME FROM crimes WHERE crimeID='$target'") or die(mysql_error()); $itemi=mysql_fetch_array($d); print "Confirm Delete crime - ".$itemi[0]."? "; break; case 3: $target = $_POST['crimeID']; if($_POST['yesorno']=='No') { die("Crime not deleted. [url='admin.php']>Back to main admin page.[/url]"); } if ($_POST['yesorno'] != ("No" || "Yes")) die('Eh'); mysql_query("DELETE FROM crimes WHERE crimeID='$target'") or die(mysql_error()); echo "Crime Deleted. [url='admin.php']>Back to main admin page.[/url]"; break; } } function new_crimegroup_form() { global $ir, $c; print "Adding a new crimegroup. Crimegroup Name: Crimegroup Order Number: "; } function new_crimegroup_submit() { global $ir,$c,$userid; if(!isset($_POST['cgNAME']) || !isset($_POST['cgORDER'])) { print "You missed one or more of the required fields. Please go back and try again. [url='admin.php?action=newcrimegroup']> Back[/url]"; $h->endpage(); exit; } $res = mysql_query("INSERT INTO `crimegroups` (`cgNAME`, `cgORDER`) VALUES('".$_POST["cgNAME"]."','".$_POST["cgORDER"]."')"); if (!$res) { die('error: '.mysql_error()); } print "Crimegroup created!"; } function edit_crimegroup_begin() { global $ir,$c,$h,$userid; print "Editing Crimegroups Edit Crimegroups here. Crimegroup: ".crimegroup_dropdown($c,'crimeGROUP')." "; } function edit_crimegroup_form() { global $ir,$c,$h,$userid; $d=mysql_query("SELECT * FROM crimegroups WHERE cgID={$_POST['crimeGROUP']}",$c); $itemi=mysql_fetch_array($d); print "Editing CrimeGroup Crimegroup Name: Crimegroup Order Number: "; } function edit_crimegroup_sub() { global $ir,$c,$h,$userid; if(!isset($_POST['cgORDER']) || !isset($_POST['cgNAME'])) { print "You missed one or more of the required fields. Please go back and try again. [url='admin.php?action=newcrimegroup']> Back[/url]"; $h->endpage(); exit; } else { $oq=mysql_query("SELECT * FROM crimegroups WHERE cgID={$_POST['cgID']}",$c); $rm=mysql_fetch_array($oq); mysql_query("UPDATE crimegroups SET cgNAME='".$_POST['cgNAME']."', cgORDER='".$_POST['cgORDER']."' WHERE cgID='{$_POST['cgID']}'", $c) or die(mysql_error()); print "Crimegroup edited..."; } } function delcrimegroup() { global $ir,$c,$h,$userid; switch ($_GET['step']) { default: echo "Deleting Crimegroups Here you can delete a crimegroup. Crimegroup: ".crimegroup_dropdown($c,'crimeGROUP')." "; break; case 2: $target = $_POST['crimeGROUP']; $d=mysql_query("SELECT cgNAME FROM crimegroups WHERE cgID='$target'") or die(mysql_error()); $itemi=mysql_fetch_array($d); print "Confirm Delete crimegroup - ".$itemi[0]."? "; break; case 3: $target = $_POST['crimeID']; if($_POST['yesorno']=='No') { die("Crimegroup not deleted. [url='admin.php']>Back to main admin page.[/url]"); } if ($_POST['yesorno'] != ("No" || "Yes")) die('Eh'); mysql_query("DELETE FROM crimegroups WHERE cgID='{$_POST['cgID']}'") or die(mysql_error()); echo "Crimegroup Deleted. [url='admin.php']>Back to main admin page.[/url]"; break; } }
-
[Lite] Bugget streets v1 lol ya lite version has this check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); paid version has this check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['credits'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); you cant mix the two
-
[Lite] Bugget streets v1 wouldnt it be something like $expcur=($ir['exp_needed']/100); $exp=(($expcur)*rand(1,5));
-
[Lite] Bugget streets v1 o man i already added items... its easy enough heres one of my chances if ($chance >= 82 and $chance < 85) { print "You see a wild pig. You sneak up on it, bash it over the head, and take it with you. "; $itemidexplore = 24; mysql_query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); } $itemidexplore i just set to the item ID i also added that they can go to hospital if ($chance == 109) { $hosptime=(int) rand(25,35); $loseruser = $ir['userid']; $reasonhosp = 'Stepped on a land mine while exploring'; mysql_query("UPDATE users SET hosptime=$hosptime WHERE userid=$loseruser",$c); mysql_query("UPDATE users SET hospreason='$reasonhosp' WHERE userid=$loseruser",$c); event_add($ir['userid'],"You stepped on a land mine while exploring. Do be a bit more careful next time...",$c); die ("You stepped on a land mine. [b]Good news[/b]: You aren't dead [b]Bad News[/b]:You have to stop exploring and go into Recovery "); } ya, i know the coding is somewhat inefficient, but it gets the job done. i also added a secret crime that they could find while exploring, thus unlocking it so that they could do it once, then it disappeared again
-
quantify items automatically ok so instead of that script above, what if everywhere i add items to a user i put something like this instead $id=ITEMIDHERE; $lol2=mysql_query("SELECT * FROM inventory WHERE inv_userid=$userid AND inv_itemid=$id",$c); $gotitem = mysql_num_rows($lol2); if($gotitem == 0) { mysql_query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); } else { $item=mysql_query("SELECT * FROM inventory WHERE inv_userid=$userid AND inv_itemid=$id",$c); $z=0; while ($i=mysql_fetch_array($item)) { $z=$z+$i['inv_qty']; } $z = $z+1; mysql_query("DELETE FROM inventory WHERE inv_userid=$userid AND inv_itemid=$id",$c); mysql_query("INSERT INTO inventory VALUES ('', '$id', '$userid', '$z')",$c); }