Nameless Posted October 25, 2014 Share Posted October 25, 2014 Hello MWG, I would like to make a request for someone to create a simple modification for my game. What is it?: This modification is very similar to the "crystal temple". I have more than 1 currency in my game, Money, Crystals, "another currency" so on... I would like my users to be able to trade their hard earned "third currency" in for special rewards. These are: 100% Will Refill 100% Brave Refill 100% Health Refill ITEM 1 (I would like it to use the item_add function) ITEM 2 (I would like it to use the item_add function) ITEM 3 (I would like it to use the item_add function) That's about it. I will tell you the DB name of my currency if you want to take on the job via PM. I would like it if you guys could tell me your price to create this modification, As that's usually the sellers choice, And not the buyers. Thank you. Quote Link to comment Share on other sites More sharing options...
Zettieee Posted October 25, 2014 Share Posted October 25, 2014 if(isset($_POST['refilW'])) { $run = "UPDATE `users` SET will = '".$maxwill.'" WHERE `userid` = '".$id."'"; } a simple form below that will do. Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted October 25, 2014 Share Posted October 25, 2014 (edited) here i started it if you want to Finnish it. You will need to change "currency" to your actual currency also i did not add any checks to see if they already have max brave <?php include(__DIR__.'/globals.php'); if(isset($_GET['refilb'])) { $bcost = 20; # 20 currency if($ir['currency'] < $bcost) { echo "Sorry but you dont have enough to refil your brave."; $h->endpage(); exit; } else { echo "You have paid ".number_format($bcost)." to refill your brave."; $db->query("UPDATE `users` SET `brave` = `maxbrave`,`currency` = `currency` - '$bcost' WHERE `userid` = '$userid'"); } } if(isset($_GET['refilw'])) {} if(isset($_GE['refilh'])) {} if(isset($_GET['itemone'])) { $icost = 100; # 100 currency if($ir['currency'] < $icost) { echo "Sorry but you dont have enough for this item you need".number_format($icost - $ir['currency']).""; $h->endpage(); exit; } else { echo "You have paid ".number_format($icost)." for <strong>Item Name</strong>."; $db->query("UPDATE `users` SET `currency` = `currency` - '$icost' WHERE `userid` = '$userid'"); item_add($userid, 9, 1); # 9 is for the id of the item the 1 is the amount they recive. } } if(isset($_GET['itemtwo'])) {} if(isset($_GET['itemthree'])) {} echo "<h2>Shop</h2><hr width='50%'> <i>here you can trade your Currency for stuff</i>"; echo " <table class='table'> <tr> <th>Refill Brave</th> <th>Refill Will</th> <th>Refill Health</th> <th>Item one</th> <th>Item two</th> <th>Item three</th> </tr> <tr> <td>".number_format($bcost)." currency <a href='cshop.php?refilb'>[Refil Brave]</a></td> <td></td> <td></td> <td>".number_format($icost)." currency <a href='cshop.php?itemone'>[buy Item]</a></td> <td> currency <a href='cshop.php?itetwo'>[buy Item]</a></td> <td> currency <a href='cshop.php?itethree'>[buy Item]</a></td> </tr> </table>"; $h->endpage(); ?> Edited October 26, 2014 by NonStopCoding Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted October 25, 2014 Share Posted October 25, 2014 Maybe tomorrow when I get a chance I will whip something up since I haven't done any MCC stuff in quite sometime and I will have a bit of fun with it. Quote Link to comment Share on other sites More sharing options...
AnonymousUser Posted October 26, 2014 Share Posted October 26, 2014 Any progress?... I'd like to see the final result of it, or if you haven't started Kyle I could give my input lol, lemme know ;) Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted October 26, 2014 Share Posted October 26, 2014 I am actually working on it a bit Quote Link to comment Share on other sites More sharing options...
AnonymousUser Posted October 26, 2014 Share Posted October 26, 2014 Sounds good, Good luck and most importantly Have Fun lol Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted October 26, 2014 Share Posted October 26, 2014 (edited) I didnt put much effort into it but here it is. Fair warning I am using eval() on here so be careful here are some screen shots as well: Player View Admin Add New Admin Add New (with drop down) Admin View Edit Delete: Here is the link https://github.com/KyleMassacre/MCC-Currency-Trader License is GNU V2 so use at your own risk. It should be ok as long as you don't let people access you don't trust **Edit** I would like to add that in the `call_back` you can do anything in there so if you would like it to cost an item you can use the item_remove function but with that being said be careful because someone can really hurt you game with this Edited October 26, 2014 by KyleMassacre Changed license Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted October 26, 2014 Share Posted October 26, 2014 nice job kyle :p 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.