# _____ _ ___ _____ _ _ # |_ _| | |__ \ / ____| | | | # | | | |_ ___ _ __ ___ ) | | | |__ __ _| |_ # | | | __/ _ \ '_ ` _ \ / /| | | '_ \ / _` | __| # _| |_| || __/ | | | | |/ /_| |____| | | | (_| | |_ # |_____|\__\___|_| |_| |_|____|\_____|_| |_|\__,_|\__| #Author : Max094_Reikeb #On an idea of : Mildojos options: ItemPickup: true PrefixPlayerInChat: <%player%> function get_item_name(i: item, n: string) :: string: if {_n} is set: return "%type of {_i}% named '%{_n}%'" else: return "%type of {_i}%" on pickup: if {@ItemPickup} is true: set {_n} to name of event-item set {_name} to get_item_name(event-item, {_n}) if event-item is enchanted: set {_enchants::*} to event-item's enchantments replace all " and " with " & " in {_enchants::*} send "&aYou've just picked up a %{_name}% &awith the enchants : %{_enchants::*}%" to player stop else: send "&aYou've just picked up a %{_name}%" to player stop on chat: if message contains "[item]": cancel event set {_n} to name of player's tool set {_name} to get_item_name(player's tool, {_n}) if player's tool is enchanted: set {_enchants::*} to players's tool's enchantments replace all "and" with "&" in {_enchants::*} replace all "[item]" with "%{_name}% (with the enchants %{_enchants::*}%)" in message broadcast "{@PrefixPlayerInChat} %message%" stop else: replace all "[item]" with "%{_name}%" in message broadcast "{@PrefixPlayerInChat} %message%" stop