[INACTIVE][FUN/ADMIN] FoundDiamonds 1.6 - Alerts for finding Ores! (Anti-Xray Mod too!) [860]

Discussion in 'Inactive/Unsupported Plugins' started by itsatacoshop247, Mar 27, 2011.

  1. Offline

    itsatacoshop247

    NEWS: OH HAI THUR. I am really not going to update this, but someone made new versions of this:
    http://forums.bukkit.org/threads/fu...or-finding-ores-anti-xray-mod-too-1337.43854/

    FoundDiamonds - PvP inspired/Anti-Xray
    Version: v1.6

    This plugin sends a server wide alert when someone finds diamonds. It is then disabled for 30 seconds s0 that
    there won't be chat spam when someone finds a vein of diamonds.
    Also, theres a 10% everyone else will get something when someone find diamonds too. 5% to get 1-5 of something, and another 5% to get 6-10 of something. The default is 1-5 iron ignots, and 6-10 Coal, but it is changeable in the config!
    I just made this as my first plugin to use on my own server, to hopefully make people want to PvP someone who finds
    diamonds, so its not very advanced :p

    Traps:
    Use '/settrap' to create a diamond vein at your feet (need FD.admin permssion or be in ops.txt)
    Just make sure to put this in a spot where someone would obviously have to use Xray to find it, and when they do find it, It will log it, display a message, and kick the player (Optional)(I'll add and option Ban later)

    Heres a quick video:


    Video of the /settrap usage



    Features:
    * Server Wide Message
    * Logging when diamonds found!
    * Gives good reason to kill
    * Permissions! add - 'FD.admin' too see all ore breaks. (or less, configurable)
    * Configurable message, colored by type of Ore
    * Ability to set traps designed to catch X-ray Users

    Download Jar- <Edit by Moderator: Redacted mediafire url>
    Another DL if the mediafire doesnt work for you
    If you dont want the /settrap command, <Edit by Moderator: Redacted mediafire url>

    Source Code - https://github.com/itsatacoshop247/FoundDiamonds

    Config Settings:
    Set the ones with 'true' to 'false' to disable them.
    Code:
    diamond=true //determines whether diamond alerts are shown
    showmmessage=true //determines whether any messages are shown at all
    redstone=true //determines whether redstone alerts are shown
    kickontrapbreak=true //kick the player when they break a trap? (cant ban yet, sorry)
    thirtysecondwait=true  //determines whether the plugin waits 30seconds to show another maessage
    gold=true //determines whether gold alerts are shown
    item1=263 //declare the item to give
    lupuslazuli=true //determines whether lapis alerts are shown
    item2=265 //declare the item to give
    randomitems=true //decide whether the random items feature is active.
    iron=true //determines whether iron alerts are shown
    Broadcast_Message=@Player@ just found @BlockName@! //change what is said when someone finds an ore
    chanceitem1=5//chance to get item one (out of 100%)
    chanceitem2=5//chance to get item two (out of 100%)
    
    redstone\ admin=true //all of the ones with 'admin's change whether someone with
    gold\ admin=true //the permission 'FD.admin' sees all breaks of this block
    lupuslazuli\ admin=truee //be warned, all admin set to true can be very annoying in chat
    iron\ admin=true
    diamond\ admin=true
    
    logging=true //do you want it to log when someone find diamonds?
    
    Changelog:
    Version 1.6
    * Traps!
    * Chance to get the random items!

    Version 1.5
    * Logging added finally!
    * Option to turn logging on/off

    Version 1.3

    * Works better with Permissions, defaults to OP list if no Permissions
    * Configurable message
    * Beta 1.4 Compatible

    Version 1.2

    * Permissions!
    * 'FD.admin' to see all block breaks

    Version 1.1

    * Added more to config
    * Added ores, options for each to be on/off
    * Turn server message on/off
    * random item give on/off

    Version 1

    * Release

    Roadmap:
    * Suggest things!

    If you looking for more Anti-Cheat options, check out <font color="rgb(16, 97, 179)">this plugin</font> by Evenprime!
     
    Last edited by a moderator: Dec 14, 2016
  2. Offline

    quickclay

    Can you please put the current version in your thread title? Makes it easier to scan for updates.
    Thanks!
     
  3. Offline

    DemonCraft

    Should make it log ever different ore into the logs in the server files if you wouldn't mind or make it optional?
     
  4. Offline

    Nate214

    thanks very much :D when i get my server online im so gunna make that all over the world XD
     
  5. Offline

    greycap

    Thank you, very nice plugin!
    However i would suggest that you move the config to a more readable/standards compliant format (yml)
     
  6. Offline

    Bigwig222

    Hey, I like the plugin! The problem is, if you set a trap, and someone without XRay finds it, how will you know if they did or they didn't have XRay? It would be cool for this plugin to check everyones mods and look for XRay if that was possible. Anyway, it's working great although that is one problem.
     
  7. Offline

    Jaypee

    Reduce the second to 15 seconds please! Or add a time changer on the config.
     
    Bigwig222 likes this.
  8. Offline

    Zalastri

    Hey, I really like this mod. It's pretty much a staple of my server as far as finding ner'do-wells and their xray hax. It doesn't seem like the xray trap is working, if it's supposed to be logging in to the ore log then it's definitely not working. I haven't checked my server logs because to be honest that's a silly place for it to be (In my opinion, of course).

    If you could get xray logging working properly (or in the ore log) that would be awesome. Also, perhaps make it so we can have the server run an arbitrary command or two on those who hit the trap vein. Easier then making your own ban system I guess.
     
  9. Offline

    Dope

    Hi, I really like this plugin as I can quite easily catch people that use Xrays.

    Anyway, for some reason I can't log when people break gold ores. Is this even possible?

    This is my config file and I use b766:

    #===FoundDiamonds Main Configuration===
    #Fri May 13 20:35:32 CEST 2011
    gold\ admin=true
    random_item2?=263
    iron=false
    iron\ admin=false
    Broadcast_Message=@Player@ just found @BlockName@\!
    lupuslazuli\ admin=false
    chance_of_random_item1?=0
    gold=true
    Kick_player_who_breaks_trap?=true
    diamond\ admin=true
    redstone=false
    chance_of_random_item2?=0
    redstone\ admin=false
    diamond=true
    thirtysecondwait=true
    random_item1?=265
    Log_Ore_Finding?=true
    showmmessage=true
    give_randomitems?=false
    lupuslazuli=false

    Also, could mossy cobblestone also be added?

    Thanks!
     
  10. Offline

    greyfire

    I'll prefer found diamonds to get them xrays when i tp them as they're in the dark, i'll wait till anti xray works better, because i messed up 2 Areas after i did /axr on trying to find the ores they just disappeared instead
     
  11. Offline

    SeeD419

    We've been running this plugin for quite some time now. I have it only set to alert on diamond, lapis, and gold - so it's a bit more special when someone hits it.

    With this setup, it is EXTREMELY obvious when someone is X-raying. At that point, it doesn't take half a brain to teleport to them and see the classic 1x2 x-ray mining shaft to the next diamond.

    Edit: How rude of me to forget to compliment the author ;) Fantastic work tacoshop. This plugin has never let me down. Albeit simple, it adds a nice element to the game and my users seem to like it a lot.
     
  12. Offline

    Geoff Winans

    Recommended config format changes ( will require yml parser):

    Any block types not explicitly listed should simply not notify. EG, opt-in rather than opt-out style.

    Code:
    logger: <true|false>
    public-notify: [ goldore, ironore, .... ]
    admin-notify: [diamondore, goldore, ....]
    
    show-message: <true|false>
    time-between-messages: XX # in seconds
    
    random-item-chance: <true|false>
    random-item-1: XXX
    random-item-2: XXX
    
    broadcast-message-format: '@Player@ just found @BlockName@!'
    
    I do have to say I don't understand the random item thing, doesn't seem to fit within the scope of this type of plugin.

    Having it take a list of possible blocks to monitor would make this far more flexible and the config file would be a lot cleaner based on the above style.

    Hell, even changing some of the options to simple comma separated lists would be better.

    eg;

    Code:
    logging=true|false
    
    showmessage=true|false
    broadcast-message='@Player@ just found @BlockName@!'
    time-between-messages=30
    
    admin-notify=block1,block2,block3
    public-notify=block1,block2,block3
    
    random_item_chance=true|false
    random_item_1=##
    random_item_2=##
    
    
     
  13. Offline

    Sh4d0w

    very good plugin, really!
    I found 3 xray user, who are now bunned. Otherwise i didn't found them without this great plugin

    geoff winans has right!
    his format is excellent.

    and can you add a manually-set time for founded items?
    the default value is 30 seconds since last found. XRay User can destroy the blocks faster, without a chat message.

    Is it possible to add lapis lazuli, gold, moss stone and the other items to ther logfile?

    the most catch lapislazuli or ireon, but this isn loggable.

    iron ore isn't shown in chat, so the players can search with xray....

    last, but not least:
    sry for my english
     
  14. Offline

    RebornSheep

    I have the same thing in my mind. Right now this plugin is unuseable for me, because i only want to set traps for one of my players. If one of my other players are digging that trap block, they are also getting kicked for using the xray mod without really using it?
    What is the meaning with that trap feature, if it not is checking the players for the xray mod and giving fake information?
     
    Bigwig222 likes this.
  15. Offline

    woodzy

    @itsatacoshop247
    CB#815
    any new players that com on to the server to the default groupe permisssions 2.7
    thay dont get the stuff from players finding diamonds but everyone else does any idea?
    Version: v1.6
     
  16. Offline

    spoothie

    Seems to work fine on #818 :)
     
  17. Offline

    nutlnw7410

    Random items seems to be glitched with worldguard's protected region (someone dig in region and other got random items, worldguard brings it back)
    p.s. it's dont drop diamonds
     
  18. Offline

    godgodgodgo

    So does this plugin work with RB #818?
     
  19. Offline

    Kene

    Is the version of the model representative of the server version it works with?

    :3 :3
     
  20. Offline

    ZerG

    Hey thanks this plugin is awesome !

    however...bugged iron ingots from the freebies when a player finds diamond, are you aware of this issue ?
    and are you going to rate this plugin for [818] hopefully with a fix for those bugged items.
    Thanks again this plug is wicked :)

    [​IMG]
     
  21. Offline

    Klausar

    I dont get it. How is the trap working? Can someone explain it to me plesae?
     
  22. Offline

    GameFreakDude

    It spawns Diamond Ore that notifies you when someone breaks it. The idea is that you put this Diamond Ore in a place where you couldn't normally find it without an xray mod.
     
  23. Offline

    Strahan

    Figured I'd post this in case anyone else may find it useful:


    Code:
    LogFileLocation = "C:\Games\Minecraft\plugins\FoundDiamonds\logs.txt"
    
    Set FS = CreateObject("Scripting.FileSystemObject")
    if not FS.FileExists(LogFileLocation) then Msgbox("I could not find the log file where you specified!"): wscript.quit
    
    if Msgbox("Restrict by date?", 4) = 6 then
      targetdate = Inputbox("Date to report on:")
      if not IsDate(targetdate) then Msgbox("Invalid date, aborting!"): wscript.quit
    end if
    if Msgbox("Restrict by user?", 4) = 6 then
      targetuser = Inputbox("User to report on:")
      if trim(targetuser) = "" then Msgbox("Invalid user, aborting!"): wscript.quit
    end if
    
    Dim Users(500), Dates(500), Data(500, 500), Times(500, 500), OutputDisp(2000)
    Dates(0) = 0: Users(0) = 0
    
    Set Infile = FS.OpenTextFile(LogFileLocation)
    do while not Infile.AtEndOfStream
      line = Infile.Readline
      logdate = cdate(mid(line, 7, 11))
      if (datediff("d", logdate, targetdate) = 0) or (targetdate = "") then
        loguser = lcase(trim(mid(line, 51, instr(line, "at (")-51)))
        if loguser = targetuser or targetuser = "" then
          uindex = 0
          for x=1 to Users(0)
            if Users(x) = loguser then uindex = x: exit for
          next
          if uindex = 0 then Users(0) = Users(0) + 1: Users(Users(0)) = loguser: uindex = Users(0)
          dindex = 0
          for x=1 to Dates(0)
            if logdate = Dates(x) then dindex = x: exit for
          next
          if dindex = 0 then
            Dates(0) = Dates(0) + 1: Dates(Dates(0)) = logdate: dindex = Dates(0)
          end if
          Data(uindex, dindex) = Data(uindex, dindex) + 1
          Times(uindex, dindex) = Times(uindex, dindex) & mid(line,19, 8) & ";"
        end if
      end if
    loop
    Infile.Close: Set Infile = Nothing
    
    for x=1 to Users(0)
      OutputDisp(0) = OutputDisp(0) + 1: OutputDisp(OutputDisp(0)) = "USER " & ucase(Users(x)) & ":" & vbCRLF
      for y=1 to Dates(0)
        if Data(x, y) > 0 then
          tmpArray = split(Times(x,y), ";")
          if ubound(tmpArray) > 1 then timespan = "  (" & timedisp(datediff("s", tmpArray(0), tmpArray(ubound(tmpArray)-1))) & ")" else timespan = ""
          OutputDisp(0) = OutputDisp(0) + 1: OutputDisp(OutputDisp(0)) = "  " & Dates(y) & ": " & Data(x, y) & timespan & vbCRLF
        end if
      next
      OutputDisp(0) = OutputDisp(0) + 1: OutputDisp(OutputDisp(0)) = vbCRLF
    next
    
    for x=1 to OutputDisp(0)
      tmp = tmp & OutputDisp(x)
      if x mod 30 = 0 then Msgbox(tmp): tmp = ""
    next
    if OutputDisp(0) < 30 then Msgbox(tmp)
    Set FS = Nothing
    
    Function timedisp(seconds)
      if seconds > 0 then
        days = int(seconds / 86400): daysec = days * 86400
        hours = int((seconds - daysec) / 3600)
        hoursec = hours * 3600
        minutes = int((seconds - (daysec + hoursec)) / 60)
        minsec = minutes * 60
        seconds = (seconds - (daysec + hoursec + minsec))
        if (seconds = 60) then minutes = minutes + 1: seconds = 0
        if (minutes = 60) then hours = hours + 1: minutes = 0
        if (hours = 24) then days = days + 1: hours = 0
        if (days > 0) then retval = retval & days & pluralize(" day^s, ", days)
        if (hours > 0) then retval = retval & hours & pluralize(" hour^s, ", hours)
        if (minutes > 0) then retval = retval & minutes & pluralize(" minute^s, ", minutes)
        if (seconds > 0) then retval = retval & seconds & pluralize(" second^s, ", seconds)
        timedisp = left(retval, len(retval)-2)
      else
        timedisp = "0 seconds"
      end if
    End Function
    
    Function Pluralize(tmpDisplay, tmpVar)
      if tmpVar > 1 then
        tmpDisplay = replace(tmpDisplay, "^s", "s")
        tmpDisplay = replace(tmpDisplay, "^ia", "are")
        tmpDisplay = replace(tmpDisplay, "^ww", "were")
      else
        tmpDisplay = replace(tmpDisplay, "^s", "")
        tmpDisplay = replace(tmpDisplay, "^ww", "was")
      end if
      Pluralize = tmpDisplay
    End Function
    It's a little vbscript log parser I wrote. When you run it and see the output, the time in parenthesis is the span between the first and last diamond of that day. I'm just a hobbyist programmer so forgive me my crude coding lol.
     
  24. Offline

    bruceweed

    I guess my biggest question would be. Does this work on Multiple worlds?

    Nevermind got things together and it works great on multiple worlds. (have 5 thats why i asked)

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

    - Properly implement onDisable, so this plugin can be loaded/disabled live with Plugman
    - Prevent found events when people mine an Ore block they placed themselves (for example mcMMO prevents gaining XP from blocks placed by players, not sure how he does it)
     
  26. This is great :) very simple and good.
     
  27. Offline

    pvjinflight

    Very good plugin, we had problems from xray users stealing others stuff from hidden chests (Yes some chestprotection would fix it, but at least in their forum threads everyone complains how they are buggy, so havent tried yet because of that), anyway I banned 2 xray users, thanks to this plugin.
     
  28. Offline

    Slez

    I'm still getting the hang of the founddiamonds plugin, this looks extremely fishy to me but would like to verify before I ban an active member on my server.

    http://pastebin.com/Y2KUaD1v
     
  29. Offline

    Strahan

    Doesn't look legit to me. I added a rate calculator to my script and ran your log:

    Code:
    C:\Games\Minecraft\plugins\FoundDiamonds>cscript stats.vbs
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    USER KURONISHIX:
      6/13/2011: 64  (4 hours, 18 minutes, 23 seconds - 4/min)
    
    USER NIKAIDOUX:
      6/13/2011: 9  (11 minutes, 13 seconds - 1.2/min)
    
    
    4 diamonds/minute average over 4 hours+? Yea, sounds fishy to me.
     
  30. Offline

    godgodgodgo

    So anyone going to update the title description to say it works with #860?
     
  31. Offline

    godgodgodgo


    Hi, I don't really understand how to do that script thing. Could you possibly upload the file on here and I'll change the log destination in notepad ++?
     

Share This Page