
boionfire81
Members-
Posts
532 -
Joined
-
Last visited
-
Days Won
6
Content Type
Profiles
Forums
Events
Everything posted by boionfire81
-
looking for a one liner (ie include ****.php or $background) for my header that will give each page it's own background. So if the member is on shops.php background image = shops.png, jail.php = jail.png, attack.php = attack.png, etc
-
Like the default shops, but instead of buying an item, it can only be sold there.
-
itemsell.php isn't an actual "Pawn Shop" it's simply selling items from inside the inventory.
-
mccode-v2 New and improved inventory code sources for free!
boionfire81 replied to MDK666's topic in Free Modifications
It's probably the bbcode. would need changed to a tags instead. Or you simply copied and pasted the code snippet. In order to get links working from here you usually need to "quote" the post and then copy the code from there. Otherwise the coded bbcode links simply shows as links which in copy and paste only gives you the anchor. -
hey, I just got this script. But, no, what table is he calling???
-
What table is illousions calling on? PHP Notice: Undefined variable: r (8) Line executed: /home/public_html/battle_ladder.php:18
-
lol! It was around waaaay back when I was using cgi...didn't like it then, still don't lol but that ^^ was funny!
-
One guy contacted me from here, saying he would handle the work. After almost a week of hiring him through freelancer and creating the milestone deposit nothing has been done. This is ludacris.
-
[uSER=65371]sniko[/uSER], I'm interested, but depends on the cost.
-
I found this mod - http://makewebgames.io/forum/game-engines/mccode-development-support/free-modifications/12684-mccodes-1-and-2-invade-house-script and thought it sounded really interesting. BUT it was rather plain as it was just a random xp gain. Well ;) now when you invade someone's house you can actually steal some of their stuff :D It's missing one point so I will be updating soon. But on the success page it doesn't print the item(s) name yet that was taken. Anyways, enjoy! <?php require('globals.php'); $_GET['ID'] = isset($_GET['ID']) && ctype_digit($_GET['ID']) ? $_GET['ID'] : null; if($ir['energy'] < 10) { die("You need at least 10 energy to invade a home. You only have {$ir['energy']} energy. "); } if($ir['jail']) { die("You cannot invade a House while in jail."); } if($ir['hospital']) { die("You cannot invade a House while in hospital."); } if($_GET['ID'] == $userid) { die("You idiot, you own your house!"); } $_GET['ID']=abs((int) $_GET['ID']); $r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid={$_GET['ID']}")); if(!$r['userid']) { die("Sorry, this user does not exist."); } $mult=$r['level']*$r['level']; $chance=min(($ir['crimexp']/$mult)*50+1, 95); $qty=rand(1,5); $it=$db->query("SELECT `inv_itemid`, `inv_qty` FROM `inventory` WHERE `inv_userid` = {$r['userid']} ORDER BY RAND() LIMIT 0,10"); $itms=$db->fetch_row($it); if(rand(1,100) < $chance) { $gain=$r['level']*5; print "You successfully invaded {$r['username']} Home, and gained some experience! <a href='jail.php'>Back</a>"; $db->query("UPDATE users SET crimexp=crimexp+{$gain} WHERE userid=$userid"); $db->query("UPDATE users SET jail=0 WHERE userid={$r['userid']}"); item_add($ir['userid'],$itms['inv_itemid'],$itms['inv_qty']); item_remove($r['userid'],$itms['inv_itemid'],$itms['inv_qty']); event_add($r['userid'], "<a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> invaded your house! They stole {$itms['inv_qty']} of your items. Click <a href='invadehouse.php?ID={$r['userid']}'>here</a> to return the favor."); } else { print "When you were knocking down {$r['username']}'s house you were caught by a police officer and taken to jail. <a href='jail.php'>Go to Jail</a>"; $time=min($mult, 40); $db->query("UPDATE users SET jail=$time, jail_reason='Caught attempting to break into {$r['username']}'s home.' WHERE userid=$userid"); event_add($r['userid'], "<a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> was arrested trying to rob your house."); } $h->endpage(); ?>
-
mccode-v2 Shops item stock - as requested (Not Tested)
boionfire81 replied to radio_active's topic in Free Modifications
I do not understand a single bit of java so here's my shop page <?php /** * File: shops.php * Signature: *******sorry******* * Date: Fri, 20 Apr 12 08:50:30 +0000 */ require_once('globals.php'); include('access.php'); if (!isset($_GET['shop'])) { $_GET['shop'] = 0; } $_GET['shop'] = abs((int) $_GET['shop']); if (!$_GET['shop']) { $q = $db->query( "SELECT `shopID`, `shopNAME`, `shopDESCRIPTION`, `shopIMAGE` FROM `shops` WHERE `shopLOCATION` = {$ir['location']}"); echo "<table width='85%' cellspacing='1' class='table'> "; while ($r = $db->fetch_row($q)) { echo "<tr><td><a href='shops.php?shop={$r['shopID']}'><img src='/css/images/shops/{$r['shopIMAGE']}' height='90px'></a></td> <td> <b><a href='shops.php?shop={$r['shopID']}'>{$r['shopNAME']}</a></b><br> {$r['shopDESCRIPTION']}</td> </tr>"; } echo "</table>"; $db->free_result($q); } else { $sd = $db->query( "SELECT `shopLOCATION`, `shopNAME`, `shopIMAGE` FROM `shops` WHERE `shopID` = {$_GET['shop']}"); if ($db->num_rows($sd) > 0) { $shopdata = $db->fetch_row($sd); if ($shopdata['shopLOCATION'] == $ir['location']) { echo "<center><img src='css/images/shops/{$shopdata['shopIMAGE']}' height='120px'></center>"; $qtwo = $db->query( "SELECT `itmtypename`, `itmname`, `itmdesc`, `itmpic`, `itmbuyprice`, `itmsellprice`, `sitemID`, `sitemQTY`, `itmid` FROM `shopitems` AS `si` INNER JOIN `items` AS `i` ON `si`.`sitemITEMID` = `i`.`itmid` INNER JOIN `itemtypes` AS `it` ON `i`.`itmtype` = `it`.`itmtypeid` WHERE `si`.`sitemSHOP` = {$_GET['shop']} ORDER BY `itmbuyprice` ASC, `itmname` ASC, `itmtype` ASC"); echo "<table class='store'><tr>"; $lt = ""; ?> <script language="Javascript" type="text/javascript"> //<![CDATA[ function moneyformat(num) { num = num.toString().replace(/\$|\,/g,''); if(isNaN(num)) num = "0"; sign = (num == (num = Math.abs(num))); num = Math.floor(num*100+0.50000000001); cents = num%100; num = Math.floor(num/100).toString(); if(cents<10) cents = "0" + cents; for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++) num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3)); return (((sign)?'':'-') + '$' + num); } function tot(id,a,b) { var c=a*Math.round(b); var d=moneyformat(c); document.getElementById("res" + id).innerHTML = d; } function clearText(thefield){ if (thefield.defaultValue==thefield.value) thefield.value = "" } function returnText(thefield){ if (thefield.value=='' || thefield.value==0) thefield.value = thefield.defaultValue } //]]> </script> <?php $i = 1; // start the increment while($r = $db->fetch_row($qtwo)) { print "<td style='border: 1px solid #DDD;'><table class='shopitem'><tr><th><? echo {$r['itmname']}; ?></th></tr><td height='75px'><div id='box' style=background-image:url('css/images/shops/itmpic/{$r['itmpic']}');><div id='overlay'><span id='plus'><a href='iteminfo.php?ID={$r['itmid']}'><br><img src='css/images/shops/info.png'><b>Info</b><br><b>In Stock: </b><? echo {$r['sitemQTY']}; ?><br></a></span></div></div></td></tr><tr><td><center><b><? echo " . money_formatter($r['itmbuyprice']) . " ?></b></center></td></tr><tr><td><center><form action='itembuy.php?ID=<? echo $r['itmid']; ?>' name='shopbuy' method='post'>Qty: <input type='number' name='qty' min='1' max='100' value='1' maxlength='3' onkeyup='tot(<? echo {$r['itmid']}; ?>, <? echo {$r['itmbuyprice']}; ?>,this.value);' onfocus='clearText(this);' onblur='returnText(this);' /> <input type='hidden' name='shop' value='{$_GET['shop']}' /> <input type='submit' value='Buy' class='storebutton' /></form></center></td></tr></table></td>"; if($i != 0 && $i % 5 == 0) //3 because we started with 0. 0,1,2,3 = 4 { print "</tr><tr>"; // This will be some sort of "line break" } $i++; } echo "</tr></table>"; } else { echo "You are trying to access a shop in another city!"; } } else { echo "You are trying to access an invalid shop!"; } $db->free_result($sd); } $h->endpage(); Error is Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) Basically where the table starts on the view shop part. -
I'm looking for a script that will let you sell your items back to the game at the items defined sell price. But only items with a sell value of $5 or more. Also, I need a log of the sales.
-
I changed the three to a four which gave me 5 on top and 4 on the other rows. And, the tables are inside a table. Need to for the overlays.
-
Ok, first row is 4, but then the next are only 3's here's what I have $i = 0; // start the increment while($r = $db->fetch_row($qtwo)) { print "<td><table class='shopitem'><tr><th>{$r['itmname']}</th></tr><td height='75px'><div id='box' style=background-image:url('css/images/shops/itmpic/" . $r['itmpic'] . "');><div id='overlay'><span id='plus'><a href='iteminfo.php?ID={$r['sitemID']}'><br><img src='css/images/shops/info.png'><br><br></a></span></div></div></td></tr><tr><td><center><b>" . money_formatter($r['itmbuyprice']) . " </b></center></td></tr><tr><td><center><form action='itembuy.php?ID={$r['sitemID']}' method='post'>Qty: <input type='number' name='qty' min='1' max='100' value='1' maxlength='3' /><br><input type='submit' value='Buy' class='storebutton'/></form></center></td></tr></table></td>"; if($i != 0 && $i % 3 == 0) //3 because we started with 0. 0,1,2,3 = 4 { print "</tr><tr>"; // This will be some sort of "line break" } $i++; } echo "</tr></table>"; }
-
going to keep working on this. which is fun because I really don't understand what does what, how and why. But now the first row is a single then it's groups of 3??
-
ok, so the first $i should be $i = 4? Then just add $i++ at the end? I mean just curious does it need to be kept repeating until when? I have no idea how many items will end up being there so???
-
That just gave me 5 items side by side?? How do I break into a new row?
-
ok so $i = 0; // start the increment while($r = $db->fetch_row($query)) { print "<div class='container'>"; print "all your items in this container"; print "</div>"; if($i == 3) //3 because we started with 0. 0,1,2,3 = 4 { print "<div class='row'></div>"; // This will be some sort of "line break" } $i++; } just put my html for a tr row in the container, and it will print 4 td and break to a new line and repeat on it's own? That's cool. Mind defining the $i = 0 portions so if I ever need to do this type of thing again I'll know.
-
Why is McCodes hated so much online? Outside of this forum finding help is almost useless. 80% of coders wont touch an mccodes script. The others want to charge $100 just to install a mod that was bought from mccodes. I guess you could say the good news is I'm learning more and more about php/mccodes? Anyways anyone help me with how do I recreate the woocommerce look for my mccodes shop pages? Meaning how they have 4 cells across and then go to the next line, 4 cells, next line etc...? Closest I have here is the never ending loops -.-
-
ok, so it would link the inventory item id to a get id which would equal the pack id in the code above?
-
Yes it is v2. I'm assuming that would go in itemuse.php? If there is more than 1 say "box of goodies" to open. i.e. box of sweets, box of bullets, etc, etc. How would the script be written then?
-
Does anyone know how to create "packages" so that when opened you get 6x an item, or even multiple items?
-
Anyone have this mod?
-
Where can it be purchased?
-
[uSER=68711]KyleMassacre[/uSER] is that post ^^^ still available? It says it's a restricted thread.