
ishmell
Members-
Posts
299 -
Joined
-
Last visited
-
Days Won
6
Content Type
Profiles
Forums
Events
Everything posted by ishmell
-
mccode-v2 Shops item stock - as requested (Not Tested)
ishmell replied to radio_active's topic in Free Modifications
Re: [MCcode v2] Shops item stock - as requested (Not Tested) Ok well I decided to try out the mod. In shops.php when trying to click a shop it does not show the shops id in the end of the url so the url looks liek this when the shop is clicked... http://streetsrising.iiistudios.com/shops.php?shop= <<< shop id missing. Then if I put in an id and go to the shop I get this error o.o QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.itmtypename FROM shopitems si ' at line 4 Query was SELECT si.sitemID,sitemSHOP,sitemITEMID,sitemQTY, i.itmid,itmname,itmdesc,itmbuyprice,itmsellprice,itmtype it.itmtypename FROM shopitems si LEFT JOIN items i ON si.sitemITEMID = i.itmid LEFT JOIN itemtypes it ON i.itmtype = it.itmtypeid WHERE si.sitemSHOP = ('1') ORDER BY i.itmtype ASC, i.itmbuyprice ASC, i.itmname ASC Not trying to be a pest, just testing the mod out for you. -
mccode-v2 Shops item stock - as requested (Not Tested)
ishmell replied to radio_active's topic in Free Modifications
Re: [MCcode v2] Item Stock as requestsed (Not Tested) From what I can already see your going to want to change the staff_shops.php page. Its going to give an error when adding new items to shops. Something along the lines of Column count doesn't match as the error. Edit:// You can always find $db->query("INSERT INTO shopitems VALUES('',{$_POST['shop']},{$_POST['item']})"); in staff_shops.php and replace with $db->query("INSERT INTO shopitems VALUES('',{$_POST['shop']},{$_POST['item'], ''})"); then put in a quantity manually. or in staff_shops.php find $db->query("INSERT INTO shopitems VALUES('',{$_POST['shop']},{$_POST['item']})"); and replace with $db->query("INSERT INTO shopitems VALUES('',{$_POST['shop']},{$_POST['item']},{$_POST['qty']})"); then find Item: ".item_dropdown($c,"item")." and underneath add <input type='text' size='5' name='qty' value='0' id='qty' /> so you can place in a quantity and not have to do it manually. -
Re: Shops Item Quantity? Yeh, this is a great idea. Sounds like it would make a great mod.
-
Re: [Any Mccodes] Digital Clock .. Anywebsite It doesn't show or do anything. :oops:
-
Re: [mccode v2] Organizations & Productions You shouldn't get 3. I have looked over it and the code for me seems to be right and working. Maybe you refreshed after purchasing 1?
-
Re: [mccode v2] Organizations & Productions I actually found another bug after fixing the one before but I fixed it. Replace your entire organizations.php page with the one below. Ill also update the files on my site. <?php //This script was made by illes ignath (a.k.a ishmell) //Please do not delete this credit. //Feel free to edit the script however you may please. //This is version 2.0 //Thats all for now, I hope you enjoy it. require "globals.php"; global $db,$c,$ir, $set; $totaltroops = $s['bodyguards']+$s['hustlers']+$s['bootleggers']+$s['whores']; $space = $s['tsspace']; $usersid= $ir['userid']; $set=$db->query("SELECT * FROM orgp WHERE userid=$usersid"); if ($ir['orgp'] != '1') { print" <form action='orginizations.php' method='post'> You dont have an orginization. Would you like to purchase one for $1000000? <input name='yesbuy' value='Yes' type='submit'><input name='nobuy' value='No' type='submit'>"; //for buying } if($_POST['yesbuy']) { if ($ir['money'] < '1000000') { print " Sorry, you dont have enough money to purchase an orginization. <a href='index.php'>Go Back</a"; $h->endpage(); exit; } else { $db->query("INSERT INTO orgp VALUES ('', $usersid, '0', '0', '0', '0', '10', '1', 'Graveyard', '0', '10', '25')") or die(mysql_error()); $db->query("UPDATE users SET money=money-1000000 WHERE userid=$usersid"); $db->query("UPDATE users SET orgp=orgp+1 WHERE userid=$usersid"); print " You have purchased an orginization for $1000000. [url='orginizations.php']Go To My Orginization[/url]"; $h->endpage(); exit; } } if($_POST['nobuy']) { print " So be it, be sure to come back any time. [url='index.php']Go Back[/url]"; $h->endpage(); exit; } else { while($s=$db->fetch_row($set)) { print "<h2>Your Orginization</h2> <p align='center'>This is your {$set['game_name']} Orginization page. It allows you to train troops to help produce products for your orginization. Also owning certain troops will help you both offensive and defensive when fighting someone. [b]Note:[/b] That it requires energy to hire troops. [b]Bodyguard=[/b]$25000, [b]Hustler=[/b]$8000, [b]Bootlegger=[/b]$5000, [b]Whore=[/b]$3000</span> <p align='center'><h1>[url='productions.php']Visit My Productions[/url]</h1></p> </p> <div align='center'> <form action='orginizations.php' method='post'> <table width='200' border='1'> <tr> <td width='81' bgcolor='red'>[b]Bodyguards:[/b]</td> <td bgcolor='red'><div align='center'>{$s['bodyguards']}</div></td> </tr> <tr> <td><div align='center'><input name='bodyguards' value='Purchase' type='submit' /></div></td> <td><div align='center'><input type='text' size='10' name='bodyguard' /></div></td> </tr> </table> <table width='200' border='1'> <tr> <td bgcolor='red'>[b]Hustlers:[/b]</td> <td bgcolor='red'><div align='center'>{$s['hustlers']}</div></td> </tr> <tr> <td><div align='center'><input name='hustlers' value='Purchase' type='submit' /></div></td> <td><div align='center'><input type='text' size='10' name='hustler' /></div> </td> </tr> </table> <table width='200' border='1'> <tr> <td bgcolor='red'>[b]Bootleggers:[/b]</td> <td bgcolor='red'><div align='center'>{$s['bootleggers']}</div></td> </tr> <tr> <td><div align='center'><input name='bootleggers' value='Purchase' type='submit' /></div></td> <td><div align='center'><input type='text' size='10' name='bootlegger' /></div> </td> </tr> </table> <table width='200' border='1'> <tr> <td bgcolor='red'>[b]Whores:[/b]</td> <td bgcolor='red'><div align='center'>{$s['whores']}</div></td> </tr> <tr> <td><div align='center'><input name='whores' value='Purchase' type='submit' /></div></td> <td><div align='center'><input type='text' size='10' name='whore' /> </div></td> </tr> </table> "; if($ir['energy'] < 6) { print "You don't have enough energy to hire troops!"; $h->endpage(); exit; } else { //this is for getting bodyguards $totaltroops = $s['bodyguards']+$s['hustlers']+$s['bootleggers']+$s['whores']; $space = $s['tsspace']; $userid = $s['userid']; $bodynum = $_POST['bodyguard']; $bodycount = $bodynum*25000; if($ir['money'] < $bodycount) { print "You don't have enough money to buy troops!"; $h->endpage(); exit; } if ($bodynum) { if ($totaltroops + $bodynum >= $space) { print "You dont have enough space for your body troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } else if ($bodynum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$bodycount WHERE userid=$userid"); $db->query("UPDATE orgp SET bodyguards=bodyguards+$bodynum WHERE userid=$userid"); print "You have purchased $bodynum bodyguards for $$bodycount."; } } //this is for getting hustlers $userid = $s['userid']; $hustnum = $_POST['hustler']; $hustcount = $hustnum*8000; if($ir['money'] < $hustcount) { print "You don't have enough money to buy troops!"; $h->endpage(); exit; } if ($hustnum) { if ($totaltroops + $hustnum >= $space) { print "You dont have enough space for your troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } else if ($hustnum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$hustcount WHERE userid=$userid"); $db->query("UPDATE orgp SET hustlers=hustlers+$hustnum WHERE userid=$userid"); print "You have purchased $hustnum hustlers for $$hustcount."; } } //this is for getting bootleggers $userid = $s['userid']; $bootnum = $_POST['bootlegger']; $bootcount = $bootnum*5000; if($ir['money'] < $bootcount) { print "You don't have enough money to buy troops!"; $h->endpage(); exit; } if ($bootnum) { if ($totaltroops + $bootnum >= $space) { print "You dont have enough space for your troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } else if ($bootnum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$bootcount WHERE userid=$userid"); $db->query("UPDATE orgp SET bootleggers=bootleggers+$bootnum WHERE userid=$userid"); print "You have purchased $bootnum bootleggers for $$bootcount."; } } //this is for getting whores $userid = $s['userid']; $whonum = $_POST['whore']; $whocount = $whonum*3000; if($ir['money'] < $whocount) { print "You don't have enough money to buy troops!"; $h->endpage(); exit; } if ($whonum) { if ($totaltroops + $whonum >= $space) { print "You dont have enough space for your troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } else if ($whonum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$whocount WHERE userid=$userid"); $db->query("UPDATE orgp SET whores=whores+$whonum WHERE userid=$userid"); print "You have purchased $whonum whores for $$whocount."; } } } $totaltroops = $s['bodyguards']+$s['hustlers']+$s['bootleggers']+$s['whores']; print "</form> [b]<h2>Troop Stats:</h2>[/b] <table width='451' border='1'> <tr> <td bgcolor='red'>[b]Balance:[/b] {$s['tsbalance']} </td> <td bgcolor='red'>[b]Hapiness:[/b] {$s['tshapiness']} "; if ($s['tshapiness'] < 0) { print "0"; $db->query("UPDATE orgp SET tshapiness='0' WHERE userid=$userid"); } print "/ {$s['tshapinessmax']}"; print "</td> <td bgcolor='red'>[b]Sacred Hangout:[/b] {$s['tshangout']}</td> <td bgcolor='red'>[b]Total Troops:[/b] $totaltroops</td> </tr> </table>"; //balance level for every exp if ($s['tsexp'] == 50) { $db->query("UPDATE orgp SET tsbalance='2' WHERE userid=$userid"); } if ($s['tsexp'] == 100) { $db->query("UPDATE orgp SET tsbalance='3' WHERE userid=$userid"); } if ($s['tsexp'] == 150) { $db->query("UPDATE orgp SET tsbalance='4' WHERE userid=$userid"); } if ($s['tsexp'] == 200) { $db->query("UPDATE orgp SET tsbalance='5' WHERE userid=$userid"); } if ($s['tsexp'] == 250) { $db->query("UPDATE orgp SET tsbalance='6' WHERE userid=$userid"); } if ($s['tsexp'] == 300) { $db->query("UPDATE orgp SET tsbalance='7' WHERE userid=$userid"); } if ($s['tsexp'] == 350) { $db->query("UPDATE orgp SET tsbalance='8' WHERE userid=$userid"); } if ($s['tsexp'] == 400) { $db->query("UPDATE orgp SET tsbalance='9' WHERE userid=$userid"); } if ($s['tsexp'] == 450) { $db->query("UPDATE orgp SET tsbalance='10' WHERE userid=$userid"); } //changes hangout when users space reaches a certain number if ($s['tsspace'] == 50) { $db->query("UPDATE orgp SET tshangout='Haunted House' WHERE userid=$userid"); } if ($s['tsspace'] == 75) { $db->query("UPDATE orgp SET tshangout='Playground' WHERE userid=$userid"); } if ($s['tsspace'] == 100) { $db->query("UPDATE orgp SET tshangout='Alley Way' WHERE userid=$userid"); } if ($s['tsspace'] == 125) { $db->query("UPDATE orgp SET tshangout='Pub' WHERE userid=$userid"); } if ($s['tsspace'] == 150) { $db->query("UPDATE orgp SET tshangout='Factory' WHERE userid=$userid"); } if ($s['tsspace'] == 200) { $db->query("UPDATE orgp SET tshangout='Estate' WHERE userid=$userid"); } //upgrading sacred hangout if($totaltroops >= $s['tsspace']) { print "<form action='orginizations.php' method='post'> You have ran out of space to get more troops. This can easily be solved if you upgrade your hangout. Want to upgrade your hangout with +25 space for $500,000? <input name='yesup' value='Yes' type='submit'><input name='noup' value='No' type='submit'>"; } if($_POST['yesup']) { if ($ir['money'] < '500000') { print " Sorry, you dont have enough money to purchase an upgrade. <a href='orginizations.php'>Go Back</a"; $h->endpage(); exit; } else { $db->query("UPDATE users SET money=money-500000 WHERE userid=$usersid"); $db->query("UPDATE orgp SET tsspace=tsspace+25 WHERE userid=$userid"); print " You have purchased an orginization upgrade for $500,000. [url='orginizations.php']Refresh My Orginization[/url]"; $h->endpage(); exit; } } if($_POST['noup']) { print " Thats to bad, feel free to try anytime. [url='orginizations.php']Refresh My Orginization[/url]"; } //if happy is low if($s['tshapiness'] <= 0) { print "<form action='ts.php' method='post'> Your troops seem to be very unhappy. What would you like to do about that? <input name='sendhome' value='Send Them Home' type='submit' /> <input name='sendvacation' value='Send On Vacation' type='submit' /> [b]Note:[/b] Send Them Home is the only one that wont cost you anything. The others will but they will also give you a highyer troops hapiness increase."; } } } //ends ?>
-
Re: [mccode v2] Organizations & Productions Alrighty I found the fix to the space problem and fixed it. Find the fallowing code on orginizations.php if ($bodynum) { if ($totaltroops + $bodynum >= $space) { print "You dont have enough space for your troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } } else if ($bodynum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$bodycount WHERE userid=$userid"); $db->query("UPDATE orgp SET bodyguards=bodyguards+$bodynum WHERE userid=$userid"); print "You have purchased $bodynum bodyguards for $$bodycount."; } //this is for getting hustlers $userid = $s['userid']; $hustnum = $_POST['hustler']; $hustcount = $hustnum*8000; if($ir['money'] < $hustcount) { print "You don't have enough money to buy troops!"; $h->endpage(); exit; } if ($hustnum) { if ($totaltroops + $hustnum >= $space) { print "You dont have enough space for your troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } } else if ($hustnum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$hustcount WHERE userid=$userid"); $db->query("UPDATE orgp SET hustlers=hustlers+$hustnum WHERE userid=$userid"); print "You have purchased $hustnum hustlers for $$hustcount."; } //this is for getting bootleggers $userid = $s['userid']; $bootnum = $_POST['bootlegger']; $bootcount = $bootnum*5000; if($ir['money'] < $bootcount) { print "You don't have enough money to buy troops!"; $h->endpage(); exit; } if ($bootnum) { if ($totaltroops + $bootnum >= $space) { print "You dont have enough space for your troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } } else if ($bootnum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$bootcount WHERE userid=$userid"); $db->query("UPDATE orgp SET bootleggers=bootleggers+$bootnum WHERE userid=$userid"); print "You have purchased $bootnum bootleggers for $$bootcount."; } //this is for getting whores $userid = $s['userid']; $whonum = $_POST['whore']; $whocount = $whonum*3000; if($ir['money'] < $whocount) { print "You don't have enough money to buy troops!"; $h->endpage(); exit; } if ($whonum) { if ($totaltroops + $whonum >= $space) { print "You dont have enough space for your troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } } else if ($whonum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$whocount WHERE userid=$userid"); $db->query("UPDATE orgp SET whores=whores+$whonum WHERE userid=$userid"); print "You have purchased $whonum whores for $$whocount."; } } $totaltroops = $s['bodyguards']+$s['hustlers']+$s['bootleggers']+$s['whores']; Replace with the fallowing below if ($bodynum) { if ($totaltroops + $bodynum >= $space) { print "You dont have enough space for your body troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } else if ($bodynum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$bodycount WHERE userid=$userid"); $db->query("UPDATE orgp SET bodyguards=bodyguards+$bodynum WHERE userid=$userid"); print "You have purchased $bodynum bodyguards for $$bodycount."; } } //this is for getting hustlers $userid = $s['userid']; $hustnum = $_POST['hustler']; $hustcount = $hustnum*8000; if($ir['money'] < $hustcount) { print "You don't have enough money to buy troops!"; $h->endpage(); exit; } if ($hustnum) { if ($totaltroops + $hustnum >= $space) { print "You dont have enough space for your troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } else if ($hustnum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$hustcount WHERE userid=$userid"); $db->query("UPDATE orgp SET hustlers=hustlers+$hustnum WHERE userid=$userid"); print "You have purchased $hustnum hustlers for $$hustcount."; } } //this is for getting bootleggers $userid = $s['userid']; $bootnum = $_POST['bootlegger']; $bootcount = $bootnum*5000; if($ir['money'] < $bootcount) { print "You don't have enough money to buy troops!"; $h->endpage(); exit; } if ($bootnum) { if ($totaltroops + $bootnum >= $space) { print "You dont have enough space for your troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } else if ($bootnum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$bootcount WHERE userid=$userid"); $db->query("UPDATE orgp SET bootleggers=bootleggers+$bootnum WHERE userid=$userid"); print "You have purchased $bootnum bootleggers for $$bootcount."; } } //this is for getting whores $userid = $s['userid']; $whonum = $_POST['whore']; $whocount = $whonum*3000; if($ir['money'] < $whocount) { print "You don't have enough money to buy troops!"; $h->endpage(); exit; } if ($whonum) { if ($totaltroops + $whonum >= $space) { print "You dont have enough space for your troops! Your current space is {$s['tsspace']}."; $h->endpage(); exit; } else if ($whonum >=1) { $db->query("UPDATE users SET energy=energy-6 WHERE userid=$userid"); $db->query("UPDATE users SET money=money-$whocount WHERE userid=$userid"); $db->query("UPDATE orgp SET whores=whores+$whonum WHERE userid=$userid"); print "You have purchased $whonum whores for $$whocount."; } } } $totaltroops = $s['bodyguards']+$s['hustlers']+$s['bootleggers']+$s['whores']; Ill also be updating the downloadable files for this mod on my site.
-
Re: [mccode v2] Organizations & Productions Oh k I see thats our problem. ALTER TABLE `users` ADD `orgp` INT ( 11 ) NOT NULL DEFAULT '0'; Should fix the problem.
-
Re: [mccode v2] Organizations & Productions So your having problems with buying space or just the whole thing all together not working for you? And: But I still get Yes, make sure the orgp table was created so check your mysql. Also make sure the field orgp was added to the users table.
-
Re: [mccode v2] Organizations & Productions No it works perfectly. I have installed it on a friends site as well. You just have to read all the code not just a few lines. A couple lines after you posted there is this little bit that makes $s work line 52 I believe it was: while($s=$db->fetch_row($set)) and on line 12 $set is shown as fallows $set=$db->query("SELECT * FROM orgp WHERE userid=$usersid"); Everything works fine, it all works together. This is compatible with anyone's game. :-)
-
Re: [mccode v2] Organizations & Productions Ty, hope no one mines me bumping this. BUMP!!!
-
Re: [mccodes v2]Movie Theatre(basic) To tell you the truth you can just change happiness to will or something to make it suit your game.
-
Re: Organizations & Productions Good point... http://www.iiistudios.com/orgpmod.zip (this download will only stay up for a few days)
-
Re: Organizations & Productions What kind of file suits you then? You can always get winzip or winrar to unzip the zip/rar file. I would like to post the mod here but its really big code wise so it wont fit on my posts that's why im offering it downloadable instead.
-
Re: Organizations & Productions Oh yeh I forgot all about that user field I better update it to the readme file. Thanks for posting it here. Edit: My sites zip was updated, here is the new rapid share one. http://rapidshare.com/files/175161713/orgpmod.rar.html
-
Re: [mccodes] Register Coupon Lock Only way to bypass this is if they knew the renamed register.php. And yes this is very basic but I thought I would share it in case anyone is interested. And yeh killah you can do that but for those that would like to save time while keeping things professional this might be what you need. Im not forcing anyone to use it. Im just posting a free mod. Whether you use it or not is totally up to you.
-
Script Has Been Tested Numerous Times!!! Hello, I have been tweaking this mod for quite some time now. And im proud to release this for mccodes v2. I call this mod Organizations & Productions and this is version 2.0 of the mod. Earlier versions can be found if you search the forums. Although this script has been tested numerous times there still might be a chance an error occurs. Be sure to post it here if something does happen so I may correct it for future reference. In this topic I have a link to the download of the mods zip below. I didnt post the mod on this thread because its far to big. What does this script do? This script allows your users to hire bodyguards, hustlers, bootleggers and whores. They can then get these hired people to do them production/business jobs allowing the user to make some money. What version is this right now and what are the new features? This is currently version 2.0 the version that has been ever so long awaited. After countless pm's/time/PAIN I have finally finished it. Its compatible with mccodes v2 you will probably just have to change colors...etc to suit your game. This version allows you to do everything the old ones did but more. It now has troop stats in which your users must keep up in order to be successful. Also the higher someones troops stats are the more successful they will be. And lots of bugs/errors were fixed and more security added. Be sure to leave credits in the code and not claim my work as yours. If anyone asks who did it, just redirect them to iiistudios.com my indie company site. This thread will be the support thread for the mod so be sure to post your problems here. Also comments on the mod would be most appreciated. Links to Download: http://www.iiistudios.com/orgpmod.rar (this download will only stay up for a few days) http://rapidshare.com/files/175077172/orgp_mod.rar.html more links coming Screenshots: Tutorials: tutorials will be added over time on customizing the content and adding content...
-
Re: [mccodes] Register Coupon Lock Nope... for my games i dont like people i dont want signing up on closed betas. So using this they must have a special pass, in this case also know as a coupon to register. Keeps those out you dont want to join when your games are in closed beta...etc
-
This code does not connect to the site nor its mysql. Its very simple code that i made in a minute for myself. I just thought I should post it in case anyone is ever interested. Basically what it does is it allows you to keep users from registering during closed beta. They must have a special code, in this case a coupon to enter and proceed with registration. Just do the fallowing below and it will work fine. Rename your register.php page to w/e you like. Create the page register.php with the fallowing code... <?php //Created by Illes Ignath (Ishmell) //Simple register lock code //Dont remove credit!!! print "Sorry but the site is currently in closed beta. Only those with coupons can register on the site. If you were given a coupon to register then enter that below!!! <form action='register.php' method='post'> ENTER COUPON: <input type='text' size='10' name='coupon'/> <input name='cupsub' value='Submit' type='submit' />"; if ($_POST['coupon'] && $_POST['cupsub']) { if ($_POST['coupon'] == 'SPECIAL CODE HERE') { print "<font color='green'> Your coupon is correct. </font>[url='NEW REGISTER PAGE LOCATION HERE']CLICK HERE[/url]"; } else { print " <font color='red'>Your coupon was incorrect.</font>"; } } ?> Replace 'SPECIAL CODE HERE' with the code you want entered in order to gain access and replace 'NEW REGISTER PAGE LOCATION HERE' with the new renamed register page you just did earlier. That should be it!!! http://www.dabmob.iiistudios.com/register.php <<< you can test it there!!!
-
Re: [mccode] Mcc Christmas Theme Demo isnt working for me. Maybe provide a screenshot? Sounds interesting... :lol:
-
[mccode v2] My Orginization & My Production
ishmell replied to ishmell's topic in Free Modifications
Re: [mccode v2] My Orginization & My Production Alright, ill continue work on this. Ill make my coding for it more clear and suit the mccodes v2 without you having to change it like killah cleaned it before. -
[mccode v2] My Orginization & My Production
ishmell replied to ishmell's topic in Free Modifications
Re: [mccode v2] My Orginization & My Production This is a mccodes v2 mod. :-) Its been a while since I posted here. I also got sidetracked from working on this mod. Are people still interested in me finishing it up and releasing 2.0 for this mod? 8-) -
Re: [mccodes v2]Movie Theatre(basic) Ah yes I see. That way would make more sense. But on the other hand everyone that programs has a way of doing things. My way is the long and complicated :-P But you all make good points. Thanks for the helpful replies and great example. Ill work on taking out my sloppy way of programming and bring in this more officiant/sense-full way. 8-)
-
Re: [mccodes v2]Movie Theatre(basic) Oh I just realized you have to be a premium member to use that mod on my site. So ill take off having to be a premium member for a day or two so you people can test it out. 8-)
-
Hello, this is a basic mod i made. At the moment what it does is users can buy tickets and enter in to watch certain movies depending on the tickets it costs to watch those movies. Then once a user has watched a movie it will raise there happiness stat. You can easily make it raise any stat that you want. The mod has been tested, so it should all be well. If you have any problems then be sure to let me know here. You can also test it on my site www.blacksheep-mafia.com by going to explore> movie theater. Enjoy!!! Note: You may have to change names...etc on the scripts below to suit your game. First off add a field to users table... ticketnum int 11 0 Then make the fallowing pages. movies.php <?php //Created by Illes Ignath (Ishmell) //Movie Theater mod //A IIIStudios Production require "globals.php"; $user = $ir['userid']; $ticketnum = $ir['ticketnum']; print " Welcome {$ir['username']}, to the BSM Movie theater. What would you like to do today? <form action='theater.php' method='post'> <input name='purchase' value='Purchase A Ticket' type='submit' /> <input name='enter' value='Enter With Ticket' type='submit' />"; //checks your tickets print " You have $ticketnum movie tickets."; ?> Make a theater.php page and add this below. <?php //Created by Illes Ignath (Ishmell) //Movie Theater mod //A IIIStudios Production require "globals.php"; $user = $ir['userid']; $puramount = $_POST['buying'] * 1000000; $btickets = $_POST['buying']; $ticketnum = $ir['ticketnum']; $money = $ir['money']; if ($_POST['purchase']) { print " Since this theater is more private then public it wont be cheap. You can purchase tickets for $1000000 each. How many tickets would you like? <form action='theater.php' method='post'> <input type='text' size='8' name='buying'/><input name='psubmit' value='Purchase' type='submit' />"; } else if ($_POST['enter']) { if ($ir['ticketnum'] >= '1') { print " Which movie would you like to watch? Note: Some movies require more tickets but give more hapiness. <form action='theater.php' method='post'> <table width='300' border='1'> <tr> <td>Movie</td> <td>Required</td> <td>Reward</td> <td>Watch?</td> </tr> <tr> <td>The Baker</td> <td>5 tickets</td> <td>5 hapiness</td> <td><input name='watch1' value='Watch' type='submit' /></td> </tr> <tr> <td>Naked Gun</td> <td>10 tickets</td> <td>10 hapiness</td> <td><input name='watch2' value='Watch' type='submit' /></td> </tr> <tr> <td>Im Your Boss</td> <td>20 tickets</td> <td>15 hapiness</td> <td><input name='watch3' value='Watch' type='submit' /></td> </tr> <tr> <td>The Godfather</td> <td>40 tickets</td> <td>20 hapiness</td> <td><input name='watch4' value='Watch' type='submit' /></td> </tr> <tr> <td>Black Sheep Mafia</td> <td>80 tickets</td> <td>25 hapiness</td> <td><input name='watch5' value='Watch' type='submit' /></td> </tr> </table> "; } else { print "Sorry but you dont have any tickets. [url='movies.php']Go Back[/url]"; } } //using tickets else if ($_POST['watch1']) { if ($ticketnum < '5') { print "Sorry, you dont have enough tickets. [url='movies.php']Go Back[/url]"; $h->endpage(); exit; } $db->query("UPDATE users SET ticketnum=ticketnum-5 WHERE userid=$user"); $db->query("UPDATE users SET hapiness=hapiness+5 WHERE userid=$user"); print " The movie, 'The Baker' began to play. Excitement echoed through the crowd in the theater. A little while later the movie finished. You came out of the theater with a smile on your face. [url='movies.php']Go Back[/url]"; } else if ($_POST['watch2']) { if ($ticketnum < '10') { print "Sorry, you dont have enough tickets. [url='movies.php']Go Back[/url]"; $h->endpage(); exit; } $db->query("UPDATE users SET ticketnum=ticketnum-10 WHERE userid=$user"); $db->query("UPDATE users SET hapiness=hapiness+10 WHERE userid=$user"); print " The movie, 'Naked Gun' began to play. Excitement echoed through the crowd in the theater. A little while later the movie finished. You came out of the theater with a smile on your face. [url='movies.php']Go Back[/url]"; } else if ($_POST['watch3']) { if ($ticketnum < '20') { print "Sorry, you dont have enough tickets. [url='movies.php']Go Back[/url]"; $h->endpage(); exit; } $db->query("UPDATE users SET ticketnum=ticketnum-20 WHERE userid=$user"); $db->query("UPDATE users SET hapiness=hapiness+15 WHERE userid=$user"); print " The movie, 'Im Your Boss' began to play. Excitement echoed through the crowd in the theater. A little while later the movie finished. You came out of the theater with a smile on your face. [url='movies.php']Go Back[/url]"; } else if ($_POST['watch4']) { if ($ticketnum < '40') { print "Sorry, you dont have enough tickets. [url='movies.php']Go Back[/url]"; $h->endpage(); exit; } $db->query("UPDATE users SET ticketnum=ticketnum-40 WHERE userid=$user"); $db->query("UPDATE users SET hapiness=hapiness+20 WHERE userid=$user"); print " The movie, 'The Godfather' began to play. Excitement echoed through the crowd in the theater. A little while later the movie finished. You came out of the theater with a smile on your face. [url='movies.php']Go Back[/url]"; } else if ($_POST['watch5']) { if ($ticketnum < '80') { print "Sorry, you dont have enough tickets. [url='movies.php']Go Back[/url]"; $h->endpage(); exit; } $db->query("UPDATE users SET ticketnum=ticketnum-80 WHERE userid=$user"); $db->query("UPDATE users SET hapiness=hapiness+25 WHERE userid=$user"); print " The movie, 'Black Sheep Mafia' began to play. Excitement echoed through the crowd in the theater. A little while later the movie finished. You came out of the theater with a smile on your face. [url='movies.php']Go Back[/url]"; } //purchases else if ($_POST['buying'] <= '0') { print " Sorry, you cant purchase zero or less tickets."; $h->endpage(); exit; } if ($money < $puramount) { print " Sorry, you dont have enough money."; $h->endpage(); exit; } if ($_POST['buying'] >= '1') { $db->query("UPDATE users SET money=money-$puramount WHERE userid=$user"); $db->query("UPDATE users SET ticketnum=ticketnum+$btickets WHERE userid=$user"); print " You have spent $$puramount on $btickets movie tickets. [url='movies.php']Go Back[/url] "; } ?> That should be it. Its nothing to advanced but a pretty nifty mod. If you want to make it increase something other than happiness just replace anything that says happiness to the stat you want to increase when they watched the movie. Be sure to leave comments.