/Roll Command

Discussion in 'Archived: Plugin Requests' started by overlordror, Apr 12, 2011.

  1. Offline

    overlordror

    This one is a pretty simple request. I run an RPG-like server that has several generated dungeons that use PhatLoots to control the dungeon loot so that each chest within the dungeon is dynamically generated at set intervals. My players frequently raid these dungeons and until now, they have had to discuss amongst themselves who will take what loot.

    One of them yesterday asked that I institute a /roll command so that upon execution, that player is rolled a random number between 1-100 and the result is output into chat. That way they can effectively roll for loot without drama.

    Example:

    Three player dungeon party reaches the end of the dungeon and the chest contains a pair of diamond leggings, which all three players need. Players institute a roll to receive, with each player performing the /roll command. Output is as follows in chat:

    PlayerA rolls 39 of 100.
    PlayerB rolls 21 of 100.
    PlayerC rolls 67 of 100.

    PlayerC wins the roll and the diamond leggings are his.

    TL;DR: Basically I want a plugin that will roll between 1-100 when the /roll command is typed into chat and the output can be seen by everyone.
     
  2. Offline

    ninwa

    I should be able to do this pretty easily. At work now so if someone beats me to it that's alright, but check back a little later.
     
  3. Offline

    xPaw

    Try this.
     
  4. Offline

    overlordror

    Hey xPaw, thanks! That's exactly what I want, except other players don't seem to be able to see what everyone is rolling. Is that possible at all?
     
  5. Offline

    xPaw

    Heh try this one
     

    Attached Files:

    overlordror likes this.
  6. Offline

    overlordror

    Thanks, xPaw. That did it right up. You're amazing. :)
     
  7. Offline

    ninwa

    Well, I'm a slowpoke. Just checked back and it looks like I was beaten to the punch. Here's what I had brewing.

    Rollin v0.1

    Usage:
    • /roll - Rolls a number between 1 and 100.
    • /roll [#1] - Rolls a number between 1 and #1.
    • /roll [#1] [#2] - Rolls a number between #1 and #2.

    The only thing that might be different than xPaws, and this is a matter of preference, is my Plugin does a local broadcast only. It defaults to a 10-block radius. This way you wont spam the entire server with /rolls. If I put more work into it I could add this to the config file, along with much other pretty things (colors, etc). But it looks like your needs are met!

    Cheers :)
    Ninwa
     

    Attached Files:

    LostSoulFly likes this.
  8. Offline

    overlordror

    Oh awesome! Local broadcast would be extremely neat, since if there are multiple parties going in a dungeon at once, rolls could get confusing. If you're not adverse to giving it a go, I'd love to see the ability to change colors etc. via a config file. The way xPaws set up the plugin is the output is such that:

    overlordror has rolled 45 out of 100.

    That's really easy on the eyes, but having a config for that would be really neat. Installing now to try out the localization. :3

    Just installed it and the localized function works perfectly. With a few more customizations I'd have to say you've got a great mod for anyone who runs an RPG server with dungeons, etc.

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

    dak393

    @overlordror
    But Phatloot generates new loot for each person so If all 3 need it then the person who got it keeps it? :p Any way the simple roll command is nice cool to see so many responses so fast XD
     
  10. Offline

    overlordror

    @dak393 It does, but my users are pretty generous. If multiple people in the party need something someone else has, having a roll command to see who wins it is nice.
     
  11. Offline

    Hunt800

  12. Offline

    ninwa

  13. Offline

    dak393

    I agree its a nice plugin to have and its good to hear of generous players ^^
     
  14. Offline

    overlordror

    @Hunt800 I looked at your mod, but it doesn't do what I want. The roll command you have is for dice, while what I needed is just a simple 1 out of 100 command.
     
  15. Offline

    Hunt800

    @overlordror Ah, too bad. I guess I'm just in the mindset of more is better (since you can always use /roll 1 100). Oh well, thanks for looking at it. :)
     
  16. Offline

    ninwa

    Changed to use colors you wanted, added some error checks that should have been there, and am working on learning Permissions. Just wanted to give this to you so you didn't have to wait for that. :)
     

    Attached Files:

    overlordror likes this.
  17. Offline

    overlordror

    Awesome, thank you! Installing the new version now. Hopefully if you decide to continue with it you'll add it to the Plugin submission, as I'm sure there are quite a few RPG-like servers who could benefit from your work. :)
     

Share This Page