-
Posts
693 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by radio_active
-
Re: [mccode v2] Revamped RentaSpy Haha, was browsing and thought id give you a bump! Because everyone always goes to advanced rentaspy, not revamped, so i bumped this one up for ya :wink:
-
[MCcode v2] Advanced spying script [$10 USD]
radio_active replied to radio_active's topic in Paid Modifications
Re: [MCcode v2] Advanced spying script [$10 USD] Once again thanks, Im doing more edits on it right now, im changing the main Formula for success and failures so it will be a bit better and fairer again along with some visual edits etc.! -
[MCcode v2] Advanced spying script [$10 USD]
radio_active replied to radio_active's topic in Paid Modifications
Re: [MCcode v2] Advanced spying script [$10 USD] Thanks for the morale boost, lol :-) -
Advanced Spy: My first CE sold script Price $ 10 USD Copies Available: 10 How it works: There is now a new stat in the game, that is called Spy Skill. Users cannot train it, there is only one way for it to rise and that is by spying on other users. There is always a 3% chance to fail even if the formula hits 100% success or above. Making it a little fairer. Its set out so lower levels are easier to spy on whereas higher levels it is harder. So you have a base formula which then the users spy stat comes into that formula to make it more interesting. The more spy skill, the more chance you have of succeeding HOWEVER, there is also a catch. When you succeed you dont have all the answers set out in front of you, you didnt get all the information in one go unless you were really lucky. You will understand when you see the screen shot. Lots of rand()s make this a lot more interesting. Little Background info The formula's involved in this script make it fair no matter what level you are. A good way to also up people's spy stats is to edit the "School Courses" script in V2 so users can get SPY skill from it aswell, that will cost $5 extra however. I sat for while thinking up a formula and it finally came to me, then with a little advice from zero_affect the first part was complete. Files 1 file spy.php 1 file instructions.php 1 sql to the userstats table Buyers Only selling to trustworthy buyers so mail me for my paypal address if your interesting in buying through a PM NOTE: I am traveling from 11 hours time for 3 days so i will not be able to sell copies until i have arrived at my destination on the 7th for +10 GMT time. SCREENIES http://i446.photobucket.com/albums/qq19 ... uccess.jpg http://i446.photobucket.com/albums/qq19 ... jail-1.jpg http://i446.photobucket.com/albums/qq19 ... /event.jpg Screenies are pretty bad but hey... Services: Offering fixes and updates on this script for 6 months.
-
Re: [mccode v2] Building [$20.00] I think it'd be nicer if there was the same map for everyone allowing around 100-500 buildings and users can burn eachothers down, that would raise the price but you would get more sells
-
mccode-v2 Shops item stock - as requested (Not Tested)
radio_active replied to radio_active's topic in Free Modifications
Re: [MCcode v2] Shops item stock - as requested (Not Tested) No worries, glad you do! Enjoy :wink: -
Re: [mccode v2] Building [$20.00] If you added random things like occasionally peoples buildings burnt down etc etc, maybe i would get it.
-
Re: [mccode v2] Revamped RentaSpy BUMP
-
Re: Gym Help Can you tell me a bit more about it, such as are you using the "everyone has 100 energy" mod etc etc?
-
Re: Gym Help So you want to make it so 10 energy = 1 energy? So out of having 100 energy, you will get 10 trains out of it? Like torn city does?
-
Re: Gym Help Can you post the whole gym file... Not so familiar with lite.
-
Re: *special* McCodes v3 BETA Release My question, have you edited it off the V2 or V1 code?
-
mccode-v2 Shops item stock - as requested (Not Tested)
radio_active replied to radio_active's topic in Free Modifications
Re: [MCcode v2] Shops item stock - as requested (Not Tested) I updates the Add item to shop function.. Thankyou, it was a good idea! Edit: Forgot a ) on the query. But that was only one function which is that was needed it think. -
mccode-v2 Shops item stock - as requested (Not Tested)
radio_active replied to radio_active's topic in Free Modifications
Re: [MCcode v2] Shops item stock - as requested (Not Tested) Optional Addition: When users sell items it updates the stock. So if a user sells 10 medical kits, the shops medical kit supplies will increase by 10. Open itemsell.php Add $db->query(sprintf("UPDATE shopitems SET `sitemQTY` = (sitemQTY+('%d')) where sitemITEMID = ('%d')", $_GET['qty'], $r['itmid'] )) or die (" Query Error "); Under the item_add... or just use this. <?php include "globals.php"; $_GET['ID'] = (isset($_GET['ID']) AND !ereg('[^0-9]', $_GET['ID'])) ? abs(@intval($_GET['ID'])) : FALSE ; $_GET['qty'] = (isset($_GET['qty']) AND !ereg('[^0-9]', $_GET['qty'])) ? abs(@intval($_GET['qty'])) : FALSE ; //itemsend if($_GET['qty']) { $id = $db->query(sprintf("SELECT iv.inv_id,inv_itemid,inv_userid,inv_qty, it.itmid,itmtype,itmname,itmsellprice FROM inventory iv LEFT JOIN items it ON iv.inv_itemid = it.itmid WHERE iv.inv_id = %d AND iv.inv_userid = %d LIMIT 1", $_GET['ID'], $userid )); if($db->num_rows($id)==0) { echo "Invalid item ID"; } else { $r=mysql_fetch_assoc($id); if($_GET['qty'] > $r['inv_qty']) { echo "You are trying to send more than you have!"; } else { $price=$r['itmsellprice']*$_GET['qty']; item_remove($userid, $r['itmid'], $_GET['qty']); $db->query(sprintf("UPDATE shopitems SET `sitemQTY` = (sitemQTY+('%d')) where sitemITEMID = ('%d')", $_GET['qty'], $r['itmid'] )) or die (" Query Error "); $db->query(sprintf("UPDATE `users` SET `money` = money+%d WHERE userid = %d", $price, $userid )); $priceh="$".($price); $sold = "You sold ".('%u')." {$r['itmname']}(s) for {$priceh}"; printf($sold,(int)$_GET['qty']); $db->query(sprintf("INSERT INTO itemselllogs (isID,isUSER,isITEM,isTOTALPRICE,isQTY,isTIME,isCONTENT) VALUES ('', %d, %d, %d, %u, unix_timestamp(),'{$ir['username']} sold {$_GET['qty']} {$r['itmname']}(s) for {$priceh}') ", $userid, $r['itmid'], $price, $_GET['qty'] )); } } } else if($_GET['ID']) { $id = $db->query(sprintf("SELECT iv.inv_id,inv_itemid,inv_userid,inv_qty, it.itmid,itmtype,itmname,itmsellprice FROM inventory iv LEFT JOIN items it ON iv.inv_itemid = it.itmid WHERE iv.inv_id = ('%u') AND iv.inv_userid = ('%d') LIMIT 1", $_GET['ID'], $userid )); if($db->num_rows($id)==0) { echo "Invalid item ID"; } else { $r = mysql_fetch_assoc($id); echo "[b]Enter how many ".$r['itmname']." you want to sell. You have ".$r['inv_qty']." to sell.[/b] <form action='itemsell.php' method='get'> Quantity: <input type='text' name='qty' value='' /> <input type='hidden' name='ID' value='".$_GET['ID']."' /> <input type='submit' value='Sell Items (no prompt so be sure!' /> </form>"; } } else { echo "Invalid use of file."; } $h->endpage(); ?> I think that just about covers it. -
Re: Gang Respect? You would want to have high prices on gang upgrades, like very high... And have a way to limit users joining etc because the best gang would be the one with the most users... Its a great idea but yeah, for me it would cost.. lol
-
Re: [mccodes v2.0] Yet Another Attack Rather then selecting the whole users table why dont you just select fields needed??? $q = $db->query(sprintf("SELECT u.userid,username,energy,hp,location,hospital,jail,fedjail,gender,attacking,equip_primary,equip_secondary,equip_armor, us.userid,strength,agility,guard,labour,IQ,maxhp FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=('%d')", (int)$_GET['ID'] )); $odata=$db->fetch_row($q); And do that on ALL the Select queries..
-
Re: Gang Respect? Its a big mod, i would do this for money only.. lol Someone else might do for free though.
-
Re: Gang Respect? I do not because that just means the more users you have, the more respect. You would have to have a base amount of respect, say 200 and then users in gangs share that respect. If another user joins that means 100 respect for both users, if another one joins that means 66.66666 for each user, another joins it divides to 50 for each user... If a users respect hit 0, what would happen then, alot of information is requireed to make someting like that.
-
Re: Gang Respect? Hmmmm interesting. What happens if someone is just looking for respect and attacks a player they are at war with, does the whole gangs users respect drop?
-
mccode-v2 Shops item stock - as requested (Not Tested)
radio_active replied to radio_active's topic in Free Modifications
Re: [MCcode v2] Shops item stock - as requested (Not Tested) One more edit.. Open staff_shops.php replace the "function new_stock_form()" and "function new_stock_submit()" with function new_stock_form() { global $db,$ir,$c,$h; print "<h3>Adding an item to a shop</h3> <form action='staff_shops.php?action=newstocksub' method='post'> Shop: ".shop_dropdown($c,"shop")." Item: ".item_dropdown($c,"item")." Stock: <input type='text' name='qty' value='0' /> <input type='submit' value='Add Item To Shop' /></form>"; } function new_stock_submit() { global $db,$ir,$c,$h; $qty=abs(@intval( $_POST['qty'])); $db->query(sprintf("INSERT INTO shopitems (sitemID,sitemSHOP,sitemITEMID,sitemQTY) VALUES ('',('%d'),('%d'),('%u'))", $_POST['shop'], $_POST['item'], $qty)); echo "". $qty." of item ID ".$_POST['item']." was successfully added to shop ID ".$_POST['shop'].""; stafflog_add("Added ". $qty." of Item ID {$_POST['item']} to shop ID {$_POST['shop']}"); } Thankyou, it was a good idea! Edit: Forgot a ) on the query. -
Re: Help!! Mccodes Lvl hack Or you could just use a if statement with an array.. if (!ctype_alnum(str_replace(array('_', ' '), '', $string))) Allowing Alphanumeric with _ and spaces. To use that in your username change you would do something like if (!ctype_alnum(str_replace(array('_', ' '), '', $_POST['newname']))) and implement that into the file So you would then be using something like this.. function do_name_change() { global $db,$ir,$c,$userid,$h; // Edited by zero-affect if($_POST['newname'] == "" || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " || $_POST['newname'] == " " && $_POST['newname'] == " ") { $i = mysql_query("SELECT * FROM users WHERE username='{$_POST['username']}'") or die(mysql_error()); if(mysql_num_rows($i)) {echo 'Username already in use!';$h->endpage(); exit; } print "You did not enter a new name. [url='preferences.php?action=namechange']> Back[/url]"; } else { if (!ctype_alnum(str_replace(array('_', ' '), '', $_POST['newname']))) { echo "You have an invalid character in your name"; } else { $checkun=$db->num_rows($db->query("SELECT * FROM users WHERE username='{$_POST['newname']}' AND userid!=$userid")); if($checkun) { echo "Username is already in use."; $h->endpage(); exit; } $checkln=$db->num_rows($db->query("SELECT * FROM users WHERE login_name='{$_POST['newname']}' AND userid!=$userid")); if($checkln) { echo "Username is already in use."; $h->endpage(); exit; } $db->query("UPDATE users SET username='{$_POST['newname']}' WHERE userid=$userid"); print "Username changed!"; } } }
-
Re: Shops Item Quantity? http://criminalexistence.com/ceforums/i ... ic=27467.0 Its been made Josh, the update is about 10 posts down so grab the edited version..
-
mccode-v2 Shops item stock - as requested (Not Tested)
radio_active replied to radio_active's topic in Free Modifications
Re: [MCcode v2] Shops item stock - as requested (Not Tested) Okay i have woken up now, im awake and i found the errors... Replace with these itembuy.php <?php include "globals.php"; $_GET['ID'] = (isset($_GET['ID']) AND !ereg('[^0-9]', $_GET['ID'])) ? abs(@intval($_GET['ID'])) : FALSE ; $_GET['shop'] = (isset($_GET['shop']) AND !ereg('[^0-9]', $_GET['shop'])) ? abs(@intval($_GET['shop'])) : FALSE ; $_GET['qty'] = (isset($_GET['qty']) AND !ereg('[^0-9]', $_GET['qty'])) ? abs(@intval($_GET['qty'])) : FALSE ; if(!$_GET['ID'] || !$_POST['qty']) { echo "Invalid use of file"; } else if($_POST['qty'] <= 0) { echo "You have been added to the delete list for trying to cheat the game."; } else { $q = $db->query(sprintf("SELECT `itmid`,`itmtype`,`itmname`,`itmbuyprice`,`itmbuyable` FROM items WHERE itmid=('%d')", $_GET['ID'])); $b = $db->query(sprintf("SELECT sitemID,sitemQTY FROM shopitems WHERE sitemITEMID = ('%d')", $_GET['ID'])); if(mysql_num_rows($q) == 0) { echo "Invalid item ID"; } else { $itemd = mysql_fetch_assoc($q); $qty = mysql_fetch_assoc($b); if($ir['money'] < $itemd['itmbuyprice']*$_POST['qty']) { echo "You don't have enough money to buy this item!"; $h->endpage(); exit; } if($itemd['itmbuyable'] == 0) { echo "This item can't be bought!"; $h->endpage(); exit; } if($qty['sitemQTY'] == 0) { echo "This item is out of stock, you will have to wait for a new shipment"; $h->endpage(); exit; } if($qty['sitemQTY'] < $_POST['qty']) { echo "There isn't enough items in stock to purchase that quantity"; $h->endpage(); exit; } $price = ($itemd['itmbuyprice'] * $_POST['qty']); item_add($userid, $_GET['ID'], $_POST['qty']); $db->query(sprintf("UPDATE `users` SET `money` = money - ('%d') WHERE `userid` = ('%d')", $price, $userid)); $db->query(sprintf("UPDATE `shopitems` SET `sitemQTY` = sitemQTY - ('%d') WHERE sitemITEMID = ('%d')", $_POST['qty'], $_GET['ID'])); $db->query(sprintf("INSERT INTO `itembuylogs` (ibID,ibUSER,ibITEM,ibTOTALPRICE,ibQTY,ibTIME,ibCONTENT) VALUES (%u,%d,%u,%d,%u,unix_timestamp(), '{$ir['username']} bought {$_POST['qty']} {$itemd['itmname']}(s) for {$price}')", '', $r['imITEM'], $_GET['ID'], $price, $_POST['qty'], $r['imPRICE'], $r['imID'], $i) ); echo "You bought {$_POST['qty']} {$itemd['itmname']}(s) for \$$price"; } } $h->endpage(); ?> and shops.php <?php include "globals.php"; if($ir['hospital'] | $ir['jail']) { echo " You cannot access this whilst in hospital or jail "; $h->endpage(); exit; } $_GET['shop'] = (isset($_GET['shop']) AND !ereg('[^0-9]', $_GET['shop'])) ? abs(@intval($_GET['shop'])) : FALSE ; if(!$_GET['shop']) { echo "You walk downtown and see all the usefull shops available. "; $q = $db->query(sprintf("SELECT shopID,shopNAME,shopDESCRIPTION FROM `shops` WHERE shopLOCATION = ('%u')", $ir['location'])); echo " <table width=85% cellspacing=1 class='table'> <tr style='background: gray;'> <th>Shop</th> <th>Description</th> </tr>"; while($r = mysql_fetch_assoc($q)) { echo " <tr> <td>[url='shops.php?shop={$r[']{$r['shopNAME']}[/url]</td> <td>{$r['shopDESCRIPTION']}</td> </tr>"; } echo "</table>"; } else { $sd = $db->query(sprintf("SELECT shopLOCATION,shopNAME FROM shops WHERE shopID= ('%d')", $_GET['shop'] )); if($db->num_rows($sd)) { $shopdata = $db->fetch_row($sd); if($shopdata['shopLOCATION'] == $ir['location']) { echo "Browsing items at [b]".$shopdata['shopNAME']."...[/b] <table cellspacing=1 class='table' width='80%'> <tr style='background: gray;'> <th>Item</th> <th>Description</th> <th>Price</th> <th>Sell Price</th> <th>In stock</th> <th>Buy</th> </tr>"; $qtwo = $db->query(sprintf("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 = ('%d') ORDER BY i.itmtype ASC, i.itmbuyprice ASC, i.itmname ASC", $_GET['shop'] )); $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 while($r = mysql_fetch_assoc($qtwo)) { if($lt!= $r['itmtypename']) { $lt = $r['itmtypename']; echo "\n<tr style='background: gray;'><th colspan=5>{$lt}</th></tr>"; } $buyprice = money_formatter($r['itmbuyprice']); $sellprice = money_formatter($r['itmsellprice']); ?> <tr><td> <? echo $r['itmname']; ?> </td><td> <? echo $r['itmdesc']; ?> </td><td> <? echo $buyprice; ?> </td><td> <? echo $sellprice; ?> </td><td> <? echo $r['sitemQTY']; ?> </td><td> <form action='itembuy.php?ID=<? echo $r['itmid']; ?>' name="shopbuy" method='post'> Qty: <input type='text' name='qty' value='1' onkeyup="tot(<? echo $r['itmid']; ?>, <? echo $r['itmbuyprice']; ?>,this.value);" onfocus="clearText(this);" onblur="returnText(this);" /> <input type='hidden' name='shop' value='<? echo $_GET['shop']; ?>' /> <input type='submit' value='Buy' /> </form> <div id="res<? echo $r['itmid']; ?>" align="center"> <? echo $buyprice; ?> </div></td></tr> <? } echo "</table>"; } else { echo "You are trying to access a shop in another city!"; } } else { echo "You are trying to access an invalid shop!"; } } $h->endpage(); ?> I just tested that, so it works... If you find any problems, post error. AND FOR THE CRON, USE THIS INSTEAD, THIS WILL ONLY UPDATE STOCKS AT 0. $stockreset = rand(100,500); //100 is the minimum it will reset to and 500 is maximum, you can change $db->query("update shopitems set sitemQTY = ".$stockreset." WHERE sitemQTY='0' "); ENJOY This would be so much easier if i could edit the first post. -
mccode-v2 Shops item stock - as requested (Not Tested)
radio_active replied to radio_active's topic in Free Modifications
Re: [MCcode v2] Shops item stock - as requested (Not Tested) See's luke viewing, says, noooo USE THIS INSTEAD $_GET['shop'] = (isset($_GET['shop']) AND !ereg('[^0-9]', $_GET['shop'])) ? abs(@intval($_GET['shop'])) : FALSE ; lol -
mccode-v2 Shops item stock - as requested (Not Tested)
radio_active replied to radio_active's topic in Free Modifications
Re: [MCcode v2] Shops item stock - as requested (Not Tested) my bad, you have to put one more ( before the int.. SO this $_GET['shop'] = abs((int) $_GET['shop']);