Jump to content
MakeWebGames

CHAMAVELI

Members
  • Posts

    69
  • Joined

  • Last visited

    Never

Everything posted by CHAMAVELI

  1. Re: Help with CSS header.php It's alright, I read the whole header and found what I had to change. Thanks jamboy1 you gave me an idea.
  2. Re: Help with CSS header.php So you are saying I need to modify each page to change the background from white to black?
  3. Hey guys I've been wanting to change the layout of my game for quiet a while now, and now i got the time to do it. I wanted to change the colors of the original layout in reverse, but making the gray background darker and the white black, but I don't know what to change for the white section. At the very top it has body { background-color: #787878;(new color) But this just changes the gray background section. Any help is appreciated.
  4. Re: Simple Question Ok thanks for the help. I won't be changing the codes as they will be useless waste of time.
  5. CHAMAVELI

    Simple Question

    Hey guys, I'm new to PHP so I don't know the answer to this, so I know the echo is faster than print, so if I replace print with echo in my scripts will anything be affected that I should know about or is having echo completely safe?
  6. Re: Register.php create user on SMF Forum My game is just a project and is not finished. Could someone help with the making of the register query to add into the SMF table using the md5+salt. It's only because i have no clue what I am doing witht the password encryption.
  7. Re: Register.php create user on SMF Forum   I think SMF does use md5, but using md5_hmac. Can anyone confirm this?
  8. Re: Register.php create user on SMF Forum Thanks for the replies, i'll just try inserting the DB queries from the SMF register into the Mccodes one. Does anyone know what hashing SMF and Mccodes use? I think Mccodes is md5 encryption.
  9. Re: Multiple Houses [V2] This is something that you forgot to add, and will allow users to cheat in a way. When adding the house to the market, or just selling it straight up without moving out, the user will still have the will of the house they were in. So you should make a query to reset the players current property to the one you start off with, and then they can move into there other houses. Really good mod though mate.
  10. Hey guys, I want to know is it possible if I had both MySQL tables of SMF and Mccodes V2 to run on the same Database, and then modify the register on both to correspond with eachother. Example: 1. A guy registers to Mccode V2 game and plays a bit. 2. He then needs help about the game so he goes to the forums. 3. He logs into the forum without registering because it's automatically done when he signed up for the Mccode game. Thanks.
  11. Re: PHP Code to send a mail when something happens I've given up on this, I've found a different solution to my upgrade system.
  12. Re: PHP Code not working, showing up text Thanks for that, I was along the lines of that but I placed <<<OUT in the wrong place.
  13. Hey guys I have no idea why this is happening but this is was happens: This is my header.php code <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #DEDEDE; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#FFFFFF; vertical-align:top; text-align:center; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#DEDEDE; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); //mission script if($ir['mission'] != 0) { $mq=mysql_query("SELECT * FROM missions WHERE id=".$ir['mission']."",$c); if(mysql_num_rows($mq)== 0) { } $rm=mysql_fetch_array($mq); if($rm['id']> 1) { $usa=$_SESSION['mission_attack']; $aa=mysql_query("SELECT * FROM missions WHERE id='".$ir['mission']."' AND attack_value='".$_SESSION['mission_attack']."'",$c); if(mysql_num_rows($aa)) { $exp=rand($ir['level'],$ir['level']*10); $mission=($ir['mission']); } } print "<h3>You are currently doing the <font color=red>[b]$rm[name][/b]</font> mission.</h3> [url='abandon.php']Click here to Abandon the Mission[/url] "; } if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; } $gn=""; global $staffpage; $bgcolor = 'FFFFFF'; print <<<OUT [img=title.jpg] <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> [b]Name:[/b] [url='viewuser.php?u={$ir[']$gn{$u} [{$ir['userid']}] $d[/url] [b]Money:[/b] {$fm} [b]Level:[/b] {$ir['level']} "; if{$ir['exp']}>={$ir['level']}*975 { print "[url='level.php'][upgrade][/url] "; } [b]Crystals:[/b] {$ir['crystals']} [[url='logout.php']Quick Logout[/url]] <hr /> [b]Energy:[/b] {$ir['energy']}/{$ir['maxenergy']} <img src=yellowbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10> [b]Will:[/b] {$ir['will']}/{$ir['maxwill']} <img src=yellowbar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10> [b]Health:[/b] {$ir['hp']}/{$ir['maxhp']} <img src=yellowbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = 'FFFFFF'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = 'FFFFFF'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> {$db->num_queries} queries</body> </html> OUT; } } ?> And this is the section of PHP code i edited if{$ir['exp']}>={$ir['level']}*975 { print "[url='level.php'][upgrade][/url] "; }
  14. Re: PHP Code to send a mail when something happens I did one using events and it just keeps happening, is there a way to make it only send one event?
  15. Re: I need help with PHP Thanks for that it worked, I changed to the query that you recommended.
  16. Hey guys i've got a modified leveling system and I wanted a mail to send once someone can upgrade. Could someone please give me the PHP code and the MySQL queries i need for this. I am using Mccodes V2 and want to do this through the global_func.php check_level function. Thanks.
  17. Re: [MCCv2] Crons Not Working It was temporarily disabled since they were fixing something, but thanks anyway.
  18. Hey guys I receive this error when i open this PHP page: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/gangland/public_html/upgrade.php on line 15 The PHP code is: <?php include "globals.php"; if($ir['exp']==$ir['level']*975) { $ir['level']+=1; $ir['exp']=$expu; $ir['brave']+=2; $ir['maxbrave']+=2; $ir['hp']=(975*$ir['level']); $ir['maxhp']=(975*$ir['level']); mysql_query("UPDATE users SET level=level+1,brave=brave+2,maxbrave=maxbrave+2, hp='{975*$ir['level']}',maxhp='{975*$ir['level']}' WHERE userid=$userid") or die(mysql_error()); mysql_query("UPDATE users SET upgrade=upgrade-1 WHERE userid=$userid") or die(mysql_error()); print"Congratulations! You upgraded to level [b]{$ir['level']}[/b]!"; } else { die("You do not have enough XP to upgrade your level at this time."); } $h->endpage; ?> The error code line is (line 14-16): mysql_query("UPDATE users SET level=level+1,brave=brave+2,maxbrave=maxbrave+2, hp='{975*$ir['level']}',maxhp='{975*$ir['level']}' WHERE userid=$userid") or die(mysql_error()); mysql_query("UPDATE users SET upgrade=upgrade-1 WHERE userid=$userid") or die(mysql_error());
  19. Re: Mccodes V2 game code Thanks for that found it.
  20. I have no clue why this is happening. Ever since my hosting account was suspended due to crons running every minute and then all of my crons removed, they don't work anymore. I've put in the codes again but they don't seem to work, has anyone had this problem if so let me know. Or would someone show me there cron data (without the game code of course) and I'll see if it's any different. Thanks.
  21. Hey guys, my crons got deleted for some reason and I've now lost my game code to put at the end. I want to know how to find it again or will i have to re-install the game.
  22. Re: if jail/if hosp Here you go, it's mccodes V2   <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #DEDEDE; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#FFFFFF; vertical-align:top; text-align:center; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#DEDEDE; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; } $gn=""; global $staffpage; $bgcolor = 'FFFFFF'; print <<<OUT [img=title.jpg] <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> [b]Name:[/b] [url='viewuser.php?u={$ir[']$gn{$u} [{$ir['userid']}] $d[/url] [b]Money:[/b] {$fm} [b]Level:[/b] {$ir['level']} [b]Crystals:[/b] {$ir['crystals']} [[url='logout.php']Quick Logout[/url]] <hr /> [b]Energy:[/b] {$ir['energy']}/{$ir['maxenergy']} <img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10> [b]Will:[/b] {$ir['will']}/{$ir['maxwill']} <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10> [b]Health:[/b] {$ir['hp']}/{$ir['maxhp']} <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s). Reason: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = 'FFFFFF'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"> <center>'; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } print "[url='donator.php'][b]Donate to {$set['game_name']} now for game benefits![/b][/url] "; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = 'FFFFFF'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> {$db->num_queries} queries</body> </html> OUT; } } ?>
  23. Re: if jail/if hosp Hey I cant seem to get this to work for my mccodes. Could someone please do it for me, if so just ask for the php file.
  24. Re: Mccodes V2 Layout help Thanks, I did search but its a bad topic name, no real description. Thanks.
  25. Re: Captca code mccodeV2 Only problem i've had with the captcha test is that when registering, even if you put in the corrent letters/numbers the test will always fail, so i just turned it off. The captcha on the crimes and gym is very annoying anyway.
×
×
  • Create New...