
Haunted Dawg
Members-
Posts
2,933 -
Joined
-
Last visited
Never -
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Haunted Dawg
-
[any version] Removal of 1 minute crons
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [any version] Removal of 1 minute crons I understand at what you get at templar, how ever. This is intentionaly made for mcc game's. Now, how many mcc games has around 130+ online in a 15 minute period? Not even cronus's game which is the fastest growing mccode game i have seen by far. Now, this being 72 online within 15 minute's. It would be better to use this than the cron. Now to my specifications and to what i tend to do for my game is. Have it run on per user. Not entire game. Also i tend to make use of the UNION in mysql. And i also noticed that yes there is a problem with pog1's code. Have not looked at it yet to fix it. -
Re: FLASH MENU ($30) The second one i do not like. It's changing all the time.
-
Re: [McCodes][v2] Mailbox Layout Mod Miniman, i was not starting a arguement at all. I was just letting him know how to spell it correctly so when it actualy come's to an exam or something he will know.
-
[any version] Removal of 1 minute crons
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [any version] Removal of 1 minute crons Templar, this will benefit a game with around 50 online per 15 minute's. But putting it around TC, won't match. Why do you think TC has a timestamp on per user. TC only matches the user and not the entire website. -
Re: [v2] Car Mods He mean's one field 19 comma's (,). By this, 1,8,1,45,7,2,6,2,76,2,7,1,8,1,7,2 Then $numbers = explode(',',$user['field']); $field_1 = $numbers[0];
-
Re: Some help with jobs.php error mysql_errno returns the mysql_error error number. Not going to help you at all unless you got all the errors in list.
-
Re: Hospital time bug FIX here! why not just add in attacklost.php: unset($_SESSION['attacklost']); then if( !isset($_SESSION['attacklost']) ) { echo 'Cheaters dont get no where.'; $h->endpage(); exit; }
-
Re: [McCodes][v2] Mailbox Layout Mod Just so you know, it's "generator" not "genorator", just telling you because you using it and well, best to have better english eh.
-
[any version] Removal of 1 minute crons
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [any version] Removal of 1 minute crons As i also argued with some one on msn about this. On every page load, it is selecting 2 row's from one table. 1 row is for the last time and other row is for the time name. If the last time was 60 second's ago. Perform the rest of the query's. If not don't do nothing. Basicly if it is not 60 second's no other query's are being performed. Thus leaving it with the 1 query at the top to check the last time etc. Now let's see. A basic v2 game average querys on page load is what? 6 - 10. And thus selecting every row in that table. What's 1 query with 2 row's going to do with 6 querys of up to 100 row's? I ran test's of this. And it only add's a 0.00001 time frame to the page load. But let me say this. I ran the exact same code without the if statement via a cron to log and guess what the page load was? 0.001. So by all mean's i do think this is faster and less resource. -
Re: CE's Home A topic like this has already been posted by (i think) 03lacey's.
-
Re: [V2] Very Simple Help Needed He did say that his will & energy is working fine. Best bet is to post your code to see if any error's
-
Re: FLASH MENU ($30) Not so long ago i found a site that you could create your own flash banner's etc. So personaly, i will go there first. $30 is not worth it either. When you can simply use CSS to do majority of that.
-
Re: [All versions] Mailbox clickable bbcode and smilies There is no problem to have a / infront of a url image in CSS. the / assigns it is coming from out of public_html so it actualy ends up like public_html/url
-
How often are these games customized?
Haunted Dawg replied to EineyEntertainment's topic in General Discussion
Re: How often are these games customized? I've owned a couple game's and sold one very successful site that still grow's till today. Been open for about a year. I guess well alot of people like is community discussion's. Somewhere they can talk and talk about the game. Sell thing's in that place. ETC. Other thing's is. You got to bring them something unique, that no other game has. If they like that feature, they will stay. But if it's on another game and they play that game and are a good level. Why bother play your game for that feature when they have it? They like colour's but not to much. They don't like lag. They don't like downtime. Downtime come's and you got around 50+ mails next morning ;) -
Re: [FAQ] Before posting An Error Can anyone please use this before posting error's. It saves us atleast time. This is only because i have had around 6 people on msn asking me about SQL error's.
-
Re: vr2 help needed please delete installer.php
-
[any version] Removal of 1 minute crons
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [any version] Removal of 1 minute crons It shows error's but won't actualy work. No one outside your game can actualy run it. Oh and if you want to stop people viewing the page in domain. if($_SERVER['PHP_SELF'] == '/file') { die; } -
Ok, based off pog1's code www.pog1.co.uk/updates.txt, he made the removal of 5 minute cron's. I attempted to try the removal of 1 minute cron's and worked perfectly. How this Works Well, you might be thinking, the user has to click every minute for it to go down? No, it adds up so basicly like this. If the user is in hospital or jail for 12 minutes and no one clicks in a time frame of 10 minute's. When some one click's the 10 minute's get's deducted. Leaving them with 2 minutes. Well, let's start off with the querys: CREATE TABLE `updates` ( `name` VARCHAR(255) NOT NULL DEFAULT '', `last` INT(255) NOT NULL DEFAULT '60' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `updates` (name,last) VALUES('1min', unix_timestamp()); Now here is the file: <?php $result = mysql_query("SELECT * FROM `updates` WHERE `name` = '1min'"); $result = mysql_fetch_assoc($result); $hla = time() - $result['last']; if($hla > (60)) { $n = floor($hla / 60); $hospital = (1 * $n); $jail = (1 * $n); $query_hos = sprintf("UPDATE users SET hospital = hospital - %u WHERE hospital <> 0", $hospital); $query_jail = sprintf("UPDATE users SET jail = jail - %u WHERE jail <> 0", $jail); mysql_query($query_hos); mysql_query($query_jail); mysql_query("UPDATE `users` SET `hospital` = 0 WHERE `hospital` < 0"); mysql_query("UPDATE `users` SET `jail` = 0 WHERE `jail` < 0"); $time = time(); mysql_query("UPDATE `updates` SET `last` = ".$time." WHERE `name` = '1min'"); $floor = $time - (floor($time / 60) * 60); if($floor > 0) { $newUpdate = time() - $floor; mysql_query("UPDATE `updates` SET `last` = ".$newUpdate." WHERE `name` = '1min'"); } } ?> You can add pog1's code also inside that file. When calling it out. Just include this under your config code in globals.php where it connects to the DB. include_once('file'); Enjoy the removal of 1 minute cron's :)
-
Re: User Levels [v2] Add it before the last }
-
Re: User Levels [v2] function player_rank($tp) { if ($tp < 3) { return "#1 Absolute Newbie"; } else if ($tp < 7) { return "#2 Newbie"; } else if ($tp < 12) { return "#3 Beginner"; } else if ($tp < 18) { return "#4 Not Experienced"; } else if ($tp < 25) { return "#5 Rookie"; } else if ($tp < 50) { return "#6 Average"; } else if ($tp < 100) { return "#7 Good"; } else if ($tp < 200) { return "#8 Very Good"; } else if ($tp < 350) { return "#9 Greater Than Average"; } else if ($tp < 500) { return "#10 Experienced"; } else if ($tp < 750) { return "#11 Highly Experienced"; } else if ($tp < 1200) { return "#12 Honoured"; } else if ($tp < 1800) { return "#13 Highly Hounoured"; } else if ($tp < 2500) { return "#14 Respect King"; } else if ($tp < 5000) { return "#15 True Champion"; } } To display: echo player_rank($ir['level']);
-
Re: Number Game! [V2] $ir['userid'] is better to use. $userid is linked to the session which the session can be edited.
-
Re: Mccodes V2 Request Name Changes <?php function nameFormat($user) { $us = mysql_query("SELECT userid,username,donatordays,namecolor FROM `users` WHERE `userid` = ".abs(@intval($user))); $row = mysql_fetch_assoc($us); $names = array ( 1 => 'ID 1 Image', 2 => 'ID 2 Image', 3 => 'ID 3 Image', 4 => 'ID 4 Image', 5 => 'ID 5 Image', 6 => 'ID 6 Image', ); if($row['donatordays'] > 0) { $color = 'blue'; } else { $color = ($row['namecolor']) ? $row['namecolor'] : 'white'; } if( in_array($row['userid'], $names) ) { return '[url="viewuser.php?u='.$row['userid'].'"][img='.$names[$row['userid']].'][/url]'; } else { return '[url="viewuser.php?u='.$row['userid'].'"]<span style="color: '.$color.';">'.$row['username'].'</span>[/url]'; } } ;)
-
Re: BRAND NEWW !!!!!!!!! That's why i want to see the site :P
-
Re: BRAND NEWW !!!!!!!!! What was your old site that you sold for $1,600?
-
Re: New Game. Blow your mind's away. UPDATES! 1.- Layout integrated onto login (www.deadlykillah.com). 4 Page in 1 => login, register, forgot password, home on index.php. 2.- Layout integrated into header. No preview. 3.- DataBase class has been working for about 1 month now. 4.- Item Market Recoded. 5.- Functions file in place & working. 6.- Custom bbcode engine in place & working. 7.- Items page now uses a tabbed view, to view equiped item's and item's you currently own. 8.- Explore.php now has Hospital & Jail file's all into one. 9.- When in jail or hospital, and go to explore. It will just show you the hospital page. 10.- Gangs Script complete. Now has => Ajax Chatroom per gang. BBCode descriptions. BBCode announcements. Gang Search. 11.- Staff List is different to other game's. 12.- Town View Recoded. 13.- A complete recode of forums.php, this works similar like the SMF forum's. 14.- Gym Recode. Unique feature's included. 15.- Donator's get a smaller advantage but not a big thing. 16.- More donator feature's. 17.- Staff Panel is now inside a different folder. Recoded also. 18.- A complete new donator page, with IPN system that track's donator log's. Still To Come There is to much to mention that is still to come. Game should release into ALPHA 2 i hope by next friday. Game will proceed in ALPHA 2 for a month, see how thing's are going. If thing's proceed alright without a big game economy, no reset shall hapen. Else reset will hapen and will reduce the economy stat's. While it is in ALPHA 2, people may signup to the site, play on it. Upgrade Account (Donations) will be open and in case of a reset, all your donator pack's will be returned to you when open again.