boionfire81 Posted May 23, 2016 Share Posted May 23, 2016 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. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 24, 2016 Share Posted May 24, 2016 Can't you do that through the inventory? It just doesn't track the logs Quote Link to comment Share on other sites More sharing options...
G7470 Posted May 24, 2016 Share Posted May 24, 2016 [uSER=68711]KyleMassacre[/uSER] in v2, yes it does. All that would have to be done is to create/utilize a new logs table and check for sell price > $5 on the itemsell file. ~G7470 Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 24, 2016 Share Posted May 24, 2016 That just made it even easier Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted June 1, 2016 Share Posted June 1, 2016 (edited) Sorry in advance if anyone has requested this job also sorry if i have picked you up wrong. i did a full paste for you if its easier. - http://pastie.org/10860439 look for in itemsell.php if ($_POST['qty'] > $r['inv_qty']) { echo 'You are trying to sell more than you have!'; } change the else statement to this else { $price = $r['itmsellprice'] * $_POST['qty']; if($price > 5) { item_remove($userid, $r['itmid'], $_POST['qty']); $db->query("UPDATE `users`SET `money` = `money` + {$price}WHERE `userid` = $userid"); $priceh = money_formatter($price); echo 'You sold ' . $_POST['qty'] . ' ' . $r['itmname']. '(s) for ' . $priceh; $is_log = $db->escape("{$ir['username']} sold {$_POST['qty']} {$r['itmname']}(s) for {$priceh}"); $db->query("INSERT INTO `itemselllogs`VALUES (NULL, $userid, {$r['itmid']}, $price,{$_POST['qty']}, " . time() . ", '{$is_log}')"); } else echo "The value of the item must be greater than 5"; } Edited June 1, 2016 by NonStopCoding Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted June 2, 2016 Author Share Posted June 2, 2016 itemsell.php isn't an actual "Pawn Shop" it's simply selling items from inside the inventory. Quote Link to comment Share on other sites More sharing options...
G7470 Posted June 2, 2016 Share Posted June 2, 2016 What are the differences between this method and your idea of a "Pawn Shop"? ~G7470 Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted June 2, 2016 Author Share Posted June 2, 2016 Like the default shops, but instead of buying an item, it can only be sold there. Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted June 3, 2016 Share Posted June 3, 2016 i have a free player personal shops mod on here if you mean that users can sell there own items for money/crystals had to dig through the free mods section to find it but heres link http://makewebgames.io/forum/ga...4-player-shops if this is still not what your looking for and your looking for a "Real life" pawn shop idea then yes it can be done but don't know if it will be useful So lets say you are on about real life pawn shops the user owns the shop and another user can give you a item you price it and etc they buy it back with interest? if they fail to pay after x days then they lose item and its yours. Example : Knife worth: $1,000 offer: $250 buyback: 15% buyback cost: $287 to buy the item back profit: $37 Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted June 3, 2016 Author Share Posted June 3, 2016 No just a shop, you "walk into" it shows the list of items you have, and a buy price (the standard sell price set for that item). A shop that only buys items, not sells them. And while I do use your player shop, it's not an instant sale. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.