Jump to content
MakeWebGames

Recommended Posts

Posted

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.

Posted

[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

  • 2 weeks later...
Posted (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 by NonStopCoding
Posted

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

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...