
bocco
Members-
Posts
108 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by bocco
-
Re: buying missions mod for [v2!] i have something like that but there is about 5 edits to the files and 5 new files and and about 4 SQL entries it last for about 45 days after that you get a reward at the end
-
Re: New Take Out A Loan sorry for the long delay on your questions example what if they have a the house they start with (big deal if they lose it) the reason why i said send their account into a negative, it would make the best sense. As for messing up the game, how ? the stats are you referring to? That is why i suggested that you add a feild and if loan = 1 they cant send any money or crystals or weapons to people while that = 1 then once the loan is paid the loan will be 0 then they can transfer money crystals etc. again and if they dont pay back it just auto takes it from them + interest so if the loan was for 10,000 and they did not pay it back it would take 15,000 dollars out and with the negative they would have to cover that. But that is the way i look at this mod
-
Re: New Take Out A Loan thats good, but an example, what if they transfer the money before they have to pay it back ok so they lose the house and are declared backup what does that do to the player i would think the best way to do this is do some rewriting the code and either have a bank loan where they can not transfer it by adding a feild called 'loan' and if they try to do a transfer and loan = 1 then it will be denied also rather then losing the house, i would make the money on hand minus what they took out so if they took out 10,000,000 dollars and they have 0 on hand they would go into a negative of 10,000,000 but that is just my two sense EDIT - ADD `maxloan` INT( 11 ) NOT NULL DEFAULT '50000' sorry did not see that was the max but still would like to keep my above advise
-
Re: Energy bar well there is more to it then that do you want it to display the max energy and current or just 100/100 if that is the case why not leave it at 100% but if you want it to display the current and max energy do this find this <td>Energy: {$enperc}% and replace {$enperc}% with {$ir['energy']} / {$ir['maxenergy']}
-
mccode-v1 Stock Market. Working + Secured
bocco replied to Haunted Dawg's topic in Free Modifications
Re: [mccode v2] Stock Market. Working + Secured first thing is he added the cron to the page to show you how it would change, that is not in the real code.... 2nd there is one error if you have 100 dollars on hand and the stock is at 100 you cant buy it it should only be a <money rather then <=money -
Add, Edit, Delete House Upgrades from Staff Panel
bocco replied to Becon's topic in Free Modifications
Re: Add, Edit, Delete House Upgrades from Staff Panel i think its a good idea, but the prices would need to be altered something like if not married give the normal price if married price x 1.5 so the house would be 50% more, i would make that alteration if i wanted to use shared houses -
Re: Auto ban mod [V2] something at is a little better then a ban is to block same ip transfers saves a lot of trouble to see if this happens remember some people play at school\colleges that may never know they are at the same campus
-
so for some people that have a huge amount of listing for crystals and want to clean it up use this code, you can set the number of listing it will show per page, i like to keep things a little cleaner and use 15 - 20 listing per page. <?php include "globals.php"; print "<h3>Crystal Market</h3>"; switch($_GET['action']) { case "buy": crystal_buy(); break; case "remove": crystal_remove(); break; case "add": crystal_add(); break; default: cmarket_index(); break; } function cmarket_index() { global $db,$ir,$c,$userid,$h; $st=($_GET['st']) ? $_GET['st'] : 0; $cnt = $db->query("SELECT cm.*, u.* FROM crystalmarket cm LEFT JOIN users u ON u.userid=cm.cmADDER ORDER BY cmPRICE/cmQTY ASC LIMIT $st,15"); $membs=mysql_num_rows($cnt); $pages=(int) ($membs/15)+1; $no1=$st+1; $no2=$st+15; if($membs % 100 == 0) { $pages--; } print "Pages: "; for($i=1;$i <= $pages;$i++) { $stl=($i-1)*15; print "[url='cmarket.php?st=$stl&ord=$ord']$i[/url] "; } $no1=$st+1; $no2=$st+15; print " Showing crystal listing $no1 to $no2 "; print " [url='cmarket.php?action=add']Add A Listing[/url] Viewing all listings... <table width=75% cellspacing=1 class='table'> <tr style='background:gray'> <th>Adder</th> <th>Qty</th> <th>Price each</th> <th>Price total</th> <th>Links</th> </tr>"; while($r=$db->fetch_row($q)) { if($r['cmADDER'] == $userid) { $link = "[url='cmarket.php?action=remove&ID={$r[']Remove[/url]"; } else { $link = "[url='cmarket.php?action=buy&ID={$r[']Buy[/url]"; } $each= (int) $r['cmPRICE'] / $r['cmQTY']; print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['cmQTY']}</td> <td> \$" . number_format($each)."</td> <td>\$".number_format($r['cmPRICE'])."</td> <td>[$link]</td> </tr>"; } print "</table>"; } function crystal_remove() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM crystalmarket WHERE cmID={$_GET['ID']} AND cmADDER=$userid"); if(!$db->num_rows($q)) { print "Error, either these crystals do not exist, or you are not the owner. [url='cmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); $db->query("UPDATE users SET crystals=crystals+{$r['cmQTY']} where userid=$userid"); $db->query("DELETE FROM crystalmarket WHERE cmID={$_GET['ID']}"); print "Crystals removed from market! [url='cmarket.php']> Back[/url]"; } function crystal_buy() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM crystalmarket cm WHERE cmID={$_GET['ID']}"); if(!$db->num_rows($q)) { print "Error, either these crystals do not exist, or they have already been bought. [url='cmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); if($r['cmPRICE'] > $ir['money']) { print "Error, you do not have the funds to buy these crystals. [url='cmarket.php']> Back[/url]"; $h->endpage(); exit; } $db->query("UPDATE users SET crystals=crystals+{$r['cmQTY']} where userid=$userid"); $db->query("DELETE FROM crystalmarket WHERE cmID={$_GET['ID']}"); $db->query("UPDATE users SET money=money-{$r['cmPRICE']} where userid=$userid"); $db->query("UPDATE users SET bankmoney=bankmoney+{$r['cmPRICE']} where userid={$r['cmADDER']}"); event_add($r['cmADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['cmQTY']} crystals from the market for \$".number_format($r['cmPRICE']).".",$c); print "You bought the {$r['cmQTY']} crystals from the market for \$".number_format($r['cmPRICE'])."."; } function crystal_add() { global $db,$ir,$c,$userid,$h; $_POST['amnt'] = abs((int) $_POST['amnt']); $_POST['price'] = abs((int) $_POST['price']); if($_POST['amnt']) { if($_POST['amnt'] > $ir['crystals']) { die ("You are trying to add more crystals to the market than you have."); } $tp=$_POST['amnt']*$_POST['price']; $db->query("INSERT INTO crystalmarket VALUES('',{$_POST['amnt']},$userid,$tp)"); $db->query("UPDATE users SET crystals=crystals-{$_POST['amnt']} WHERE userid=$userid"); print "Crystals added to market! [url='cmarket.php']> Back[/url]"; } else { print "[b]Adding a listing...[/b] You have [b]{$ir['crystals']}[/b] crystal(s) that you can add to the market.<form action='cmarket.php?action=add' method='post'><table width=50% border=2><tr> <td>Crystals:</td> <td><input type='text' name='amnt' value='{$ir['crystals']}' /></td></tr><tr> <td>Price Each:</td> <td><input type='text' name='price' value='200' /></td></tr><tr> <td colspan=2 align=center><input type='submit' value='Add To Market' /></tr></table></form>"; } } $h->endpage(); ?> I should also say, i have modded my game a lot, and the banks are open when you join .... so you will have to change this $db->query("UPDATE users SET bankmoney=bankmoney+{$r['cmPRICE']} where userid={$r['cmADDER']}"); (line 98) to $db->query("UPDATE users SET money=money+{$r['cmPRICE']} where userid={$r['cmADDER']}");
-
Re: Shops there is a better way, why not just make all the shop located at the one location and delete all the other cities then again the idea of the game is to give people something to look forward to, if you make all the shop open then the members have nothing to look forward to.
-
[MCCODES V2[ Announcements mod only visible to staff
bocco replied to Uridium's topic in Free Modifications
Re: [MCCODES V2[ Announcements mod only visible to staff why can you just use the mail staff feature ?? seems like that would be a little better .... but then again, its a personal preference -
Attack Script made by us one that works Hopefully.
bocco replied to Uridium's topic in Free Modifications
Re: Attack Script made by us one that works Hopefully. right now i have a mug script fully made, and the more mug exp you have the more money you get Cost - 10% you can pay to upgrade you level, after that you start to get exp to level your player but it is modded to my game and will not work for everyone -------------- and i am working with someone to make a new attack script and it is going to be great -
Re: [Help] itemmarket (v2) i have done that and it does not work for me it still goes to the money "on hand"
-
Re: [Help] itemmarket (v2) maybe before you say what to change, take a look at the code. the code does not make sense
-
Re: Hall of Fame = Lag central. no it could be your server that is trying to pull to much info try killah's HOF, i use it and its good
-
Re: [Help] itemmarket (v2) i have already gave everyone a free bank and changed the reg. page to put bankmoney=0 so that is all covered, and for Iamwicked what line are you referring to, i did change it and it took it from buyers bank and put it in sellers banks it should be buyers money on hand and put into sellers bankmoney
-
i am asking for some help, the itemmarket puts the money into the 'on hand' i have seriously modded my game to were bank accounts do not cost to open so i would like the money to go into there bank. just to clear it up Player 2 has 50 crystals on the market for $1,000,000 i buy it my money leaves my money on hand and goes into there bank. so i have to take money out of my bank to buy something but if player 2 gets mugged he will not lose any money <?php /* //Created by raDiO acTivE ~ Free script for CE users //Please leave this notice here as courtesy //Free Revamp of MCcode V2 //Enjoy */ include "globals.php"; print "<h3>Item Market</h3>"; switch($_GET['action']) { case "buy": item_buy(); break; case "remove": itemm_remove(); break; default: imarket_index(); break; } function imarket_index() { global $db,$ir,$c,$userid,$h; print "Viewing all listings... <table width=75% cellspacing=1 class='table'> <tr style='background:gray'> <th>Adder</th> <th>Item</th> <th>Price</th> <th>Links</th> </tr>"; $q = $db->query("SELECT im.`imID`,`imITEM`,`imADDER`,`imPRICE`,`imCURRENCY`, i.`itmid`,`itmtype`,`itmname`, u.`userid`,`username`, it.`itmtypeid`,`itmtypename` FROM itemmarket im LEFT JOIN `items` i ON im.imITEM = i.itmid LEFT JOIN `users` u ON u.userid = im.imadder LEFT JOIN `itemtypes` it ON i.itmtype = it.itmtypeid ORDER BY i.itmtype, i.itmname ASC" ); // Created by raDiO acTivE ~ Free script for CE users $lt=""; while ( $r=$db->fetch_row($q) ) { if($lt!=$r['itmtypename']) { $lt=$r['itmtypename']; echo"\n <tr style='background: gray;'> <th colspan=4>{$lt}</th> </tr> "; } if($r['imCURRENCY']=="money") { $price="\$".number_format($r['imPRICE']); } else { $price = number_format($r['imPRICE'])." crystals"; } if($r['imADDER'] == $userid) { $link = "[[url='itemmarket.php?action=remove&ID=".$r[']Remove[/url]]"; } else { $link = " [[url='itemmarket.php?action=buy&ID=".$r[']Buy[/url]] "; } echo "\n <tr> <td> [url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['itmname']}</td> <td>$price</td> <td>[[url='iteminfo.php?ID={$r[']Info[/url]] $link</td> </tr>"; } } function itemm_remove() { global $db,$ir,$c,$userid,$h; $r = $db->query(sprintf(" SELECT im.`imID`,`imITEM`,`imADDER`,`imPRICE`,`imCURRENCY`, i.`itmid`,`itmtype` FROM `itemmarket` im LEFT JOIN `items` i ON im.imITEM = %d WHERE `imID` = %u AND `imADDER` = %d", i.itmid, (INT)$_GET['ID'], $userid ) ); if(!$db->num_rows($q)) { echo "Error, either this item does not exist, or you are not the owner. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r=$db->fetch_row($q); item_add($userid, $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $delete = sprintf("DELETE FROM `itemmarket` WHERE imID= %u", (INT)$_GET['ID']); $db->query($delete); $insert = sprintf("INSERT INTO `imremovelogs` (imrID,imrITEM,imrADDER,imrREMOVE,imrIMID,imrINVID,imrTIME,imrCONTENT) VALUES (%d,%d,%d,%d,%d,%u,unix_timestamp(), {$ir['username']} removed a {$r['itmname']} from the item market.)", '', $r['imITEM'], $r['imADDER'], $userid, $r['imID'] , $i, $ir['username'] ); echo " Item removed from the market. [url='itemmarket.php']> Back[/url]"; } // Created by raDiO acTivE ~ Free script for CE users function item_buy() { global $db,$ir,$c,$userid,$h; $q = $db->query(sprintf("SELECT `imID`,`imITEM`,`imADDER`,`imPRICE`,`imCURRENCY` FROM `itemmarket` im LEFT JOIN `items` i ON i.itmid = %d WHERE imID = %u", im.imITEM, (INT)$_GET['ID'] ) ); if(!$db->num_rows($q)) { echo "Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } $r = $db->fetch_row($q); $curr = $r['imCURRENCY']; if($r['imPRICE'] > $ir[$curr]) { echo "Error, you do not have the funds to buy this item. [url='itemmarket.php']> Back[/url]"; $h->endpage(); exit; } item_add($userid, $r['imITEM'], 1); $i=($db->insert_id()) ? $db->insert_id() : 99999; $db->query(sprintf("DELETE FROM `itemmarket` WHERE `imID` = %u", (INT)$_GET['ID'] ) ); $db->query(sprintf("UPDATE`users` SET $curr = $curr-%d WHERE userid=%d", $r['imPRICE'], $userid ) ); $db->query(sprintf("UPDATE `users` SET $curr = $curr+%d WHERE userid = %u", $r['imPRICE'], $r['imADDER'] ) ); if($curr=="money") { event_add($r['imADDER'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for \$".number_format($r['imPRICE']).". "); $db->query(sprintf("INSERT INTO `imbuylogs` (imbID,imbITEM,imbADDER,imbBUYER,imbPRICE,imbIMID,imbINVID,imbTIME,imbCONTENT) VALUES (%u,%d,%d,%d,%d,%d,%u, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']}')", '', $r['imITEM'], $r['imADDER'], $userid, $r['imPRICE'], $r['imID'], $i) ); // Created by raDiO acTivE ~ Free script for CE users echo "You bought the {$r['itmname']} from the market for \$".number_format($r['imPRICE'])."."; } else { event_add( $r['imADDER'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for ".number_format($r['imPRICE'])." crystals."); $db->query(sprintf("INSERT INTO `imbuylogs` (imbID,imbITEM,imbADDER,imbBUYER,imbPRICE,imbIMID,imbINVID,imbTIME,imbCONTENT) VALUES (%u,%d,%d,%d,%d,%d,%u, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']}')", '', $r['imITEM'], $r['imADDER'], $userid, $r['imPRICE'], $r['imID'], $i) ); echo "You bought the {$r['itmname']} from the market for ".number_format($r['imPRICE'])." crystals."; } } $h->endpage(); ?>
-
Re: A standalone Mug mod if you are referring to a mug mod as in you mugged 30 people and gain 300 dollars i have made one the better exp you have the more money you get PS mail me if you want the code
-
Re: [mc codes lite] User Credit Card Companys another thing should be say if such person does not pay back in say 30 days or what ever you set it for, it will auto take the money out of the account to repay it. Even if they do not have money it will put it in the negative. At least then if people try to take the money and not pay back you still will get it back. Same concept if you went to a place that does pay day loans, if you are over due by 3 weeks they take take the money directly out of their bank.
-
Re: Staff Functions! you know what would be really nice, the ability to grant a staff more power so say you will let assistants make and edit crimes, you would go to 'edit user powers' and you would select what they can do or deselect
-
Re: [mccode] Advanced Warning System Still having a problem can someone help me out. This is the error message 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 'ORDER BY w.time DESC' at line 1 Query was SELECT w.*,u.* FROM warnings w LEFT JOIN users u ON w.warner=u.userid WHERE w.user= ORDER BY w.time DESC Yes i have double checked the database and it is correct
-
Re: [mccode] stop same ip transfers i understand that all this security in multi transfers makes it unnecessary for staff, but there is so much more still to look over
-
Re: [mccode] stop same ip transfers Never mind i have figured out the code myself
-
Re: [mccode v2] Updated forums then why dont you share it with all of us
-
Re: stop same ip transfers Is there a way to stop same IP transfers with ITEMS ? if there is can you please assist me.
-
Re: [V2] Edit Jobs Error... well this is a very simple fix i know this is an late update but i figured if someone else had this issue i would let you know see where it is "222where jrID=2" well find find this $db->query("UPDATE jobs SET jNAME='{$_POST['jNAME']}', jDESC='{$_POST['jDESC']}', jOWNER='{$_POST['jOWNER']}', jFIRST={$_POST['jFIRST']}WHERE jID={$_POST['jID']}"); and replace it with this $db->query("UPDATE jobs SET jNAME='{$_POST['jNAME']}', jDESC='{$_POST['jDESC']}', jOWNER='{$_POST['jOWNER']}', jFIRST={$_POST['jFIRST']} WHERE jID={$_POST['jID']}");