Phantom Plugin

Discussion in 'Archived: Plugin Requests' started by phantomace1111, Jun 26, 2013.

  1. Offline

    phantomace1111

    I was thinking of a plugin called "Phantom Plugin", which would add a phantom which would "haunt" the server, kind of like Herobrine. Whenever an effect happens the phantom will give you a message in dark red. The message would look like &4[PHANTOM] Message...
    The effects are based on how many steps you take. Here are some of the effects that would happen:

    Minor Effects: (every 300-500 steps)
    1. Get hurt, taking half a heart of damage (like 1 fist hit) Message: Tag, your it...
    2. Instantly turn around 180 degrees. Message: Behind you...
    3. Get the effect slowness 2 for 10 seconds. Message: Slow down...
    4. Get the effect nausea for 5 seconds. Message: You probably shouldn't have eaten that...
    5. 2 blocks of dirt appear like a wall in front of you. Message: Oops, I dropped those...

    Medium Effects: (every 1000-1500 steps)
    1. Get lit on fire for 4 seconds. Message: BURN...
    2. Get the effect blindness for 10 seconds. Message: Watch where you're going...
    3. Get thrown up 8 blocks into the air. Message: You go up, you come down...
    4. A random item from your inventory gets dropped onto the ground. Message: You dropped something...
    5. You cannot move for 4 seconds. Message: FREEZE...

    Major Effects: (every 2500-3500 steps) (All major effects come with blindness for 10 seconds)
    1. Your health instantly goes down TO half a heart. Message: I WILL WATCH TO SEE IF YOU CAN SURVIVE...
    2. Stationary lava appears on the block in front of you. Message: DIE! DIE! DIE!...
    3. 2 creepers spawn in front of you. Message: GO, MY MINIONS. DESTROY HIM...
    4. Lit tnt appears in front of you. Message: BLOWN TO BITS...
    5. You instantly run out of food and start starving to death. Message: THE HUNGER WILL OVERWHELM YOU...

    Extreme Effects (Every 10000-12000 steps)
    1. Your entire inventory is cleared. Message: HOW WILL YOU SURVIVE NOW?...
    2. You get blindness for 5 seconds while being spammed with the message: I WILL REAP YOUR SOUL!!!!! Then you die.


    There would also be another Phantom, whose messages would appear like this: &3[PHANTOM] Not All Phantoms Are Evil! This phantom would give good effects to the player every 1000-1500 steps.

    1. Instantly heals your health and food bar.
    2. Gives you speed 3 for 60 seconds.
    3. Gives you 5 diamonds.
    4. Gives you a full set of gold armor
    5. Gives you a full set of gold tools
    6. Gives you a golden sword with sharpness 3, knockback 2, and fire aspect 1.
     
    ezybuddy likes this.
  2. Offline

    oa10712

    I can get started on this in a few hours
     
  3. Offline

    phantomace1111

    Really? Cool thanks! you are awesome!
     
  4. Offline

    ezybuddy

    Dang phantomace! This is a cool plugin! Cant wait for it to be done!
     
  5. Offline

    oa10712

    Ok, so I have looked into it some. Unless another developer knows of a way, I cannot figure out how to detect the number of block traveled without lagging the server. I can, however, make it work on a timed basis
     
  6. Offline

    timtower Administrator Administrator Moderator

    oa10712 There is no way to do it without lagging the server, without the timed based thing
     
  7. Offline

    oa10712

    That's what I thought.
    phantomace1111 would using a timed interval be ok?
     
  8. Amazing idea. Might even start working on it this weekend!
     
  9. Offline

    phantomace1111

    Yes.
     
  10. Offline

    oa10712

    Starting up on this now. How does "Server Spook" sound for the title?
     
  11. Offline

    Skye

    Just count the number of blocks each player has traveled.

    Code:java
    1. HashMap<String, Integer> stepCount = new HashMap<String, Integer>();
    2.  
    3. @EventHandler
    4. public void onPlayerMove(PlayerMoveEvent e) {
    5. if (e.getFrom().getBlockX() == e.getTo().getBlockX() && e.getFrom().getBlockZ() == e.getTo().getBlockZ() && e.getFrom().getBlockY() == e.getTo().getBlockY())
    6. return;
    7.  
    8. String playerName = e.getPlayer().getName();
    9.  
    10. if (!stepCount.containsKey(playerName))
    11. stepCount.put(playerName, 0);
    12.  
    13. stepCount.put(playerName, stepCount.get(playerName) + 1);
    14. }
     
  12. Offline

    phantomace1111

    Sounds cool, and could you please make the time (or blocks stepped if you use Skye's code) customizable? I was also wondering if it would be possible to disable the plugin in a world, because I dont really want the effects to take place in my minigames world. If thats too hard to code in though its ok. And thanks for coding it!
     
  13. Offline

    oa10712

    I think i will be able to get world support. I already have a sample config sheet made up.
     

    Attached Files:

  14. Offline

    phantomace1111

    Yay that's awesome! Thank you so much.
     
  15. Offline

    oa10712

    UPDATE: The plugin loads PhantomEffects from a config file and they can be tested with a command.
    You can specify potion effects, message to display, and health changes/sets from the config. I am working on making a decent, non-laggy way of applying the phantom effect.
    Are there any requests other than inventory stuff and mob/block placement for the config?
    Code:
    positive:
      boost:
        potion:
          speed:
            level: 2
            time: 60
        freq: 20
        skipWorlds:
        - world
        - miniGame
      healFull:
        healthSet: 10
        hungerSet: 20
        freq: 10
    negative:
      tag:
        message: Tag, you're it
        healthChange: -1
        freq: 5
    
    BukkitDev page for when it gets finalized: http://dev.bukkit.org/bukkit-plugins/serverspook/

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  16. Offline

    phantomace1111

    Nope. Not yet at least.

    When do you think it will be finished?

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

    phantomace1111

  18. Offline

    oa10712

    Sorry, real-life stuff came up. I can get back to it this afternoon. Pretty much all that's left is to add the timer cycle.
     
  19. Offline

    phantomace1111

    Cool :) can't wait!
     
  20. Offline

    johngianni

    I don't think counting the amount of blocks the player has traveled is a good idea. Instead, use the time. This seems like I nice idea and I am going to try making it but I am probably going to change some of the effects you thought of such as the extreme effects. Also, I probably going to make these effects more severe when it is night time in the game. I will see how it goes.
     
  21. Offline

    Skye

    How do you think a timer works? The only difference is that a block counter only runs when the player actually moves.
     
  22. Offline

    oa10712

    Quick check on the concept, do you want the timer to be for each player or for the server as a whole?
    as in, each player has a chance of an effect every 20 minutes, or one player on the server every 20 minutes? (just as an example time)
     
  23. Offline

    phantomace1111

    Each player should have a chance of an effect every 20 minutes, and only one effect should happen at a time.
     

Share This Page