Jump to content
MakeWebGames

[mccode] Poker Script for v1


oxidati0n

Recommended Posts

Re: [mccode] Poker Script for v1

My bad, At first i was going to use cards, but its a 4 hour job to get it exact, And i'm really not in the mood for something that long and just give it away, So i removed cards at last minute, Sorry for any inconvience - You can rename it to BlackJack or Go-Fish if you like ;)

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Re: [mccode] Poker Script for v1

1 little minor glitch that I found. Just not needed code.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Should be

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

Re: [mccode] Poker Script for v1

ok on my poker scirpt i think it was the old 1 tho everytime you entered the room you won so all you has to do was enter play once exit enter play once exit and so on to gain the chips and get cash for them...

second one was you could go into minus money when buying chips.

i probs have the old script tho :wink:

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...

Re: [mccode] Poker Script for v1

this is the v2 mod i just converted

if its worng mail me

 

<?php

/*-----------------------------------------------------

An Established Modification Given Free by oxidati0n at CE!

Why don't you join the biggest online RPG gaming community with replies of your topic within 5 minutes?

Well Then Visit

http://www.criminalexistence.com/forum/ ... gnup;begin

It's fast, safe and free! - No private details are required

-----------------------------------------------------*/

include "globals.php";

print "<h3>Poker</h3>";

//-Configuration

$ChipPrice=500; // Price Per Chip in Poker

$times=350; //-- how many rounds the poker game should last

if(!$_SESSION['chips']) { $chiptxt="no"; } else {$chiptext=$_SESSION['chips']; }

if(!$_GET['action'])

{

if($_SESSION['game'] == 1) { die("You cannot visit here while in a game!"); }

print "Welcome to the All-Stars Poker Room!

This Place is either where you have your day or you don't!

 

Warning: If you enter the game and decide to quit before finished, You lose all your chips

 

You currently have $_SESSION[chips] chips!

<table width=50% border=1 style=\"border:groove;\" bordercolor=orange>

<tr><td>

Buy Chips</td></tr>

<tr><td>Back to Game</td></tr>";

if($_SESSION['chips'] > 0)

{

print "<tr><td>

Start Your Game</td></tr><tr><td>

Sell Chips</td></tr>";

}

print "</table>";

} else if($_GET['action'] == "game" and $_SESSION['game'] == 1)

{

if($_SESSION['times'] == 0)

{

print "You have used up all your turns and have finished your Poker game!

Click here to visit home and use up all your chips on whatever you want

";

$_SESSION['game']=0;

$h->endpage();

exit();

}

if($_SESSION['chips'] < 0)

{

print "You have used up all your chips and your broke!

You were sent out of the poker room!

Back

";

$_SESSION['chips']=0;

$_SESSION['game']=0;

$h->endpage();

exit();

}

print "pokerroommo8.png

";

if($_POST['chips_use'] < $_SESSION['chips'] and $_POST['chips_use'] > 0 and $_POST['chips_use'])

{

$chances=rand(150,750);

if($chances > 450)

{

$used=$_POST['chips_use']*2;

print "I'm sorry you lost $used chips!

<hr />";

$_SESSION['chips']=$_SESSION['chips']-$used;

 

} else {

$won=$_POST['chips_use']*5;

print "Congrats, You won and were credited $used chips!

<hr />";

$_SESSION['chips']=$_SESSION['chips']+$won;

 

}

} else if(isset($_GET['gambleall']))

{

$chipam=(int) rand(1,$_SESSION['chips']);

$chances=rand(150,750);

if($chances > 350)

{

$used=$chipam*2;

print "I'm sorry you lost $used chips!

<hr />";

$_SESSION['chips']=$_SESSION['chips']-$used;

} else {

$won=$chipam*5;

print "Congrats, You won and were credited $used chips!

<hr />";

$_SESSION['chips']=$_SESSION['chips']+$won;

}

}

print "What do you want to do

You have <font color=orange>$_SESSION[chips]</font> chips left

You have <font color=green>\$".number_format($ir['money'])."</font> money left

You have <font color=teal>\$".number_format($_SESSION['chips']*$ChipPrice)."</font> money from chips

<table width=50% border=1><tr><td>Use My Turn

<form action='poker.php?action=game' method='post'>Chips to Use :<input type='text' name='chips_use' value='$_SESSION[chips]'>

<input type=submit value='-Take My Turn-'></form>

</td></tr></table>

Gamble Random

Quit Game

";

$_SESSION['game']=1;

} else if($_GET['action'] == "gamequit" and $_SESSION['game'] == 1)

{

if($_GET['next'] == "confirmed")

{

$_SESSION['times']=0;

$_SESSION['game']=0;

print "You have left the tournament!

Back

Quit now!

No, stay in the poker room

";

}

} else if($_GET['action'] == "startgame")

{

if($_SESSION['game'] == 1) {

print "You have already started the game

Click here to go back to your table

";

exit(); }

if($_SESSION['chips'] == 0)

{

print "You have no chips, So you cannot enter!

Back

";

$h->endpage();

exit();

}

print "You have started the game

Click here to go to your table

";

$_SESSION['game']=1;

$_SESSION['times']=$times;

} else if($_GET['action'] == "sellchips")

{

if($_SESSION['game'] == 1) { die("You cannot buy chips while you are in a game"); }

if($_SESSION['chips'] == 0)

{

print "You don't have any chips to sell dude!

Back

";

} else if($_POST['chips'] > 0)

{

if($_POST['chips'] > $_SESSION['chips'])

{

print "I'm sorry you don't have that many chips in your command

Back

";

} else {

$cashtopay=$_POST['chips']*$ChipPrice;

mysql_query("UPDATE users SET money=money+$cashtopay WHERE userid=$userid");

$_SESSION['chips']=$_SESSION['chips']-$_POST['chips'];

print "You have sold $_POST[chips] chip's and you have been paid \$$cashtopay!

Back

";

}

} else {

if($_POST['chips'] < 0)

{

if($_SESSION['abused'] == "ONCEA")

{

print "<font color=red>Thats it you've cheated twice, I'll just put you in hospital for 50 minutes and you get can lost cause i get all your chips, Your toasted fool!</font>

";

mysql_query("UPDATE users SET hospital=50, hospreason='Tryed to Cheat at the Poker House' WHERE userid=$userid");

$_SESSION['chips']=0;

$_SESSION['abused']=0;

$h->endpage();

exit();

}

print "<font color=red>Thats it, Cheat One more time and your toasted!</font>

";

$_SESSION['abused']="ONCEA";

$h->endpage();

exit();

}

print "You currently have $_SESSION[chips] You can sell

<form action='poker.php?action=sellchips' method='post'>

<table width=90% border=1><tr><th>Chips</th><td><input type='text' name='chips' value='$_SESSION[chips]'></td></tr>

<tr><th>PPC (Price Per Chip)</th><td>\$".number_format($ChipPrice)."</td></tr>

<tr><td colspan=2><input type=submit value='Sell Chips'></td></tr>

</table></form>";

}

} else if($_GET['action'] == "buychips")

{

if($_SESSION['game'] == 1) { die("You cannot buy chips while you are in a game"); }

if($_POST['chips']> 0)

{

$POKER['chipprice']=$_POST['chips']*$ChipPrice;

if($_POST['chipprice'] > $_POST['money'])

{

print "I'm sorry you don't have enough money to buy $_POST[chips] chips

Back

";

} else {

$new['chips']=$_SESSION['chips']+$_POST['chips'];

$_SESSION['chips']=$new['chips'];

mysql_query("UPDATE users SET money=money-$POKER[chipprice] WHERE userid=$userid");

print "You bought <font color=orange>$_POST[chips]</font> chips for <font color=green>\$".number_format($POKER[chipprice])."</font>!

You must not logout or you will lose all your chips, These chips are only allowed now during your session.

Back

";

}

} else {

if($_POST['chips'] < 0)

{

if($_SESSION['abused'] == "ONCE")

{

print "<font color=red>Thats it you've cheated twice, I'll just put you in hospital for 50 minutes and you get can lost cause i get all your chips, Your toasted fool!</font>

";

mysql_query("UPDATE users SET hospital=50, hospreason='Tryed to Cheat at the Poker House' WHERE userid=$userid");

$_SESSION['chips']=0;

$_SESSION['abused']=0;

$h->endpage();

exit();

}

print "<font color=red>Thats it, Cheat One more time and your toasted!</font>

";

$_SESSION['abused']="ONCE";

$h->endpage();

exit();

}

print "Buy Chips

<form action='poker.php?action=buychips' method='post' name='buychips'>

<table width=50% border=1><tr><th>Chips</th><td> <input type='text' name='chips' size=6 maxlength=4></td></tr>

<tr><td colspan=2> </td></tr>

<tr><th>PPC (Price Per Chip)</th><td>\$".number_format($ChipPrice)."</td></tr>

<tr><td colspan=2><input type=submit value='-Purchase Chips-'></td></tr>

</table></form>";

}

} else {

print "ERROR!

You have selected an invalid function, Please check back or Go through the side menu

Back

";

}

$h->endpage();

?>

Link to comment
Share on other sites

  • 1 month later...

Re: [mccode] Poker Script for v1

Yea, this script is bugged just to let you all know. Every game I have seen it in, I have been able to buy 9999 chips and go into negative money on hand. It takes only a matter of time to max the economy out once ya start playing and selling the chips off. If you have 1$ on hand, just simply go buy 9999 chips or the max it will let you. Doesnt stop you at all so if you guys are using this I would post some kind of fix If I were you otherwise you jus gave everyone in your games free cash.

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...
  • 2 months later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...