[ADMN] Redeem v1.5 - Transfer items and iConomy money from MySQL to player [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Paah, Jul 4, 2011.

  1. Offline

    Paah

    Redeem - The item redeemer
    Version: 1.5

    Redeem retrieves player's items from MySQL database and places them in his/her inventory. This is particularly useful for server admins who want to be able to grant items to their players as a thank you for donation automatically.

    How to use
    Users - Just type /redeem
    Admins:

    Show Spoiler
    Just insert correct MySQL information to the config file and reload/restart server.
    However, for the plugin to actually do anything, you will need some interaction on your website.
    Here is an example PHP script:
    Code:
    php said: 
    <html>
    <head>
    <title>Redeem</title>
    </head>
    <body>
    <form method="post" action="redeem.php">
    Playername: <input type="text" name="Player" size="45" /> <br />
    Data input: <input type="text" name="Input" size="45" /> <br />
    <input type="submit" value="Add to database" />
    </form>
    </body>
    </html>
    Name this whatever you want (.php)
    Code:
    php said: 
    <?php
    //Input correct values into this section
    $dbhost = 'localhost';
    $dbuser = 'root';
    $dbpass = 'pass';
    $dbname = 'minecraft';
    $dbtable = 'redeem';
    //---------------------------------------
    
    $input = $_POST['Input'];
    $player = $_POST['Player'];
    $conn = mysql_connect ($dbhost, $dbuser, $dbpass) or die ('Error: ' . mysql_error());
    mysql_select_db($dbname);
    $query = "INSERT INTO `".$dbname."`.`".$dbtable."` (`player`, `item`) VALUES ('".$player."', '".$input."')";
    mysql_query($query);
    mysql_close($conn);
    echo "Done!";
    ?>
    Name this one redeem.php and insert your mysql data into the appropriate section.
    Access the first file with your browser for simple data input form. Users will be immediately able to retrieve their items with /redeem command. Correct syntax for input is "<item> <amount>". Without amount it will default to 1. Item should either be the item's data value or name. "diamond 7" would grant 7 diamonds. Use item "money" for iConomy money. You can add ":<number>" behind item name to use damage values. For example "wool:15 27" for 27 black wool.

    Please note that this is not the recommended way to use this plugin. Quite honestly, it will be pretty much useless in this state. You should integrate it into your donation system / whatever you want to make the most of it. This is just overly basic example and functionality tester.



    Download
    <font color="red">If updating from 1.3 or lower, use command "/redeem convert" to update your database. (Requires op)</font>
    <Edit by Moderator: Redacted mediafire url>
    <Edit by Moderator: Redacted mediafire url>
    Place the connector into /lib/ folder in your server root. If you have the connector already no no need to download it again.


    Changelog:
    * 1.5 - Added support for damage values.
    * 1.4 - Updated database structure, sealed up memory leaks, fixed bugs..
    * 1.3 - Now supports iConomy5, use item "money".
    * 1.2 - Added automatic table creation
    * 1.1 - Fixed an issue related to connections.
    * 1.0 - Release

    Known bugs:
    * Plugin will think player's inventory is full if there are no free slots, even if there is partly empty stack of item.

    TODO:
    * Configurable messages
    * Grant permission nodes
    * Grant (permission) group memberships
    * Automatic group membership/permission expiration system
     
    Last edited by a moderator: Nov 27, 2016
    blaize9 and olimoli123 like this.
  2. Offline

    heifinator

    Great update.

    Any way I can convince you to support damage codes so I can redeem for multiple wool colors (35:5) for example.
     
  3. Offline

    endofzero

    Wonderful change... one thing... Item damages are not available.. so there is no way to redeem stacks of colored wool... :((

    Haha... yeah... what heif said... posted before it showed his msg... :p
     
  4. Offline

    heifinator

    It should be a fairly simple addition. From my understanding

    Another thing to consider. If you do /redeem there should be some sort of check on inventory space, if you don't have enough it should decline your request and tel you to make more space.

    Not sure if this is built in already.
     
  5. Offline

    Paah

    It will fill your inventory until it is full, and even tells you what was left in the database.
     
  6. Offline

    heifinator


    Ok awesome.

    Whats your opinion on damaged items? Something you can add?
     
  7. Offline

    Paah

    Yes of course.

    v1.5
    Now supports damage values. However there is no sanity checking on them, if you try to grant someone wool:2535 then whatever happens is your fault.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  8. Offline

    Taranis01

    Hey Paah, great plugin, great possibilities, thank you!
    I would like to use that with a Forum-Bank-Plugin. The registered users on the forum will get Points for writing Posts or Donating. And then they can transfer this points into items or iconomy-money.
    I just have to find a good bank-plugin for my forum ^^
     
  9. Offline

    embty

    Is it possible to have an option where players get items/money when they bump ur server thread?
     
  10. Offline

    Josh Harwood

    does anyone know how i can integrate this with paypal?

    I've Got It Working, now my issue is i need it to support adding permissions

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  11. Offline

    Tonyfrenchies

    Parfait !
     
  12. Offline

    iteush

    How I can use this with allopass please ?
    Si quelqu'un pouvait me répondre en français ce serait encore mieux, merci :)
     
  13. Offline

    Vhince

    I've managed to get this working with a clean page on my MyBB forum.
    It's great, thank's for this plugin. Keep updating this; Definitely gonna be using this for a long time.
     
  14. Offline

    blazedd

    Would love to use this plugin to change user groups via MySQL!
     
  15. Offline

    Daniel Akkanen

    Okey I don't get it. Where should i put the connector? In the computers root or in the folder that I have bukkit?
     
  16. Offline

    djrazr

    Is it possible to give either the source, or let the word redeem in the command be edited in the config?
     
  17. Offline

    alzan12

    error when i type /redeem

    Code:
    unable to find players purchases. unknown column 'idredeem' in 'field list'
    EDIT: Now it wont do anything...
     
  18. Offline

    blaize9

    I wish this got updated =/
     
  19. Offline

    MaMaxGER

    Is the plugin recommend for the last bukkit build ? I want to use it in my UserControlpanel
     
  20. Offline

    keto23

    Could anyone help me make a vote for diamonds with this?
     
  21. Offline

    Silvester

    Would like a update on this to latest CB
     
  22. Offline

    neoteknic

    Please update for 1.2.X :)
    I love this plugin!

    If you cant update, or dont have time, can you give the source of the plugin?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  23. Offline

    Benciky

    Please upload the source code.
     
  24. Offline

    neoteknic

    Yes I need this plugin for my serveur shop, I can port it for 1.2.3. I'm trying to redevellop it but I dont have much time.
     
    Benciky likes this.
  25. Offline

    Benciky

    I can give you the source code if you want to.
     
  26. Offline

    Paah

    Just decompile it?
    It only needs to be changed from iConomy to Vault, and the configuration class needs rewrite due to new configuration API. Should work fine then.
     
  27. Offline

    Benciky

    I know. But then why don't you update it? It's your plugin.
     
  28. Offline

    Paah

    CBA?
     
  29. Offline

    neoteknic

    So you cant give the source? It will save me some time...

    Finally I ported it to 1.2.3, it's working perfectly with vault, I would like to add language files support too.
    I cleaned some code, only 3 class.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  30. Offline

    Blasty

    Please, can you send me updated version?
     
  31. Offline

    neoteknic

    Yes I can send you the sourcecode because I have tranlated some words in french, so you need to edit text to translate it in english or in your server's language. I wanna make a multilang support version (with yaml lang files) but I dont have much time now to do it, maybe later, it require about 1 or 2h.
    Just PM me your skype, I will send you the source, if you are not able to edit/compile java I can send you the english version but I need some time to do it.
     

Share This Page