Jump to content
MakeWebGames

Free Jail feature Bribe The guard


canibalstew

Recommended Posts

make a file jailbribe.php

 

 

<?

session_start();

require "globals.php";

if($ir['jail']==0)

{

die("You arent in jail!");

}

//set $cost to what you want it to cost

$cost=rand(10000,100000);

$bravec=5;

//set $stat to the stat you want it to use..eg. brave, energy, will etc

$braves='brave';

If ($ir[$money]<$cost or $ir[$brave]<$bravec)

{

die ("Your Dont have enough money to bribe the guard or enough brave to do it.");

}

if(rand(1,100) <= 20)

{

print "You successfully Bribed your way out of the Battle Creek City Jail.";

mysql_query("update users set money=money-$cost, $braves=$braves-$bravec where userid=$userid",$c)or die(mysql_error());

mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c);

}

else

{

$jailtime=(int) rand(1,30);

print "You were caught attempting to bribe your way out of the Battle Creek City Jail.

The officers beat you for a while and added $jailtime minutes to your sentence.";

mysql_query("UPDATE users SET jail=jail+$jailtime WHERE userid=$userid", $c);

mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c);

}

?>

now if you got ver 1.1 you replace the include"globals.php"; with

 

session_start();

require "global_func.php";

if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }

$userid=$_SESSION['userid'];

require "header.php";

$h = new headers;

$h->startheaders();

include "mysql.php";

global $c;

$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());

$ir=mysql_fetch_array($is);

check_level();

$fm=money_formatter($ir['money']);

$cm=money_formatter($ir['crystals'],'');

$lv=date('F j, Y, g:i a',$ir['laston']);

$h->userdata($ir,$lv,$fm,$cm);

$h->menuarea();

last thing is to put a link in your jail your done

if thers anything wrong with it im sure you all will say

Link to comment
Share on other sites

  • 1 year later...

Re: Free Jail feature Bribe The guard

You just removed If

You're unable to view this code.

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

and the $ from

 

You're unable to view this code.

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

 

It should be:

 

You're unable to view this code.

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

 

OR = || in php operators.

Link to comment
Share on other sites

Re: Free Jail feature Bribe The guard

either i cant code lol or this code dont work full stop sorry man nice code and that but probs all over when you are in jail it says ya not and if its the first time you use it it works but after that keeps saying your not in jail when you are i play with when i work it out ill post thanks

Link to comment
Share on other sites

Re: Free Jail feature Bribe The guard

 

You just removed If

You're unable to view this code.

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

and the $ from

 

You're unable to view this code.

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

 

It should be:

 

You're unable to view this code.

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

 

OR = || in php operators.

No i didnt just remove that, I also added if you get caught trying to bribe him you still lose your cash

Link to comment
Share on other sites

Re: Free Jail feature Bribe The guard

Just basically added a line so if you fail the bribe you still lose the bribe money.

Hope that was ok.

 

<?

session_start();

require "globals.php";

if($ir['jail']==0)

{

die("You arent in jail!");

}

//set $cost to what you want it to cost

$cost=rand(10000,50000);

//set $stat to the stat you want it to use..eg. brave, energy, will etc

If ($ir['money']<$cost )

{

die ("Your Dont have enough money to bribe the guard or enough brave to do it.");

}

if(rand(1,100) <= 20)

{

print "You successfully paid $$cost to Bribed your way out of the Torn County Jail.";

mysql_query("update users set money=money-$cost where userid=$userid",$c)or die(mysql_error());

mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c);

}

else

{

$jailtime=(int) rand(1,30);

print "You were caught attempting to bribe your way out of the Torn County Jail.

The officers beat you for a while, take the $$cost anyway and added $jailtime minutes to your sentence.";

mysql_query("update users set money=money-$cost where userid=$userid",$c);

mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c);

mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c);

}

?>

Link to comment
Share on other sites

Re: Free Jail feature Bribe The guard

 

Just basically added a line so if you fail the bribe you still lose the bribe money.

Hope that was ok.

 

<?

session_start();

require "globals.php";

if($ir['jail']==0)

{

die("You arent in jail!");

}

//set $cost to what you want it to cost

$cost=rand(10000,50000);

//set $stat to the stat you want it to use..eg. brave, energy, will etc

If ($ir['money']<$cost )

{

die ("Your Dont have enough money to bribe the guard or enough brave to do it.");

}

if(rand(1,100) <= 20)

{

print "You successfully paid $$cost to Bribed your way out of the Torn County Jail.";

mysql_query("update users set money=money-$cost where userid=$userid",$c)or die(mysql_error());

mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c);

}

else

{

$jailtime=(int) rand(1,30);

print "You were caught attempting to bribe your way out of the Torn County Jail.

The officers beat you for a while, take the $$cost anyway and added $jailtime minutes to your sentence.";

mysql_query("update users set money=money-$cost where userid=$userid",$c);

mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c);

mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c);

}

?>

 

That was allready done with the coded i added above about 5 posts ago

Link to comment
Share on other sites

Re: Free Jail feature Bribe The guard

 

Just basically added a line so if you fail the bribe you still lose the bribe money.

Hope that was ok.

 

<?

session_start();

require "globals.php";

if($ir['jail']==0)

{

die("You arent in jail!");

}

//set $cost to what you want it to cost

$cost=rand(10000,50000);

//set $stat to the stat you want it to use..eg. brave, energy, will etc

If ($ir['money']<$cost )

{

die ("Your Dont have enough money to bribe the guard or enough brave to do it.");

}

if(rand(1,100) <= 20)

{

print "You successfully paid $$cost to Bribed your way out of the Torn County Jail.";

mysql_query("update users set money=money-$cost where userid=$userid",$c)or die(mysql_error());

mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c);

}

else

{

$jailtime=(int) rand(1,30);

print "You were caught attempting to bribe your way out of the Torn County Jail.

The officers beat you for a while, take the $$cost anyway and added $jailtime minutes to your sentence.";

mysql_query("update users set money=money-$cost where userid=$userid",$c);

mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c);

mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c);

}

?>

 

That was allready done with the coded i added above about 5 posts ago

 

I used reloads post but it certainly did not take money off the victim if he failed the bribed, as I said ive added a line so that if you get caught bribing, you still lose the money, Ive highlited the lines ive added which you can see are not in reloads orriginal, Thank you.

Link to comment
Share on other sites

Re: Free Jail feature Bribe The guard

 

Heres a fixed version and much better than the current one.

 

You're unable to view this code.

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

 

~reload

You didnt add anything I allready had that if you get caught trying to bribe him you get jailed and your money gets taken away to.

It is Made bold and underlined so you can see it now, Just incase you "couldnt" before.

 

mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c);

Link to comment
Share on other sites

Re: Free Jail feature Bribe The guard

 

Just basically added a line so if you fail the bribe you still lose the bribe money.

Hope that was ok.

 

<?

session_start();

require "globals.php";

if($ir['jail']==0)

{

die("You arent in jail!");

}

//set $cost to what you want it to cost

$cost=rand(10000,50000);

//set $stat to the stat you want it to use..eg. brave, energy, will etc

If ($ir['money']<$cost )

{

die ("Your Dont have enough money to bribe the guard or enough brave to do it.");

}

if(rand(1,100) <= 20)

{

print "You successfully paid $$cost to Bribed your way out of the Torn County Jail.";

mysql_query("update users set money=money-$cost where userid=$userid",$c)or die(mysql_error());

mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c);

}

else

{

$jailtime=(int) rand(1,30);

print "You were caught attempting to bribe your way out of the Torn County Jail.

The officers beat you for a while, take the $$cost anyway and added $jailtime minutes to your sentence.";

mysql_query("update users set money=money-$cost where userid=$userid",$c);

mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c);

mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c);

}

?>

 

That was allready done with the coded i added above about 5 posts ago

 

I used reloads post but it certainly did not take money off the victim if he failed the bribed, as I said ive added a line so that if you get caught bribing, you still lose the money, Ive highlited the lines ive added which you can see are not in reloads orriginal, Thank you.

 

As you see with my code that you try to claim thats yours it was allready taking money away.

mysql_query("update users set money=money-$cost where userid=$userid",$c);

mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c);

As you see here and if you have a look at the code he submited a good 5 posts after mine whats standing out here??

Is it that he forgot to take away the

mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c);

which allready have my -$cost in it?

So Now do you think you added it?

pfft.

Link to comment
Share on other sites

Re: Free Jail feature Bribe The guard

Reload, I do Appologise I didnt see that and now you explained it clearly and pointed out where it is and also now im fully awake,(It was 4.30am where i was), well thank you for doing it anyway, the members like it, but i did add the text telling the members that they lost the money anyway "take the $$cost anyway", hope you dont mind that....

quite funny, no ones noticed that they are loosing double the money, id better go and take my line out now. Once again Thanks

Link to comment
Share on other sites

Re: Free Jail feature Bribe The guard

 

Reload, I do Appologise I didnt see that and now you explained it clearly and pointed out where it is and also now im fully awake,(It was 4.30am where i was), well thank you for doing it anyway, the members like it, but i did add the text telling the members that they lost the money anyway "take the $$cost anyway", hope you dont mind that....

quite funny, no ones noticed that they are loosing double the money, id better go and take my line out now. Once again Thanks

 

lol no problems mate :P

Link to comment
Share on other sites

  • 10 months 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...