Jump to content
MakeWebGames

Coly010

Members
  • Posts

    912
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Coly010

  1. Beiber?
  2. Yay i topped snikos 18 views and not one reply with 39
  3. The advanced version of this mod This is the advanced version of this mod Ok so this is the advanced version of the sleep mod i posted earlier. It is now 01:56 here im still on my ipod and lying in bed typing this into the notes app on the ipod as the wireless internet is off. Anyway everything you need to do for the advanced version is posted below. If you find any bugs or errors post them here so i can learn from my mistakes :) this took me approximatly 30 mins to 1 hour and 15 mins to make. Im just guessing because i didnt time it and things take longer on the iPod. In the sleep.php file you can change the cost of how much it is to sleep depending on the economy of your game. [mysql] ALTER TABLE `users` ADD `sleeps` int(11) NOT NULL DEFAULT `5`; [/mysql] cron_day.php db->query("UPDATE users SET sleeps = 5, $c");   mainmenu.php [url='sleep.php']Go To Sleep[/url]   sleep.php <?php /***************************/ /* Sleep Mod created by Coly010*/ /* For Makewebgames users. */ /* Keep this in file please. */ /* And show recognition that i */ /* created it please. Thanks. */ /* Created on the 3.1.11 at */ /* 01:56. */ /***************************/ include "globals.php"; switch ($_GET['do']) { case 'sc': slefirm(); break; default sleep_index(); break; } function sleep_index() { global $ir,$c,$userid; echo "<center><h2>Bed Time</h2> It costs money to go any further. 20 gold. <form action='sleep.php?do=sc' method='post'> <input type='submit' value='sleep' /> </form> </center>"; } function slefirm() { global $ir,$c,$userid; db->query("UPDATE users SET money= money - 20 WHERE userid=$userid,$c"); if ($ir['sleeps'] = 0) { die (" No more sleep tries left."); } else { db->query("UPDATE users SET sleeps=sleeps-1 WHERE userid=$userid,$c"); $sleeps = rand(1,3); if ( $sleeps = 1) { echo " BRRRRRRIINGGGG. Your phone went off just as you were about to fall asleep, "; } elseif ( $sleeps = 2 ) { db->query("UPDATE users SET sleeps=sleeps-1 WHERE userid=$userid,$c"); echo " You fell asleep but had your guts ripped open by an evil demonic Power Crazed weirdo. get to hospital."; db->query("UPDATE users SET hp=0 && hospital= hospital + 1 WHERE userid=$userid,$c"); } elseif ( $sleeps = 3 ) { db->query("UPDATE users SET sleeps=sleeps-1 WHERE userid=$userid,$c"); echo "You got to sleep and your health was fully restored but with a few bonuses. Check your stats to find out what."; $bonus = rand(2,8); db->query("UPDATE users SET hp=maxhp WHERE userid=$userid,$c"); db->query("UPDATE userstats SET strength=strength+$bonus && guard=guard+$bonus WHERE userid=$userid,$c"); } else { echo "Invalid action click on the sleep link on the mainmenu. This does not use up any of your sleep tries."; } } } $h->endpage(); ?>   Whereever you find appropiate place this into your header file header.php echo "Sleep Tries: $ir['sleeps'] ";
  4. I'm working on a real estate mod on my lappy and I will hopefully finish it tomorrow. This mod is one where u can buy houses and stuff to try and get more money income but taxes get taken from it. Taxes vary depending on the income and level of the player and players Real Estate level. Higher Real Estate Level the less tax but it costs money to upgrade your real estate. Would anyone be interested in this mod? I am still going to post it anyway :P
  5. Ok so I'm lying in bed it's 00:37 I'm on my iPod and I want to create a simple mod and what do I base it on? Sleep lol pathetic I know but it may come in handy to someone down the line. In main menu add this somewhere: [url='sleep.php']Sleep[/url] then u obviously create the file sleep.pup and into it copy and paste the following: <?php include "globals.php"; db->query("UPDATE users SET money = money - 10 & hp = maxhp WHERE userid=$userid",$c); echo " you have slept in the homeless center but couldn't get to sleep so you bought a wiskhey for 10 gold to help you fall over. Your health has been restored."; $h->endpage(); ?>   Lol like I said , simple very simple. But I don't know if the query is correct is it?
  6. Coly010

    hey

    yeah the server seems to be very busy this week i can even get into the cpanel :( D:! i wanted to do the finishing touches of the ingame template i'm creating but cant :( this in game is fully coded so far YAY!
  7. Coly010

    hey

    hey can any one tell me if you think this is good. i use smf i think... Planet 201 i'm also using a free template lol
  8. i know that the file is coded right i think it might be the server just im with heliohost you see free account as im 13
  9. aye me server is down at the moment when it is back up i'll recheck it
  10. i have... its not working correctly
  11. naw still not working it doesnt show that simple / advanced screen it shows one that looks like it has been ajaxed
  12. i'm having a spot of trouble with my cron jobs. i don't know how to install them on the new servers. i'm currently using a free host as i'm only thirteen and can't pay for a real one, but it does have the cron job thing on it. i installed them on it before but now they have changed it and the cron jobs wont work. the server type is linux and cPanel Version 11
  13. thx
  14. is it a # u use for class or a .
  15. by the way i found a site that has free website templates that could easily be turned into a login - register for your game or jsut keep them they way they are
  16. ok, i have created a simple psd website template that can be used by anyone. i'll be coding it soon. i dont know of the coded version will work or not but i'll give it a go. now here is the image for it. please tell me what you think. like i said its simple
  17. ok i know i have been away for a while but that doesnt matter. i'm going to start up a new game and i really need help with an ingame/ login template. i want it based around medieval times. all i want is a website that has like free ones on it or even, at the very least, a site that can give me medieval images to allow me to put into a template so that i can try it my self. i am kind of confident on how to create a template from psd. if i get images and do it myself i'll post it here (hopefully coded) and let others use it if they want for free and by the way is there a catch with co.cc the free domain service thing? i'd really appreciate the help! regards, Coly010
  18. thanks a lot :D and np
  19. I'm not using an illegal version. That's part of the mccodes lite zip that I got from mccodes.com today! But. Anyway, any help?
  20. my register file is not working and i have no clue why not. i'm not that good at doing registers so if anyone could point out my mistakes or what i've left out etc. i have to seperate register files. one that contains the form and the other with mysql insert stuff. here is the mysql insert stuff one: <?php $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { die("<html><head></head><body>[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</body></html>"); } require "connect.php"; global $link; if($_POST['username']) { $sm=100; if($_POST['promo'] == "7341") { $sm+=100; } $username=$_POST['username']; $username=str_replace(array("<", ">"), array("<", ">"), $username); $q=mysql_query("SELECT * FROM users WHERE username='{$username}'"); if(mysql_num_rows($q)) { print "Username already in use. Choose another."; } else if($_POST['password'] != $_POST['cpassword']) { print "The passwords did not match, go back and try again."; } else { mysql_query("INSERT INTO users (username, password, level, gold, casino_coins, realm, city, user_level, energy, maxenergy, stamina, maxstamina, hp, maxhp, gender, signedup, email, lastip) VALUES( '{$username}', md5('{$_POST['password']}'), 1, $sm, 10, '{$_POST['realm']', 1, 350, 4000, 350, 1500, 100, 100, 'Male', unix_timestamp(), '{$_POST['email']}', '$ip')"); $i=mysql_insert_id($link); mysql_query("INSERT INTO userstats VALUES($i, 1, 1, 1, 1, 1)"); print "You have signed up, enjoy the game. > [url='login.php']Login[/url]"; } } ?>   i'm creating my own game you see. i'm doing my own code. i dont have referals in my game and i dont no if they need to be in the code or not. like i said i dont know how to make a register. this is the form one: <!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 content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Planet 201</title> <style type="text/css"> body { background: black; border: 5px silver groove; color: #CC0000; cursor: auto; font-family: Cambria, Cochin, "Georgia", Times, Times New Roman, serif; font-size: medium; font-weight: normal; font-variant: small-caps; font-style: oblique; text-align: center; text-decoration: blink; text-indent: 1px; text-transform: capitalize; } #nav { background: black url('navigation.png'); color: #CC0000; } #homebutton { background: transparent; color: white; font-size: large; } input, select { background: black url('input.png'); color: #FFF; } #submit { background: white; color: #000; } form { background: transparent; } </style> </head> <body> <span> <div id="nav" style="height: 40px; width: 758px"> <span> [url="index.html"]<input type="button" id="homebutton" value="Home" style="height: 35px; width: 77px" onclick="home()" />[/url] <a href="register.html"> <input type="button" id="homebutton" value="Register" style="height: 35px; width: 77px" onclick="register()" /></a> <a href="story.html"> <input type="button" id="homebutton" value="Story" style="height: 35px; width: 77px" onclick="story()" /></a> <a href="ages.html"> <input type="button" id="homebutton" value="Ages" style="height: 35px; width: 77px" onclick="ages()" /></a> </span></div> <div> <form method="post" action="register.php" onsubmit="return validate_form(this);"> <label>Username:</label> <input type="text" name="username" id="username" /> <label>Password:</label> <input type="password" name="password" id="password" /> <label>Confirm Password:</label> <input type="password" name="cpassword" id="cpassword" /> <label>Email:</label> <input type="text" name="email" id="email" /> <label>Time Realm:</label> <select name="realm"> <option name="past" id="past" value="past">Past</option> <option name="present" id="present" value="present">Present</option> <option name="future" id="future" value="future">Future</option> </select>[url="ages()"]?help</label>[/url] <label>Promo Code:</label> <input type="text" name="promo" /> <input type="submit" value="Register" id="submit" /><input type="reset" value="Reset" id="submit" /> </form> </div> </span> </body> </html> <script language="JavaScript"> <!-- hide function register() { popupWin = window.open('register.html', 'open_window') } function story() { popupWin = window.open('story.html', 'open_window') } function home() { popupWin = window.open('index.html', 'open_window') } function ages() { popupWin = window.open('ages.html', 'open_window') } // done hiding --> function validate_email(field,alerttxt) { with (field) { apos=value.indexOf("@"); dotpos=value.lastIndexOf("."); if (apos<1||dotpos-apos<2) {alert(alerttxt);return false;} else {return true;} } } function validate_form(thisform) { with (thisform) { if (validate_email(email,"Not a valid e-mail address!")==false) {email.focus();return false;} } } </script>   any help? thanks, coly010
  21. ok, i'm trying to create a login for a game i am making. i posted a different login on a different thread. people replied saying that i should use css posistioning instead of tables. i would like to ask you all how do you do css posistioning. Thank you
  22. because it's the first time i used css like that and didnt understand if: class = #/. or id = ./#
  23. read it. plus i think i may have coded it wrong.
  24. Ok this is by far a very simple login. it's more to teach new coders how to use a css to make a simple login. from there you can add background images/ ajax things/ jquery and so on. i cant provide a screenshot so it would be great if anyone hear would. the code:   <?php session_start(); print <<<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 content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Your Game Name</title> <style> body { background: black; color: red; font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: medium; border: thick white groove; text-decoration: none; text-transform: uppercase; } .login { border: medium silver groove; } #login { border: medium silver groove; } .description { border: medium silver groove; } #description { border: medium silver groove; } .register { border: medium silver groove; } #register { border: medium silver groove; } #llgoin { background: silver; border: medium gray groove; color: black; font-family: "Courier New", Courier, monospace; font-style: italic; text-decoration: blink; } #lregister { background: silver; border: medium gray groove; color: black; font-family: "Courier New", Courier, monospace; font-style: italic; text-decoration: blink; } #lstory { background: silver; border: medium gray groove; color: black; font-family: "Courier New", Courier, monospace; font-style: italic; text-decoration: blink; } .style1 { text-align: center; } </style> </head> <body> <center>[img=logo.png]</center> <table style="width: 100%"> <tr> <td id="login" class="login" width="33.3%"> <fieldset> <legend id="llgoin">Login</legend> <form action="authenticate.php" method="post"> <label id="Label1">Username:</label> <input name="username" type="text" /> Password:<input name="password" type="text" /> <input name="Submit1" type="submit" value="submit" /> </form> </fieldset> </td> <td id="description" class="description" width="33.3%"> <fieldset> <legend id="lstory">Description</legend> The description for your game will go here! For example: Welcome this is Your Game Name. This game is a Your Game Type! Thanks For Using Coly010's Desgins! </fieldset> </td> <td id="register" class="register" width="33.3%"> <fieldset> <legend id="lregister">Register</legend> <form action="register.php" method="post"> <label id="Label2">Username: </label> <input name="username" type="text" /> Password: <input name="password" type="text" /> Confirm Password: <input name="cpassword" type="text" /> Email: <input name="email" type="text" /> Promo Code: <input name="promo" type="text" /> <input name="Submit2" type="submit" value="submit" /><input name="Reset1" type="reset" value="reset" /></form> </fieldset> </td> </tr> </table> </p> <table style="width: 100%"> <tr> <td class="style1">Copyright &copy 2010 Your Name Template By Coly010 </td> </tr> </table> </body> </html> i know that this is very simple but it does have login and register on the same page. post neagtive comments if you wish
×
×
  • Create New...