欢迎加入!

注册后,您将能够与我们社区的其他成员进行讨论、分享和私信。

无论您是想寻求帮助、分享经验,还是结识志同道合的朋友,我们都期待您的参与!一起探索更多精彩内容吧。

立即注册! 加入群聊
  • 所有的免费插件都是同步外网更新,所有都是最新版!
删除工具

删除工具 同步更新

没有下载权限
购买会员

特征

  • PlayerAdmin 删除工具
  • 退款选项
  • 支付选项
  • 使用 Tool Cupboard 或/和 Building Owners 或/和 Entity Builder(见下文)
  • 删除结构
  • 删除可部署对象
  • 选择可以删除的实体
  • 支持大多数 Clans 插件
  • 支持 NoEscape
  • 图形用户界面

权限

此插件使用权限系统。要分配权限,请使用 。要删除权限,请使用 。oxide.grant <user or group> <name or steam id> <permission>oxide.revoke <user or group> <name or steam id> <permission>
对 all、structure 和 external 类型没有限制。请不要将其授予玩家

  • removertool.normal- 需要使用普通删除
  • removertool.admin- 需要使用 admin remove。在此模式下,可以删除任何实体。
  • removertool.all- 需要使用 all remove。
  • removertool.structure- 需要使用 structure remove。
  • removertool.external- 需要使用外部删除。
  • removertool.target- 需要使用 'remove.target' 命令
  • removertool.override- 需要使用 'remove.allow' 命令

聊天命令

  • /remove [time (seconds)]-- 启用/禁用 RemoverTool
  • /remove <admin | a> [time (seconds)]-- 启用管理员 RemoverTool。在此模式下,可以删除任何实体。
  • /remove all [time (seconds)]-- 从你正在看的地方开始,移除所有相互接触的东西(如果它们彼此太近,将移除多个建筑)(对于大型建筑来说可能会很慢)
  • /remove <structure | s> [time (seconds)]-- 移除整个建筑(不会移除彼此靠近的建筑或可部署的建筑)(即使在大型建筑上也非常快)
  • /remove <external | e> [time (seconds)]-- 拆除相邻的高外墙
  • /remove <help | h>-- 查看帮助

控制台命令

  • remove.toggle-- 与 /remove 相同,只能在游戏 F1 主机中使用
  • remove.target <disable | d> <player (name or id)>-- 禁用播放器的去除工具
  • remove.target <normal | n> <player (name or id)> [time (seconds)] [max removable objects (integer)]-- 为播放器启用移除工具 (Normal)
  • remove.target <admin | a> <player (name or id)> [time (seconds)]-- 为播放器启用移除工具 (Admin)
  • remove.target <all> <player (name or id)> [time (seconds)]-- 为播放器启用移除工具 (全部)
  • remove.target <structure | s> <player (name or id)> [time (seconds)]-- 为播放器启用移除工具 (Structure)
  • remove.target <external | e> <player (name or id)> [time (seconds)]-- 为播放器启用移除工具 (外部)
  • remove.playerentity <all | a> <player id>-- 删除 Player 的所有实体
  • remove.playerentity <building | b> <player id>-- 移除玩家的所有建筑
  • remove.playerentity <cupboard | c> <player id>-- 移除玩家拥有的橱柜的建筑
  • remove.allow <false/true>-- 覆盖玩家的 remover 工具,如果设置为 false,则只有具有 removertool.override 权限的玩家才能使用 remover 工具。在服务器重启或插件重启后,不会保存此内容!!如果您希望您的服务器仅在特定时间段内拥有删除工具,则此选项与 Timed Executed 一起使用。
  • remove.building <price / refund> <percentage>-- 为所有建筑物设置价格或退款。例如 'remove.building price 50'。以这种方式显示:
"Twigs": {
"Price": {
"wood": {
"amount": 10,
"skinId": -1
}
},
"Refund": {
"wood": {
"amount": 10,
"skinId": -1
}
}
},

  • remove.building <priceP / refundP> <percentage>-- 为所有建筑物设置价格或退款。例如 'remove.building priceP 50'。以这种方式显示:
"Twigs": {
"Price": 50,
"Refund": 20
},

配置

设置和选项可以在目录下的文件中进行配置。建议使用编辑器和验证器,以避免格式问题和语法错误。RemoverToolconfig

UI 图像

如果要使用 Image,则必须安装 ImageLibrary 插件

无需添加可部署实体和项的图像;ImageLibrary 已经有它们。

如果需要添加其他实体的图像,请使用以下格式:

"Image Urls (Used to UI image)": {
"Entity short prefab name": "Image url",
},

删除访问权限

  • 使用工具柜(强烈不推荐)
    这将允许 TC 授权的玩家移除 TC 范围内的实体。换句话说,玩家不能只在建筑被阻挡时移除实体。强烈不推荐意味着不建议单独使用
  • 使用建筑锁
    这是 tc 检查中的附加检查。所以你必须启用 tc 检查 -> “Use Tool Cupboards”。当您没有被建筑物阻止时,它会检查您是否已经验证了建筑物中的所有锁。
  • Use Entity Owners
    这将允许实体所有者删除实体
  • Use Building Owners (您将需要 BuildingOwners 插件)
    这将允许拥有建筑物(在基地中建造第一个地基的建筑物)的玩家删除建筑物

  • 根据你之前选择的选项(实体所有者或建筑物所有者),它将允许这些人的(朋友/队友/部落成员)删除
例如:如果同时启用了以下两项。玩家需要是实体所有者并拥有 TC 授权才能删除实体

"Use Entity Owners": true,
"Use Tool Cupboards (Strongly unrecommended)": true,

价格 / 退款

经济与服务器奖励

将其用作价格或退款。例如:

"Price": {
"scrap": {
"amount": 30,
"skinId": -1
},
"Economics": {
"amount": 30,
"skinId": -1
},
"ServerRewards": {
"amount": 30,
"skinId": -1
}
},
"Refund": {
"scrap": {
"amount": 30,
"skinId": -1
},
"Economics": {
"amount": 30,
"skinId": -1
},
"ServerRewards": {
"amount": 30,
"skinId": -1
}
}
按初始费用的百分比退款

仅适用于建筑,不适用于可部署物。(So Wood、Twigs、Metal、Stones 和 TopTier)

"Twigs": {
"Price": 50, //Pay 50% of the initial cost
"Refund": 60 //Refund 60% of the initial cost
},
Remove 按钮

FORWARD,
BACKWARD,
LEFT,
RIGHT,
JUMP,
DUCK,
SPRINT,
USE,
FIRE_PRIMARY,
FIRE_SECONDARY,
RELOAD,
FIRE_THIRD
Entity Spawned Time Limit(实体生成时间限制):因为插件不会保存生成实体的时间。因此,这仅用于加载插件后生成的实体。

配置

设置和选项可以在目录下的文件中进行配置。建议使用编辑器和验证器,以避免格式问题和语法错误。RemoverToolconfig
{
"Settings": {
"Use Teams": true,
"Use Clans": true,
"Use Friends": true,
"Use Entity Owners": true,
"Use Tool Cupboards (Strongly unrecommended)": false,
"Use Building Owners (You will need BuildingOwners plugin)": false,
"Remove Button": "FIRE_PRIMARY",
"Remove Interval (Min = 0.2)": 0.5,
"Only start cooldown when an entity is removed": false,
"RemoveType - All/Structure - Remove per frame": 20,//Reducing it can reduce server lag, but take longer to remove
"RemoveType - All/Structure - No item container dropped": true,//If false, it will drop
"RemoveType - Normal - Max Removable Objects - Exclude admins": true,
"RemoveType - Normal - Cooldown - Exclude admins": true,
"RemoveType - Normal - Check stash under the foundation": false,
"RemoveType - Normal - Entity Spawned Time Limit - Enabled": false,//If true, the spawned entity before installing the plugin cannot be removed
"RemoveType - Normal - Entity Spawned Time Limit - Cannot be removed when entity spawned time more than it": 300.0, //Seconds
"Default Entity Settings (When automatically adding new entities to 'Other Entity Settings')": {
"Default Remove Allowed": true
}
},
"Container Settings": {
"Storage Container - Enable remove of not empty storages": true,
"Storage Container - Drop items from container": false,
"Storage Container - Drop a item container from container": true,
"IOEntity Container - Enable remove of not empty storages": true,
"IOEntity Container - Drop items from container": false,
"IOEntity Container - Drop a item container from container": true
},
"Remove Damaged Entities": {
"Enabled": false,
"Exclude Building Blocks": true,
"Percentage (Can be removed when (health / max health * 100) is not less than it)": 90.0
},
"Chat Settings": {
"Chat Command": "remove",
"Chat Prefix": "[RemoverTool]: ",
"Chat Prefix Color": "#00FFFF",
"Chat SteamID Icon": 0
},
"Permission Settings (Just for normal type)": {//You can add more permissions here. but "removertool.normal" is necessary
"removertool.normal": {
"Priority": 0,
"Distance": 3.0,
"Cooldown": 60.0,
"Max Time": 300,
"Remove Interval (Min = 0.2)": 1.0,
"Max Removable Objects (0 = Unlimited)": 50,//Maximum removable object each time the remover tool is enabled
"Pay": true,
"Refund": true,
"Reset the time after removing an entity": false
},
"removertool.vip": { // vip permission
"Priority": 1,
"Distance": 5.0,
"Cooldown": 30.0,
"Max Time": 300,
"Remove Interval (Min = 0.2)": 0.5,
"Max Removable Objects (0 = Unlimit)": 100,
"Pay": false,
"Refund": true,
"Reset the time after removing a entity": true
}
},
"Remove Type Settings": {
"Normal": {
"Display Name": "Normal",
"Distance": 3.0,
"Default Time": 60,
"Max Time": 300,
"Gibs": true,
"Reset the time after removing an entity": false
}
},
"Remove Mode Settings (Only one model works)": {
"No Held Item Mode": true, //Prevents the player from holding any item
"No Held Item Mode - Disable remover tool when you have any item in hand": true, //remover tool disabled if player holds item
"Melee Tool Hit Mode": false,
"Melee Tool Hit Mode - Item shortname": "hammer",
"Melee Tool Hit Mode - Item skin (-1 = All skins)": -1,
"Melee Tool Hit Mode - Auto enable remover tool when you hold a melee tool": false,
"Melee Tool Hit Mode - Requires a melee tool in your hand when remover tool is enabled": false,
"Melee Tool Hit Mode - Disable remover tool when you are not holding a melee tool": false,
"Specific Tool Mode": false,
"Specific Tool Mode - Item shortname": "hammer",
"Specific Tool Mode - Item skin (-1 = All skins)": -1,
"Specific Tool Mode - Auto enable remover tool when you hold a specific tool": false,
"Specific Tool Mode - Requires a specific tool in your hand when remover tool is enabled": false,
"Specific Tool Mode - Disable remover tool when you are not holding a specific tool": false
},
"NoEscape Settings": {
"Use Raid Blocker": false,
"Use Combat Blocker": false
},
"Image Urls (Used to UI image)": {
"economics": " ",
"serverrewards": " "
},
"GUI": { },
"Remove Info (Refund & Price)": {
"Price Enabled": true,
"Refund Enabled": true,
"Refund Items In Entity Slot": true,//What is "Entity Slot": e.g. Code lock on the cupboard
"Allowed Building Grade": {
"Twigs": true, //Allow removal of Twigs
"Wood": true,
"Stone": true,
"Metal": true,
"TopTier": true
},
"Display Names (Refund & Price)": {
"telephone_5566": "Telephone", // item shortname skin id // If empty, the default item name will be displayed
"economics": "Economics", // custom currency
},
"Building Blocks Settings": {
"Foundation": {
"Display Name": "Foundation", //The name displayed on the RemoverToolUI
"Building Grade": {
"Twigs": {
"Price": {
"wood": {
"amount": 15,
"skinId": -1 // If less than 0, will ignore skin to take items
}
},
"Refund": {
"wood": {
"amount": 10,
"skinId": -1 // If less than 0, the item skin ID will be set based on the entity skin Id
}
}
}
}
}
},
"Other Entity Settings": {//If you want to add other entities, you can do so here
"fogmachine": { //entity short prefab name
"Remove Allowed": true, //Allows the entity to be remove
"Display Name": "Fogger-3000", //The name displayed on the RemoverToolUI
"Price": {},
"Refund": {
"fogmachine": {
"amount": 1,
"skinId": -1
}
}
}
}
}
}

private object canRemove(BasePlayer player, BaseEntity entity)
private void OnNormalRemovedEntity(BasePlayer player, BaseEntity entity) // Called when deleting an entity in normal remove mode
private object OnDropContainerEntity(BaseEntity entity) // Called when the container is about to drop
private void OnRemoverToolActivated(Baseplayer player) // Called only in normal remove mode
private void OnRemoverToolDeactivated(Baseplayer player) // Called only in normal remove mode

自定义实体删除设置

通过外部插件自定义实体删除设置,换句话说,您可以通过其他插件修改实体或退款物品的价格

下面给出了一个例子(通过 removertool 移除无人机并退还无人机物品)


Copy
using System.Collections.Generic;

namespace Oxide.Plugins
{
[Info("Remover Tool API Example", "Arainrr", "1.0.0")]
[Description("Example of api usage for the Remover Tool plugin")]
public class RemoverToolAPIExample : RustPlugin
{
private class RemovableEntityInfo
{
/// <summary>
/// Id of the entity image.
/// </summary>
public string ImageId { get; set; }

/// <summary>
/// Display name of the entity.
/// </summary>
public string DisplayName { get; set; }

/// <summary>
/// Remove the price of the entity. ItemName to ItemInfo
/// </summary>
public Dictionary<string, ItemInfo> Price { get; set; }

/// <summary>
/// Remove the refund of the entity. ItemName to ItemInfo
/// </summary>
public Dictionary<string, ItemInfo> Refund { get; set; }

public struct ItemInfo
{
/// <summary>
/// Amount of the item.
/// </summary>
public int Amount { get; set; }

/// <summary>
/// SkinId of the item.
/// Less than 0 is not specified skin.
/// </summary>
public long SkinId { get; set; }

/// <summary>
/// Id of the item image.
/// </summary>
public string ImageId { get; set; }

/// <summary>
/// Display name of the item.
/// </summary>
public string DisplayName { get; set; }
}
}

private const string RefundItemName = "Drone Item"; // Make sure the custom ItemName is unique.
private const string PriceItemName = "Custom Currency"; // Make sure the custom ItemName is unique.

private readonly Dictionary<string, object> _droneEntityInfo = new Dictionary<string, object>
{
["DisplayName"] = "Drone",
["Price"] = new Dictionary<string, object>
{
// All items are built-in.
["wood"] = new Dictionary<string, object>
{
["Amount"] = 1000,
["DisplayName"] = "Wood..."
},
// economics and serverrewards are built-in not custom.
["economics"] = new Dictionary<string, object>
{
["Amount"] = 100,
["DisplayName"] = "Economics..."
},
// Custom ItemName.
[PriceItemName] = new Dictionary<string, object>
{
["Amount"] = 100,
["DisplayName"] = "Custom Gold"
}
},
["Refund"] = new Dictionary<string, object>
{
// Custom ItemName.
[RefundItemName] = new Dictionary<string, object>
{
["Amount"] = 1,
["DisplayName"] = "Refund Drone",
},
// Custom SkinId
["box.wooden.large"] = new Dictionary<string, object>
{
["Amount"] = 1,
["SkinId"] = 1742653197L,
["DisplayName"] = "MiniCopter",
}
}
};

#region RemoverTool Hooks

/// <summary>
/// Used to check if the player can pay. It is only called when there is a custom ItemName
/// in the price
/// </summary>
/// <param name="entity"> Entity </param>
/// <param name="player"> Player </param>
/// <param name="itemName"> Item name </param>
/// <param name="itemAmount"> Item amount </param>
/// <param name="skinId"> Less than 0 is not specified skin </param>
/// <param name="check"> If true, check if the player can pay. If false, consume the item </param>
/// <returns> Returns whether payment can be made or whether payment was successful </returns>
private bool OnRemovableEntityCheckOrPay(BaseEntity entity, BasePlayer player, string itemName, int itemAmount, long skinId, bool check)
{
PrintWarning($"OnRemovableEntityCheckOrPay: {player.userID} | {entity.ShortPrefabName} | {itemName} | {itemAmount} | {skinId} | {check}");
if (itemName == PriceItemName)
{
return true;
}

return false;
}

/// <summary>
/// Called when giving refund items. It is only called when there is a custom item name in
/// the refund.
/// </summary>
/// <param name="entity"> Entity </param>
/// <param name="player"> Player </param>
/// <param name="itemName"> Item name </param>
/// <param name="itemAmount"> Item amount </param>
/// <param name="skinId"> Less than 0 is not specified skin </param>
/// <returns> Returns whether the refund has been granted successful </returns>
private bool OnRemovableEntityGiveRefund(BaseEntity entity, BasePlayer player, string itemName, int itemAmount, long skinId)
{
PrintWarning($"OnRemovableEntityGiveRefund: {player.userID} | {entity.ShortPrefabName} | {itemName} | {itemAmount} | {skinId}");
if (itemName == RefundItemName)
{
var item = ItemManager.CreateByName("drone", itemAmount);
player.GiveItem(item);
}

return true;
}

/// <summary>
/// Return information about the removable entity.
/// </summary>
/// <param name="entity"> Entity </param>
/// <param name="player"> Player </param>
/// <returns> Serialized information </returns>
private Dictionary<string, object> OnRemovableEntityInfo(BaseEntity entity, BasePlayer player)
{
PrintWarning($"OnRemovableEntityInfo: {entity.ShortPrefabName} | {player.userID}");
if (entity is Drone)
{
return _droneEntityInfo;
}

return null;
}

#endregion RemoverTool Hooks
}
}
作者
xiaoguan
下载
3
查看
24
首次发布
最后更新

评分

0.00 星 0 星

来自xiaoguan的更多资源

后退
顶部