
Karlos
Members-
Posts
951 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Karlos
-
Re: [mccodes v2] Taser Mod You quote my post without saying anything?
-
Re: Marriage Proposal if ($ir['married'] != '0') { echo 'Try Getting Divorced First, Before Re-Marrying...'; $h->endpage(); exit; }
-
Re: [mccodes v2] Taser Mod <?php // Added For Colour Only.. $fetch = $db->fetch_row($db->query(sprintf("SELECT `ID`, `when` FROM `froze` WHERE `userid` = %u", $_SESSION['userid']))); if (!empty($fetch['ID'])) { $for = time() - $fetch['when']; if ($for > 300) { $db->query(sprintf("DELETE FROM `froze` WHERE `userid` = %u", $_SESSION['userid'])); } else { echo '<span style="color: #FF0000; font-size: 15px; font-weight: 800;">You have been tasered for up to 5 minutes, your froze! '.$for.' seconds have past.</span>'; $h->endpage(); exit; } } Looks like you changed your post before I posted.. Here's a untested fix anyway.
-
Re: HTML posting in forums? If anything make it so only your IP can. :wink:
-
Can you make a variable have a name like "legs"?
Karlos replied to jon182's topic in General Discussion
Re: Can you make a variable have a name like "legs"? Yes. $legs $butt $hair $jim $xD -
Attack Script made by us one that works Hopefully.
Karlos replied to Uridium's topic in Free Modifications
Re: Attack Script made by us one that works Hopefully. I'll be in. :wink: And make it so only attack some person once every half and hour, constant attacking also helps to level people up. If you can contact me on MSN Illusions -
Re: Rating Modification Help ... Heck. It's works for me... <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['act'] = isset($_GET['act']) && ctype_alpha($_GET['act']) ? trim($_GET['act']) : ""; switch($_GET['act']) { case 'PlusRate': PlusRate(); break; case 'MinusRate': MinusRate(); break; } if (!in_array($_GET['act'], array('PlusRate', 'MinusRate'))) { echo '<span style="color:#FF0000;">Error! Invaild Command.</span>'; $h->endpage(); exit; } else if (!$_GET['ID']) { echo '<span style="color:#FF0000;">Error! Invaild ID.</span>'; $h->endpage(); exit; } function PlusRate() { global $db, $h, $ir, $userid; if($ir['ratesleft'] > '0') { $Select = $db->query(sprintf("SELECT `userid` FROM `users` WHERE `userid`='%u'", $_GET['ID'])); if (!($db->num_rows($Select))) { echo '<span style="color:#FF0000;">Error! Invaild ID.</span>'; $h->endpage(); exit; } else if($_GET['ID'] == $ir['userid']) { echo '<span style="color:#FF0000;">Error! You Cannot Rate Yourself.</span>'; $h->endpage(); exit; } else { $r = $db->fetch_row($db->query(sprintf("SELECT `userid`, `username` FROM `users` WHERE `userid`='%u'", $_GET['ID']))); $db->query(sprintf("UPDATE `users` SET `ratings`=`ratings`+'1' WHERE `userid`='%u'", $_GET['ID'])); $db->query(sprintf("UPDATE `users` SET `ratesleft`=`ratesleft`-'1' WHERE `userid`='%u'", $userid)); $db->query(sprintf("INSERT INTO `events` (`evUSER`, `evTIME`, `evREAD`, `evTEXT`) VALUES('%u', unix_timestamp(), '0', '<a href=\"viewuser.php?u=%u\">%s</a> Gave You A +1 Rating!')", @intval($r['userid']), $ir['userid'], addslashes($ir['username']))); $db->query(sprintf("UPDATE `users` SET `new_events`=`new_events`+'1' WHERE `userid`='%u'", @intval($r['userid']))); echo sprintf("You Gave %s A Positive Rating!", stripslashes($r['username']), $r['userid']); } } else { echo '<span style="color:#FF0000;">Error! You Can Only Rate Once A Day.</span>'; $h->endpage(); exit; } } function MinusRate() { global $db, $h, $ir, $userid; if($ir['ratesleft'] > '0') { $Select = $db->query(sprintf("SELECT `userid` FROM `users` WHERE `userid`='%u'", $_GET['ID'])); if (!($db->num_rows($Select))) { echo '<span style="color:#FF0000;">Error! Invaild ID.</span>'; $h->endpage(); exit; } else if($_GET['ID'] == $ir['userid']) { echo '<span style="color:#FF0000;">Error! You Cannot Rate Yourself.</span>'; $h->endpage(); exit; } else { $r = $db->fetch_row($db->query(sprintf("SELECT `userid`, `username` FROM `users` WHERE `userid`='%u'", $_GET['ID']))); $db->query(sprintf("UPDATE `users` SET `ratings`=`ratings`-'1' WHERE `userid`='%u'", $_GET['ID'])); $db->query(sprintf("UPDATE `users` SET `ratesleft`=`ratesleft`-'1' WHERE `userid`='%u'", $userid)); $db->query(sprintf("INSERT INTO `events` (`evUSER`, `evTIME`, `evREAD`, `evTEXT`) VALUES('%u', unix_timestamp(), '0', '<a href=\"viewuser.php?u=%u\">%s</a> Gave You A -1 Rating!')", @intval($r['userid']), $ir['userid'], addslashes($ir['username']))); $db->query(sprintf("UPDATE `users` SET `new_events`=`new_events`+'1' WHERE `userid`='%u'", @intval($r['userid']))); echo sprintf("You Gave %s A Minus Rating!", stripslashes($r['username']), $r['userid']); } } else { echo '<span style="color:#FF0000;">Error! You Can Only Rate Once A Day.</span>'; $h->endpage(); exit; } } $h->endpage(); ?> echo sprintf("Ratings: [url='ratings.php?ID=%u&act=PlusRate']<span style='color: #0D961F;'>+</span>[/url] %u [url='ratings.php?ID=%u&act=MinusRate']<span style='color: #FF0000;'>-</font>[/url] ", $r['userid'], number_format($r['ratings']), $r['userid']); $db->query("UPDATE `users` SET `ratesleft`='1' WHERE `ratesleft`='0'");
-
Re: [McCodes V2] Private Helth Care (Donator Only) Is two files necessary for this mod? Why not make it in hospital.php
-
Re: Signature Change That I Can Put On Main Menu Why don't you consider: $Types = array("Unknown", "Be Right Back", "Wont Answer to Mails", "Busy", "In a Call", "Mail Me", "Bored", "Be Back on Later"); for ($i = 0; $i <= count($Types); ++$i) { echo '<option value="'.$Types[$i].'">'.$Types[$i].'</option>'; }
-
Re: Signature Change That I Can Put On Main Menu No Need! The field is most likely going to be an ENUM()
-
Re: Signature Change That I Can Put On Main Menu <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['act'] = isset($_GET['act']) && ctype_alnum($_GET['act']) ? trim($_GET['act']) : ""; switch($_GET['act']) { case 'SigChange': SigChange(); break; case 'StatusChange': StatusChange(); break; case 'RaceChange': RaceChange(); break; default: Index(); break; } function Safe($Var) { return (get_magic_quotes_gpc()) ? htmlentities($Var) : addslashes(htmlspecialchars($Var)); } function Index() { echo '<h3>Preferences</h3> [url="'.$_SERVER['PHP_SELF'].'?act=SigChange"]Profile Signature Change[/url] [url="'.$_SERVER['PHP_SELF'].'?act=StatusChange"]Status Change[/url] [url="'.$_SERVER['PHP_SELF'].'?act=RaceChange"]Race Change[/url] '; } function SigChange() { global $db, $c, $ir, $h, $userid; if (isset($_POST['Sig'])) { if ($_POST['Sig'] = '') { echo 'You did not enter a new profile signature. [size="1"]>[/size] [url="'.$_SERVER['PHP_SELF'].'?act=SigChange"]Back[/url]'; $h->endpage(); exit; } else { $db->query(sprintf("UPDATE `users` SET `profileSIG`='%s' WHERE `userid`='%u'", Safe($_POST['Sig']), $userid)); echo 'Profile Signature changed! [size="1"]>[/size] [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } } else { echo '<h3>Profile Signature Change</h3> <form action="'.$_SERVER['PHP_SELF'].'?act=SigChange" method="post"> New Profile Signature: '; echo sprintf("<textarea rows='30' cols='90' name='Sig' wrap='virtual' class='input'>%s</textarea> ", $ir['profileSIG']); echo '<input type="submit" value="Change Signature" /> </form> [size="1"]>[/size] [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; } } function StatusChange() { global $db, $c, $ir, $h, $userid; if (isset($_POST['Status'])) { $db->query(sprintf("UPDATE `users` SET `status`='%s' WHERE `userid`='%d'", $_POST['Status'], $userid)); echo 'Your Status Is Now: [i]'.$_POST['Status'].'[/i]'; $h->endpage(); exit; } else { echo ' <h3>Status Change</h3> <form action="'.$_SERVER['PHP_SELF'].'?act=StatusChange" method="post"> <select class="textbox" name="Status"> <option value="Unknown">Unknown</option> <option value="Be Right Back">Be Right Back</option> <option value="Wont Answer to Mails">Wont Answer to Mails</option> <option value="Busy">Busy</option> <option value="In a Call">In a Call</option> <option value="Mail Me">Mail Me</option> <option value="Bored">Bored</option> <option value="Be Back on Later">Be Back on Later</option> </Select> <input class="textbox" type="submit" value="Change Status" /> </form>'; } } function RaceChange() { global $db, $c, $ir, $h, $userid; if (isset($_POST['Race'])) { $db->query(sprintf("UPDATE `users` SET `race`='%s' WHERE `userid`='%d'", $_POST['Race'], $userid)); echo 'Your Race Is Now: [i]'.$_POST['Race'].'[/i]'; $h->endpage(); exit; } else { echo ' <form action="'.$_SERVER['PHP_SELF'].'?act=RaceChange" method="post"> <select class=textbox name="Race"> <option value="Wizard">Wizard</option> <option value="Ware Wolf">Ware Wolf</option> <option value="Vampire">Vampire</option> <option value="Yeti">Yeti</option> <option value="Elf">Elf</option> <option value="Zombie">Zombie</option> <option value="Beast">Beast</option> <option value="Dwarf">Dwarf</option> <option value="Gangsta">Gangsta</option> <option value="Criminal">Criminal</option> <option value="Pimp">Pimp</option> <option value="Member">Member</option> <option value="Legendary Thug">Legendary Thug</option> <option value="Pilot">Pilot</option> <option value="Boxer">Boxer</option> <option value="Chief">Chief</option> <option value="Cop">Cop</option> <option value="Creature">Creature</option> <option value="Seller">Seller</option> <option value="Buyer">Buyer</option> <option value="Goth">Goth</option> <option value="Thief">Thief</option> <option value="Hacker">Hacker</option> <option value="Skeleton">Skeleton</option> <option value="Demon">Demon</option> <option value="Goblin">Goblin</option> <option value="Unknown" SELECTED>Unknown</option> </Select> <input class="textbox" type="submit" value="Change Race" /> </form>'; } } $h->endpage(); ?> Untested.
-
Re: [ANY VERSION] GFX FOR SALE! (From $1) Examples of work?
-
Re: Signature Change That I Can Put On Main Menu Well I was coding this while that got posted so i'm going to post mine anyway.. <?php include_once (DIRNAME(__FILE__) . '/globals.php'); $_GET['action'] = isset($_GET['act']) && ctype_alnum($_GET['action']) ? strtolower(trim($_GET['action'])) : ""; switch($_GET['action']) { case 'signaturechange': signature_change(); break; default: Index(); break; } function Safe($Var) { return (get_magic_quotes_gpc()) ? htmlentities($Var) : addslashes(htmlspecialchars($Var)); } function Index() { echo '<h3>Preferences</h3> [url="'.$_SERVER['PHP_SELF'].'?action=signaturechange"]Profile Signature Change[/url] '; } function signature_change() { global $ir, $c, $userid, $h; if ($POST['Sig']) { if (trim($_POST['Sig']) = '') { echo 'You did not enter a new profile signature. [size="1"]>[/size] [url="'.$_SERVER['PHP_SELF'].'?action=signaturechange"]Back[/url]'; $h->endpage(); exit; } else { $db->query(sprintf("UPDATE `users` SET `profileSIG`='%s' WHERE `userid`='%u'", Safe($_POST['newsignature']))); echo 'Profile Signature changed! [size="1"]>[/size] [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; $h->endpage(); exit; } } else { echo '<h3>Profile Signature Change</h3> <form action="'.$_SERVER['PHP_SELF'].'?action=signaturechange" method="post"> New Profile Signature: '; echo sprintf("<textarea rows='30' cols='90' name='Sig' wrap='virtual' class='input'>%s</textarea> ", $ir['profileSIG']); echo '<input type="submit" value="Change Signature" /> </form> [size="1"]>[/size] [url="'.$_SERVER['PHP_SELF'].'"]Back[/url]'; } } $h->endpage(); ?>
-
Re: Signature Change That I Can Put On Main Menu Why have it that long? function make_safe($Variable) { return mysql_real_escape_string(htmlspecialchars($Variable)); } // or even function make_safe($Var) { return (get_magic_quotes_gpc()) ? htmlentities($Var) : addslashes(htmlspecialchars($Var)); }
-
Re: How does Floydian do it? And yet you say you need to know JS before you use YUI which is wrong.
-
Re: How does Floydian do it?
-
Re: How does Floydian do it? I here that, thats why I have started to work out how to use YUI because I for one do not know how to code JavaScript, but YUI gives me more freedom work with and is incredibly useful. Well you are wrong their. Quote from YUI: The YUI Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX.
-
Re: Yahoo! YUI Board? I actually don't understand JavaScript and YUI helps me incoperate JS into my game without me getting confused what some stuff do, hence I said YUI. I checked jQuery out a while ago, heck I still have it on my harddrive but because I don't know JavaScript it limits what I can do, where I feel I have more freedom when using YUI. :wink: Edit: Another reason I prefer YUI because I don't have to go through 4376 lines to find what I need. :wink:
-
Well I have just been looking at YUI and I think it could be a really good tool for everyone to use. I'd personally like to have a board on it so we can help each other or the others who have more experience gives us tips on it. But obviously i'm not going to make a difference on my own so I think we should all try to pursuade MD to make a board. Karlos.
-
Re: [V2] New Five Minute Cron Seem I posted a verison that had errors in it. Sorry everyone.. Heres the correct file: <?php include_once (DIRNAME(__FILE__) . '/config.php'); global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { echo 'No Access'; exit; } define("MONO_ON", 1); include_once (DIRNAME(__FILE__) . '/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(); $SelectSettings = $db->query("SELECT `conf_name`, `conf_value` FROM `settings`"); while($r = $db->fetch_row($SelectSettings)) { $Set[$r['conf_name']] = $r['conf_value']; } $db->query("UPDATE `users` SET `brave`=LEAST(`brave`+((`maxbrave`/'10')+'0.5'), `maxbrave`), `hp`=LEAST(`hp`+(`maxhp`/'3'), `maxhp`), `will`=LEAST((`will`+'10'), `maxwill`), `energy`=IF(`donatordays`<>'0', LEAST(`energy`+(`maxenergy`/'6'), `maxenergy`), LEAST(`energy`+(`maxenergy`/'12.5'), `maxenergy`))"); if($Set['validate_period'] == '5' && $Set['validate_on']) { $db->query("UPDATE `users` SET `verified`='0'"); } if($Set['validate_period'] == '15' && $Set['validate_on'] && in_array(date('i'), array('00', '15', '30', '45'))) { $db->query("UPDATE `users` SET `verified`='0'"); } ?>
-
Re: A simple, fast database class for PHP 4+ and MySQL Thanks for confirming it Floydian.
-
Re: [V2] New Five Minute Cron That was the whole point recoding it :-) Thanks As I said thats the whole point. Thanks, I know we don't get on quite a bit but thanks.
-
Well I was reading how the MC Code queries in some files were rubbish.. So i decided to learn some new stuff and make a new five min cron... I mean who needs 8/9 querys to refill Health, Will, Brave and Energy... Replace one file. <?php include_once (DIRNAME(__FILE__) . '/config.php'); global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { echo 'No Access'; exit; } define("MONO_ON", 1); include_once (DIRNAME(__FILE__) . '/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(); $SelectSettings = $db->query("SELECT `conf_name`, `conf_value` FROM `settings`"); while($r = $db->fetch_row($SelectSettings)) { $Set[$r['conf_name']] = $r['conf_value']; } $db->query("UPDATE `users` SET `brave`=LEAST(`brave`+((`maxbrave`/'10')+'0.5'), `maxbrave`), `hp`=LEAST(`hp`+(`maxhp`/'3'), `maxhp`), `will`=LEAST((`will`+'10'), `maxwill`), `energy`=IF(`donatordays`='0', LEAST(`energy`+(`maxenergy`/'6'), `maxenergy`), LEAST(`energy`+(`maxenergy`/'12.5'), `maxenergy`)"); if($Set['validate_period'] == '5' && $Set['validate_on']) { $db->query("UPDATE `users` SET `verified`='0'"); } if($Set['validate_period'] == '15' && $Set['validate_on'] && in_array(date('i'), array("00", "15", "30", "45"))) { $db->query("UPDATE `users` SET `verified`='0'"); } ?>
-
Re: [mccode] Mod Sale [$10.00 - $110.00] Oh must of been all those pointless posts and little errors that make you a PHP god. :-o Seriously hate to break it to you but your not. Stop thinking you are so great because your not, not one is. Yea you have your own pass system that you claim is unexploitable and that we can't crack a pass. and as for the "Rofl! NO!" comment well....., thats what I think about your coding. Sorry Iso That this Is On Your Thread.
-
Re: [MCV2]SHOUTBOX[MCV2] http://www.iamwicked.net/mods.php?page=free