PVP


Author: Felln
Created: 2014-02-08T16:47:54-0500
Edited: 2014-04-30T20:29:29-0400
Denizen Version: 0.9.4
Views: 14
Downloads: 808
Likes: 0


WGET
Description: This little script lets player attack each other only if they both hit a player in the last 30 secounds.

When a player hits another player he gets angry and has a different head for all to recognize that he is in PVP-Mode. Now he is attackable for people which also are in PVP-Mode.
Every time a player hits another player the 30 secounds countdown star over again for the PVP-Mode to stop.

The player cant take the pvp-head off and after the countdown is over he gets back whatever he was wearing on his head.


Edit: Now There are several messages if a player hits a player which is not in PVP-mode!
Just search for the 'NARRATE's to edit them

Edit:Players dont drop the PVP-head anymore on death and it takes longer to get in PVP-Mode

"PVPworld":
  type: world
 
 

  events:
    on player clicks i@wuetenderkopf in inventory:
    - determine passively cancelled
    - Narrate 'Den kannst du nicht abnehmen...'
    on player dies:
    - if <flag.p:PVP> {
      - queue queue:<player.name>PVP clear
      - drop i@human_skull[skull_skin=<player.name>]
      - flag player PVP:!
      - if <player.flag[Helm]> != null {
        - drop <player.flag[Helm]> <player.location> 
        - flag player Helm:!
        }
      - flag player PVPInventory:||:<context.inventory.list_contents>
      - flag player PVPInventory:->:<<context.entity>.equipment.helmet>
      - flag player PVPInventory:->:<<context.entity>.equipment.leggings>
      - flag player PVPInventory:->:<<context.entity>.equipment.chestplate>
      - flag player PVPInventory:->:<<context.entity>.equipment.boots>
      - flag player PVPInventory:<-:i@wuetenderkopf
      - determine <player.flag[PVPInventory].as_list>
      }
 
    
    on player damages player:
    - if !<<context.entity>.flag[PVP]> {
      - flag player PVPSchläge:+:1
      - if <flag.p:PVPSchläge> == 10 NARRATE '<context.entity.as_player.name> scheint deine Schläge nicht mal zu bemerken' else if <flag.p:PVPSchläge> == 30 NARRATE 'Das juckt <context.entity.as_player.name> gar nicht...' else if <flag.p:PVPSchläge> == 60 NARRATE '<&4>HÖR AUF, MANN!!!' else if <flag.p:PVPSchläge> == 100 NARRATE 'Ach mach doch was du willst...' else if <flag.p:PVPSchläge> == 200 NARRATE 'Trottel...'
    - if <player.flag[PVP]> == null {
      - if <player.flag[Startschlag]> == null flag player Startschlag:0
      - if <player.flag[Startschlag]> < 5 {
        - determine passively cancelled
        - run blablafuck
        } else {
          - run PVPstart id:<player.name>PVP 
          - if !<<context.entity>.flag[PVP]> determine cancelled
          }
      } else if <flag.p:PVP> && !<<context.entity>.flag[PVP]> {
        - determine passively cancelled
        - queue queue:<player.name>PVP clear
        - runtask PVPstartover queue:<player.name>PVP
        } else if <flag.p:PVP> && <<context.entity>.flag[PVP]> {
          - queue queue:<player.name>PVP clear
          - runtask PVPstartover queue:<player.name>PVP
          }
        
PVPstartover:
  type: task
  script:
  - ^WAIT 30
  - ^flag player PVP:!
  - ^if !'<flag.p:Helm || none>' == none equip head:<flag.p:Helm> else equip head:air
  - ^flag player PVPSchläge:0
  - ^flag player Helm:!
  - ^NARRATE '<dark_green>Du hast dich wieder beruhigt!'
  
PVPstart:
  type: task
  script:
  - ^NARRATE '<dark_red>Du wirst unglaublich wütend!'
  - ^flag player Helm:<player.equipment.helmet>
  - ^flag player PVP
  - ^equip head:i@WuetenderKopf
  - ^WAIT 30
  - ^flag player PVPSchläge:0
  - ^if !'<flag.p:Helm || none>' == none equip head:<flag.p:Helm> else equip head:air
  - ^flag player Helm:!
  - ^flag player PVP:!
  - ^NARRATE '<dark_green>Du hast dich wieder beruhigt!'
  
PVPprestart:
  type: task
  script:
  - ^flag player Startschlag:+:1
  - narrate '<dark_red><player.flag[Startschlag].asint>'
  - wait 10
  - flag player Startschlag:0
 
  
blablafuck:
  type: task
  script:
  - queue queue:<player.name>prestart clear
  - ^run PVPprestart id:<player.name>prestart

WuetenderKopf:
  type: item
  material: i@human_skull[skull_skin=T_G_H_O_E_D]
  display name: <dark_red>Dein wütendes Gesicht
  lore:
  - so wütend...
 




Comments
No one has posted a comment! Post one below: