Bounty: type: format format: "Bounty Officer: " Bounty Kill Mobs: type: world debug: false events: on entity death: - if == PLAYER { - define killer - define type - define baby - define burning - if %type% == PIG { - determine passively NO_XP - if %baby% { - determine NO_DROPS } else if %burning% { - determine li@i@grilled_pork } else { - determine li@i@pork } } else if %type% == CHICKEN { - determine passively NO_XP - if %baby% { - determine NO_DROPS } else if %burning% { - determine li@i@cooked_chicken } else if < 6 { - determine li@i@raw_chicken|i@feather } else { - determine li@i@raw_chicken } } else if %type% == SHEEP { - determine passively NO_XP - if %baby% { - determine NO_DROPS } else if %burning% { - determine li@i@cooked_mutton } else if < 7 { - define colour - if %colour% == silver define colour light_gray - determine li@i@mutton|i@%colour%_wool } else { - determine li@i@mutton } } else if %type% == COW { - determine passively NO_XP - if %baby { - determine NO_DROPS } else if %burning% { - determine li@i@cooked_beef } else if < 4 { - determine li@i@leather|i@raw_beef } else { - determine li@i@raw_beef } } else if %type% == HORSE { - determine NO_DROPS_OR_XP } else if %type% == RABBIT { - determine passively NO_XP - if %baby% { - determine NO_DROPS } else if %burning% { - determine li@i@cooked_rabbit } else if < 3 { - determine li@i@rabbit|i@rabbit_foot } else { - determine li@i@rabbit } } else if %type% == MUSHROOM_COW { - determine passively NO_DROPS_OR_XP - define drops li@ - if < 3 { - define drops <%drops%.include[i@leather]> } - if < 85 { - define drops <%drops%.include[i@red_mushroom]> - if < 5 { - define drops <%drops%.include[i@raw_beef]> } - if <%drops%.size> != 0 - determine %drops% } } else if %type% == SQUID { - determine passively NO_XP - determine li@i@ink_sack } else if { #- narrate format:Bounty "You killed a and gained no xp!" targets:%killer% - determine NO_DROPS_OR_XP } else if %type% == SPIDER || %type% == CAVE_SPIDER { - determine passively 5 - define drops li@ - if < 40 { - define drops <%drops%.include[i@string]> } - if < 80 { - define drops <%drops%.include[i@spider_eye]> } - if <%drops%.size> != 0 { - determine %drops% } } else if %type% == SKELETON { - determine passively 5 - define drops li@i@bone - if < 5 { - define drops <%drops%.include[i@bow[durability=]]> } - determine %drops% } else if %type% == CREEPER { - determine passively NO_DROPS - determine passively 5 - if < 65 { - determine li@i@sulphur } } else if %type% == ZOMBIE { - determine passively 5 - determine li@i@rotten_flesh } else if %type% == PIG_ZOMBIE { - determine passively 7 - define drops li@i@rotten_flesh - if < 2 { - define drops <%drops%.include[i@gold_nugget]> } - determine %drops% } else if %type% == ENDERMAN { - determine passively NO_DROPS - determine passively 8 - if < 4 { - determine li@i@ender_pearl } } else if %type% == SILVERFISH { - determine passively 5 - determine NO_DROPS } else if %type% == WITCH { - determine 5 - random { - determine li@i@stick|i@stick - determine li@i@stick|i@stick - determine li@i@stick|i@stick - determine li@i@sugar|i@sugar - determine li@i@spider_eye|i@stick } } #- announce "<%killer%.name> killed a %type%" to_console } else { - determine NO_DROPS_OR_XP } Bounty Command: type: command debug: false name: bounty usage: /bounty [player] [amount] description: Allows you to check and place bounty on a player. allowed help: - determine > tab complete: - if > determine ]]> script: - if == 0 || > 2 { - narrate format:ServerChat "Invalid number of arguments. <&nl> Correct command syntax: /bounty [player] [amount]" #- narrate format:ServerChat "Correct command syntax: /bounty [player] [amount]" } else if == 1 { - define selPlayer ]||none> - if %selPlayer% != none { - define amount <%selPlayer%.flag[bounty]||0> - narrate format:ServerChat "<%selPlayer%.name> has $%amount% bounty on them" - log " checked the bounty of <%selPlayer%.as_player.name>. Bounty: $<%selPlayer%.as_player.flag[bounty]||0>" file:plugins/Denizen/logs/bounty.log } else { - narrate format:ServerChat "No player found by that name!" } } else if == 2 { - define selPlayer ]||none> - if %selPlayer% != none { - define amount - if %amount% != none && %amount% > 0 { - if || >= %amount% { - flag <%selPlayer%.as_player> bounty:]:<%selPlayer%.flag[bounty].add[%amount%]>||%amount%> - if ! { - take money qty: } - narrate format:ServerChat "You added $%amount% bounty to <%selPlayer%.as_player.name><&nl> Total bounty: $<%selPlayer%.as_player.flag[bounty]>" targets: - narrate format:ServerChat " placed a bounty on <%selPlayer%.as_player.name><&nl> They now have a total bounty of: $<%selPlayer%.as_player.flag[bounty]>" targets:|<%selPlayer%.as_player>]> - narrate format:ServerChat " placed a bounty on you for $%amount%<&nl> You now have $%amount% in bounty on your head!" - log " added $%amount% bounty to <%selPlayer%.as_player.name>. Total bounty: <%selPlayer%.as_player.flag[bounty]>" file:plugins/Denizen/logs/bounty.log } else { - narrate format:ServerChat "You do not have enough money!" targets: - log " attempted to add $%amount% bounty to <%selPlayer%.as_player.name> but did not have enough funds." file:plugins/Denizen/logs/bounty.log } } else { - narrate format:ServerChat "Invalid amount. Enter a whole, positive number. <&nl> e.g. 500" } } else { - narrate format:ServerChat "No player found by that name!" } } Bounty Reward: type: world events: on player kills player: - define killed - if <%killed%.has_flag[bounty]> { - define bounty <%killed.flag[bounty]> - give money qty:%bounty% - flag <%killed%.as_player> bounty:! - narrate format:ServerChat " killed <%killed%.as_player.name> and retrieved $%bounty% in bounty!" targets:|<%killed%.as_player>]> - narrate format:ServerChat "You killed <%killed%.as_player.name> and gained $%amount% from their bounty!" targets: - narrate format:ServerChat " killed you and collected your bounty!" targets:<%killed%.as_player> } else { - narrate format:ServerChat "You have been killed by <&nl> You can place a bounty on them using /bounty" }