
corruptcity || skalman
Members-
Posts
358 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Events
Everything posted by corruptcity || skalman
-
no not the invtentory system, basically I have 2 hp systems one max hp and then limb hps but when you add the 7 limbs together that equals the max hp, so that when players level up they both increase and always match each other. During the fight if the head or thorax hp hits 0 you will also lose/win the fight, also looking at add light and heavy bleeds, fractures and black out limb to it aswell. Where bleeds act like a damage over time each turn, fractures effect your hit rate and blacked out limb when hit again do extra damage to the other limbs that still have hp. There are a few other things I'm doing but gonna keep them in the back pocket π
-
hey gamble, I'm working on a new attack system for my game that from the games I've played haven't done anything like this before, I took some inspiration from escape from tarkov for it and decided to add it to mccodes to see if hopefully speeds up fights with my aim being that fights last less than 50 turns rather than those 200 click feasts I've had in the past. But like most things when you create something new it breaks something old and been fixing the bugs and breaks first.
-
Redux- Mod Support - Marriage Mod
corruptcity || skalman replied to Oracle's topic in Modification Support
yeah just looked at the only backup of redux I have and I used this <a href='".gen_url('viewuser', true)."&ID={$r['userid']}'>".stripslashes(htmlentities($r['username']))."</a> I wasn't wrong in my first post just needed to change the [URL] to <a> that's all -
Redux- Mod Support - Marriage Mod
corruptcity || skalman replied to Oracle's topic in Modification Support
Hey, your missing a couple of things. a ] for the opening [url], a ) for the ".abs(intval($r[''] your missing the ))." aswell so it should end up looking like this. Proposer: [url='viewuser.php?u=".abs(intval($r['userid']))." ".htmlentities($r['username'])."] [/url] -
Hi, I've got a PSD template that I have sliced, just looking for someone to turn the html and images into css for me, it's been a long while since I've done that myself and have completly forgotten how to do itπ€¦ββοΈ. Am willing to pay someone to do it for me I've got a login/register and a logged in one and yes its for mccodes 2.0.5 (I know its not the best but it's what I know)
-
Hi I'm not sure if this has been posted before or not but I was just in logs and noticed that on some of the functions there is incorrect links with the pages for example on the cash one, one of the pages has the correct bit of code for ($i = 1; $i <= $pages; $i++) { $s = ($i - 1) * $app; echo ($s == $st) ? '<b>' . $i . '</b> ' : '<a href="' . gen_url('logs', true, true) . '&action=cashlogs&st=' . $s . '">' . $i . '</a> '; echo ($i % 25 == 0) ? '<br />' : ''; } and the other will have atklogs instead
-
Hi I'm currently creating a racing mod game and I'm after people advice on which you think is better or what you would use for determining which car wins the race. I decided to use a rating system instead of either a random car wins or the car with the most BHP, I was thinking of using the chess rating, i got the idea of using a rating system from the movie the social network Ea = 1 / (1 + 10 ^ ((Rb-Ra)/400) ) Eb = 1 / (1 + 10 ^ ((Ra-Rb)/400) ) in which both player are given a rating of 1400 to start with and then the rating would run to determining which of the 2 girls would win and would update their rating but in my mod I'm just going to + or - 1 to the ratings so this now brings me to my question which would you use and why? A) A user rating B) A seperate rating for each car and just that car rating would be used when racing with that car C) Have both user and car rating, add them up then /2 thanks for reading and any replies
-
yeah ive got it sorted thanks m8 your a life saver
-
ok thanks for the help Oct but i was then thinking about going all the way and working out where each horse finished but after seeing your suggestion that shouldn't be a problem to do
-
Hi I am currently creating a horse racing mod for my game and I'm trying to have it that each time you bet it shows you which horse finished in the top 3 and where your horse that you bet on finished. I decided to use array which would hold the ID and the random number that is generated this works for 1st and 2nd but I'm having problems trying to do the 3rd. Been stuck a while so I'm posting on here, here is the code so far. $horse = array(); for($i=1;$i<=7;$i++) { $rand1 = (int)rand(1,50); $rand2 = (int)rand(1,50); $rand3 = (int)rand(1,50); $total = (int)(($rand1 + $rand2 + $rand3) / 3); $horse[$i] = $total; //this bit is just there while i create it echo"$total<br>"; } //works out which horse won if($horse[1] > $horse[2] && $horse[1] > $horse[3] && $horse[1] > $horse[4] && $horse[1] > $horse[5] && $horse[1] > $horse[6] && $horse[1] > $horse[7]) { echo"horse 1 wins<br>"; $winner = 1; $sec = array('1' => '$horse[2]', '2' => '$horse[3]', '3' => '$horse[4]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($horse[2] > $horse[2] && $horse[2] > $horse[3] && $horse[2] > $horse[4] && $horse[2] > $horse[5] && $horse[2] > $horse[6] && $horse[2] > $horse[7]) { echo"horse 2 wins<br>"; $winner = 2; $sec = array('1' => '$horse[1]', '2' => '$horse[3]', '3' => '$horse[4]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($horse[3] > $horse[2] && $horse[3] > $horse[3] && $horse[3] > $horse[4] && $horse[3] > $horse[5] && $horse[3] > $horse[6] && $horse[3] > $horse[7]) { echo"horse 3 wins<br>"; $winner = 3; $sec = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[4]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($horse[4] > $horse[2] && $horse[4] > $horse[3] && $horse[4] > $horse[4] && $horse[4] > $horse[5] && $horse[4] > $horse[6] && $horse[4] > $horse[7]) { echo"horse 4 wins<br>"; $winner = 4; $sec = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($horse[5] > $horse[2] && $horse[5] > $horse[3] && $horse[5] > $horse[4] && $horse[5] > $horse[5] && $horse[5] > $horse[6] && $horse[5] > $horse[7]) { echo"horse 5 wins<br>"; $winner = 5; $sec = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[4]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($horse[6] > $horse[2] && $horse[6] > $horse[3] && $horse[6] > $horse[4] && $horse[6] > $horse[5] && $horse[6] > $horse[6] && $horse[6] > $horse[7]) { echo"horse 6 wins<br>"; $winner = 6; $sec = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[4]', '5' => '$horse[5]', '6' => '$horse[7]',); } else { echo"horse 7 wins<br>"; $winner = 7; $sec = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[4]', '5' => '$horse[5]', '6' => '$horse[6]',); } //works out which horse finishd 2 if($sec[1] > $sec[2] && $sec[1] > $sec[3] && $sec[1] > $sec[4] && $sec[1] > $sec[5] && $sec[1] > $sec[6] && $sec[1] > $sec[7]) { echo"horse 1 finished second<br>"; $second = 1; $third = array('1' => '$horse[2]', '2' => '$horse[3]', '3' => '$horse[4]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($sec[2] > $sec[2] && $sec[2] > $sec[3] && $sec[2] > $sec[4] && $sec[2] > $sec[5] && $sec[2] > $sec[6] && $sec[2] > $sec[7]) { echo"horse 2 finished second<br>"; $second = 2; $third = array('1' => '$horse[1]', '2' => '$horse[3]', '3' => '$horse[4]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($sec[3] > $sec[2] && $sec[3] > $sec[3] && $sec[3] > $sec[4] && $sec[3] > $sec[5] && $sec[3] > $sec[6] && $sec[3] > $sec[7]) { echo"horse 3 finished second<br>"; $second = 3; $third = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[4]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($sec[4] > $sec[2] && $sec[4] > $sec[3] && $sec[4] > $sec[4] && $sec[4] > $sec[5] && $sec[4] > $sec[6] && $sec[4] > $sec[7]) { echo"horse 4 finished second<br>"; $second = 4; $third = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($sec[5] > $sec[2] && $sec[5] > $sec[3] && $sec[5] > $sec[4] && $sec[5] > $sec[5] && $sec[5] > $sec[6] && $sec[5] > $sec[7]) { echo"horse 5 finished second<br>"; $second = 5; $third = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[4]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($sec[6] > $sec[2] && $sec[6] > $sec[3] && $sec[6] > $sec[4] && $sec[6] > $sec[5] && $sec[6] > $sec[6] && $sec[6] > $sec[7]) { echo"horse 6 finished second<br>"; $second = 6; $third = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[4]', '5' => '$horse[5]', '6' => '$horse[7]',); } else { echo"horse 7 finished second<br>"; $second = 7; $third = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[4]', '5' => '$horse[5]', '6' => '$horse[6]',); } //find out who finished third if($third[1] > $third[2] && $third[1] > $third[3] && $third[1] > $third[4] && $third[1] > $third[5] && $third[1] > $third[6] && $third[1] > $third[7]) { echo"horse 1 finished second<br>"; $third = 1; $forth = array('1' => '$horse[2]', '2' => '$horse[3]', '3' => '$horse[4]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($third[2] > $third[2] && $third[2] > $third[3] && $third[2] > $third[4] && $third[2] > $third[5] && $third[2] > $third[6] && $third[2] > $third[7]) { echo"horse 2 finished second<br>"; $third = 2; $forth = array('1' => '$horse[1]', '2' => '$horse[3]', '3' => '$horse[4]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($third[3] > $third[2] && $third[3] > $third[3] && $third[3] > $third[4] && $third[3] > $third[5] && $third[3] > $third[6] && $third[3] > $third[7]) { echo"horse 3 finished second<br>"; $third = 3; $forth = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[4]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($third[4] > $third[2] && $third[4] > $third[3] && $third[4] > $third[4] && $third[4] > $third[5] && $third[4] > $third[6] && $third[4] > $third[7]) { echo"horse 4 finished second<br>"; $third = 4; $forth = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[5]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($third[5] > $third[2] && $third[5] > $third[3] && $third[5] > $third[4] && $third[5] > $third[5] && $third[5] > $third[6] && $third[5] > $third[7]) { echo"horse 5 finished second<br>"; $third = 5; $forth = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[4]', '5' => '$horse[6]', '6' => '$horse[7]',); } elseif($third[6] > $third[2] && $third[6] > $third[3] && $third[6] > $third[4] && $third[6] > $third[5] && $third[6] > $third[6] && $third[6] > $third[7]) { echo"horse 6 finished second<br>"; $third = 6; $forth = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[4]', '5' => '$horse[5]', '6' => '$horse[7]',); } else { echo"horse 7 finished second<br>"; $third = 7; $forth = array('1' => '$horse[1]', '2' => '$horse[2]', '3' => '$horse[3]', '4' => '$horse[4]', '5' => '$horse[5]', '6' => '$horse[6]',); } the problem I'm having is that im not sure how i would work out who finished 3rd and so on is how am i gonna know which horse 2 remove from the array for the next array if I don't know what the random numbers are going to be before hand. if anyone has a better/easier solution or advice on how to do this that would be much welcome cheers skalman
-
Hi while upgrading my game from v2 to redux i decide to add the logging of the errors into the basic_error_handler and then create a simple view logs for staff has 1 file 1 table and bits of coded added to the basic_error_handler as due to licence restriction im not allowed to post the edited basic_error_handler file. All works and has been tested on my local server. table sql contained within zip file staff error_logs.php <?php /*this was create by skalman used to view the error handler logs feel free to do what you like with this script just remember credit where credit is due Date: 21.05 GMT 7/7/12 *MCCodes Version 2.5.6 * Copyright (C) 2011-2012 MCCodes * All rights reserved. */ if (!defined($_CONFIG['define_code'])) { echo 'This file cannot be accessed directly.'; exit; } $_GET['delete'] = abs((int) $_GET['delete']); if ($_GET['delete'] > 0) { $d_c = $db->query("SELECT COUNT(`id`) FROM `errors` WHERE `id` = {$_GET['delete']}"); if ($db->fetch_single($d_c) == 0) { echo '<span style="font-weight:bold;">Error log doesn\'t exist</span><br />'; } else { $db->query("DELETE FROM `errors` WHERE `id` = {$_GET['delete']}"); echo '<span style="font-weight:bold;">Error Deleted</span><br />'; } $db->free_result($d_c); } if (isset($_GET['delall']) && $_GET['delall']) { echo " This will delete all the error logs.<br /> There is <b>NO</b> undo, so be sure.<br /> <a href='" . gen_url('error_logs', true, true). "&delall2=1'>Delete all error logs</a><br /> <a href='" . gen_url('error_logs', true, true). "'>No, go back</a><br />"; $h->endpage(); exit; } if (isset($_GET['delall2']) && $_GET['delall2']) { $am = $db->fetch_single($db->query("SELECT COUNT(`id`) FROM `errors`")); if ($am == 0) { echo"There isn't any error logs.<br /> <a href='" . gen_url('error_logs', true, true) . "'>Go Back</a>"; die($h->endpage()); } $db->query("DELETE FROM `errors`"); echo " All <b>{$am}</b> Error logs have been deleted.<br /> <br /><a href='" . gen_url('error_logs', true, true) . "'>Go Back</a>"; die($h->endpage()); } echo"<br> <h3>Error Logs</h3> <hr />"; $errors = $db->query("SELECT id, userid, page, error, time FROM errors ORDER BY time ASC"); if($db->num_rows($errors) == 0) { echo"<br>There isn't any logs right now<br> <a href=".gen_url('main', true, true)."'>Go Back</a>"; $h->endpage(); exit; } else { echo" <table width='90%' align='center' class='table'> <tr> <th>No</th> <th>Page</th> <th>Error</th> <th>Time</th> <th>Del</th> </tr>"; $n = 1; while($r = $db->fetch_row($errors)) { echo" <tr> <td>".number_format($n)."</td> <td>".htmlentities($r['page'])."</td> <td>".stripslashes($r['error'])."</td> <td>".DateTime_Parse($r['time'])."</td> <td><a href='".gen_url('error_logs', true, true)."&delete={$r['id']}'>Delete</a></td> </tr>"; $n++; } echo"</table><br> <a href='".gen_url('error_logs', true, true)."&delall=1'>Delete All</a>"; } $h->endpage(); ?> SMENU link > <a href='".gen_url('error_logs', true, true)."'>Error Logs</a> after line 62 and 71 in basic_error_handler.php paste this $error = $db->escape($debug_error); $db->query("INSERT INTO errors (id, userid, page, error, time) VALUES('', {$ir['userid']}, '{$_GET['page']}', '{$error}, {$action}', ".time().")"); and that its errors.sql.zip
-
Drugs mod [$15]
corruptcity || skalman replied to corruptcity || skalman's topic in Paid Modifications
hi all sorry for that i was kinda in a rush trying to get it all up on my site yesterday before i had work and as such i forgot to add a table and a few rows but I've now added the table -
Hi i have just finished creating a drugs mod for my game and i was thinking about selling up to 10 licences of the drugs mod here are all the features of the mod:- you build a druglab which you use to grow any one of 10 selected drugs. There is a bag shop where you buy bags to increase the total account of drugs you can carry on you. You can hire hookers thugs and dealers (HTD) which will earn you some money in return for drugs you can set the drug you give them. You can built gun presses and sewing machines to produce guns and vests for the HDK's to use. There is a drug street where you can buy/sell drugs the prices will fluctuate often. There is drug bank where you launder your dirty drug money into clean money that you can use elsewhere there is 2 options quick and slow. Quick is instant you get your money there and then but the bank takes a 55% cut of the money. Slow takes 6 hours per transaction but the bank only takes 25% cut. You can exchange 1000 units of any drug into a useable drug item that your avatar can take. You can travel between 10 different drug cities each with there own market prices. There is a real time function that is run every time players use drug points they gain drugs, their HDK's gain them money and take some drugs and gun and vests are produced and then shows a summary to the player of what happened. The only thing need to be added to the crons are the fluctuating market prices and the users hourly gain of drug money and drug points. If you would like to see a demo of the mod in action visit my game http://corruptcity.net use demo demo to login and in the explore link look for drugs. cheers skalman
-
You havent added the query that updates the users money when creates a city
-
Slot machine v2
corruptcity || skalman replied to corruptcity || skalman's topic in Free Modifications
if you view the 5 photos or even the last photo u can see how you get 5 lines from 3 lines -
Slot machine v2
corruptcity || skalman replied to corruptcity || skalman's topic in Free Modifications
hi as a player on my game found a bug with the original script where you was able to bet with money you didnt have i fixed the bug and added images to show where each of the 5 lines are and am gonna post the new code for it if you used the original you just need to paste the code in the file get the 5 images then change the image links in the drop down box <?php //Slot Machine v1.1 coded by skalman for makewebgames //this is a free mod made by me do sell, redistrubite or claim as you own //2nd may 2011 //this is an editted slot machine where you can use up to 3 lines increasing your players chance of winning //if i was drawing a box to show you how it works if you dont know you would have a 3 by 3 box number 1 - 9 with //the top left number 1 //the middle line is line 1 and the uses slot 4 - 6 //the top line is line 2 and uses slot 1 - 3 //bottom line uses slot 7 - 9 //include_once (DIRNAME(__FILE__) . '/globals.php'); include_once "globals.php"; echo' <script type="text/javascript"> function changeImg(image_id, image_folder){ document.getElementById(image_id).src = image_folder; } </script>'; echo"<h3>Slot Machine</h3> <hr /> "; $fee = 100; if(!$_POST['submit']) { echo"<form action='slotsmachine.php' method='post'> To play the slot machine it is \$".number_format($fee)." * the amount of line you choose to play with.<br /> How many lines would you like to use? <select name='lines' id='lines'> <option value='1' onclick=\"changeImg('image1', 'images/core/sml1.jpg');\">1</option> <option value='2' onclick=\"changeImg('image1', 'images/core/sml2.jpg');\">2</option> <option value='3' onclick=\"changeImg('image1', 'images/core/sml3.jpg');\">3</option> <option value='4' onclick=\"changeImg('image1', 'images/core/sml4.jpg');\">4</option> <option value='5' onclick=\"changeImg('image1', 'images/core/sml5.jpg');\">5</option> </select> <input type='submit' name='submit' Value='Pull Handle' /><br /> <img id='image1' src='images/core/sml1.jpg' alt='Slot Machine' /> </form>"; } else { $lines = $_POST['lines']; $cost = $lines * $fee; if($cost > $ir['money']) { error("You are trying to bet more than you own!"); } else { $db->query(sprintf("UPDATE users SET money = money - %d WHERE (userid = %u)", $cost, {$ir['userid']})); $slot[1] = (int)rand(1,9); $slot[2] = (int)rand(1,9); $slot[3] = (int)rand(1,9); $slot[4] = (int)rand(1,9); $slot[5] = (int)rand(1,9); $slot[6] = (int)rand(1,9); $slot[7] = (int)rand(1,9); $slot[8] = (int)rand(1,9); $slot[9] = (int)rand(1,9); $line1 = $slot[4] == $slot[5] && $slot[5] == $slot[6]; $line1a= $slot[4] == $slot[5] || $slot[5] == $slot[6]; $line2 = $slot[1] == $slot[2] && $slot[2] == $slot[3]; $line2a = $slot[1] == $slot[2] || $slot[2] == $slot[3]; $line3 = $slot[7] == $slot[8] && $slot[8] == $slot[9]; $line3a = $slot[7] == $slot[8] || $slot[8] == $slot[9]; $line4 = $slot[3] == $slot[5] && $slot[5] == $slot[3]; $line4a = $slot[3] == $slot[5] || $slot[5] == $slot[3]; $line5 = $slot[1] == $slot[5] && $slot[5] == $slot[9]; $line5a = $slot[1] == $slot[5] || $slot[5] == $slot[9]; echo" <table width='60%' align='center'> <tr> <th colspan='3'>2nd Line</th> </tr> <tr> <td>".number_format($slot[1])."</td> <td>".number_format($slot[2])."</td> <td>".number_format($slot[3])."</td> </tr> <tr> <th colspan='3'>1st Line</th> </tr> <td>".number_format($slot[4])."</td> <td>".number_format($slot[5])."</td> <td>".number_format($slot[6])."</td> </tr> <tr> <th colspan='3'>3rd Line</th> </tr> <td>".number_format($slot[7])."</td> <td>".number_format($slot[8])."</td> <td>".number_format($slot[9])."</td> </tr> </table>"; //checks the 1st 3 slots if($lines = 1) { //all 3 match //if($slot[1] == $slot[2] && $slot[2] == $slot[3]) if($line1) { $won = 250; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //2 in a line match elseif($line1a) { $won = 150; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } else { $won = 100; echo"You pull the arm wait for it to stop spinning and you lost \$".number_format($won)."<br />"; } } //checks the 1st 6 slots elseif($lines = 2) { //both lines match if((line1) && ($line2)) { $won = 750; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //either 1 matches if((line1) || ($line2)) { $won = 500; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //any 2 in either lines match elseif(($line1a) || ($line2a)) { $won = 350; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //nothing else { $won = 100; echo"You pull the arm wait for it to stop spinning and you lost \$".number_format($won)."<br />"; } } //checks all 9 slots elseif($lines = 3) { //all 3 match if(($line1) && ($line2) && ($line3)) { $won = 1500; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //line 1 matches with either line 2 or 3 elseif(($line1) && ($line2) || ($line3)) { $won = 1000; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //line 2 matches with either line 1 or 3 elseif((line2) && ($line1) || ($line3)) { $won = 1000; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //line 3 matches with either line 1 or 2 elseif(($line3) && ($line1) || ($line2)) { $won = 1000; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //only 1 of the 3 match elseif(($line1) || ($line2) || ($line3)) { $won = 750; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //any 2 in a line match elseif(($line1a) || ($line2a) || ($line3a)) { $won = 500; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } else { $won = 100; echo"You pull the arm wait for it to stop spinning and you lost \$".number_format($won)."<br />"; } } //checks all 9 slots else { //all 5 lines match if(($line1) && ($line2) && ($line3) && ($line4) && ($line5)) { $won = 2500; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //line 1 matches with either line 2 3 4 or 5 elseif(($line1) && ($line2) || ($line3) || ($line4) || ($line5)) { $won = 2000; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //line 2 matches with either line 1 3 4 or 5 elseif((line2) && ($line1) || ($line3) || ($line4) || ($line5)) { $won = 2000; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //line 3 matches with either line 1 2 4 or 5 elseif(($line3) && ($line1) || ($line2) || ($line4) || ($line5)) { $won = 2000; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //line 4 matches with either line 1 2 3 or 5 elseif((line4) && ($line1) || ($line2) || ($line3) || ($line4)) { $won = 2000; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //line 5 matches with either line 1 2 3 or 4 elseif(($line5) && ($line1) || ($line2) || ($line3) || ($line4)) { $won = 2000; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //only 1 of the 5 match elseif(($line1) || ($line2) || ($line3) || ($line4) || ($line5)) { $won = 1500; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //any 2 in a line match elseif(($line1a) || ($line2a) || ($line3a) || ($line4a) || ($line5a)) { $won = 1000; echo"You pull the arm wait for it to stop spinning and you win \$".number_format($won)."<br />"; $db->query(sprintf("UPDATE users SET money = money + %d WHERE (userid = %u)", $won, $userid)); } //neither match else { $won = 100; echo"You pull the arm wait for it to stop spinning and you lost \$".number_format($won)."<br />"; } } echo" Would you like to change the amount of lines to use?<br /> <form action='slotsmachine.php' method='post'> <input type='hidden' name='lines' value='$lines'/> <input type='submit' name='submit' value='swing again'/> </form> <form action='slotsmachine.php' method='post'> To play the slot machine it is \$".number_format($fee)." * the amount of line you choose to play with.<br /> How many lines would you like to use? <select name='lines' id='lines'> <option value='1' onclick=\"changeImg('image1', 'images/core/sml1.jpg');\">1</option> <option value='2' onclick=\"changeImg('image1', 'images/core/sml2.jpg');\">2</option> <option value='3' onclick=\"changeImg('image1', 'images/core/sml3.jpg');\">3</option> <option value='4' onclick=\"changeImg('image1', 'images/core/sml4.jpg');\">4</option> <option value='5' onclick=\"changeImg('image1', 'images/core/sml5.jpg');\">5</option> </select> <input type='submit' name='submit' Value='Pull Handle' /><br /> <img id='image1' src='images/core/sml1.jpg' alt='Slot Machine' /> </form>"; } } $h->endpage(); ?> -
CorruptCity relaunch
corruptcity || skalman replied to corruptcity || skalman's topic in Game Projects
im not sure about that 1 curt and I would like to say that i have now added the news feed social side and made myself friends with the demo account so you can see other players posts -
CorruptCity relaunch
corruptcity || skalman replied to corruptcity || skalman's topic in Game Projects
that happend because you tried the demo account and was logged as the last ip then when you try to create your own account your get the error this now be fixednad thanks telling me -
CorruptCity relaunch
corruptcity || skalman replied to corruptcity || skalman's topic in Game Projects
whoops cheers for that curt -
ive used http://advertisemygame.com/ in the past and will prob use it agen for the relaunch of CorruptCity
-
CorruptCity relaunch
corruptcity || skalman replied to corruptcity || skalman's topic in Game Projects
yeah that'll be added once i get home from work l8a 2nyt -
CorruptCity relaunch
corruptcity || skalman replied to corruptcity || skalman's topic in Game Projects
i only added the users profile so you know who your posting to although i suppose your right not all of the users details needs 2 be there -
CorruptCity relaunch
corruptcity || skalman replied to corruptcity || skalman's topic in Game Projects
ok sorted that out your now able to use the demo account -
hi I would like to inform the community that ive now relaunched CorruptCity from today. Some of you old timers may remember that i had originally launched the game last year but due to being at uni I had to drop development of the game to get my assignments for the year finished then falling ill (only glandular fever lol) until just before christmas at a family meal i was talking to my unclue and cousin about facebook and web games and other stuff which gave me an idea and created and answered 2 questions what can the users do on fb when they are waiting for a friend to reply or no1s online or w/e? well they could play a fb game but i dont like them as you have to leave the actual facebook page and it takes ages to go back main site. and the 2d question what do users on a browser based game do while the stats are regening? go on facebook?, play another part of the game that doesnt need stats?, go on the ingame forum? play another game or whatever else and from these 2 question i had a big bang in my head why not add a social network side to a browser based game, Ino you'll just say that the user could just go on facebook but with the social network inside of a game the users won't need to leave the site to switch between game and social. Im planning on keeping the social network basic, simple and easy to use and im creating it how I would want it to look and not just a facebook ripoff And from the games ive played and im fairly certain that something like this has never been done before sorry for the waffle and long story and thanks for your time, yes im over my kissing disease :P If you would like to check out the game/social network the demo account is http://corruptcity.net username demo password demo p.s. Before alan or any1 has a chance to say the main story on the login is crap ino ive got my cousin that did screen writting and creative writing at university. She currently writting the main story and crimes for me and they will be added once shes finished
-
Hi ive got abit of code while($tp = $db->fetch_row($yourposts)) { $date=date('G:i:s F j Y',$tp['time']); echo" <tr> <td> {$date} <a href='viewuser.php?u={$tp['userid']}'>".stripslashes(htmlentities($tp['username']))."</a>"; if($tp['userid'] != $tp['profile_user']) { } else { } echo" ".stripslashes(htmlentities($tp['text']))." </td> </tr> <tr> <td> <div class='comment'>Comment</div> </td> </tr> <tr> <td> //robbed this from w3schools <div class='panel' align='center'> <p>Because time is valuable, we deliver quick and easy learning.</p> <p>At W3Schools, you can study everything you need to learn, in an accessible and handy format.</p> </div> </td> </tr>"; } echo"</table>"; } //this is also robbed from w3schools and was placed outside of the while loop while played with the code echo' <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".comment").click(function(){ $(".panel").slideToggle("slow"); }); }); </script>'; echo" <style type='text/css'> div.panel,div.comment { margin:0px; padding:5px; text-align:center; background:#e5eecc; border:solid 1px #c3c3c3; } div.panel { height:100px; display:none; width:90%; } </style> <div class='panel' align='center'> <p>Because time is valuable, we deliver quick and easy learning.</p> <p>At W3Schools, you can study everything you need to learn, in an accessible and handy format.</p> </div> "; Basically within the loop it will show a given users posts, then have a comment button which when clicked shows the div panel this works fine. ButIi would like to know if and how its possible to only open the div panel that is directly under the comment button and not all the div panels cheers