Jump to content

Milbea

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

About Milbea

  • Birthday 06/09/1988

Contact Methods

  • MSN
    foxinsox_rox@hotmail.com
  • Website URL
    http://www.rpgsaga.com

Profile Information

  • Gender
    Female
  • Location
    Canada

Milbea's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The picture displays, but I'd like it to look as it does in the html code, or at least aligned center. If I put the html code in the echo command, nothing shows up.
  2. Alrighty, I worked on this code for hours yesterday to get this game working. (I'm a newb, it was my first success with something this complicated). My problem is however, getting the result to display as I want it to. I used NVU to make what I wanted the end result to be, but when I pasted the code into the "echo" line it didn't work. Should I change the php game code, or can I code it so that each outcome automatically sends to the corresponding pages I made in nvu? Here's the code for the game: <html> <body> <title>Random Chance Hat Game</title> <?php //take their 10 gold. //if they don't have 10 gold, ignore the next section of code //generate a random number mt_srand ((double) microtime( )*1000000); $num = mt_rand (1,200); if ($num==1) echo " JACKPOT <br><br><img src= 'http://rpgsaga.com/games/jackpot.png'align=center>"; //add the jackpot elseif ($num>=2 and $num<=21) echo "You win 25 gold <br><br><br> <img src= 'http://rpgsaga.com/games/bigwin.png'>"; //add 25 gold elseif ($num>=22 and $num<=82) echo "You win 15 gold<br><br><br> <img src= 'http://rpgsaga.com/games/mediumwin.png'>"; //add 15 gold elseif ($num>=83 and $num<=153) echo "You win 10 gold <br><br><br> <img src= 'http://rpgsaga.com/games/smallwin.png'>"; //add 10 gold elseif ($num>=154 and $num<=184) echo "You win only 5 gold back. <br><br><br><img src= 'http://rpgsaga.com/games/blank.png'>"; //add 5 gold elseif ($num>=185 and $num<=200) echo "You lost your entire 10 gold <br><br><br><img src= 'http://rpgsaga.com/games/death.png'>"; else echo "You got nothin!"; ?> </body> </html> Here's the code for what I want the "jackpot" to look like: <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>10gold</title> </head> <body> <div style="text-align: center;"><big><big><big><big>Small win<br> <small><small>You win 10 gold!<br > < br> <b r> <br > <br > <br > <br > <br > <br > <br > Again?</small></small></big></big></big></big></div> <img style="width: 190px; height: 192px; position: absolute; top: 120px; left: 278px;" alt="10gold" src="http://rpgsaga.com/games/jackpot.png">
  3. I'm in the process of making a random chance game. How can I make the different outcomes have their own picture? Here's the code: <?php; srand((double)microtime()*1000000); $numb=rand(0,100); if ($numb>=75) echo "Big Win"; elseif ($numb<=50) echo "lose"; else echo "dude"; ?> thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.