Jump to content
MakeWebGames

Hospital Escape for V2


ronhouston2

Recommended Posts

<?php

include "globals.php";

if($ir['energy'] < 10)

{

die("Sorry, it costs 10 energy to help someone escape from hospital. You only have {$ir['energy']} energy. Come back later.");

}

if($ir['jail'])

{

die("You cannot help escape people from hospital while in jail.");

}

if($ir['hospital'])

{

die("You cannot help escape people from hospital while in hospital.");

}

$_GET['ID']=abs((int) $_GET['ID']);

$r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"));

if(!$r['userid'])

{

die("Invalid user");

}

if(!$r['hospital'])

{

die("That user is not in hospital!");

}

$mult=$r['level']*$r['level'];

$chance=min(($ir['crimexp']/$mult)*50+1, 95);

if(rand(1,100) < $chance)

{

$gain=$r['level']*5;

print "You successfully helped {$r['username']}escape out of hospital.

> Back";

$db->query("UPDATE users SET crimexp=crimexp+{$gain} WHERE userid=$userid");

$db->query("UPDATE users SET jail=0 WHERE userid={$r['userid']}");

event_add($r['userid'], "{$ir['username']} busted you out of jail.", $c);

}

else

{

print "While trying to help escape your friend from hospital, a Cop spotted you and dragged you into jail yourself. Unlucky!

> Go to Jail";

$time=min($mult, 100);

$db->query("UPDATE users SET jail=$time, jail_reason='Caught trying to help escape from hospital {$r['username']}' WHERE userid=$userid");

event_add($r['userid'], "{$ir['username']} was caught trying to bust you out of jail.", $c);

}

$h->endpage();

?>

 

heres anouther new mod i made Escape From Hospital you can help spmeone escape from the hospital if you get caught you will be sent to JAIL

[Hospital Escape] add this into the Hospital for the link to help spmeone escape from the Hospital

Link to comment
Share on other sites

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...