Jump to content
MakeWebGames

solar

Members
  • Posts

    38
  • Joined

  • Last visited

    Never

solar's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. This mod will realese the user from the hospital, yes its just a edited jailbail.php and anyone could of done it enjoy. Create a file called medical.php with the following in. <?php include "globals.php"; if($ir['medical']) { die("This person has alredy been healed in the last 5 minitues please try again later."); } $_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!"); } $cost=$r['level']*10; $cf=number_format($cost); if($ir['money'] < $cost) { die("Sorry, you do not have enough money for the medical fee {$r['username']}. You need \$$cf."); } print "The sergery was a sucess {$r['username']} has been released for a total fee of \$$cf. > [url='hospital.php']Back[/url]"; $db->query("UPDATE users SET money=money-{$cost} WHERE userid=$userid"); $db->query("UPDATE users SET medical=10 WHERE userid={$ir['userid']}"); $db->query("UPDATE users SET hospital=0 WHERE userid={$r['userid']}"); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] payed for your medical fee.", $c); $h->endpage(); ?>   Run this sql Query   ALTER TABLE `users` ADD `medical` int(11) NOT NULL default '0';   open hospital.php find: {$r['hospreason']}</td></tr>";   Replace with: {$r['hospreason']} [[url='medical.php?ID={$r[']Private care[/url]]</td></tr>";   open cron_fivemins.php add: $db->query("UPDATE users SET medical=0");   that can be added to any cron and the money can be easily changed if your game has actice gang wars i suggest adding in to hourly cron maybe daily
  2. Re: Login & Register $10   Wow that realy helps me thanks...
  3. I will be selling a login and register page for $10 or $5 for login or register Login: http://img208.imageshack.us/img208/8601/logineq6.jpg Register: http://img241.imageshack.us/img241/2798/registermx4.jpg File contains: login.php register.php tos.php contact.php and 4 images If you woud like to purchase this pelase post here and/or mail [email protected] Also a banner can be made for a price :wink:
  4. Re: Item Type Upgrade sorry i dont have enough time to add delete item type
  5. Re: Item Type Upgrade Edit: has been tested now works fine, but please still comment Find: if($_POST['name']) { $db->query("INSERT INTO itemtypes VALUES(NULL, '{$_POST['name']}')"); print "Item Type {$_POST['name']} added."; stafflog_add("Added item type {$_POST['name']}"); } else { print "<h3>Add Item Type</h3><hr /> <form action='staff_items.php?action=newitemtype' method='post'> Name: <input type='text' name='name' /> <input type='submit' value='Add Item Type' /></form>"; } } $h->endpage(); ?>   Replace with:   if($_POST['name']) { $db->query("INSERT INTO itemtypes VALUES(NULL, '{$_POST['name']}')"); print "Item Type {$_POST['name']} added."; stafflog_add("Added item type {$_POST['name']}"); print " <hr /> <h3>Add Another</h3><hr /> <form action='staff_items.php?action=newitemtype' method='post'> Name: <input type='text' name='name' /> <input type='submit' value='Add Item Type' /></form>"; } else { print "<h3>Add Item Type</h3><hr /> <form action='staff_items.php?action=newitemtype' method='post'> Name: <input type='text' name='name' /> <input type='submit' value='Add Item Type' /></form> <h3>Curent types</h3><hr /> Item Type's: ".itemtype_dropdown($c,'itmtype',$itemi['itmtype'])." "; } } $h->endpage(); ?>
  6. so ive been looking around the forums now for about 30 mins ive found a few scripts that say they block same ips but they dont seem to work for me :(, and all the other posts say look on forums...... can somone post a register.php that blocks multis or some code with some instructions to stop it please. im usein V2
  7. Re: HELP PLEASE even if the item cannot be bought you still need to add a buy price
  8. Re: Problem With class_db_mysql.php do you have a folder called class with the class_db_mysql.php file in it?
  9. Re: Header.php all sorted now
  10. hi does anyone have the original mccodes v2 header.php? i have changed the layout on mine and dont like it and i would like to go back to the normal one but i have no back up :-D
  11. Re: [FREE][CRYSTAL GYM] V1 slightly improved cgym.php <?php /* Crystal gym modded by Solar */ 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $out=""; if ($ir['hospital'] || $ir['jail']) { print "You cannot use the gym while in Hospital or Jail,Please come back later."; exit; } $_GET['times']= abs((int) $_GET['times']); if(isset($_GET['train'])) { $tgain=0; for($i=1;$i<=$_GET['times'] && $ir['crystals'] > 0;$i++) { if ($ir['crystals'] > 0) { $gain=rand(1,3)/rand(200,800)*rand(200,800)*(($ir['will']+20)/150); $tgain+=$gain; if ($_GET['train']=="IQ") { $gain/=100; } $ir[$_GET['train']]+=$gain; $egain=$gain/10; $ts=$ir[$_GET['train']]; $st=$_GET['train']; mysql_query("UPDATE userstats SET $st=$st+".$gain." WHERE userid=$userid",$c) or die("UPDATE userstats SET $st=$st+$gain,crystals=crystals-1,exp=exp+$egain WHERE userid=$userid ".mysql_error()); $wu=(int) (rand(1,3)); if ($ir['will'] >= $wu) { $ir['will']-=$wu; mysql_query("UPDATE users SET crystals=crystals-1,exp=exp+$egain,will=will-$wu WHERE userid=$userid",$c); } else { $ir['will']=0; mysql_query("UPDATE users SET crystals=crystals-1,exp=exp+$egain,will=0 WHERE userid=$userid",$c); } $ir['crystals']-=1; $ir['exp']+=$egain; } else { $out="You do not have enough crystals to train."; } } $stat=$ir[$st]; $i--; $out="You begin training your $st. You have gained $tgain $st by training it $i times. You now have $stat $st and {$ir['crystals']} crystals left. "; } else { $out="<h3>Crystal Gym:<h3>"; } $h->userdata($ir,$lv,$fm); $h->menuarea(); print $out; print "Enter the amount of times you wish to train and choose the stat to train. You can train up to {$ir['crystals']} times. <form action='cgym.php' method='get'> <input type='text' name='times' value='1' /><select type='dropdown' name='train'> <option value='strength'>Strength</option> <option value='agility'>Speed</option> <option value='labour'>Work Skill</option> <option value='iq'>IQ</option> <option value='guard'>Defence</option></select> <input type='submit' value='Train!' /></form>"; $h->endpage(); ?>   i only made it because some people were asking for it. I wasnt going to use i just thought it might be useful for some people
  12. Re: [mccode] User Verification Mod for V2   i agree
  13. Re: staff applications   [/quote] Where do I add this code to ? Thanks agin for any help givin :? [/quote] find $h->endpage(); ?>   then add that before it and make sure u change admin.php to staff.php
  14. Re: [TGM] Crystal Gym [TGM] y would people buy this if they can just change 'energy' to 'crystals' and then edit how mutch they get per train???
  15. Re: [FREE][CRYSTAL GYM] Thanks :-D first time i tryed i kept getting an error saying abusers not allowed but i managed to get rid of dat lol
×
×
  • Create New...