Jump to content
MakeWebGames

-BRAIDZ-

Members
  • Posts

    403
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by -BRAIDZ-

  1. Haha true, if i had the money to buy the mccodes script I would. But unfortunately at the moment I do not have that kind of money as I am currently paying for my father's funeral expenses. And how do they get attacked? So I know what to look for and patch it?
  2. No incorrect, I asked about it four years ago, this is the first time since that I've been back on here, due to mouth aches such as yourself. And I was only young back then and took none of what I was told into account. And what design may I ask?
  3. It's a simple question you douche, now **** off you're not wanted here. Didn't your mother ever tell you, if you don't have nothing nice to say, then don't say nothing at all?
  4. Okay, and how do you get the license to work with Ravan's?
  5. How do I get a valid licence?
  6. True that mate, I don't really care though I am happy using Ravan's and my personal opinion is it is a much better layout than MCC, I find MCC to be pretty plain and boring
  7. True, thanks for clarifying that, and I have used Ravan's for years, and once got hacked due to the ****ty security back then this was almost 4-5 years ago, but since then it is much more secure, well so I think anyways. I just don't want to really give out my game URL then have some smartass try take it down. And also I've compared both mccodes and Ravan's Scripts, and they're similar but are heaps different, half of the mods you find on here will not work on Ravan's, but I have got a heap to work though
  8. I read that Ravan's Mafia Script is a rip off version of McCodes. Is this true? Because the way i see it, is if it is true, and it is an illegal version then why are they still selling it? Because in all honesty I'd much rather Ravan's over McCodes any day, but each too their own i guess. I just want to find out if it's true or not, and is there any proof of it being an illegal rip off version of McCodes?
  9. Can someone help me with one part of my code please. I want under "You must complete atleast 10,000 crimes to access this area" "You have completed 'number of crimes done' crimes" <?php session_start(); require_once "globals.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; include_once "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']); if($ir['crimesdone'] < 10000) { print"You must complete atleast 10,000 crimes to access this area."; print "<br /><a href='honorawards.php'>Go Back to Honor Awards</a><br />"; $h->endpage(); exit; } $q=mysql_query("SELECT * FROM honorawards WHERE userid=$userid AND list='10000crimes'",$c); if(mysql_num_rows($q)) { print "You have already recieved that award you can only recieve each award one time!<br />"; print "<a href='honorawards.php'>Back to Honor Awards</a><br />"; $h->endpage(); } else { mysql_query("INSERT INTO honorawards values ($userid,'10000crimes')",$c); mysql_query("UPDATE users SET honor=honor+1 WHERE userid=$userid",$c); print "Award Credited!"; print "<a href='honorawards.php'>Back to Honor Awards</a><br />"; } ?>
  10. Does anyone have a working version of this for V2?
  11. I do that a fair bit, but you see so many different ways how people code it just confuses the absolute crap out of me - - - Updated - - -   I do that a fair bit, but you see so many different ways how people code it just confuses the absolute crap out of me
  12. Thanks mate, means a lot, where is the best and quickest way to learn PHP? I know some basic stuff about the language. But just not all the fancy stuff haha I've just really been learning off Scripts I've seen on here and had to edit in or edit out things, but that's all too easybwhen 85 percent of the time you're just copying and pasting it
  13. All good now, thank you mate, I just didn't copy and paste it properly (how you stuff that up I'll never know) but it is now working, thank mate
  14. Now it's returning a blank white screen.. This is really starting to annoy the living **** out of me haha. Can't imagine what you blokes are thinking. But thanks for the help I appreciate it. - - - Updated - - -   No error, just nothing is coming up, like it's meant to say that I've traded my honor award in for whatever stat or however much cash, but it doesn't, it just how my mainmenu and header and stuff with nothing else
  15. I am still encountering the same problem as before it was converted properly. Would you have any idea why this would be? Refer to my last comment
  16. Thank you, but I am still encountering the same problem. When I exchange a honor for say 2 mil cash, I should get a print saying You traded 1 Honor Awards for $2,000,000 But I am not getting this response. Is there any errors in the code anywhere that could be preventing this from happening?
  17. The mod is working just when I go to exchange the Honor it just shows my header, mainmenu and nothing else. So pretty much just all the globals stuff
  18. So like this? <?php session_start(); require_once "globals.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; include_once "mysql.php"; global $c; $is=$db->("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']); if(!$_GET['spend']) { print "Welcome to the Honor Award Exchange Center!<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> What would you like to spend your Honor Awards on?<br /> <br /> <a href='HonorExchange.php?spend=IQ'>IQ - 100 IQ per Honor Award</a><br /> <a href='HonorExchange.php?spend=labour3'>Trade for Labour Points - 3,000 Labour Points per Honor Award</a><br /> <a href='HonorExchange.php?spend=guard3'>Trade for Defense - 3,000 Defense per Honor Award</a><br /> <a href='HonorExchange.php?spend=agility3'>Trade for Agility - 3,000 Speed per Honor Award</a><br /> <a href='HonorExchange.php?spend=strength3'>Trade for Strength - 3,000 strength per Honor Award</a><br /> <a href='HonorExchange.php?spend=money'>Money - \$2,000,000 per Honor Award</a><br />"; } else if($_GET['spend'] == 'IQ') { print "Type in the amount of Honor Awards you want to swap for IQ.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = 100 IQ.<form action='HonorExchange.php?spend=IQ2' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'IQ2') { $_POST['honor']=(int) $_POST['honor']; if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=IQ'>Back</a>"; } else { $iqgain=$_POST['honor']*100; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor']); $_POST['honor']=abs((int)($_POST['honor'])); $db->("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid",$c); $db->("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for $iqgain IQ."; } } else if($_GET['spend'] == 'labour3') { print "Type in the amount of Honor Awards you want to swap for labour points.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = 300,000 labour points.<form action='HonorExchange.php?spend=labour4' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'labour4') { $_POST['honor']=(int) $_POST['honor']; if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=labour3'>Back</a>"; } else { $labourgain=$_POST['honor']*3000; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); $db->("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid",$c); $db->("UPDATE userstats SET labour=labour+$labourgain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for $labourgain labour points."; } } else if($_GET['spend'] == 'guard3') { print "Type in the amount of Honor Awards you want to swap for Defense.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = 3,000 Defense.<form action='HonorExchange.php?spend=guard4' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'guard4') { $_POST['honor']=(int) $_POST['honor']; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=guard3'>Back</a>"; } else { $guardgain=$_POST['honor']*3000; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); $db->("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid",$c); $db->("UPDATE userstats SET guard=guard+$guardgain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for $guardgain Defense."; } } else if($_GET['spend'] == 'agility3') { print "Type in the amount of Honor Awards you want to swap for Agility.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = 3,000 Agility.<form action='HonorExchange.php?spend=agility4' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'agility4') { $_POST['honor']=(int) $_POST['honor']; if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=agility3'>Back</a>"; } else { $agilitygain=$_POST['honor']*3000; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); $db->("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid",$c); $db->("UPDATE userstats SET agility=agility+$agilitygain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for $agilitygain Agility."; } } else if($_GET['spend'] == 'strength3') { print "Type in the amount of Honor Awards you want to swap for Strength.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = 3,000 Strength.<form action='HonorExchange.php?spend=strength4' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'strength4') { $_POST['honor']=(int) $_POST['honor']; if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=strength3'>Back</a>"; } else { $strengthgain=$_POST['honor']*3000; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); $db->("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid"); $db->("UPDATE userstats SET strength=strength+$strengthgain WHERE userid=$userid"); print "You traded {$_POST['honor']} Honor Awards for $strengthgain Strength."; } } else if($_GET['spend'] == 'money') { print "Type in the amount of Honor Awards you want to swap for \$\$\$.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = \$2,000,000.<form action='HonorExchange.php?spend=money2' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'money2') { $_POST['honor']=(int) $_POST['honor']; if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=money'>Back</a>"; } else { $iqgain=$_POST['honor']*2000000; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); $_POST['money']=strip_tags($_POST['money']); $_POST['money']=mny_stripfmt($_POST['money'], ENT_QUOTES); $_POST['money']=abs($_POST['money']); $db->("UPDATE users SET honor=honor-{$_POST['honor']},money=money + $iqgain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for \$$iqgain."; } } $h->endpage(); ?>
  19. Okay thank you :)
  20. 2 it works perfectly fine just the problem I'm having here, I need it for v2
  21. I figured out the DB issue but had to remove the event add saying there was no winner, it was saying there was an error it was on line 103 I think <?php include "config.php"; include "global_func.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) $lotteryDetails = mysql_query("SELECT * FROM lotteryDetails"); $ld = mysql_fetch_assoc($lotteryDetails); $winNumbers = array(); for($i = 0; $i < 6; $i++) { $num = mt_rand(1,46); if(empty($winNumbers)) { array_push($winNumbers, $num); } else { while(in_array($num, $winNumbers)) { $num = mt_rand(1,46); } array_push($winNumbers, $num); } } sort($winNumbers); $wn = implode(",", $winNumbers); $getTickets = mysql_query("SELECT * FROM lotterytickets"); $jackpot = (mysql_num_rows($getTickets) * $ld['lotprice']) + $ld['lotjackpot']; $zero = 0; $one = 0; $two = 0; $three = 0; $four = 0; $five = 0; $six = 0; $users = array(); while($gt = mysql_fetch_assoc($getTickets)) { $yourNumbers = explode(",", $gt['numbers']); sort($yourNumbers); $uID = abs(@intval($gt['userid'])); if(empty($users)) { array_push($users, $uID); } else { if(!in_array($uID, $users)) { array_push($users, $uID); } } $correct = 0; foreach($yourNumbers as $yn) { if(in_array($yn, $winNumbers)) { $correct++; } } if($correct == 0) { $zero++; } if($correct == 1) { $one++; } if($correct == 2) { $two++; } if($correct == 3) { $three++; } if($correct == 4) { $four++; } if($correct == 5) { $five++; } if($correct == 6) { $six++; } $updateTicket = ("UPDATE lotterytickets SET correct = ". abs(@intval($correct)) ." WHERE id = ". abs(@intval($gt['id'])) .""); mysql_query($updateTicket) OR die("Could not update ticket ID ". $gt['id'] .": ". mysql_error()); } $potWin = array(); $countUsers = count($users); if(!empty($users)) { for($ui = 0; $ui < $countUsers; $ui++) { $selectCorrect = mysql_query("SELECT correct, id, userid, numbers FROM lotterytickets WHERE userid = ". abs(@intval($users[$ui])) .""); $event = "<b><u>This Weeks Anarchy 46 Winning Numbers Are: ". $wn .".</u> "; $event .= "The Results From Your ". abs(@intval(mysql_num_rows($selectCorrect))) ." Lottery Tickets: "; $nowin = array(0,1,2); $total = 0; while($sc = mysql_fetch_assoc($selectCorrect)) { $event .= "Ticket Numbers: ". mysql_real_escape_string($sc['numbers']) .""; if(in_array($sc['correct'], $nowin)) { $event .= "<i> -- ". $sc['correct'] ." Matching Number(s) (no winnings)</i> "; } else { if($sc['correct'] == 3) { $winnings = ($ld['lotprice'] + (floor($ld['lotprice'] * 0.5))); } if($sc['correct'] == 4) { $winnings = ($ld['lotprice'] + (floor($ld['lotprice'] * 0.8))); } if($sc['correct'] == 5) { $winnings = ($ld['lotprice'] + (floor($ld['lotprice'] * 1.4))); } if($sc['correct'] == 6) { $winnings = ($ld['lotprice'] + (floor($jackpot/$six))); array_push($potWin, $users[$ui]); } $event .= "<i> -- ". $sc['correct'] ." Matching Numbers (Won \$". number_format($winnings) .")</i> "; $total += $winnings; } } $event .= "You Won A Total Of \$". number_format($total) ."."; $subevent = mysql_real_escape_string(trim($event)); $giveWinnings = ("UPDATE users SET money = money + ". abs(@intval($total)) ." WHERE userid = ". abs(@intval($users[$ui])) .""); mysql_query($giveWinnings) OR die("Could not give userid ". $ui ." Water: ". mysql_error()); } if(!empty($potWin)) { $winners = implode(",", $potWin); } elseif(empty($potWin)) { $winners = "NA"; } $insertDone = ("INSERT INTO lotterydone (ldID, ldNUMBERS, ldZERO, ldONE, ldTWO, ldTHREE, ldFOUR, ldFIVE, ldSIX, ldPOT, ldPOTWIN, ldTIME) VALUES('','". $wn ."', ". $zero .", ". $one .", ". $two .", ". $three .", ". $four .", ". $five .", ". $six .", ". $jackpot .", '". $winners ."', UNIX_TIMESTAMP())"); mysql_query($insertDone) OR die("Could not insert into lottery done: ". mysql_error()); if($six == 0) { $jp = $jackpot; } elseif($six > 0) { $jp = 0; } $updateJackpot = ("UPDATE lotteryDetails SET lotjackpot = ". abs(@intval($jp)) .""); mysql_query($updateJackpot) OR die("Could not update jackpot: ". mysql_error()); } else { $db->query("INSERT INTO events VALUES('',$userid,UNIX_TIMESTAMP(),0,'$text= No Lottery Winner This Week')"); } $truncate = ("TRUNCATE TABLE lotterytickets"); mysql_query($truncate) OR die("Could not truncate: ". mysql_error()); ?>
  22. I need a little help with the please. It isn't crediting users the state nor taking the Honor Award off them. Can someone please have a look at this for me. <?php session_start(); require_once "globals.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; include_once "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']); if(!$_GET['spend']) { print "Welcome to the Honor Award Exchange Center!<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> What would you like to spend your Honor Awards on?<br /> <br /> <a href='HonorExchange.php?spend=IQ'>IQ - 100 IQ per Honor Award</a><br /> <a href='HonorExchange.php?spend=labour3'>Trade for Labour Points - 3,000 Labour Points per Honor Award</a><br /> <a href='HonorExchange.php?spend=guard3'>Trade for Defense - 3,000 Defense per Honor Award</a><br /> <a href='HonorExchange.php?spend=agility3'>Trade for Agility - 3,000 Speed per Honor Award</a><br /> <a href='HonorExchange.php?spend=strength3'>Trade for Strength - 3,000 strength per Honor Award</a><br /> <a href='HonorExchange.php?spend=money'>Money - \$2,000,000 per Honor Award</a><br />"; } else if($_GET['spend'] == 'IQ') { print "Type in the amount of Honor Awards you want to swap for IQ.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = 100 IQ.<form action='HonorExchange.php?spend=IQ2' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'IQ2') { $_POST['honor']=(int) $_POST['honor']; if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=IQ'>Back</a>"; } else { $iqgain=$_POST['honor']*100; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor']); $_POST['honor']=abs((int)($_POST['honor'])); mysql_query("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid",$c); mysql_query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for $iqgain IQ."; } } else if($_GET['spend'] == 'labour3') { print "Type in the amount of Honor Awards you want to swap for labour points.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = 300,000 labour points.<form action='HonorExchange.php?spend=labour4' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'labour4') { $_POST['honor']=(int) $_POST['honor']; if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=labour3'>Back</a>"; } else { $labourgain=$_POST['honor']*3000; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); mysql_query("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid",$c); mysql_query("UPDATE userstats SET labour=labour+$labourgain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for $labourgain labour points."; } } else if($_GET['spend'] == 'guard3') { print "Type in the amount of Honor Awards you want to swap for Defense.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = 3,000 Defense.<form action='HonorExchange.php?spend=guard4' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'guard4') { $_POST['honor']=(int) $_POST['honor']; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=guard3'>Back</a>"; } else { $guardgain=$_POST['honor']*3000; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); mysql_query("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid",$c); mysql_query("UPDATE userstats SET guard=guard+$guardgain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for $guardgain Defense."; } } else if($_GET['spend'] == 'agility3') { print "Type in the amount of Honor Awards you want to swap for Agility.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = 3,000 Agility.<form action='HonorExchange.php?spend=agility4' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'agility4') { $_POST['honor']=(int) $_POST['honor']; if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=agility3'>Back</a>"; } else { $agilitygain=$_POST['honor']*3000; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); mysql_query("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid",$c); mysql_query("UPDATE userstats SET agility=agility+$agilitygain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for $agilitygain Agility."; } } else if($_GET['spend'] == 'strength3') { print "Type in the amount of Honor Awards you want to swap for Strength.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = 3,000 Strength.<form action='HonorExchange.php?spend=strength4' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'strength4') { $_POST['honor']=(int) $_POST['honor']; if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=strength3'>Back</a>"; } else { $strengthgain=$_POST['honor']*3000; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); mysql_query("UPDATE users SET honor=honor-{$_POST['honor']} WHERE userid=$userid",$c); mysql_query("UPDATE userstats SET strength=strength+$strengthgain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for $strengthgain Strength."; } } else if($_GET['spend'] == 'money') { print "Type in the amount of Honor Awards you want to swap for \$\$\$.<br /> You have <b>{$ir['honor']}</b> Honor Awards.<br /> One Honor Award = \$2,000,000.<form action='HonorExchange.php?spend=money2' method='post'><input type='text' name='honor' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'money2') { $_POST['honor']=(int) $_POST['honor']; if($_POST['honor'] <= 0 || $_POST['honor'] > $ir['honor']) { print "Error, you either do not have enough Honor Awards or did not fill out the form.<br /> <a href='HonorExchange.php?spend=money'>Back</a>"; } else { $iqgain=$_POST['honor']*2000000; $_POST['honor']=strip_tags($_POST['honor']); $_POST['honor']=mny_stripfmt($_POST['honor'], ENT_QUOTES); $_POST['honor']=abs((int)($_POST['honor'])); $_POST['money']=strip_tags($_POST['money']); $_POST['money']=mny_stripfmt($_POST['money'], ENT_QUOTES); $_POST['money']=abs($_POST['money']); mysql_query("UPDATE users SET honor=honor-{$_POST['honor']},money=money+$iqgain WHERE userid=$userid",$c); print "You traded {$_POST['honor']} Honor Awards for \$$iqgain."; } } $h->endpage(); ?>
  23. Still nothing, I honestly reckon someone with the time on their hands is going.to have to remake the cron. I'm no good at that stuff. But I'm alright at converting from V1 to V2 that's piss easy haha. But no I have to take some classes in Web design. I just really want this mod to work without manually having to do the draws..
  24. I'm getting this error now, can you help? Fatal error: Call to a member function query() on a non-object in /home/braidz/public_html/cron_lottery.php on line 105   Cron: <?php require"config.php"; require"global_func.php"; global $c; $lotteryDetails = mysql_query("SELECT * FROM lotteryDetails"); $ld = mysql_fetch_assoc($lotteryDetails); $winNumbers = array(); for($i = 0; $i < 6; $i++) { $num = mt_rand(1,46); if(empty($winNumbers)) { array_push($winNumbers, $num); } else { while(in_array($num, $winNumbers)) { $num = mt_rand(1,46); } array_push($winNumbers, $num); } } sort($winNumbers); $wn = implode(",", $winNumbers); $getTickets = mysql_query("SELECT * FROM lotterytickets"); $jackpot = (mysql_num_rows($getTickets) * $ld['lotprice']) + $ld['lotjackpot']; $zero = 0; $one = 0; $two = 0; $three = 0; $four = 0; $five = 0; $six = 0; $users = array(); while($gt = mysql_fetch_assoc($getTickets)) { $yourNumbers = explode(",", $gt['numbers']); sort($yourNumbers); $uID = abs(@intval($gt['userid'])); if(empty($users)) { array_push($users, $uID); } else { if(!in_array($uID, $users)) { array_push($users, $uID); } } $correct = 0; foreach($yourNumbers as $yn) { if(in_array($yn, $winNumbers)) { $correct++; } } if($correct == 0) { $zero++; } if($correct == 1) { $one++; } if($correct == 2) { $two++; } if($correct == 3) { $three++; } if($correct == 4) { $four++; } if($correct == 5) { $five++; } if($correct == 6) { $six++; } $updateTicket = ("UPDATE lotterytickets SET correct = ". abs(@intval($correct)) ." WHERE id = ". abs(@intval($gt['id'])) .""); mysql_query($updateTicket) OR die("Could not update ticket ID ". $gt['id'] .": ". mysql_error()); } $potWin = array(); $countUsers = count($users); if(!empty($users)) { for($ui = 0; $ui < $countUsers; $ui++) { $selectCorrect = mysql_query("SELECT correct, id, userid, numbers FROM lotterytickets WHERE userid = ". abs(@intval($users[$ui])) .""); $event = "<b><u>This Weeks Anarchy 46 Winning Numbers Are: ". $wn .".</u> "; $event .= "The Results From Your ". abs(@intval(mysql_num_rows($selectCorrect))) ." Lottery Tickets: "; $nowin = array(0,1,2); $total = 0; while($sc = mysql_fetch_assoc($selectCorrect)) { $event .= "Ticket Numbers: ". mysql_real_escape_string($sc['numbers']) .""; if(in_array($sc['correct'], $nowin)) { $event .= "<i> -- ". $sc['correct'] ." Matching Number(s) (no winnings)</i> "; } else { if($sc['correct'] == 3) { $winnings = ($ld['lotprice'] + (floor($ld['lotprice'] * 0.5))); } if($sc['correct'] == 4) { $winnings = ($ld['lotprice'] + (floor($ld['lotprice'] * 0.8))); } if($sc['correct'] == 5) { $winnings = ($ld['lotprice'] + (floor($ld['lotprice'] * 1.4))); } if($sc['correct'] == 6) { $winnings = ($ld['lotprice'] + (floor($jackpot/$six))); array_push($potWin, $users[$ui]); } $event .= "<i> -- ". $sc['correct'] ." Matching Numbers (Won \$". number_format($winnings) .")</i> "; $total += $winnings; } } $event .= "You Won A Total Of \$". number_format($total) ."."; $subevent = mysql_real_escape_string(trim($event)); $dbevent_add($users[$ui], $subevent); $giveWinnings = ("UPDATE users SET water = water + ". abs(@intval($total)) ." WHERE userid = ". abs(@intval($users[$ui])) .""); mysql_query($giveWinnings) OR die("Could not give userid ". $ui ." Water: ". mysql_error()); } if(!empty($potWin)) { $winners = implode(",", $potWin); } elseif(empty($potWin)) { $winners = "NA"; } $insertDone = ("INSERT INTO lotterydone (ldID, ldNUMBERS, ldZERO, ldONE, ldTWO, ldTHREE, ldFOUR, ldFIVE, ldSIX, ldPOT, ldPOTWIN, ldTIME) VALUES('','". $wn ."', ". $zero .", ". $one .", ". $two .", ". $three .", ". $four .", ". $five .", ". $six .", ". $jackpot .", '". $winners ."', UNIX_TIMESTAMP())"); mysql_query($insertDone) OR die("Could not insert into lottery done: ". mysql_error()); if($six == 0) { $jp = $jackpot; } elseif($six > 0) { $jp = 0; } $updateJackpot = ("UPDATE lotteryDetails SET lotjackpot = ". abs(@intval($jp)) .""); mysql_query($updateJackpot) OR die("Could not update jackpot: ". mysql_error()); } else { $db->query("INSERT INTO events VALUES('',$userid,UNIX_TIMESTAMP(),0,'$text= No Lottery Winner This Week')"); } $truncate = ("TRUNCATE TABLE lotterytickets"); mysql_query($truncate) OR die("Could not truncate: ". mysql_error()); ?>   I completely removed line 105 now I'm getting this error Could not truncate: Access denied for user 'braidz'@'localhost' (using password: NO)
  25. Could anyone get the cron working? I've tried heaps of stuff with it. Nothing seems to work. I am using Ravans Script. And the mod worked but the cron returns a blank page, yes I know this is mean to happen but it.does not truncate the table nor send an even, can someone help me with this please?
×
×
  • Create New...