Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,657
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Uridium

  1. Just an update on MagicalTallGuys script which allowed you to view Multiple IPS. Ive slightly added to it no much but now you can see the username of the IP's for current Users as before it was just an ID of the person. Usernames are also clickable to view profiles call this ipfinder.php <?php include "sglobals.php"; /* Created by Magictallguy */ error_reporting(E_ALL); if($ir['user_level'] != 2 && $ir['user_level'] != 3) { die("You can't access this"); } //----------- $_GET['action'] = isset($_GET['action']) && is_string($_GET['action']) ? strtolower(trim($_GET['action'])) : ""; //----------- switch($_GET['action']) { case 'index': index(); break; case 'status': status(); break; case 'status2': status_edit(); break; default: index(); break; } function index() { echo ("10.0.0.0 and 127.0.0.1 are default IPs. Pay no attention to those. <table border='1' class='table' cellpadding='2' cellspacing='2' width='100%'> <tr> <th>IP</th> <th>How Many</th> <th>ID's</th> <th>Usernames</th> <th>Status</th> <th>Cleared By</th> </tr>"); $sql = ( "SELECT `username`,`lastip`, COUNT(`userid`) AS `numusers`, `userid`, CAST(GROUP_CONCAT(`userid`) AS CHAR) AS `userlist`, fedjail " . "FROM `users` " . "WHERE (`lastip` != '') " . "GROUP BY `lastip` " . "HAVING (`numusers` > 1) " . "ORDER BY `lastip`"); $mysql = mysql_query($sql); while($z = mysql_fetch_array($mysql)) { $ipcheck = sprintf("SELECT * FROM ipfinder WHERE (ip = '%s')", $z['lastip']); $doipcheck = mysql_query($ipcheck); $ip = mysql_fetch_array($doipcheck); if($ip['status'] == "" || !$ip['status']) { $status = "<font color=blue>Needs Checking</font>"; } ## else { $status = stripslashes($ip['status']); } ## if(!$ip['cleared_by']) { $cleared = "No-one"; } ## else { $cleared = $ip['cleared_by']; } echo ("<tr>"); echo sprintf("<td style='text-align:center;'>[url='/ipfinder.php?action=status&ip=%s']%s[/url]</td>", $z['lastip'], $z['lastip']); echo sprintf("<td style='text-align:center;'>%s</td>", $z['numusers']); echo sprintf("<td>%s</td>", wordwrap($z['userlist'], 50, " \n", true)); echo sprintf("<td style='text-align:center;'><a href='/viewuser.php?u=%s'>%s</td>", $z['userid'], $z['username']); echo sprintf("<td style='text-align:center;'>%s</td>", $status); echo sprintf("<td style='text-align:center;'>%s</td>", $cleared); echo ("</tr>"); } echo ("</table>"); } function status() { echo sprintf("Editing the status of IP: %s", $_GET['ip']); $GetIPDetails = sprintf("SELECT * FROM ipfinder WHERE (ip = '%s')", $_GET['ip']); $sql = mysql_query($GetIPDetails); $a = mysql_fetch_array($sql); echo (" "); echo ("You can use code, but limit it to font colours only (<font color=colour>Text</font>) "); echo ("<font color=red>Multi</font> - <font color=green>Federal Jailed</font> "); echo ("<font color=green>Library IP</font> "); echo (" <font color=orange>Side Note:</font> "); echo ("<form action='ipfinder.php?action=status2' method='post'>"); echo sprintf("<input type='hidden' name='ip' value='%s' />", $_GET['ip']); echo sprintf("<textarea rows='10' cols='50' name='status'>".$a['status']."</textarea> "); echo ("<input type='submit' value='Change Status'>"); echo ("</form>"); } function status_edit() { $Count = sprintf("SELECT ip FROM ipfinder WHERE (ip = '%s')", $_POST['ip']); $mq = mysql_query($Count); # $Name = sprintf("SELECT userid, username FROM users WHERE (userid = %u)", $_SESSION['userid']); $SN = mysql_query($Name); $fluff = mysql_fetch_array($SN); if(mysql_num_rows($mq) == 0) { $Update = sprintf("INSERT INTO ipfinder VALUES ('%s', '%s', '%s')", $_POST['ip'], mysql_real_escape_string($_POST['status']), mysql_real_escape_string($fluff['username'])); mysql_query($Update) OR DIE(mysql_error()); echo ("[b]Status Updated![/b]<hr />[url='/ipfinder.php']Back[/url]"); } else { $Insert = sprintf("UPDATE ipfinder SET status = '%s', cleared_by = '%s' WHERE (ip = '%s')", $_POST['status'], mysql_real_escape_string($fluff['username']), $_POST['ip']); echo ("[b]Status Updated![/b]<hr />[url='/ipfinder.php']Back[/url]"); mysql_query($Insert) OR DIE(mysql_error()); } stafflog_add(sprintf("Edited the status of IP %s", $_POST['ip'])); } ?> If you have the details.php file included on your site then just change the viewuser.php to details.php and that will bring up more info on that person.,
  2. Re: [mccode V2] Contact Us (VERY SIMPLE)   Give the lad a Break. He's contributing at least. Even if it isnt php its a start in the right direction. Instead of penalising him explain what you would do to make it better or even how it would look.
  3. Ever wondered if all your hard work is paying off and which scripts youve added are doing better than others ? Ive often wondered which parts of my game are being used more than others. which isnt an easy task, so how about this a click count which would tell you which scripts are being used the most and which ones are getting tired and need replacing to keep your members happy. Download this little proggy for your site and it will tell you everything you need to Know. Couple of pointer are the URL the click tracker will need to be inserted into each script which YES is a pain but really could prove useful in the long run. http://www.focalmedia.net/clicktracker.html#download Its easy to install only a few files and its Free if this type of thing dont interest you DONT download it. But for those that are curious as to where your members are most of the time then is what your looking for. I'll mention this again incase you went deaf You will NEED to add the new link given to your scripts which could prove time consuming so you have been warned..
  4. Re: [mccode v2] Not much of a MOD more of a great addon.. Private Messenger     OOOPS sorry about that guys thanks MDK666 i had two version an old and the new one and looking at the i DOH posted the wrong tables//// USE medk's tables...
  5. Re: [mccode v2] House Images   COLDK send me your Yahoo or MSN addy and also your website address and i'll have a look
  6. Re: [mccode v2] Items Pic mod No need to apologise :) ive done it myself Still yours is layed out much better than mine so yours is easier to see :)
  7. I found this cool messenger Its free but you have to give a $19 donation so i guess you cant actually call it free how ever i did donate purely for curiosity. and its not bad at all its a PHP Instant Messenger great for Gangs to communicate with each other or use it as a Staff to member function. http://www.php121.com And nope im not advertising because for the script to work on your Game you'll need some script work so i guess this is a mod afterall ;) Couple of things though use it as a Standalone and DONT insert their SQL for users as suggested. Because if you do it right you can use your Existing dbase for members so it pull up everyone from the list... so ive made my own version of their tables to help you.. DONT INSTALL THEIR SQL INSTALL THIS ONE. SQLS   CREATE TABLE `php121_blocks` ( `b_id` int(10) NOT NULL auto_increment, `b_user` int(10) NOT NULL default '0', `b_block` int(10) NOT NULL default '0', PRIMARY KEY (`b_id`) ) TYPE=MyISAM ; CREATE TABLE `php121_config` ( `config_name` varchar(255) NOT NULL default '', `config_value` varchar(255) NOT NULL default '', PRIMARY KEY (`config_name`) ) TYPE=MyISAM; INSERT INTO `php121_config` VALUES ('server_timezone', '0'); INSERT INTO `php121_config` VALUES ('default_language', 'English'); CREATE TABLE `php121_requests` ( `r_id` int(11) NOT NULL auto_increment, `roomid` int(11) default NULL, `r_to` int(11) NOT NULL default '0', `r_from` int(11) NOT NULL default '0', `r_time` int(11) NOT NULL default '0', `r_result` tinyint(1) NOT NULL default '0', `r_update_time` int(11) NOT NULL default '0', `r_type` int(1) NOT NULL default '0', PRIMARY KEY (`r_id`) ) TYPE=MyISAM ; CREATE TABLE `php121_control` ( `id` int(1) NOT NULL default '1', `CL_LastModified` int(11) NOT NULL default '0', `CL_UpdateKey` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) TYPE=MyISAM; INSERT INTO `php121_control` VALUES (1, 1, 1); CREATE TABLE `php121_messages` ( `msgid` int(11) NOT NULL auto_increment, `roomid` int(11) NOT NULL default '0', `username` varchar(25) NOT NULL default '', `timestamp` int(11) NOT NULL default '0', `servernotice` int(1) NOT NULL default '0', `message` longtext NOT NULL, PRIMARY KEY (`msgid`) ) TYPE=MyISAM AUTO_INCREMENT=1 ; CREATE TABLE `php121_rooms` ( `roomid` int(11) NOT NULL default '0', `uname` varchar(25) NOT NULL default '', `joined` int(11) NOT NULL default '0', `lastping` int(11) NOT NULL default '0', `timedout` int(1) NOT NULL default '0', PRIMARY KEY (`roomid`,`uname`) ) TYPE=MyISAM; CREATE TABLE `php121_smilies` ( `id` smallint(5) NOT NULL auto_increment, `code` varchar(50) NOT NULL default '', `filename` varchar(100) NOT NULL default '', `description` varchar(75) NOT NULL default '', `pack` varchar(50) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=44 ; INSERT INTO `php121_smilies` VALUES (1, ':D', 'icon_biggrin.gif', 'Very Happy', 'phpbb'); INSERT INTO `php121_smilies` VALUES (2, ':)', 'icon_smile.gif', 'Smile', 'phpbb'); INSERT INTO `php121_smilies` VALUES (3, ':smile:', 'icon_smile.gif', 'Smile', 'phpbb'); INSERT INTO `php121_smilies` VALUES (4, ':(', 'icon_sad.gif', 'Sad', 'phpbb'); INSERT INTO `php121_smilies` VALUES (5, ':-(', 'icon_sad.gif', 'Sad', 'phpbb'); INSERT INTO `php121_smilies` VALUES (6, ':sad:', 'icon_sad.gif', 'Sad', 'phpbb'); INSERT INTO `php121_smilies` VALUES (7, ':o', 'icon_surprised.gif', 'Surprised', 'phpbb'); INSERT INTO `php121_smilies` VALUES (8, ':-o', 'icon_surprised.gif', 'Surprised', 'phpbb'); INSERT INTO `php121_smilies` VALUES (9, ':eek:', 'icon_surprised.gif', 'Surprised', 'phpbb'); INSERT INTO `php121_smilies` VALUES (10, '8O', 'icon_eek.gif', 'Shocked', 'phpbb'); INSERT INTO `php121_smilies` VALUES (11, '8-O', 'icon_eek.gif', 'Shocked', 'phpbb'); INSERT INTO `php121_smilies` VALUES (12, ':shock:', 'icon_eek.gif', 'Shocked', 'phpbb'); INSERT INTO `php121_smilies` VALUES (13, ':?', 'icon_confused.gif', 'Confused', 'phpbb'); INSERT INTO `php121_smilies` VALUES (14, ':-?', 'icon_confused.gif', 'Confused', 'phpbb'); INSERT INTO `php121_smilies` VALUES (15, ':???:', 'icon_confused.gif', 'Confused', 'phpbb'); INSERT INTO `php121_smilies` VALUES (16, '8)', 'icon_cool.gif', 'Cool', 'phpbb'); INSERT INTO `php121_smilies` VALUES (17, '8-)', 'icon_cool.gif', 'Cool', 'phpbb'); INSERT INTO `php121_smilies` VALUES (18, ':cool:', 'icon_cool.gif', 'Cool', 'phpbb'); INSERT INTO `php121_smilies` VALUES (19, ':lol:', 'icon_lol.gif', 'Laughing', 'phpbb'); INSERT INTO `php121_smilies` VALUES (20, ':x', 'icon_mad.gif', 'Mad', 'phpbb'); INSERT INTO `php121_smilies` VALUES (21, ':-x', 'icon_mad.gif', 'Mad', 'phpbb'); INSERT INTO `php121_smilies` VALUES (22, ':mad:', 'icon_mad.gif', 'Mad', 'phpbb'); INSERT INTO `php121_smilies` VALUES (23, ':P', 'icon_razz.gif', 'Razz', 'phpbb'); INSERT INTO `php121_smilies` VALUES (24, ':-P', 'icon_razz.gif', 'Razz', 'phpbb'); INSERT INTO `php121_smilies` VALUES (25, ':razz:', 'icon_razz.gif', 'Razz', 'phpbb'); INSERT INTO `php121_smilies` VALUES (26, ':oops:', 'icon_redface.gif', 'Embarassed', 'phpbb'); INSERT INTO `php121_smilies` VALUES (27, ':cry:', 'icon_cry.gif', 'Crying or Very sad', 'phpbb'); INSERT INTO `php121_smilies` VALUES (28, ':evil:', 'icon_evil.gif', 'Evil or Very Mad', 'phpbb'); INSERT INTO `php121_smilies` VALUES (29, ':twisted:', 'icon_twisted.gif', 'Twisted Evil', 'phpbb'); INSERT INTO `php121_smilies` VALUES (30, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes', 'phpbb'); INSERT INTO `php121_smilies` VALUES (31, ':wink:', 'icon_wink.gif', 'Wink', 'phpbb'); INSERT INTO `php121_smilies` VALUES (32, ';)', 'icon_wink.gif', 'Wink', 'phpbb'); INSERT INTO `php121_smilies` VALUES (33, ':!:', 'icon_exclaim.gif', 'Exclamation', 'phpbb'); INSERT INTO `php121_smilies` VALUES (34, ':?:', 'icon_question.gif', 'Question', 'phpbb'); INSERT INTO `php121_smilies` VALUES (35, ':idea:', 'icon_idea.gif', 'Idea', 'phpbb'); INSERT INTO `php121_smilies` VALUES (36, ':arrow:', 'icon_arrow.gif', 'Arrow', 'phpbb'); INSERT INTO `php121_smilies` VALUES (37, ':|', 'icon_neutral.gif', 'Neutral', 'phpbb'); INSERT INTO `php121_smilies` VALUES (38, ':-|', 'icon_neutral.gif', 'Neutral', 'phpbb'); INSERT INTO `php121_smilies` VALUES (39, ':neutral:', 'icon_neutral.gif', 'Neutral', 'phpbb'); INSERT INTO `php121_smilies` VALUES (40, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green', 'phpbb'); INSERT INTO `php121_smilies` VALUES (41, ':^_^:', 'aiwebs_004.gif', 'Smile (Japanese)', 'phpbb'); INSERT INTO `php121_smilies` VALUES (42, ':wave:', 'wavey.gif', '', 'phpbb'); INSERT INTO `php121_smilies` VALUES (43, ':samurai:', 'samurai.gif', '', 'phpbb');   USERS SQLS   ALTER TABLE `users` ADD `php121_user_chatting` INT( 11 ) DEFAULT '0' NOT NULL , ADD `php121_smilies` TINYINT( 1 ) DEFAULT '1' NOT NULL , ADD `php121_level` TINYINT( 1 ) DEFAULT '1' NOT NULL , ADD `php121_showrequest` TINYINT( 1 ) DEFAULT '1' NOT NULL , ADD `php121_beep_newmsg` TINYINT( 1 ) DEFAULT '1' NOT NULL , ADD `php121_focus_newmsg` TINYINT( 1 ) DEFAULT '1' NOT NULL , ADD `php121_banned` TINYINT( 1 ) DEFAULT '0' NOT NULL , ADD `php121_timezone` TINYINT( 3 ) DEFAULT '0' NOT NULL , ADD `php121_timestamp` TINYINT( 1 ) DEFAULT '1' NOT NULL , ADD `php121_language` VARCHAR( 30 ) DEFAULT 'English' NOT NULL , ADD `php121_cl_update_key` int(11) NOT NULL default '0' ;   Dont foget to alter the config file to that of your game databse....... open up mainmenu.php and add this where ya want it   [url='instantmessenger.php']Your Messenger <font color='yellow'>(new)</font>[/url]   Now call this file instantmessenger.php   <?php include "globals.php"; print"<script type='text/javascript'> <!-- var newwindow; function poptastic(url) { newwindow=window.open(url,'name','height=500, width=230, left=20, top=20, toolbar=no, menubar=no, directories=no, location=no, scrollbars=yes, status=no, resizable=yes, fullscreen=no'); newwindow.focus(); } poptastic('php121/php121im.php'); //--> </script> <center><h1>Instructions</h1></center> <h2>Login with your usual Username and Pass</h2>"; $h->endpage(); ?>   MAKE sure that only the PHP121 folder is uploaded and not the other folders from the zip and your done...
  8. Re: [mccode v2] House Images The above version has been updated to also allow you to view The image when selecting an house to edit. When the house has been edited it will display the new house pic on the next page so you know that its visible to your members..... Hovering mouse over the pic will give you the extension for that particular picture...
  9. Re: [mccodes V2] game Menu Editing+Create System Its probably a step in the right Direction. if you dont want anyone else to touch it just change user_level to userid which would mean only the User specified can access the menu maker. You will notice on the SQL there is mention of menuLOCK which when added will Lock a menu from Public view if you need to Fix a certain page script, again no need to open up Cpanel or your FTP to edit this it can all be done via the staff menu. For those that want to know the entire structure for this script was taken from the staff_users.php You dont have to sit and stare at one script and think how can i make this better. Just line up 5 scripts and say how can i add this to that and that too this and what would be the outcome.. The basis of the menu script is just that.. It creates menu's but recoded it could make other things Example say you want to create a script that makes someone on your SITE a star for aday then 24 hours later it picks someone else at random and makes them a star. The files youd need to be looking at would be.. header.php (to place the name and or picture of the star person ) viewuser.php (which would tell other users this person has been made star for a day ) cron_day ( so it expells that person and adds a new one after 24 hours ) staff_users.php so you can add a script that creates the runtime for the members to be added. All this could be achieved simply by someone re-scripting the menu and add to the files mentioned.
  10. Re: [mccode v2] Items Pic mod Why cant people SEARCH the forums before adding an already created Addon for a script.. Your layout looks clearer than mine though so im going to let you off lol but you can find the original post here that also adds the itmpics to shops iteminfo and inventory... http://criminalexistence.com/ceforums/index.php?topic=24996.0
  11. Re: [mccodes V2] game Menu Editing+Create System add these links to your smenu.php   print "[b]<center>MENU CREATOR</center>[/b] > [url='staff_menumaker.php?action=newmenu']Add Menu Link[/url] > [url='staff_menumaker.php?action=editmenu']Edit Menu Link[/url] ";
  12. Re: New re-designed bank.php!! Money & Crystals in 1 bank theres mention of bankcry and bankcrystals so im assuming your using bankcrystals ?   $fee=ceil($_POST['depositcry']*15/100); if($fee > 30) { $fee=30; } $gain=$_POST['depositcry']-$fee; $ir['bankcrystals']+=$gain; //* THIS LINE AMMENDED *// $db->query("UPDATE users SET bankcrystals=bankcrystals+$gain, crystals=crystals-{$_POST['depositcry']} where userid=$userid"); print "You hand over \${$_POST['depositcry']} to be deposited, after the fee is taken (\$$fee), \$$gain is added to your account. [b]You now have \${$ir['bankcrystals']} crystals in the bank.[/b] [url='bank.php']> Back[/url]"; } }
  13. Re: Free chat mod   Flashchat used to be good till they Completly messed it up with the version 5. I was a etster for Darrens script 5 version and too be honest the 4.12 is still the best. Just far too many bugs for my likeing. PM's were being sent to people who you wernt even talking to which is quite scary when your trying to have a Private chat with someone... If your going to get flaschat get the 4.12 or 4.16 they are much safer
  14. Re: [mccode v2] House Images Slight update it was mentioned that when you EDIT a pic or even added a new House the Image wasnt being sent to the databse so heres the fixed version.   <?php include "sglobals.php"; if($ir['user_level'] > 2) { die("403"); } //This contains shop stuffs switch($_GET['action']) { case "addhouse": addhouse(); break; case "edithouse": edithouse(); break; case "delhouse": delhouse(); break; default: print "Error: This script requires an action."; break; } function addhouse() { global $db, $ir, $c, $h, $userid; $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $name=$_POST['name']; $hsepics=$_POST['hsepics']; if($price and $will and $name) { $q=$db->query("SELECT * FROM houses WHERE hWILL={$will}"); if($db->num_rows($q)) { print "Sorry, you cannot have two houses with the same maximum will."; $h->endpage(); exit; } $db->query("INSERT INTO houses VALUES(NULL, '$name', '$price', '$will', '$hsepics')"); print "House {$name} added to the game."; print "House Image {$hsepics} was added to database. Current Upload pic for this House [img=hsepics/{$ir[]"; stafflog_add("Created House $name"); } else { print "<h3>Add House</h3><hr /> <form action='staff_houses.php?action=addhouse' method='post'> Name: <input type='text' name='name' /> Price: <input type='text' name='price' /> Max Will: <input type='text' name='will' /> [b]Item Pics[/b] <input type='text' name='hsepics' value='$hsepics' /><hr /> <input type='submit' value='Add House' /></form> Current Upload pic for this House [img=hsepics/{$ir[]"; } } function edithouse() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $q=$db->query("SELECT * FROM houses WHERE hWILL={$will} AND hID!={$_POST['id']}"); if($db->num_rows($q)) { print "Sorry, you cannot have two houses with the same maximum will."; $h->endpage(); exit; } $name=$_POST['name']; $hsepics=$_POST['hsepics']; $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['id']}"); $old=$db->fetch_row($q); if($old['hWILL'] == 100 && $old['hWILL'] != $will) { die("Sorry, this house's will bar cannot be edited."); } $db->query("UPDATE houses SET hWILL=$will, hPRICE=$price, hNAME='$name', hsepics='$hsepics' WHERE hID={$_POST['id']}"); $db->query("UPDATE users SET maxwill=$will WHERE maxwill={$old['hWILL']}"); $db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); print "House $name was edited successfully. Current House Image [img=hsepics/$hsepics]"; stafflog_add("Edited house $name"); break; case "1": $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['house']}"); $old=$db->fetch_row($q); print "<h3>Editing a House</h3><hr /> <form action='staff_houses.php?action=edithouse' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='id' value='{$_POST['house']}' /> Name: <input type='text' name='name' value='{$old['hNAME']}' /> Price: <input type='text' name='price' value='{$old['hPRICE']}' /> Max Will: <input type='text' name='will' value='{$old['hWILL']}' /> [b]Item Pics[/b] <input type='text' name='hsepics' value='{$old['hsepics']}' /><hr /> <input type='submit' value='Edit House' /></form> Current Upload pic for this House [img=hsepics/{$old[]"; break; default: print "<h3>Editing a House</h3><hr /> <form action='staff_houses.php?action=edithouse' method='post'> <input type='hidden' name='step' value='1' /> House: ".house_dropdown($c, "house")." <input type='submit' value='Edit House' /></form>"; break; } } function delhouse() { global $db,$ir,$c,$h,$userid; if($_POST['house']) { $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['house']}"); $old=$db->fetch_row($q); if($old['hWILL']==100) { die("This house cannot be deleted."); } $q2=$db->query("SELECT * FROM users WHERE maxwill={$old['hWILL']}"); $ids=array(); while($r=$db->fetch_row($q2)) { $ids[]=$r['userid']; } if(count($ids)) { $db->query("UPDATE users SET money=money+{$old['hPRICE']}, maxwill=100 WHERE userid IN(".implode(', ', $ids).")"); } $db->query("UPDATE users SET will=maxwill WHERE will > maxwill"); $db->query("DELETE FROM houses WHERE hID={$old['hID']}"); print "House {$old['hNAME']} deleted."; stafflog_add("Deleted house {$old['hNAME']}"); } else { print "<h3>Delete House</h3><hr /> Deleting a house is permanent - be sure. Any users that are currently on the house you delete will be returned to the first house, and their money will be refunded.<form action='staff_houses.php?action=delhouse' method='post'> House: ".house_dropdown($c, "house")." <input type='submit' value='Delete House' /></form>"; } } function report_clear() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $_GET['ID'] = abs((int) $_GET['ID']); stafflog_add("Cleared player report ID {$_GET['ID']}"); $db->query("DELETE FROM preports WHERE prID={$_GET['ID']}"); print "Report cleared and deleted! [url='staff_users.php?action=reportsview']> Back[/url]"; } $h->endpage(); ?>
  15. Re: [mccodes V2] game Menu Editing+Create System All Feed Back is good to a project its still a BETA system and only the bare basis of this script have been implemented. we are looking further to this project so it can be more robust. I have a few ideas that we could implement things like. Additional Options. where you could write a script piece for a Link if it needs to be updated for example. Hospital and Jail. I want the staff panel to be of more use than it currently is. More use in the sense that the developer can use the staff menu not only to add the rudamentery options but to create a possible system that will enable them to edit anything or add anything they want via the staff panel.
  16. This MOD was a Joint Effort between myself and Tonka Its been tried and tested before being Posted on here so it should work fine........ This Menu System will let you Craeet your own game links via the Admin panel without the Hassle of updating scripts every 5 minutes you simply Add a link and give it a name and click Submit and its then available for everyone to vie either in the mainmenu or the Explore.. Pages. SQLS   CREATE TABLE IF NOT EXISTS `menu` ( `menuID` int(11) NOT NULL auto_increment, `menuTITLE` varchar(255) NOT NULL default '', `menuPATH` varchar(255) NOT NULL default '', `menuLOCK` int(11) NOT NULL default '0', PRIMARY KEY (`menuID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ; INSERT INTO `menu` (`menuID`, `menuTITLE`, `menuPATH`, `menuLOCK`) VALUES (1, 'Home', 'index.php', '0'), (2, 'Inventory', 'inventory.php', '0'), (3, 'Mailbox', 'mailbox.php', '0'), (4, 'Events', 'events.php', '0'), (5, 'Explore', 'explore.php', '0');   We have started you off with the Basic links but you can Alter them later if you want to. call this file staff_menumaker.php   <?php //* V2 Menu Maker //* Joint Effort between ILLUSIONS and TONKA //* Free for to those Members of Criminal Existance Forums //* All we ask is that you keep this Notice intact //* BELOW CODES FOR smenu.php //* > [url='staff_menumaker.php?action=newmenu']Add Menu Link[/url] //* > [url='staff_menumaker.php?action=editmenu']Edit Menu Link[/url] *// include "sglobals.php"; //This contains user stuffs switch($_GET['action']) { case 'newmenu': new_menu_form(); break; case 'newmenusub': new_menu_submit(); break; case 'editmenu': edit_menu_begin(); break; case 'editmenuform': edit_menu_form(); break; case 'editmenusub': edit_menu_sub(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function new_menu_form() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("403"); } print "Adding a new Menu. <form action='staff_menumaker.php?action=newmenusub' method='post'> Menu ID: <input type='text' name='menuID' /> Menu Title: <input type='text' name='menuTITLE' /> Menu Path <input type='text' name='menuPATH' /> <input type='submit' value='Create New Menu' /></form>"; } function new_menu_submit() { global $db,$ir,$c,$menuID; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['menuID']) || !isset($_POST['menuTITLE']) || !isset($_POST['menuPATH'])) { print "You missed one or more of the required fields. Please go back and try again. [url='staff_menumaker.php?action=newmenu']> Back[/url]"; $h->endpage(); exit; } $db->query("INSERT INTO menu (menuID, menuTITLE, menuPATH) VALUES( '{$_POST['menuID']}', '{$_POST['menuTITLE']}', '{$_POST['menuPATH']}')"); //$i=mysql_insert_menuid($c); print " <font size=3>Successfully Created Menu {$_POST['menuTITLE']}</font>"; stafflog_add("Created Menu {$_POST['menuTITLE']} "); } function edit_menu_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing Menu</h3> <form action='staff_menumaker.php?action=editmenuform' method='post'> Menu: ".menu_dropdown($c,'menu')." <input type='submit' value='Edit Menu' /></form> OR enter a Menu ID to edit: <form action='staff_menumaker.php?action=editmenuform' method='post'> Menu: <input type='text' name='menu' value='0' /> <input type='submit' value='Edit Menu' /></form>"; } function edit_menu_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $q = $db->query("SELECT * FROM menu WHERE menuID='{$_POST['menu']}'"); $r = $db->fetch_row($q); print "<h3>Menu Editing System</h3> <form action='staff_menumaker.php?action=editmenusub' method='post'> Menu ID: <input type='text' name='menuID' value='{$r['menuID']}' /> Menu Title: <input type='text' name='menuTITLE' value='{$r['menuTITLE']}' /> Menu Path: <input type='text' name='menuPATH' value='{$r['menuPATH']}' /> <input type='submit' value='Edit Menu' /></form>"; } function edit_menu_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $go=0; if(!isset($_POST['menuID'])) { $go=1; } if(!isset($_POST['menuTITLE'])) { $go=1; } if(!isset($_POST['menuPATH'])) { $go=1; } if($go) { print "You did not fully fill out the form."; $_POST['menu']=$_POST['menuID']; edit_menu_form(); } $u=$db->query("SELECT * FROM menu WHERE menuTITLE='{$_POST['menuTITLE']}' and menuID='{$_POST['menuID']}'"); if($db->num_rows($u) != 0) { print "That Menu Name is already in use please choose another."; print " [url='staff_menumaker.php?action=editmenu']> Back[/url]"; $h->endpage(); exit; } $oq=$db->query("SELECT * FROM menu WHERE menuID={$_POST['menuID']}"); $rm=$db->fetch_row($oq); $db->query("UPDATE menu SET menuTITLE='{$_POST['menuTITLE']}', menuPATH='{$_POST['menuPATH']}' WHERE menuID={$_POST['menuID']}"); stafflog_add("Edited menu {$_POST['menuTITLE']} [{$_POST['menuID']}]"); print "menu edited...."; } $h->endpage(); ?>   Now open up global_func.php FIND   function user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE fedjail=0 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; }   And add below   function menu_dropdown($connection,$ddname="menu",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM menu ORDER BY menuTITLE ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['menuID']}'"; if ($selected == $r['menu'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['menuTITLE']}</option>"; } $ret.="\n</select>"; return $ret; }   Now for the part that works the menu system..... You can eitehr put this on Mainmenu.php or Explore.php   global $db; $q = $db->query("SELECT * FROM menu ORDER BY menuID ASC"); while($r = mysql_fetch_array($q)) { echo '[url="'.$r['menuPATH'].'"]'.$r['menuTITLE'].'[/url] '; }
  17. Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS UPDATE on the streets.php Overwrite Chance 2 with this one   if ($chance == 2) { { $earn=$r['cb_money']; $attack = rand(9,666); $q=$db->query("SELECT user_level=0 FROM users WHERE userid=$attack"); $times=$db->fetch_single($q); print "{$r['username']}"; if($r['hp'] >= $r['maxhp']/2 and $r['location']==$ir['location'] and !$ir['hospital'] and !$ir['jail'] and !$r['hospital'] and !$r['jail']) { print "<font color=green>Yes</font>"; } else { print "<font color=red>You Stupid Person</font>"; } //print "</td><td>{$r['cityname']}</td><td>$earn</td><td>"; if($attack) header("Location: attack3.php?ID=$attack"); exit; { print ""; } print ""; } print ""; }   When you Find an NPC in the Game the page will Change to the Attack3.php page so theres no more need for people to avoid the Challenges. Also Added Bots are chosen at Random
  18. Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS I wasnt happy with the orginal layout when you had to fight an NPC the page stayed as it stayed static which meant the USER could just carry on clicking on the map. However i have found a cure and the page will open to the attack3.php without the aid of a link It has been tested and works fine im also trying to make it so NPCS are random and not ones that you have had to Add to the script yourself. However this is taking some time. I will post the coding which will only effect the streets.php and none of the others...
  19. Re: [mccode v2] House Images <?php include "globals.php"; $housequery=1; print "<h3>General Info:</h2>"; $exp=(int)($ir['exp']/$ir['exp_needed']*100); print "<table><tr><td>[b]Name:[/b] {$ir['username']}</td><td>[b]Crystals:[/b] {$cm}</td></tr><tr> <td>[b]Level:[/b] {$ir['level']}</td> <td>[b]Exp:[/b] {$exp}%</td></tr><tr> <td>[b]Money:[/b] $fm</td> <td>[b]HP:[/b] {$ir['hp']}/{$ir['maxhp']}</td></tr> [b]Property:</center>[/b] {$ir['hNAME']} <center>[img=hsepics/{$ir[]</center>"; print "<hr><h3>Stats Info:</h3>"; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ']; $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts);
  20. Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS   To regards your Query this is simply an aaition to the attacktake.php Where the time is HOSP is situated just overwrite that line with ths one.   $db->query("UPDATE users SET hp=hp+100,energy=energy+100,hospital=$hosptime,hospreason='Left by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}");   The bots Energy so be reset once beaten ready for the next opponent... Regards AVGUSTE's comment the sql are as follows   ALTER TABLE 'users' ADD `turns` int(11) NOT NULL default '50',   Would be your SQL ALSO You dont have to stop at just having one search page you can make as many pages as you wanted.. All you would need to EDIT from now on would be the streets.php and leave the attack2.php and attack3.php as they are Just add a command line at head of each page to only allow certain levelled player to view that Area..
  21. Re: delete user and reuse userID why not just use the ones that you have now and change them to challenge bots just change their user_level to zero and remove passwords for their accounts
  22. Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS   to loocate the settings for hospital just do your search guery as hosp Regards the Cron for the above open up cron_day.php and add this   $db->query("UPDATE users SET turns=50");   By the way i also forgot to mention on the streets.php all jail and hospital times are set to 0,0 as i was testing this so you would need to given a random Sentence for each example $db->query("UPDATE users SET hospital=0 WHERE userid=$userid",$c); hospital=0 would need to be changed to the time you want them hospitalised and again for jail times $db->query("UPDATE users SET jail=0 WHERE userid=$userid",$c);
  23. Re: [mccode] Stalemate for attacks   open up attacklost.php and find this line   $db->query("UPDATE users SET exp=0 WHERE exp<0");   You can alter the EXP from there at the moment it resets to zero so you could have it as follows   $db->query("UPDATE users SET exp=50 WHERE exp<0");   There is also one on header.php that mentions regards running from the fight. Again you could alter that to 50 or just remove the whole function as i did.. Actually you may find this one better because if the person whos lost wast at 50 to begin with its an unfair advantage on the rest of the gamers and will be losing just to get 50 so alter it to   $db->query("UPDATE users SET exp=+1 WHERE exp<0");
  24. Very tiny mod but for me its saved a lot of Messing about when trying to give items to users and so forth as the current system brings up EVERY user in the DB. well this TINY mod will Extract all the Users that are Fedjailed and just leave you with Current active members.... open up global_func.php Locate this   function user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) {   on that piece look for   $q=$db->query("SELECT * FROM users ORDER BY username ASC");   and Overwrite with this one   $q=$db->query("SELECT * FROM users WHERE fedjail=0 ORDER BY username ASC");   Your list should now be Free of Fed jailed Users on the staff panel
  25. Re: [mccode v2] House Images   MARZY :) can you send me your game link via PM on here and i'll look at the page for you.. Or you could simply right click on the blank image and note the path if your path is as follows yourdomain.com/hsepics/hsepics/.house.jpg Then that would mean when your editing your house and inserting the image name just call the image house.jpg and not hsepics/house.jpg... However if your getting the url as yourdomain.com/ Again when editing your houses and adding the link for the image it would be hsepics/house.jpg Like i say send me your link and i'll have a look for you...
×
×
  • Create New...