TuSKe 是一款 Skript 扩展插件,它为 Skript 带来了与多个流行实用插件的集成支持,并新增了一系列功能,帮助服务器管理员更便捷地管理服务器。
TuSKe 为聊天插件 LegendChat 提供了全面的语法支持。
on legendchat chat- `player`:发送消息的玩家。- `legendchat channel`:玩家发送消息的频道。返回 `%channel%`。- `legendchat message`:消息内容。可被清除或设置为 `%string%`。返回 `%string%`。on legendchat tell- `sender`:消息发送者(玩家或控制台)。- `receiver`:消息接收者(玩家或控制台)。- `tell message`:私聊消息。可被清除或设置为 `%string%`。返回 `%string%`。%player% is (not) muted%player% can(‘t) (see|say in) [channel] %channel%[make] %player% [send] tell %string% to %player%mute %player% [for %integer% minute[s]]unmute %player%make %player% say %string% in [channel] %channel%mute (left|remaining) time of %player%%integer%。default channel of %player%%channel%。返回 %channel%。spy state of %player%%boolean%。返回 %boolean%。hide state of %player%%boolean%。返回 %boolean%。[chat] tag %string% of %player%%string%。[chat] tags of %player%"Mytag" 的格式,而非 "[MyTag]")。channelglobal, local。从 TuSKe 1.5.3 版本开始,你可以通过 Skript 效果创建自定义附魔。
首先,你需要注册一个附魔并指定其 ID 名称。
on skript load:
register a new custom enchantment with id name "Magic"此处的 ID 名称 "Magic" 将在后续代码中用于为物品附魔。
set max level of Magic to 10set rarity of Magic to 3set accepted items for Magic to "Swords", "Bow" and "Armor"- 单个类型:`Helmets`, `Chestplates`, `Leggings`, `Boots`, `Pickaxes`, `Axes`, `Shovels`, `Bow`, `Fishing Rod`- 组合类型:`Tools`(镐、斧、锹)、`Armor`(头盔、胸甲、护腿、靴子)、`All`(所有类型)All。可使用逗号或 “and” 分隔多个值。set enabled for Magic to truetrue 时,此附魔可在附魔台中获得;否则只能通过 Skript 代码添加。默认为 false。set conflicts for Magic to Enchantment and Another_Enchantmenton skript load:
register a new custom enchantment with id name "Magic"
set {_enchantment} to "Magic" parsed as custom enchantment
set max level of {_enchantment} to 5
set rarity of {_enchantment} to 1
set accepted items for {_enchantment} to "Swords" and "Bow"
set lore name of {_enchantment} to "Magic Power"reload all custom enchantments%itemtype% has custom enchantment %custom enchantment%level of custom enchantment %custom enchantment% of %itemstack%[all] custom enchantments of %itemstack%TuSKe 提供了一套强大的 GUI 创建与管理语法,用于格式化物品栏中的槽位。
(format|create|make) [a] gui slot %numbers% of %players% with %itemstack% to do nothing (format|create|make) [a] gui slot %numbers% of %players% with %itemstack% to close [using %click action% [(button|click|action)]] (format|create|make) [a] gui slot %numbers% of %players% with %itemstack% to [close then] run %command sender% command %string% [as op] [using %click action% [(button|click|action)]] [with cursor [item] %itemstack%] (format|create|make) [a] gui slot %numbers% of %players% with %itemstack% to [close then] run function %function% [using %click action% [(button|click|action)]] [with cursor [item] %itemstack%]%click action%:指定触发动作的点击类型。支持的值包括:left, right, shift left, shift right, double click, middle, number key, drop, control drop。如果使用 Bensku 的 Skript v2.2-dev16b 或更高版本,请查阅其文档以获取正确的点击动作值。with cursor %itemstack%:仅当玩家手持特定物品点击时才会触发动作。# 基础示例
create a gui slot 0 of player with stone to do nothing
create a gui slot 1 of player with potato to close with left click
create a gui slot 2 of player with paper to run player command "CommandHere" as op
create a gui slot 3 of player with diamond to run console command "CommandHere"
create a gui slot 4 of player with gravel to run function giveItems(player) with cursor item stone
# 同一槽位不同点击动作
create a gui slot 2 of player with stone to run function subtract(1) with left click
create a gui slot 2 of player with stone to run function increase(1) with right click
# 动态更改槽位物品
function toggle(p: Player):
if {var} is true:
set slot 0 of current inventory of {_p} to red wool
else:
set slot 0 of current inventory of {_p} to green wool
# 在你的打开物品栏代码后
create a gui slot 0 of player with green wool to run function toggle(player) unformat the gui slot 1 of player unformat all gui slots of player%player% has [a] gui:检查玩家当前打开的库存是否包含 GUI 槽位。slot %number% of %player% is a gui:检查玩家的指定槽位是否为 GUI 槽位。相较于旧方法或其他未更新的插件,TuSKe 的 GUI 管理器具有以下优势:
# 铁砧合成事件
on anvil combine:
event-item-one is a diamond sword
event-item-two is a diamond sword
send "Oh, you combined two diamonds swords!"
# 铁砧重命名事件
on anvil rename:
event-string is "Awesome axe"
event-item-result is any axe
send "You've renamed your %event-item% from %event-item's name% to %event-string%"
# 按字母顺序列出玩家
command /players:
trigger:
set {_players::*} to alphabet order of all players
loop {_players::*}:
send "%loop-value%"
# 显示玩家经验球数量
command /xp:
trigger:
send "You have %xp of player% experiences orbs."
# 使用自定义附魔“吸血鬼”的效果
on damage of player:
if attacker's tool has custom enchantment Vampire:
set {_AddHealth} to 1 * level of custom enchantment Vampire of attacker's tool
add {_AddHealth} to health of attackerplugins 文件夹。(如果已安装 Skript,则只需放入 TuSKe)。友情链接: 网易我的世界 | 泰拉瑞亚 | ocent云计算 | 米饭Minecraft插件文档 | 友链合作
历史访问人次:3,028,283 | 今日访问人次:12,411 | 昨日访问人次:11,147
独立 IP:4,877 | 最近24小时有3,877人访问本站
Copyright © 2019-2026 我的世界服务器列表站. All rights reserved.
❤ Powered by GermMC 京ICP备17023959号-6