[INACTIVE][MISC] ReferAFriend v0.3 - Reward players who invite people to your server [1.0.1-R1]

Discussion in 'Inactive/Unsupported Plugins' started by andersonhc, Sep 3, 2011.

  1. Offline


    ReferAFriend - Reward players who invite people to your server:
    Version: 0.2

    This plugin is idea of Nipper, posted on the Pluggin Suggestions forum.

    ReferAFriend allows you to define bonus to be given to players who invite others to join your server. When the new player joins the server, he should type /refereed (name of the player who invited him).

    When the inviter do his next login, he will be instructed do type /refercollect to claim his items.

    When you put the plugin in yours /plugins folder and runs CraftBukkit, a /plugins/ReferAFriend folder will be created with two files: database.db (the SQLite database file) and config.yml (the configuration file).

    The config syntax is:

    # You can define up to 99 bonus'es, and 99 nbonus'es
    # BONUS = items givem to inviters and NBONUS = itens given to the refereed player(only once)
    # Type: "item" to spawn specified items to the player
    #       "money" to add money to the player's account. (iConomy or BOSEconomy)
    # Item: Item ID (for type=item only)
    # Amount: How many of the (item or money) will be given
    # Multiplier: How many inviteds to achieve this bonus. It's cumulative.
    #     i.e.: If you have 3 bonuses: bonus01 with multiplier 1, bonus02 with 3 and bonus03 with 5:
    #           1st person: bonus01
    #           2nd person: bonus01
    #           3rd person: bonus01 + bonus02
    #           4th person: bonus01
    #           5th person: bonus01 + bonus03
    #           6th person: bonus01 + bonus02
    nbonus1.type: item
    nbonus1.item: 264
    nbonus1.amount: 1
    bonus1.type: item
    bonus1.item: 264
    bonus1.amount: 5
    bonus1.multiplier: 1
    bonus2.type: money
    bonus2.amount: 1000
    bonus2.multiplier: 1
    bonus3.type: item
    bonus3.item: 57
    bonus3.amount: 2
    bonus3.multiplier: 10
    • /refercheck: Lists people you refereed. OPs can do /refercheck (player)
    • /refercollect: Collect all unpaid bonus the player haves.
    • /refereed (inviter): Register the name of the person indicated the player.
    • /referwipe (inviter): (OP only) Wipe all the indications of a player.
    • /referadd (inviter) (invited): (OP only) Add a indication on tables.
    Permission Nodes

    referafriend.refereed: Permission to user /refereed
    referafriend.wipe: Permission to use /referwipe
    referafriend.add: Permission to use /referadd

    Avoiding Abuse

    One of the main concerns when people install this plugin is how to avoid it being abused.
    We recommend giving referafriend.refereed permission only to your lowest rank (guest/default), se it cannot be used by members.
    We're working on adding features to help detect misuse of the plugin.

    Pending features

    • Register IP of the person who used /refereed, than check it against the IP of the player using /refercollect
    • Fixing debug mode;
    • Help messages improvement.
    As this is a very first release, there may be some bugs and some "not so helpful" help messages. Help me with suggestions.

    My english is really bad (I'm brazilian) so, please, tell me if you find wrong or confuse phrases.

    Download in the BukkitDev project page.

    Version 0.2
    • Permission nodes with Permissions and Superperms;
    • Integration with iConomy and BOSEconomy, so you can define bonus with money amounts

    Version 0.1
    • Initial release.
  2. Offline


    I like...and I will send a pm with better grammar for your post if you like.
  3. Offline


    Love the plugin, great job!
  4. Offline


    Updated the OP with link to the BukkitDev project page.

    Would be great!

  5. had a similar idea, but it would make more sense if the player who is referring another player has to reffer him before that person joins and then the new player needs to confirm who referred him. Otherwise it leaves open room for abusing this function.
  6. Offline


    Can we get bosecon support for this?
  7. Offline


    I'll be releasing soon the next version, supporting iConomy and BOSEconomy to make possible give "money" as a reward.
  8. Offline


    Very cool!
  9. Offline


    I get this error in game:
    And This Error On Bat:
  10. I've done this for so long manually! Thanks for this! Lets hope all goes well in the testing!
  11. Offline


    Updated the OP for version 0.2.
    iConomy and BOSEconomy integration, and permission nodes.
  12. Offline


    i have made some similar but all my code is in php for a web structure, i suggest u some features for antifarming of referall code, as my experience with my referall minecraft php code.

    save how many block new player, that redem code, broke and how many block thay placed, in this way u can give the reward only to real person, another thing could be playtime, or distance made ingame.. i have done all with php and
    old netstats plugin maybe could it help u
  13. Offline


    Hey man you did read me post on how to stop abuse right? If not I will post again.

    Everyone starts out not on the list.
    Once someone types /refereed name
    They are added to the list with count of 0. If the person that refereed them is not on the list it adds them as well with count of 1. This also prevents them from using the command more then once.

    If any user thats on the list trys and use /refereed name it just wont work at all. or tells them who they used the referee from.

    This idea can be tweeked a bit but I think you can get the idea.
  14. Offline



    The plugin already works like this... A player can only use /refereed once.

    I liked your idea.. I'll take a look on how i could implement it.

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


    Yeah, That would be the easiest way of doing it. I also posted it in the request forum post as well.
  16. Offline


    Make it so that you can have specific commands when someone refers someone else, I would definitely enjoy giving a higher membership or permission for players referring others :D

    In other words, support for ANY commands as a reward :D
  17. Offline


    Does it work with Icon 6 ? :)
  18. Offline


    @Raycrash, Not yet.
  19. Offline


    oh Lordy this is the biggest plugin ever??
  20. Offline


    Very nice work :) Update it please :)
  21. Offline


    Plugin Exploit: Players can refer themselves to receive both benefits! (nbonus and bonus)
    PLugin needs to be updated anyways, as /refercollect no longer works. the server understands the command, but does nothing. (it does not say unkown command)
  22. Offline


    I need this update :/
  23. Offline


    Version 0.3 on BukkitDev

    - Updated to 1.0.1-R1
    - When invited used /refereed, inviter is warned (if online)
    - Check IP address of who used /refereed against who is using /refercollect
    - Support iConomy 6 and Essentials Economy
  24. Offline


    Maybe to stop the abuse you can make it so they have to be online for 1 hour to be refereed. So people can't get friends from other servers to sign on and off.
  25. Offline


    A have the same problem
    In game error:
    An Error Had Ocured. Please Contact An Admin
    Log file:
    2011-12-23 11:38:34 [SEVERE] java.sql.SQLException: column playerName is not unique
    2011-12-23 11:38:34 [SEVERE] 	at org.sqlite.NativeDB.throwex(NativeDB.java:210)
    2011-12-23 11:38:34 [SEVERE] 	at org.sqlite.NativeDB._exec(Native Method)
    2011-12-23 11:38:34 [SEVERE] 	at org.sqlite.Stmt.executeUpdate(Stmt.java:152)
    2011-12-23 11:38:34 [SEVERE] 	at com.andersonhc.database.Database.executeUpdate(Database.java:30)
    2011-12-23 11:38:34 [SEVERE] 	at com.andersonhc.ReferAFriend.ReferAFriendDBConnection.includeBan(ReferAFriendDBConnection.java:128)
    2011-12-23 11:38:34 [SEVERE] 	at com.andersonhc.ReferAFriend.ReferAFriendDBConnection.checkMisuse(ReferAFriendDBConnection.java:138)
    2011-12-23 11:38:34 [SEVERE] 	at com.andersonhc.ReferAFriend.ReferAFriend.payBonus(ReferAFriend.java:180)
    2011-12-23 11:38:34 [SEVERE] 	at com.andersonhc.ReferAFriend.ReferAFriendCommandExecutor.cmdCollect(ReferAFriendCommandExecutor.java:222)
    2011-12-23 11:38:34 [SEVERE] 	at com.andersonhc.ReferAFriend.ReferAFriendCommandExecutor.onCommand(ReferAFriendCommandExecutor.java:32)
    2011-12-23 11:38:34 [SEVERE] 	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    2011-12-23 11:38:34 [SEVERE] 	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165)
    2011-12-23 11:38:34 [SEVERE] 	at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:378)
    2011-12-23 11:38:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757)
    2011-12-23 11:38:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)
    2011-12-23 11:38:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
    2011-12-23 11:38:34 [SEVERE] 	at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    2011-12-23 11:38:34 [SEVERE] 	at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    2011-12-23 11:38:34 [SEVERE] 	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93)
    2011-12-23 11:38:34 [SEVERE] 	at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    2011-12-23 11:38:34 [SEVERE] 	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
    2011-12-23 11:38:34 [SEVERE] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
    2011-12-23 11:38:34 [SEVERE] 	at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
  26. Offline


    OP has wrong version number (should be 3.0).
  27. Offline


    the bukkitdev page is broken plz fix
  28. Offline


    please fix bikkitdev page or just write download link
  29. Offline


    Can you add a feature that the console type a command eg:
    "perm player setgroup {inviter} VIP"

    and please fix bikkitdev page or just write download link

Share This Page