取决于
-
高级状态
-
纪念碑守望者
-
树枝衰减
-
活动奖励
Works with
-
抱歉,我们找不到!
-
可突袭基地
-
地牢基地
-
经济学
-
临时权限
-
抱歉,您没有权限!
-
工业粪
-
朋友
-
动态 PVP
-
区域管理器
-
复制粘贴
-
图片库
关于Real PvE
真实 PvE 服务器的插件,具有损害预防、反破坏措施、可定制的 PvP 区域、radtown s 和 raid 区域中的自动战利品队列等等。
附言由于之前使用 DynamicPVP 的实现不正确并且存在一些问题,因此我添加了通用钩子(开发人员 API 部分)用于所有 PvP 插件的常规访问,目前 DynamicPVP 中缺少这些插件。我已经要求作者添加它们(3 行),但现在,您需要使用修改后的版本DynamicPVP.cs
- 能够将 “server.pve” 设置为 “true”,这允许服务器具有 “PvE” 标志;
- 当 server.pve 为 true 时,会启用 NPC 的伤害;
- 使用 “server.pve true” 对自己的结构造成伤害的能力;
- 能够不受任何时间限制地摧毁(包括外墙)或旋转结构;
- 能够强制 Twigs 等级的构建块腐烂,即使工具柜中有木头;
- 能够在其他人的 Building Privileges 中切换收集资源限制;
- 除了所有者或其朋友之外,没有人能够打开他们的战利品容器(箱子、储藏室、尸体等);
- 管理员可以绕过战利品限制;
- 如果玩家在其他人的建筑特权中断开连接,则可以安排杀死玩家;
- 禁用背包和主动物品在死亡时掉落,即使背包已满;
- 修改在海滩上生成时提供的物品的能力;
- 能够创建无限数量的自定义权限;
- 允许玩家绕过队列的能力;
- 能够为每个权限设置睡袋、庇护所和自动炮塔的限制;
- 能够为每个权限设置纪念碑和活动的价格乘数;
- 能够为您的每个自定义权限自定义车辆的价格和数量;
- 能够为每个玩家分配车辆;
- 能够为您的每个自定义权限自定义分配的价格和可用车辆数量;
- 分配的车辆不能被其他玩家损坏、掠夺或推动,但如果它在其他人的建筑特权范围内,则可以被推动;
- 通过排队系统掠夺纪念碑的能力;
- 能够配置纪念碑,设置其掠夺价格和时间,以及调整每个纪念碑的状态栏;
- 能够通过购买获得掠夺事件(直升机、布拉德利和可突袭基地)的特权;
- 能够自定义每种事件类型和战利品尝试(生命)的价格;
- NPC 只攻击正在掠夺纪念碑、事件或可突袭基地的玩家;
- 只有掠夺纪念碑、事件或可突袭基地的玩家才能对 NPC 造成伤害;
- RaidableBase 受到保护,免受恶意破坏(无损坏、无战利品等)。只有所有者可以与 RAID 交互;
- 可以购买中立的 RaidableBases;
- 购买中立突袭的价格可针对每个难度级别进行配置;
- 可配置的 RAID 限制(当前可用)以及每个权限的购买折扣乘数。
文件位置:*SERVER*\oxide\data\RealPVE\PermissionConfig.json
默认值:https://pastebin.com/5VtWZZVr
所有权限都在配置文件的 “List of permissions” 部分下创建和配置。
您可以根据需要创建任意数量的权限并灵活地自定义它们。
建议在权限名称中使用前缀 “realpve”,例如:“realpve.vip”。
注意:第一个权限将用作没有任何权限的用户的默认权限。
{
"List of permissions. NOTE: The first permission will be used by default for those who do not have any permissions.": [
{
"Permission Name": "realpve.default",
"Bypass Queue": false,
"Limit of beds": 15,
"Limit of shelters": 1,
"Limit of auto turrets": 12,
"Seconds that will be skipped when opening HackableLockedCrate": 0.0,
"Monuments price multiplier": 1.0,
"Events price multiplier": 1.0,
"Limit of RaidableBases(at the time)": 1,
"RaidableBases price multiplier": 1.0,
"Vehicles settings": {
"Horse": {
"Limit": 1,
"Price": 10.0
},
"Bike": {
"Limit": 1,
"Price": 5.0
},
"MotorBike": {
"Limit": 1,
"Price": 20.0
},
"Car": {
"Limit": 1,
"Price": 25.0
},
...
}
},
{
"Permission Name": "realpve.vip",
"Bypass Queue": true,
"Limit of beds": 20,
"Limit of shelters": 2,
"Limit of auto turrets": 15,
"Seconds that will be skipped when opening HackableLockedCrate": 450.0,
"Monuments price multiplier": 0.9,
"Events price multiplier": 0.9,
"Limit of RaidableBases(at the time)": 2,
"RaidableBases price multiplier": 0.9,
"Vehicles settings": {
"Horse": {
"Limit": 5,
"Price": 9.0
},
"Bike": {
"Limit": 5,
"Price": 4.5
},
"MotorBike": {
"Limit": 5,
"Price": 18.0
},
"Car": {
"Limit": 5,
"Price": 22.5
},
...
}
}
],
"Version": {
"Major": 0,
"Minor": 1,
"Patch": 1
}
}
使用默认权限的 monument/event/rb 乘数示例。
例如,如果您将 Harbor 的价格设置为 1000 美元,则具有默认权限 (1.0) 的玩家将支付 1000 美元 * 1 = 1000 美元。同时,拥有 VIP 权限 (0.9) 的玩家将支付 1000 美元 * 0.9 = 900 美元。但是,如果玩家拥有值为 1.1 的行为不端权限,则需要支付 1000 美元 * 1.1 = 1100 美元。
{
"Chat command": "realpve",
"Chat admin command": "adminpve",
"Is it worth forcibly implementing PvE for a server?": true,
"Is it worth enabling GameTips for messages?": true,
"Is it worth preventing resource gathering in someone else's building privilege area?": false,
"Is it worth preventing the pickup of plants spawned by the server in someone else's building privilege zone?": false,
"Is it worth forcibly blocking damage from the patrol helicopter to building blocks and deployables?": false,
"Is it worth preventing players from handcuffing others?": true,
"Is it worth assigning portals(Halloween and Christmas) to the first player?": true,
"Is it worth preventing a backpack from dropping upon player death?": true,
"Is it worth preventing damage to the laptop of the Hackable Crate?": true,
"Is it worth removing the penalties for recyclers in safe zones?": true,
"Is it worth allowing all players to pick up items dropped by others? If enabled, personal settings will be ignored": false,
"The format that will be used for prices": "${0}",
"Vehicles - Time in seconds to display the marker when searching for a vehicle. A value of 0 disables the marker": 15.0,
"Anti-Sleeper - Time in seconds after which a player will be killed if they disconnect while inside someone else's Building Privilege. Set to 0 to disable": 1200.0,
"Is it worth enabling support for the 'Npc Random Raids' plugin?": true,
"Is friendly fire enabled by default when creating a new team?": false,
"PvP - Is it worth adding map markers for PvP zones?": true,
"PvP - Name of the map maker": "PvP Zone!",
"PvP - Settings for the status bar": {
"Order": 9,
"Height": 26,
"Main_Color(Hex or RGBA)": "1 0.39 0.28 0.7",
"Main_Transparency": 0.8,
"Main_Material": "",
"Image_Url": "https://i.imgur.com/oi5vIkk.png",
"Image_Local(Leave empty to use Image_Url)": "RealPVE_PvP",
"Image_Sprite(Leave empty to use Image_Local or Image_Url)": "",
"Image_IsRawImage": false,
"Image_Color(Hex or RGBA)": "1 0.39 0.28 1",
"Image_Transparency": 1.0,
"Is it worth enabling an outline for the image?": false,
"Image_Outline_Color(Hex or RGBA)": "0.1 0.3 0.8 0.9",
"Image_Outline_Transparency": 0.0,
"Image_Outline_Distance": "0.75 0.75",
"Text_Size": 12,
"Text_Color(Hex or RGBA)": "1 1 1 1",
"Text_Font(https://umod.org/guides/rust/basic-concepts-of-gui#fonts)": "RobotoCondensed-Bold.ttf",
"Is it worth enabling an outline for the text?": false,
"Text_Outline_Color(Hex or RGBA)": "#000000",
"Text_Outline_Transparency": 1.0,
"Text_Outline_Distance": "0.75 0.75",
"SubText_Size": 12,
"SubText_Color(Hex or RGBA)": "1 1 1 1",
"SubText_Font": "RobotoCondensed-Bold.ttf",
"Is it worth enabling an outline for the sub text?": false,
"SubText_Outline_Color(Hex or RGBA)": "0.5 0.6 0.7 0.5",
"SubText_Outline_Transparency": 0.0,
"SubText_Outline_Distance": "0.75 0.75"
},
"PvP - Settings for the progress status bar": {
"Main_Color(Hex or RGBA)": "1 1 1 0.15",
"Main_Transparency": 0.15,
"Progress_Reverse": true,
"Progress_Color": "#FF6347",
"Progress_Transparency": 0.7,
"Progress_OffsetMin": "0 0",
"Progress_OffsetMax": "0 0"
},
"Wipe ID": null,
"Version": {
"Major": 0,
"Minor": 1,
"Patch": 15
}
}
英文: https://pastebin.com/ZMUL6pYL
RUS: https://pastebin.com/Mx8cbMts
主要命令 (/realpve ) :
- autobuy – 为总价大于 0 的纪念碑、原版事件和突袭基地切换 autobuy;
- pick up – 切换所有玩家从地上捡起物品的权限;
- share – 管理其他玩家(团队外)掠夺实体的权限:
- status entityID(可选) – 显示有关您正在查看的实体或您指定的实体的设置的信息;
- add nameOrID entityID (可选) – 将指定的玩家添加到你正在查看的实体列表或你指定的实体列表中;
- remove nameOrID 实体 ID(可选) – 从你正在查看的实体列表或你指定的实体列表中删除指定的玩家;
- toggle entityID (可选) – 切换您正在查看的实体列表或您指定的实体列表;
- delete entityID (可选) – 删除您正在查看的实体或您指定的实体的设置;
- clear – 删除所有实体的设置。
- team – 管理您的团队:
- ff – 切换伤害队友的能力。
- 车辆 – 管理您的车辆:
- list – 您所有车辆的 ID 列表;
- find *vehicleID*(可选) – 帮助查找您正在查看的车辆或您指定的车辆;
- unlink vehicleID (可选) – 取消链接您正在查看的车辆或您指定的车辆;
- clear – 取消所有车辆的关联。
管理员命令 (/adminpve) 的命令。需要 “realpve.admin” 权限:
- autobuy – 管理纪念碑、原版事件和突袭基地的 autobuy:
- nameOrId – 切换指定玩家的自动购买;
- force monument/event/rb – 切换强制自动购买。如果启用,将忽略播放器设置;
- clear – 为所有人禁用 autobuy。
- config – 管理配置文件中值的设置:
- forcepve *boolValue*(可选) – 是否值得为服务器强制实施 PvE?
- gametips *boolValue*(可选) – 是否值得为消息启用 GameTips?
- resource_privilege *boolValue*(可选) – 是否值得阻止在别人的建筑特权区域收集资源?
- plant_privilege *boolValue*(可选) – 是否值得阻止服务器在别人的建筑特权区中拾取生成的植物?
- heli_damage *boolValue*(可选) – 强行阻挡巡逻直升机对积木和可部署物的伤害值得吗?
- handcuffs *boolValue*(可选) – 是否值得为第一个玩家分配传送门(万圣节和圣诞节)?
- 传送门 boolValue*(可选) – 值得阻止玩家给他人戴上手铐吗?
- backpack_drop *boolValue*(可选) – 防止背包在玩家死亡时掉落值得吗?
- laptop_damage *boolValue*(可选) – 是否值得防止 Hackable Crate 的笔记本电脑受到损坏?
- recycler_safezone *boolValue*(可选) – 是否值得取消对安全区回收商的处罚?
- item_pickup boolValue*(可选) – 允许所有玩家捡起其他人掉落的物品值得吗?如果启用,将忽略个人设置;
- priceformat stringValue – 将用于价格的格式;
- vehicle_marker_time 浮点值 – 载具 – 搜索载具时显示标记的时间(以秒为单位)。值为 0 将禁用标记;
- anti-sleeper floatValue – anti-sleeper – 如果玩家在别人的建筑特权中断开连接,那么这个时间(以秒为单位)将被杀死。设置为 0 将禁用;
- randomraids *boolValue*(可选) – 是否值得启用对 ‘Npc Random Raids’ 插件的支持?
- teamff *boolValue*(可选) – 创建新团队时是否默认启用友军射击?
- pvpmarkers *boolValue*(可选) – PvP – 是否值得为 PvP 区域添加地图标记?
- pvpmarkersname stringValue – PvP – 地图制作者的名称。
- loot – 不受限制地管理玩家对实体的访问:
- nameOrId – 切换指定玩家的无限制访问;
- self – 为自己切换不受限制的访问;
- clear – 撤销所有玩家的无限制访问权限。
- monument – 管理纪念碑:
- list – 可用纪念碑列表;
- monumentID/this – 你可以使用 “this” 一词来代替 monumentID,但你必须在纪念碑内:
- suffix *boolValue*(可选) – 切换纪念碑名称中的后缀显示;
- broadcast *boolValue*(可选) – 切换有关纪念碑占用/释放的通知;
- time intValue* – 设置纪念碑的掠夺时间限制,以秒为单位;
- price floatValue – 设置掠夺权限的成本。值为 0 时,纪念碑变为自由;
- offer floatValue* – 设置购买纪念碑的优惠持续时间(以秒为单位);
- map_mode intValue* – 设置地图上的标记显示模式。0 – 禁用,1 – 启用,2 – 在 PvP 模式下启用;
- map_circle boolValue(可选) – 切换纪念碑的圆圈标记在地图上的显示;
- pvp *boolValue*(可选) – 切换纪念碑的 PvP 模式;
- pvp_delay floatValue – 为玩家在离开 PvP 纪念碑后设置 PvP 模式的持续时间(以秒为单位);
- bar_progress boolValue(可选) – 在纪念碑的 TimeProgressCounter 和 TimeCounter 条之间切换。
- perm – 管理权限:
- add permName – 通过复制列表中第一个(默认)权限的值,向列表添加新权限。如果权限名称以 realpve’ 开头,它还将注册一个新权限;
- add permName sourcePermName* – 通过复制列表中现有权限的值,向列表添加新权限;
- remove permName – 从列表中删除现有权限;
- edit permName – 编辑权限:
- queue – 切换权限以绕过服务器队列;
- beds intValue* – 对可用床位数量的限制;
- shelters intValue* – 对可用 shelter 数量的限制;
- turrets intValue(入图塔) – 对可用炮塔数量的限制;
- hackable floatValue – 打开一个可破解的 crate 时要跳过的秒数(0-900);
- monuments floatValue* – 纪念碑的价格乘数;
- events floatValue – 原版事件的价格乘数;
- rb_limit intValue* – 限制同时可用的 raid 基地数量;
- rb_mult floatValue – 突袭基地的价格乘数;
- vehicles (车辆) – 车辆设置:
- limit intValue* – 按类型限制可用车辆的数量;
- price floatValue – 按类型注册车辆的价格。
- clear – 从列表中删除除第一个权限之外的所有权限。
- pickup – 管理从地上捡起其他玩家物品的权限:
- nameOrId – 切换从地上捡起特定玩家物品的访问;
- clear – 撤销所有玩家从地上捡起物品的权限。
- share – 管理其他玩家(团队外)对掠夺实体的访问:
- status entityID(可选) – 显示有关您正在查看的实体或您指定的实体的设置的信息;
- add nameOrID entityID (可选) – 将指定的玩家添加到你正在查看的实体列表或你指定的实体列表中;
- remove nameOrID 实体 ID(可选) – 从你正在查看的实体列表或你指定的实体列表中删除指定的玩家;
- toggle entityID (可选) – 切换您正在查看的实体列表或您指定的实体列表;
- delete entityID (可选) – 删除您正在查看的实体或您指定的实体的设置;
- clear nameOrID(可选) – 删除指定玩家的所有实体或所有实体的设置。
- tc – 管理建筑权限:
- add self/*entityID* *nameOrID*(可选) – 将您自己或指定玩家添加到您或指定实体所在区域的建筑权限中;
- remove self/*entityID* *nameOrID*(可选) – 将您自己或指定玩家从您或指定实体所在区域的建筑权限中删除;
- clear self/*entityID* – 清除您或指定实体所在区域的建筑权限中的授权玩家列表;
- info self/*entityID* – 获取有关您或指定实体所在区域的建筑权限的信息。
- 车辆 – 所有可用车辆类型的列表:
- 类型 – 可用车辆类型列表。
例:
- /realpve pickup
- /realpve 车辆查找 *netID*
- /realpve 团队投降
- /adminpve perm 添加 realpve.vip2
- /adminpve perm 添加 realpve.vip2 realpve.vip
- /adminpve perm edit realpve.vip2 队列 true
- /adminpve 烫发编辑 realpve.vip2 车辆 马匹限制 5
- /adminpve 纪念碑列表
- /adminpve monument *monumentID* pvp
- /adminpve monument *monumentID * 价格 7.5
- /adminpve 战利品 iiiaka
- /adminpve pickup iiiaka
- /adminpve tc info self
- /adminpve tc info 6959689
- /adminpve 车辆类型
该插件提供了领取车辆的能力,从而防止其他玩家的盗窃和恶意破坏。
在权限中,您可以为每种类型的车辆设置价格和数量限制,确保根据您的喜好进行灵活定制。
分配的战车不能被其他玩家损坏、掠夺或推动,但如果它在其他人的建筑特权范围内,则可以被推动。
文件位置: *SERVER*\oxide\data\RealPVE\MonumentConfig.json
默认值: https://pastebin.com/XY1d9YaM
此插件引入了队列系统和纪念碑的战利品购买。
您可以自定义每个纪念碑的掠夺价格和时间。在纪念碑中,只有“掠夺者”和他的朋友们有能力掠夺、捡起物品或伤害实体。
此外,纪念碑中的 NPC 和动物不会攻击其他玩家,也不会受到他们的伤害。
如果玩家在纪念碑内死亡,他们将有一段宽限期可以返回。这使玩家可以安全地掠夺纪念碑,而不必担心破坏。
纪念碑配置示例:
"ferry_terminal_1": {
"Type(This parameter is just a hint. Changes won’t have any effect)": "RadTown",
"Is it worth displaying the suffix(if any) in the monument's name?": true,
"Is it worth notifying all players about the occupation/release of the monument?": true,
"The cost for the right to loot the monument. A value of 0 makes the monument free": 15.0,
"The time in seconds(1-3600) given for looting the monument": 900,
"The time in seconds(1-15) given to make a decision to purchase the monument": 5.0,
"Map marker display mode: 0 - disabled, 1 - enabled, 2 - enabled during PvP mode": 1,
"Is it worth creating a circle in the map marker?": true,
"PvP - Is PvP enabled at this monument? If so, players will be able to kill each other and loot will be publicly accessible": false,
"PvP - The time in seconds(0-60) during which the player retains PvP mode after leaving the PvP monument": 10.0,
"Is it worth using a progress bar for bars with a counter?": true,
"Settings for the status bar": {
"Order": 10,
"Height": 26,
"Main_Color(Hex or RGBA)": "#FFBF99",
"Main_Transparency": 0.8,
"Main_Material": "",
"Image_Url": "https://i.imgur.com/awUrIwA.png",
"Image_Local(Leave empty to use Image_Url)": "RealPVE_ferry_terminal_1",
"Image_Sprite(Leave empty to use Image_Local or Image_Url)": "",
"Image_IsRawImage": false,
"Image_Color(Hex or RGBA)": "#FFDCB6",
"Image_Transparency": 1.0,
"Is it worth enabling an outline for the image?": false,
"Image_Outline_Color(Hex or RGBA)": "0.1 0.3 0.8 0.9",
"Image_Outline_Transparency": 0.0,
"Image_Outline_Distance": "0.75 0.75",
"Text_Size": 12,
"Text_Color(Hex or RGBA)": "1 1 1 1",
"Text_Font(https://umod.org/guides/rust/basic-concepts-of-gui#fonts)": "RobotoCondensed-Bold.ttf",
"Is it worth enabling an outline for the text?": false,
"Text_Outline_Color(Hex or RGBA)": "#000000",
"Text_Outline_Transparency": 1.0,
"Text_Outline_Distance": "0.75 0.75",
"SubText_Size": 12,
"SubText_Color(Hex or RGBA)": "1 1 1 1",
"SubText_Font": "RobotoCondensed-Bold.ttf",
"Is it worth enabling an outline for the sub text?": false,
"SubText_Outline_Color(Hex or RGBA)": "0.5 0.6 0.7 0.5",
"SubText_Outline_Transparency": 0.0,
"SubText_Outline_Distance": "0.75 0.75"
},
"Settings for the progress status bar": {
"Main_Color(Hex or RGBA)": "1 1 1 0.15",
"Main_Transparency": 0.15,
"Progress_Reverse": true,
"Progress_Color": "#FFBF99",
"Progress_Transparency": 0.7,
"Progress_OffsetMin": "0 0",
"Progress_OffsetMax": "0 0"
}
}
- 类型 – 此字段仅用作您的指示器。这些更改不会产生任何影响;
- ShowSuffix — 后缀显示。某些纪念碑(例如 Warehouses)的名称中包含后缀,例如 “Warehouse #12”;
- 广播 – 在纪念碑被占用或腾空时启用或禁用广播;
- LootingTime – 为掠夺纪念碑分配的时间;
- 价格 – 您可以开始掠夺纪念碑的价格。0 表示 looting 是免费的;
- BarSettings – 高级状态栏的设置。
您还可以通过在 “List of tracked types of monuments” 部分下指定来选择纪念碑的类型。
所有可用类型的列表可以在 MonumentsWatcher 页面的 “Developer API” 部分查看。
"List of tracked types of monuments": [
"RadTown",
"RadTownWater",
"RadTownSmall",
"TunnelStation",
"Custom"
]
事件与纪念碑类似,提供了认领事件的机会。
所有事件都在配置文件的 “Settings for the events” 部分下进行配置。
您可以自定义抢劫和抢劫尝试的价格(死亡,包括朋友)。就像在纪念碑中一样,只有 “Looter” 和他的朋友们有能力掠夺和损坏实体。
此外,在事件中,NPC 不会攻击其他玩家。
如果玩家(包括好友)超过死亡限制,则活动将变为免费,从而为其他玩家提供领取活动的机会。
事件配置示例:
{
"Is it worth enabling forced auto-buy for vanilla events where the final price is greater than 0?": false,
"Settings for the PatrolHelicopter events": {
"IsEnabled": true,
"Time in seconds (1-15) given to respond for purchasing this event. Note: This is shown to everyone who deals damage, and the first person to buy it will claim it": 5.0,
"Is it worth removing fire from crates?": true,
"The price to claim the event. A value of 0 means it's free": 50.0,
"The number of deaths after which the event becomes public. A value of 0 disables the limit": 5,
"The time in seconds for which the event is locked to the player. A value of 0 disables the time limit": 1800.0
},
"Settings for the BradleyAPC events": {
"IsEnabled": true,
"Time in seconds (1-15) given to respond for purchasing this event. Note: This is shown to everyone who deals damage, and the first person to buy it will claim it": 5.0,
"Is it worth removing fire from crates?": true,
"The price to claim the event. A value of 0 means it's free": 50.0,
"The number of deaths after which the event becomes public. A value of 0 disables the limit": 5,
"The time in seconds for which the event is locked to the player. A value of 0 disables the time limit": 1800.0
},
"Version": {
"Major": 0,
"Minor": 1,
"Patch": 0
}
}
- Price (价格) – 申领活动的价格。0 表示 looting 是免费的;
- DeathLimit – 死亡限制,超过此限制后,事件将变为免费。
文件位置: *SERVER*\oxide\data\RealPVE\NewbieConfig.json
默认值: https://pastebin.com/QHZCqpji
为主库存给出的物品列表示例:
"List of items for the main inventory": [
{
"ShortName": "note",
"Slot": 0,
"Amount": 1,
"SkinID": 0,
"Text": "MsgNoteText"
}
]
附言在 Text 字段中,您需要指定语言键。或者,你可以只写任何文本,但不会有文本的翻译。
文件位置:*SERVER*\oxide\data\RealPVE\RaidableBasesConfig.json
默认值:https://pastebin.com/rpDng7Fd
与 RaidableBases 插件集成不会以任何方式限制其功能。相反,它增加了一个反悲伤系统,可以保护基地免受恶意玩家的侵害。
- 在突袭基地中,NPC 和其他实体只能受到突袭所有者或其朋友的伤害;
- 炮塔和陷阱不会攻击外人;
- 您可以自定义每个难度的申领价格,并为每个权限设置单独的折扣。
您仍然可以使用 /buyraid 命令购买突袭基地。没有所有者(可购买、维护、手动和计划)的突袭基地可以以配置文件中设置的价格购买,或者如果最终价格(价格 * 折扣)小于或等于 0,则可以分配给第一个进入其半径的玩家。
此外,作为奖励,购买此插件后,您将获得 5 个难度级别的 3 个免费基地,以及为它们配置的战利品。
[PluginReference] private Plugin RealPVE;
该插件订阅了 6 个通用钩子,使用它们允许与各种 PVE 插件中的 PVP 交互:
- OnPlayerEnterPVP
- OnPlayerExitPVP (玩家退出PVP)
- OnEntityEnterPVP
- OnEntityExitPVP (实体退出PVP)
- 创建 PVPMapMarker
- 删除 PVPMapMarker
OnPlayerEnterPVP:
用于将玩家添加到 PVP 模式/区域。
要调用 OnPlayerEnterPVP 钩子,您需要传递 2 个参数:
- <BasePlayer>player – 要添加到 PVP 的玩家;
- <string>zoneID – 您的 PVP 区域的唯一标识符。
此参数非常重要,因为玩家可以同时处于多个 PVP 区域中,在这种情况下传递 zoneID 可以正确处理玩家在其中的位置。
Interface.CallHook("OnPlayerEnterPVP", player, "*Your unique zone identifier*");//Calling the OnPlayerEnterPVP hook to tell PVE plugins that the player needs to be added to the specified PVP zone.
OnPlayerExitPVP:
用于将玩家从 PVP 模式/区域中删除。
调用此钩子可以保证玩家从指定的 PVP 区域中删除,但不能保证从 PVP 模式中删除,因为除了您的区域之外,可能还有其他区域。
此外,当玩家死亡时,他们会自动从所有 PVP 区域中删除。
要调用 OnPlayerExitPVP 钩子,您需要传递 3 个参数,其中 1 个是可选的:
- <BasePlayer>player – 要从 PvP 中删除的玩家;
- <string>zoneID – 您的 PVP 区域的唯一标识符;
- <float>pvpDelay – 可选。当玩家退出您的 PVP 区域时,您还可以传递 PVP 延迟时间。
但是,如果玩家还有其他活跃的 PVP 区域,您的 PVP 延迟将不会生效。
Interface.CallHook("OnPlayerExitPVP", player, "*Your unique zone identifier*", 10f);//Calling the OnPlayerExitPVP hook to tell PVE plugins that the player needs to be removed from the specified PVP zone, with the pvpDelay(10 seconds) specified if the player no longer has any active PVP zones.
OnEntityEnterPVP:
用于将实体添加到 PVP 模式/区域。
在 RealPVE 的情况下,此钩子仅在将具有所有者 (player) 的实体添加到 PVP 中时才需要,从而允许其他玩家与他们互动,例如玩家死后的尸体 (PlayerCorpse) 或尸体消失后的背包 (DroppedItemContainer)。
要调用 OnEntityEnterPVP 钩子,您需要传递 2 个参数:
- <BaseEntity>entity – 要添加到 PVP 的实体;
- <string>zoneID – 您的 PVP 区域的唯一标识符。
Interface.CallHook("OnEntityEnterPVP", entity, "*Your unique zone identifier*");//Calling the OnEntityEnterPVP hook to tell PVE plugins that the entity needs to be added to the specified PVP zone.
OnEntityExitPVP:
用于从 PVP 模式/区域中删除实体。
当一个实体死亡时,它会自动从所有 PVP 区域中移除。
要调用 OnEntityExitPVP 钩子,您需要传递 3 个参数,其中 1 个是可选的:
- <BaseEntity>entity – 要从 PVP 中删除的实体;
- <string>zoneID – 您的 PVP 区域的唯一标识符;
- <float>pvpDelay – 可选。当实体退出您的 PVP 区域时,您还可以传递 PVP 延迟时间。
但是,如果实体仍有其他活动的 PVP 区域,则您的 PVP 延迟将不会生效。
Interface.CallHook("OnEntityExitPVP", entity, "*Your unique zone identifier*", 10f);//Calling the OnEntityExitPVP hook to tell PVE plugins that the entity needs to be removed from the specified PVP zone, with the pvpDelay(10 seconds) specified if the entity no longer has any active PVP zones.
CreatePVPMapMarker:
用于为 PVP 区域创建地图标记。
要调用 CreatePVPMapMarker 钩子,您需要传递 5 个参数,其中 2 个是可选的:
- <string>zoneID – 您的 PVP 区域的唯一标识符;
- <Vector3>pos – 您的 PVP 区域的位置;
- <float>radius – 您的 PVP 区域的圆圈半径;
- <string>displayName – 可选。地图标记的显示名称;
- <BaseEntity>entity – 可选。映射标记应附加到的实体。
Interface.CallHook("CreatePVPMapMarker", "*Your unique zone identifier*", pos, 25f, "ATTENTION! This is a PVP zone!");//Calling the CreatePVPMapMarker hook to tell PVE plugins to create a map marker for the specified zone, at the specified position with the given radius, but without specifying a parent entity.
DeletePVPMapMarker:
用于删除 PVP 区域的地图标记。
要调用 DeletePVPMapMarker 钩子,你只需要传递 1 个参数:
- <string>zoneID – 您的 PVP 区域的唯一标识符。
Interface.CallHook("DeletePVPMapMarker", "*Your unique zone identifier*");//Calling the DeletePVPMapMarker hook to tell PVE plugins to delete a map marker for the specified zone.
插件调用了 5 个 hooks:
- OnPlayerPVPDelay
- OnPlayerPVP已发布
- OnPlayerPVPDelayRemoved
- OnZoneStatusText
- CanRedeemKit 兑换套件
OnPlayerPVPDelay:
当玩家退出最后一个活动的 PVP 区域时调用,允许其他插件覆盖 pvpDelay 的值。
返回 float 值允许更改播放器的 pvpDelay。
小于零的值将禁用 pvpDelay。
调用 OnPlayerPVPDelay 钩子时,会传递 3 个参数:
- <BasePlayer>player – 应用了 pvpDelay 的玩家;
- <float>pvpDelay – pvpDelay 的初始值;
- <string>zoneID – PVP 区域的唯一标识符。
object OnPlayerPVPDelay(BasePlayer player, float pvpDelay, string zoneID) { Puts($"Attempting to set a PvP delay of {pvpDelay} seconds for player {player.displayName} in zone {zoneID}!"); if (zoneID == "*Your unique zone identifier*") { return 15f;//Overriding the values for pvpDelay } return null;//Leave unchanged }
OnPlayerPVPDelayed:
在为播放器设置 PVP 延迟后调用。
调用 OnPlayerPVPDelayed 钩子时,会传递 3 个参数:
- <BasePlayer>player – 应用了 pvpDelay 的玩家;
- <float>pvpDelay – The value of pvpDelay;
- <string>zoneID – A unique identifier of PVP zone.
void OnPlayerPVPDelayed(BasePlayer player, float pvpDelay, string zoneID) { Puts($"A PvP delay of {pvpDelay} seconds has been set for player {player.displayName} in zone {zoneID}!"); }
OnPlayerPVPDelayRemoved:
当玩家进入具有活动 PVP 延迟的 PVP 区域后,从玩家中移除 PVP 延迟时调用。
调用 OnPlayerPVPDelayRemoved 钩子时,只传递 1 个参数:
- <BasePlayer>player – 已移除 PVP 延迟的玩家。
void OnPlayerPVPDelayRemoved(BasePlayer player) { Puts($"PVP delay has been removed for player {player.displayName} as they entered a PVP zone!"); }
OnZoneStatusText:
当需要具有指定区域的漂亮名称的文本时调用,以在状态栏中显示。
调用 OnZoneStatusText 钩子时,会传递 2 个参数:
- <BasePlayer>player – 为其请求区域好名字的玩家;
- <string>zoneID – PVP 区域的唯一标识符。
object OnZoneStatusText(BasePlayer player, string zoneID) { Puts($"Text for the status bar is required for zone {zoneID}"); if (zoneID == "*Your unique zone identifier*") { return lang.GetMessage("*langKey*", this, player.UserIDString);//<string>Overriding the value for the status bar text } return null;//Leave unchanged }
CanRedeemKit:
在提供初学者工具包之前在 OnDefaultItemsReceive 钩子中调用。
非零值将取消此作。
调用 CanRedeemKit 钩子时,仅传递 1 个参数:
- <BasePlayer>player – 尝试向其提供套件的玩家。
object CanRedeemKit(BasePlayer player) { Puts($"Attempting to give the kit to player {player.displayName}!"); if (player.IsAdmin) { return false;//Cancel the action } return null;//Leave unchanged }