Jump to content
MakeWebGames

shrek1609

Members
  • Posts

    310
  • Joined

  • Last visited

    Never

Everything posted by shrek1609

  1. Re: Hospital Java Countdown there was a bug with the header code just updated in post above...
  2. Re: Hospital Java Countdown new update...   open hospital.php add   $time=time();   under   include "globals.php";   find   $q=$db->query("SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hospital > 0 ORDER BY u.hospital DESC",$c);   replace with   $q=$db->query("SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hostime > $time ORDER BY u.hospital DESC",$c);   open header.php find   if($ir['hospital']) { print "[b]<font color='red'>NB: You are currently in hospital for {$ir['hospital']} minutes.</font>[/b] "; }   replace with   $time = time(); if ($ir['hostime'] > $time) { print "<table bgcolor='#000000' border='4' cellpadding='6' bordercolor='#636363'><tr><td>[b]<font color='red'>You are in hospital for <html><body> <div id='countdown'></div> <div id='notifier'></div> <script type='text/javascript'> (function () { function display( notifier, str ) { document.getElementById(notifier).innerHTML = str; } function toMinuteAndSecond( x ) { return Math.floor(x/60) + ':' + (x%60<10?'0':'')+x%60; } function setTimer( remain, actions ) { var action; (function countdown() { display('countdown', toMinuteAndSecond(remain)); if (action = actions[remain]) { action(); } if (remain > 0) { remain -= 1; setTimeout(arguments.callee, 1000); } })(); // End countdown } setTimer({$ir['hostime']}-$time, { 0: function () { display('notifier', 'Releasing'); } }); })(); </script></body></html></font>[/b]</td></tr></table> "; }
  3. Re: Hospital Java Countdown oops sorry you need to add this   $time=time();   into hospital.php doesn't matter where so long as its in the while loop
  4. Re: Hospital Java Countdown *** Forgot to say with this method if you refresh time left doesn't jump back up *** ok folks this is more accurate and as its impossible to make it 100% accurate without using 1 second crons, if its slightly out it will display "releasing" in the hospital list... first off run this sql   alter table users add hostime int(11) not null default 0   everywhere you send someone to hospital ie attackwon attacklost attackbeat etc insert into the hospital queries the following...   hostime=unix_timestamp() + 1200,   (1200 is 20 minutes so however many minutes you want times it by 60) an example of altered query   $db->query("UPDATE users SET hp=1, hostime=unix_timestamp() + 1200, money=money-$stole,hospital=$hosptime,hospreason='Mugged by <a href=\'viewuser.php?u={$ir['userid']}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}");   you will need to change these queries whereever the hospital field is updated in the database, which i guess is different for you all... now open hospital.php find   {$r['hospital']} minutes   replace with...   <html> <body> <div id='{$r['userid']}'></div> <div id='notifier'></div> <script type='text/javascript'> (function () { function display( notifier, str ) { document.getElementById(notifier).innerHTML = str; } function toMinuteAndSecond( x ) { return Math.floor(x/60) + ':' + (x%60<10?'0':'')+x%60; } function setTimer( remain, actions ) { var action; (function countdown() { display('{$r['userid']}', toMinuteAndSecond(remain)); if (action = actions[remain]) { action(); } if (remain > 0) { remain -= 1; setTimeout(arguments.callee, 1000); } })(); // End countdown } setTimer({$r['hostime']}-$time, { 0: function () { display('notifier', 'Releasing'); } }); })(); </script> </body> </html>
  5. Re: Hospital Java Countdown Just to add i know people have wanted a java countdown and although this isn't perfect if anyone wants to work on it and make it better please do :-)
  6. This kind of works it makes the hospital time countdown in seconds and minutes with a piece of java... (original java script found off google can't leave credit as can't find source again) only problem is as it calls the minutes left from the database if you refresh it will round back up to last minute... ie if you have 5 minutes 30 seconds left and refresh it will go back up to 6 till minute cron changes it to 5 minutes... (can't see a way round this except for using unix time stamps for time in hossy) anyway have a go and post what you think ok for the code... open hospital.php find   {$r['hospital']} minutes   replace with...   <html> <body> <div id='{$r['userid']}'></div> <div id='notifier'></div> <script type='text/javascript'> (function () { function display( notifier, str ) { document.getElementById(notifier).innerHTML = str; } function toMinuteAndSecond( x ) { return Math.floor(x/60) + ':' + (x%60<10?'0':'')+x%60; } function setTimer( remain, actions ) { var action; (function countdown() { display('{$r['userid']}', toMinuteAndSecond(remain)); if (action = actions[remain]) { action(); } if (remain > 0) { remain -= 1; setTimeout(arguments.callee, 1000); } })(); // End countdown } setTimer({$r['hospital']}*60, { }); })(); </script> </body> </html> minutes
  7. Re: Count Down Clock i think this is what you want...   <!-- THREE STEPS TO INSTALL NUMBER COUNTDOWN: 1. Copy the coding into the HEAD of your HTML document 2. Add the onLoad event handler into the BODY tag 3. Put the last coding into the BODY of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin <!-- var g_iCount = new Number(); // CHANGE THE COUNTDOWN NUMBER HERE - ADD ONE TO IT // var g_iCount = 11; function startCountdown(){ if((g_iCount - 1) >= 0){ g_iCount = g_iCount - 1; numberCountdown.innerText = '00:00.0' + g_iCount; setTimeout('startCountdown()',1000); } } // End --> </script> </HEAD> <BODY onLoad="startCountdown()"> <font face="Digital Readout Upright" color="blue" size="7"> <div align="center" id="numberCountdown"></div> </font> <center> <font face="arial, helvetica" size"-2">Free JavaScripts provided by [url="http://javascriptsource.com"]The JavaScript Source[/url]</font> </center>   thanks to http://javascriptsource.com
  8. Re: Count Down Clock   correct me if i am wrong but the requires a countdown.js which will be the main workings of the script which you have no access to...
  9. Re: Pot Of Gold $15 [mccode v2] purchased will review later 8-)
  10. Re: [v2] Approval System no mate i actually agree with you, i think with hind sight i would have made prices be more realistic, i'm in the process of creating a 3rd game and seriously considering dropping all prices... but!!! i have members who play both games but use one game to trade which i dont really mind as it means who they trade to are playing... so if i knock prices down it would stop traders on 3rd... max cost of anything in my game is 500mill top house, which i guess is high but not too bad.... i have seen some games with top house at 6 billion :-o
  11. Re: Count Down Clock crazy i think what he means he wants one where you can set the time at say 4 hours and it will count down... which is what i have searched for and can't find... the ones on google seem to be where you enter a date and it counts down to that
  12. Re: [v2] Approval System   Hence if you stopped multi's from the beginning your not making an extra full time job for your staff which in effect keeps the job easy, but if your staff are twiddling their thumbs then by all means put them to work. However it could be sensible to use both scripts; being the preventing of the same IP at signup and then needing approval by staff, but i think preventing users from sending mail is a bad idea shrek, it would be in my opinion to rather restrict the amount of mails one can send in a certain time frame, i believe that would prove more effective in the circumstances. As for your "Crystals" reward situation, you seem to have a massive influx of them if your rewarding 200 each day. Its almost creating an in game Zimbabwe, meaning you have extensive hyper inflation as you've (im guessing) put the trading for crystals up to make an equal ratio, making 1 crystal pretty much worthless, which i suppose is one way to solve the problem, from a Zimbabwe perspective. Haa, I'm just picky over those sorts of things so dont listen to me :wink: i actually increased the levelling costs in my game so crystals are quite valuable, later levels will cost around 4k crystals increasing to 20k for last levels... so crystal prices are stable... on the whole my economy is pretty stable my game is over a year and a half old now (520 days) and there is still stuff for members to save cash for...
  13. Re: Energy not going up? the problem with energy not going up can be because the query for one is update energy = energy + maxenergy /25 if maxenergy is 10 then 10/25 is 0.4 0.4 is rounded down to 0 so it doesn't update
  14. Re: [v2] Approval System i think this idea is excellent personally as they can till play just not trade and to be honest only reason they would want to trade when 1st started is as a multi account sending to their main... i do think blocking forum and mail would be good too if you have active staff rewarding staff i give them a crystal bonus everyday of 200 crystals and they get gradient names (in game price of 10k crystals)
  15. shrek1609

    Cron

    Re: Cron i think your problem is here...   $io=$db->query("SELECT * FROM users where rent>0"); $hu=$db->fetch_row($io); $gd=$db->query("SELECT * FROM rentals WHERE reRENTER={$hu['userid']}"); $hd=$db->fetch_row($gd);   i think the first query is pulling up a blank result so then the second query can't run...
  16. Re: [v2] Approval System This is an interesting idea, personally i have restricted any trading on same ip and also restricted trades till they reach level 10... however you could take this one step further, they can't send messages, enter the forum or trade, till approval is given... this would not only stop same ip users but also would be a nice prevention for people signing up just to spam their games in forums and mails... perhaps with a message popping up for staff stating x amount of users awaiting approval, with a link to approval accept page...
  17. Re: [MMCODES V2] HACKING ATTEMPTS LOGGED heres a question i've secured against my game against sql injections... BUT is there anyway to check the url to see if its being tampered with, and do an auto fed ? perhaps check for certain words like union ? reason i say is i check raw access logs every so often and find a few attempted injections
  18. Re: marriage, sharing housing? its on here if you use the search mate... but seriously shared housing is a very BAD idea... houses are important for your games economy to take cash out of the game, by adding shared housing you can in effect half the amount of money taken out of the game by houses... if you do add it then add a tax for sharing or something similar
  19. Re: How can i decrease the brave gain/level?   there is nothing wrong with that code, this should increase 1 brave per level, as its not... your problem is somewhere else, check you haven't repeated the query somewhere else
  20. Re: How can i decrease the brave gain/level? if you have only just changed the level to +1 it won't change the brave from before... go to your phpmyadmin and run this sql update users set brave=level+5
  21. Re: Cannot attack Clan Mates Addition Mod   if ($stole > 0) { update the database query here }
  22. Re: Cron problem - No energy for some users, others get it. you have energy=energy+maxenergy/25 if max energy is 10 you are dividing that by 25 which equals 0.4 0.4 will be rounded up to 0 hence its not updating... you need to set the default max energy higher or lower the amount you want it to update by so its at least over 0.5
  23. Re: Flash Slot Machine [$50] Designed to fit your game! i'm VERY interested in this but would want it for 3 games what would the price be ?
  24. Re: Complete new gang system... I've had another idea for this, with the gang levelling system and upgrade system to work as follows... the gang starts with a maximum of five slots ie five members can be recruited and it costs X amount per slot, however the extra slots only become available after the gang levels up... levelling up is on an exp system that can only be gained by attacking other gangs.... but gang members also have their own gang exp and they are given levels within the gang... so if another gang members attacks you and you are in a gang your gang exp goes down and so does your personal gang exp... same as theres goes up... if the gang exp goes below the requirement to house say 10 members in the gang then the gang member with the lowest personal gang exp gets auto kicked... and the gang is then limited to housing 10 members... with this system it not only encourages gangs to fight, but also gang members to fight so they are not at the bottom of the list and first to be auto kicked
  25. Re: [mccodes] Advanced Pet Mod [$15] i'm interested in this but a few questions... i don't want the horses or the birds and just want dogs and dog fights also the dogs to race... how difficult would it be for me to mod this for what i want... in other words is it easier for me to buy this and mod yours or create my own...
×
×
  • Create New...