Jump to content
MakeWebGames

veteran

Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Everything posted by veteran

  1. Re: (FREE) Fixed Advertisements on Dabomstew's MCcode v1.1 any chance of posting the link to display the ad.php i know its ad.php?adID=1 (1 being the number of the advert) and how do you view the banners
  2. Re: Lucky Dip Mod serious bugs with this mode please don't use at the moment until myself or someone else on the forums can fix it. the bug is that as long as you have money you can still have goes on the game !!!! :oops:
  3. Re: (FREE) Fixed Advertisements on Dabomstew's MCcode v1.1   ok thanks mate
  4. Re: (FREE) Fixed Advertisements on Dabomstew's MCcode v1.1 where do i find the first part of this code so we can do the database tables and the other parts that are missing!!
  5. here is a mod that i have converted from 'Budget streets' mod, this could probably be modified to be more elegant.. create a new line in users table called 'gamegoes' as an integer and set your day cron to update by one   <?php //Budget streets mod made into a lucky dip mod.. hehe //Author: on_fire (and a bit from veteran) //Converted for Lite by Dabomstew (and veteran) 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']); $h->userdata($ir,$lv,$fm); $h->menuarea(); if($ir['hospital']) { die ("ErrorWhat are you doing out of hospital!! go back and rest. What are you thinking??."); } if($ir['jail']) { die ("ErrorWhat are you doing your in prison!!. What are you thinking??."); } print " "; $cost=($ir[level]*100); // cost of lucky dip if ($_GET['action'] != 'explore') { print "You have only 1 chance each day on the lucky dip, it will cost you £$cost You have {$ir['gamegoes']} turns left for today and will be topped up to 1 at midnight. "; print " "; } else { $steps=abs((int) $_POST['gamegoes']); for($i=0;$i<$steps;$i++) { if ($ir['gamegoes'] < 1) { print("You only have one go per day for the lucky dip. come back another day "); } if ($ir['money'] < $cost+1) { print("You don't have the funds to play "); }else{ $chance = rand(1,10); //total of random chances mysql_query("update users set gamegoes=gamegoes-1 where userid=$userid",$c); mysql_query("update users set money=money-$cost where userid=$userid",$c); if ($chance == 1) { //random money $gained=rand(300,400)*$ir['level']; print "You have won [b]£$gained[/b] "; mysql_query("update users set money=money+$gained where userid=$userid",$c); } if ($chance == 2) { //random money $gain = rand(90,150)*(floor($ir['level']/2)+1); print "You have won [b]£$gain[/b]. "; mysql_query("update users set money=money+$gain where userid=$userid",$c); } if ($chance == 3) { //random money $gain = rand(200,250)*(floor($ir['level']/2)+1); print "You have won [b]£$gain[/b]. "; mysql_query("update users set money=money+$gain where userid=$userid",$c); } if ($chance == 4) { //random item amount $gain = rand(1,5); print "You have won [b]$gain[/b] Red Ball(s) "; mysql_query("INSERT INTO inventory VALUES('',1,$userid,$gain)",$c); } if ($chance == 5) { //random item amount $gain = rand(4,9); print "You have won [b]$gain[/b] crystals."; mysql_query("update users set crystals=crystals+$gain where userid=$userid",$c); } if ($chance == 6) { //random item amount $gain = rand(1,5); print "You have won [b]$gain[/b] morphine(s)"; $itemidexplore = 10; mysql_query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,$gain)",$c); print" "; } if ($chance == 7) {//random item amount $gain = rand(1,5); print "You have won [b]$gain[/b] co proxamol(s)"; mysql_query("INSERT INTO inventory VALUES('',18,$userid,$gain)",$c); } if ($chance == 8) { //random money $gained=rand(200,250)*$ir['level']; print "You have won [b]£$gained[/b] "; mysql_query("update users set money=money+$gained where userid=$userid",$c); } if ($chance == 9) {//random items i have used the first 26 items in the inventory $gain = rand(1,26); $q=mysql_query("SELECT i.*,it.* FROM items i LEFT JOIN itemtypes it ON i.itmtype=itmtypeid WHERE i.itmid=$gain LIMIT 1",$c); $t=mysql_fetch_array($q); print "You have won a/an {$t['itmname']}"; mysql_query("INSERT INTO inventory VALUES('',$gain,$userid,1)",$c); } if ($chance == 10) {//random dontator days $gain = rand(1,5); print "You have won [b]$gain[/b] donator days!!!! "; mysql_query("update users set donator=donator+$gain where userid=$userid",$c); } } } if($ir['gamegoes']==0) { print "Sorry, you only have one go each day! "; } } $h->endpage; ?>   you will have to change £ to $
  6. Free Jail Features V1.00000000 Relesed! just made some code so you can bail the prison offender out for a small amount of money, bail price is work out on level * time in jail * 10, but can easily be changed. i know its simple but it works... create a bailm.php...   <?php 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(); global $ir,$c,$userid; if ($ir['jail'] > 0) die("You cannot bail while you are in prison > [url='jail.php']Back[/url]"); $qq=mysql_query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=mysql_fetch_array($qq); $cost=($r['level']*$r[jail]*10); ///bail cost/// if ($ir['userid'] == $_GET['ID']) die("You cannot bail yourself out of prison > [url='jail.php']Back[/url]"); if ($r['jail'] = 0) ///you you will have to change £ to $ ///// { die("This User isnt in prison > [url='jail.php']Back[/url]"); } if ($ir['userid'] != $_GET['ID']) if($ir['money']>$cost-1) { print "<h3>Bail Price</h3> "; mysql_query("UPDATE users SET money=money-$cost WHERE userid={$ir[userid]}",$c); print"You just bailed $r[username]' out of prison, for £$cost [url='jail.php']> Back[/url]"; mysql_query("UPDATE users SET jail=0 WHERE userid={$_GET['ID']}",$c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bailed you out of prison for £$cost",$c); } else { print "<h3>Bail not Complete</h3> You dont have enough funds. It will cost you £$cost to bail $r[username] out of prison [url='jail.php']> Back[/url]"; } $h->endpage(); ?>   in the jail.php find <td>Bust</td> just after put <td>Bail</td> <td>Bail Cost</td>   find.. while($r=mysql_fetch_array($q)) { just after put... $cost=($r['level']*$r[jail]*10); ///bail price   find... <td>[url='bail.php?ID={$r[']Bust[/url]</td> just after put.. <td>[url='bailm.php?ID={$r[']Bail[/url]</td> <td>£$cost</td>   just change the currency from £ to \$
  7. validation mod   had another go and it still don't work :hmmm: could it be something with the web-host im using
  8. validation mod will this work for the lite version as i have done everything including the png image and the 5 digit number still wont work :no:
×
×
  • Create New...