Jump to content
MakeWebGames

bineye

Members
  • Posts

    310
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by bineye

  1. ah sorry had a long day and everything just wasn't working :P i was thinking of the safe on a game i played and they had the same combination for everyone, then when someone cracked it, it reset. i thought you were doing the same. ;)
  2. Your parse error is on line 9. Try changing Money :'.number_format($ir['money']).' to Money : \${$ir['money']} should have the same effect
  3. That's what I'm talkin' about ;) BTW, when someone guesses correctly, does it reset? I can't pinpoint where in the code it does that, but I'd blame me for that :P
  4. Is it a treasure chest or a safe? I'm confused :s
  5. Could quite easily just re-write the system to use timestamps. Then you could even have second ones. Whats your budget for this project? Was thinking that too, but I figured this OP wouldn't have had that much experience considering the lack of information regarding what they require, then I offered probably the simplest solution for them to do themselves. Also, as he originally posted in the free section, I wasn't gonna go write out anything at all that I wouldn't use myself.
  6. Courses run off the day cron. Couldn't you add a new field in database, called hour or whatever and add to the hour cron?
  7. Hi. What exactly are you looking for? You want the time changed only?
  8. I assume you'd be adding to a profile? Wouldn't a db recall be sufficient? Rating: {$user['ratings']} I haven't tried the code so I don't know if that's the correct place where the total ratings are stored, but a quick read suggests to me it is.
  9. Is there really another mod out there that uses mathematics to determine odds for results? If so, please direct me to it and i'll remove this. I'll admit, i used a number of free mods for aspects, and something to build on, but I feel I added enough of my own work to call it my own. As I haven't really been on these forums for a long time, you have to forgive me when I can't understand why you'd run in and put someone down for trying, without backing up your points. I could go to one of the MCCoders and say "that's not your work, I saw it somewhere else" and not mention that location. I tried to explain I'm new and you are just basing your comment on the assumption that I can read your mind and know which place to look. I'm sorry, but that's just not the way it is.
  10. Why did the code go messed up? lol
  11. Hi guys. I decided to stop reading the great mods and starting writing some myself. This is my first EVER mod, so take that into consideration when slating me! *chuckles* Also, I'm sure people will find bugs/faults, so that's why its v1.0...for now! So the first mod I decided to make is a horse racing gambling game. I am aware there were 2 or 3 mods already made for horse racing, but mine uses odds. Not much of an overall difference, but I think it's a nice addition. Here's the script: horses.php <?phpinclude "globals.php";if ($ir['location'] != 17){die ("You need to be in Tokyo to visit Tokyo Racetrack! [url='explore.php']Back [/url]");}$tresder = (int) (rand(100,999));$maxbet=$ir['level']*150;$_GET['tresde']=abs((int) $_GET['tresde']);if(($_SESSION['tresde'] == $_GET['tresde']) || $_GET['tresde']<100){die ("Error, you cannot refresh or go back on the slots, please use a side link to go somewhere else. [url='horses.php?tresde=$tresder']> Back[/url]");}$_SESSION['tresde']=$_GET['tresde'];$_GET['bet']=abs((int) $_GET['bet']);$_GET['number']=abs((int) $_GET['number']);if($_GET['bet']){if($_GET['bet'] > $ir['money']){die("You are trying to bet more than you have. [url='horses.php?tresde=$tresder']> Back[/url]");}else if ($_GET['number'] > 8 or $_GET['number'] < 1 or $_GET['bet'] < 0){die("There are only 8 horses in this race! [url='horses.php?tresde=$tresder']> Back[/url]");}}$hb=$_GET['bet'];$horse[1]=(int) rand(1,125);if ($horse[1] > 0 && $horse[1] < 50){if ($_GET['number'] == 1){$hwin=$_GET['bet']*1.5;$hgain=($_GET['bet']*1.5)-($_GET['bet']);print " [b]<font color=green>You look over the crowds, and just about catch a glimpse of the number 1 on the side of the winning horse.</font>[/b] You have won \$$hwin!";$db->query("UPDATE users SET money=money+({$hgain}) where userid=$userid");}else {print " [b]<font color=red>You have lost \$$hb on this race. The winner was horse 1.</font>[/b]";$db->query("UPDATE users SET money=money-({$_GET['bet']}) where userid=$userid");}}else if ($horse[1] >= 50 && $horse[1] < 83){if ($_GET['number'] == 2){$hwin=$_GET['bet']*2;$hgain=($_GET['bet']*2)-($_GET['bet']);print " [b]<font color=green>Horse number 2 gallops home with 4 lengths to spare. You go to collect your \$$hwin winnings.</font>[/b]";$db->query("UPDATE users SET money=money+({$hgain}) where userid=$userid");}else { print " [b]<font color=red>Horse 2 wins easy, losing you \$$hb.</font>[/b]";$db->query("UPDATE users SET money=money-({$hb}) where userid=$userid");}}else if ($horse[1] >= 83 && $horse[1] < 98){if ($_GET['number'] == 3){$hwin=$_GET['bet']*5;$hgain=($_GET['bet']*5)-($_GET['bet']);print " [b]<font color=green>Horse number 3 wins in a photo finish! You celebrate your \$$hwin winnings.</font>[/b]";$db->query("UPDATE users SET money=money+({$hgain}) where userid=$userid");}else {print " [b]<font color=red>Horse 3 nicks it, losing you \$$hb.</font>[/b]";$db->query("UPDATE users SET money=money-({$hb}) where userid=$userid");}}else if ($horse[1] >= 98 && $horse[1] < 108){if ($_GET['number'] == 4){$hwin=$_GET['bet']*8;$hgain=($_GET['bet']*8)-($_GET['bet']);print " [b]<font color=green>Horse number 4 wins after a sprint finish! You win \$$hwin!</font>[/b]";$db->query("UPDATE users SET money=money+({$hgain}) where userid=$userid");}else {print " [b]<font color=red>Horse 4 sprints to a win, losing you \$$hb.</font>[/b]";$db->query("UPDATE users SET money=money-({$hb}) where userid=$userid");}}else if ($horse[1] >= 108 && $horse[1] < 116){if ($_GET['number'] == 5){$hwin=$_GET['bet']*12;$hgain=($_GET['bet']*12)-($_GET['bet']);print " [b]<font color=green>Horse number 5 comes over the line in first! Your gamble pays you \$$hwin!</font>[/b]";$db->query("UPDATE users SET money=money+({$hgain}) where userid=$userid");}else {print " [b]<font color=red>Horse 5 wins, losing you \$$hb.</font>[/b]";$db->query("UPDATE users SET money=money-({$hb}) where userid=$userid");}}else if ($horse[1] >= 116 && $horse[1] < 121){if ($_GET['number'] == 6){$hwin=$_GET['bet']*20;$hgain=($_GET['bet']*20)-($_GET['bet']);print " [b]<font color=green>Horse number 6 wins a head to head finish with horse 2! You gain \$$hwin!</font>[/b]";$db->query("UPDATE users SET money=money+({$hgain}) where userid=$userid");}else {print " [b]<font color=red>Horse 6 wins a close race, losing you \$$hb.</font>[/b]";$db->query("UPDATE users SET money=money-({$hb}) where userid=$userid");}}else if ($horse[1] >= 121 && $horse[1] < 124){if ($_GET['number'] == 7){$hwin=$_GET['bet']*33;$hgain=($_GET['bet']*33)-($_GET['bet']);print " [b]<font color=green>Horse number 7 races home for the win, for him and you! You go to collect your \$$hwin winnings.</font>[/b]";$db->query("UPDATE users SET money=money+({$hgain}) where userid=$userid");}else{print " [b]<font color=red>Horse 7 comes in first, losing you \$$hb.</font>[/b]";$db->query("UPDATE users SET money=money-({$hb}) where userid=$userid");}}else if ($horse[1] >= 124 && $horse[1] < 125){if ($_GET['number'] == 8){$hwin=$_GET['bet']*100;$hgain=($_GET['bet']*100)-($_GET['bet']);print " [b]<font color=green>Horse number 8 shocks the world and wins by 2 furlongs! Your ultimate gamble gains you \$$hwin winnings!</font>[/b]";$db->query("UPDATE users SET money=money+({$hgain}) where userid=$userid");}else {print " [b]<font color=red>Horse 8 shocks the world and wins by 2 furlongs, losing you \$$hb.</font>[/b]";$db->query("UPDATE users SET money=money-({$hb}) where userid=$userid");}}{print " Welcome to the Tokyo Racetrack! We have a number of horses for you to bet on today! <table width=75% cellspacing=1 class='table'> <tr style='background:gray'><th>Number</th> <th>Horse Name</th> <th>Odds</th></tr><tr><td>1</td><td>Lightning Thunder</td><td>[b]6/4[/b]</td></tr><tr><td>2</td><td>Eat My Dust</td><td>[b]2/1[/b]</td></tr><tr><td>3</td><td>Three Legged Wonder</td><td>[b]5/1[/b]</td></tr><tr><td>4</td><td>Galiant Loser</td><td>[b]8/1[/b]</td></tr><tr><td>5</td><td>Carl's Superstar</td><td>[b]12/1[/b]</td></tr><tr><td>6</td><td>Fat Donkey</td><td>[b]20/1[/b]</td></tr><tr><td>7</td><td>Galloping Granny</td><td>[b]33/1[/b]</td></tr><tr><td>8</td><td>Won't Need A Photo Finish</td><td>[b]100/1[/b]</td></tr></table> Ready to try your luck? Bet today! <form action='horses.php' method='get'>Bet: \$<input type='text' name='bet' value='50' /> Pick (1-8): <input type='text' name='number' value='1' /> <input type='hidden' name='tresde' value='$tresder' /><input type='submit' value='Play!!' /></form>";} $h->endpage();?>   add to explore.php [url='horses.php?tresde=$tresder']Tokyo Racetrack![/url] ";
  12. Thanks for that! Yeah secured it as far as I can see.
  13. I'm making a mod to put into the free mods section and I think its a good idea, whether or not i can get it working is another thing. Can anyone see the parse error I'm getting here, on the print line? { $hwin=$_GET['bet']*1.5; $hgain=($_GET['bet']*1.5)-($_GET['bet']) print "You look over the crowds, and just about catch a glimpse of the number 1 on the side of the winning horse. You have won \$$hwin!"; $db->query("UPDATE users SET money=money+({$hgain}) where userid=$userid"); }   Thanks guys.
  14. Thanks! I did read the terms, and agreed before I was redirected. Thanks!
  15. ya i did, but once i agree to fair usage thing, it directs me to the new link (404 page) again. :S
  16. does anyone have this file? it says from the link its been moved and i can't access it. thanks :)
  17. bineye

    php question?

    No errors... well there were, but was down to my own stuff. This code worked very well. Thank youuuu!!! :D
  18. bineye

    php question?

    I know this isn't related to game making, but does anyone know why I can't get this to work? This is a small snippet of a league table I'm making, and trying to calculate who wins and loses from the total of goals (worth 3 points) and points (worth, well, 1 point)   if ((($_POST[goal1]*3) + $_POST[point1]) > (($_POST[goal2]*3) + $_POST[point2])) { $sql="INSERT INTO league (W, Points) VALUES ('1','2') WHERE team = $_POST['home']"; "INSERT INTO league (L, Points) VALUES ('1','0') WHERE team = $_POST['away']"; }
  19. bineye

    index?

    Re: index?   thank you very much :-) :mrgreen:
  20. bineye

    jobpoints bug

    Re: jobpoints bug   Are your job points set to 0? It will still show 'job points', but no number
  21. bineye

    index?

    I'm running mccodes v2 on my wamp server, and on every page I'm getting an error: undefined index. Now will these errors still be there when I upload to a proper server, and if so, how do I get rid of them without screwing up my script?
×
×
  • Create New...