TP 为管理员和玩家传送系统

TP 为管理员和玩家传送系统

TP 为管理员和玩家传送系统-PCI1
TP 为管理员和玩家传送系统
此内容为免费资源,请登录后查看
0
免费资源

原创地址uMod – Nivex 的 Nelportation

请参阅下面的注释,了解权限,现在基本功能需要权限。这最终允许控制谁可以使用基本命令。nteleportation.home

玩家唯一 ID

现在,玩家每次登录时都会被分配一个唯一的随机 4 位 ID

  • 每次重新加载插件/重新启动服务器时,此 ID 都会更改
  • 只有在显示找到的多个玩家列表时,才能找到玩家 ID
  • 例:
  • 找到多个玩家:9910 – Ruptga、8750 – GRYLLZ、1133 – Roe Jogan
  • /tp 9910 – 会将你传送到 Ruptga
  • /tp 9910 nivex – 将 Ruptga 传送到 nivex
  • /tpr 9910 – 将向 Ruptga 发送传送请求

配置

可以在目录下的文件中配置设置和选项。建议使用编辑器和验证器以避免格式问题和语法错误。NTeleportationconfig
  • UseFriends – 通过好友 API 检查所有者和玩家是否为好友
  • UseClans – 通过氏族 API 检查所有者和玩家是否在同一氏族中(仅支持 Oxide Clans.cs,也许还支持 RustIO::Clans – 其他氏族插件状态未知)
  • UseTeams – 通过 Rust 团队检查所有者和玩家是否是朋友
  • UseEconomics – 使用 Economics 插件支付传送费用和/或支付绕过冷却时间费用
  • UseServerRewards – 使用 ServerRewards 插件支付传送费用和/或支付绕过冷却时间费用
  • WipeOnUpgradeOrChange – 如果为 true,则在服务器检测到新的保存时擦除房屋、城镇、岛屿、强盗和前哨站位置
  • UsableOutOfBuildingBlocked – 允许玩家传送出建筑物阻挡区域(不进入)
  • ForceOnTopOfFoundation – 如果为true,玩家必须在地基或地板上落地。如果为 false,则玩家可以在不受其他配置限制的任何地方设置家(例如 nterruptTPOnMonument)
  • AllowAboveFoundation – 允许在自有/共享地基(楼层/天花板)上方时将房屋设置在建筑物的 N 层。如果为 false,则玩家必须在地基上使用 home/sethome(一楼)
  • VIPCooldowns/VIPDailyLimits/VIPHomesLimits/VIPCountdowns:
  • TPT – 包含为好友、氏族和团队启用即时 TPA 的设置。将这些设置为 false 以禁用。
{
  "Settings": {
    "Chat Command Color": "#FFFF00",
    "Chat Command Argument Color": "#FFA500",
    "Enable Popup Support": false,
    "Block All Teleporting From Inside Authorized Base": false,
    "TPB Available After X Seconds": 0.0,
    "Global Teleport Cooldown": 0.0,
    "Global VIP Teleport Cooldown": 0.0,
    "Play Sounds After Teleport": false,
    "Sounds To Play After Teleport": [
      "assets/prefabs/misc/xmas/presents/effects/unwrap.prefab",
      "assets/bundled/prefabs/fx/player/howl.prefab",
      "assets/content/vehicles/minicopter/debris_effect.prefab",
      "assets/prefabs/npc/patrol helicopter/damage_effect_debris.prefab",
      "assets/prefabs/npc/patrol helicopter/effects/rocket_fire.prefab"
    ],
    "Interrupt TP": {
      "Interrupt Teleport At Specific Monuments": [],
      "Above Water": true,
      "Balloon": true,
      "Boats": false,
      "Cargo Ship": true,
      "Cold": false,
      "Excavator": false,
      "Hot": false,
      "Hostile": false,
      "Hurt": true,
      "Junkpiles": false,
      "Lift": true,
      "Monument": false,
      "Ignore Monument Marker Prefab": false,
      "Mounted": true,
      "Oil Rig": false,
      "Safe Zone": true,
      "Swimming": false
    },
    "Block Teleport (NoEscape)": false,
    "Block Teleport (ZoneManager)": false,
    "Chat Name": "<color=red>Teleportation</color> \n\n",
    "Chat Steam64ID": 76561199056025689,
    "Check Boundaries On Teleport X Y Z": true,
    "Data File Directory (Blank = Default)": "",
    "Draw Sphere On Set Home": true,
    "Homes Enabled": true,
    "TPR Enabled": true,
    "Strict Foundation Check": false,
    "Minimum Temp": 0.0,
    "Maximum Temp": 40.0,
    "Blocked Items": {},
    "Bypass CMD": "pay",
    "Use Monument Topology Check": false,
    "Use Cave Topology Check": false,
    "Use Economics": false,
    "Use Server Rewards": false,
    "Wipe On Upgrade Or Change": true,
    "Auto Generate Outpost Location": true,
    "Auto Generate Bandit Location": true,
    "Show Time As Seconds Instead": false
  },
  "Admin": {
    "Announce Teleport To Target": false,
    "Usable By Admins": true,
    "Usable By Moderators": true,
    "Location Radius": 25,
    "Teleport Near Default Distance": 30
  },
  "Home": {
    "Homes Limit": 2,
    "VIP Homes Limits": {
      "nteleportation.vip": 5
    },
    "Allow Sethome At Specific Monuments": [
      "HQM Quarry",
      "Stone Quarry",
      "Sulfur Quarry",
      "Ice Lake"
    ],
    "Allow Sethome At All Monuments": false,
    "Allow TPB": true,
    "Cooldown": 600,
    "Countdown": 15,
    "Daily Limit": 5,
    "VIP Daily Limits": {
      "nteleportation.vip": 5
    },
    "VIP Cooldowns": {
      "nteleportation.vip": 5
    },
    "VIP Countdowns": {
      "nteleportation.vip": 5
    },
    "Location Radius": 25,
    "Force On Top Of Foundation": true,
    "Check Foundation For Owner": true,
    "Use Friends": true,
    "Use Clans": true,
    "Use Teams": true,
    "Usable Out Of Building Blocked": false,
    "Usable Into Building Blocked": false,
    "Usable From Safe Zone Only": false,
    "Allow Cupboard Owner When Building Blocked": true,
    "Allow Iceberg": false,
    "Allow Cave": false,
    "Allow Crafting": false,
    "Allow Above Foundation": true,
    "Check If Home Is Valid On Listhomes": false,
    "Pay": 0,
    "Bypass": 0
  },
  "TPT": {
    "Use Friends": false,
    "Use Clans": false,
    "Use Teams": false,
    "Allow Cave": false
  },
  "TPR": {
    "Require Player To Be Friend, Clan Mate, Or Team Mate": false,
    "Allow Cave": false,
    "Allow TPB": true,
    "Cooldown": 600,
    "Countdown": 15,
    "Daily Limit": 5,
    "VIP Daily Limits": {
      "nteleportation.vip": 5
    },
    "VIP Cooldowns": {
      "nteleportation.vip": 5
    },
    "VIP Countdowns": {
      "nteleportation.vip": 5
    },
    "Request Duration": 30,
    "Block TPA On Ceiling": true,
    "Usable Out Of Building Blocked": false,
    "Usable Into Building Blocked": false,
    "Allow Cupboard Owner When Building Blocked": true,
    "Allow Crafting": false,
    "Pay": 0,
    "Bypass": 0
  },
  "Dynamic Commands": {
    "Town": {
      "Command Enabled": true,
      "Allow TPB": true,
      "Allow Cave": false,
      "Cooldown": 600,
      "Countdown": 15,
      "Daily Limit": 5,
      "VIP Daily Limits": {
        "nteleportation.vip": 5
      },
      "VIP Cooldowns": {
        "nteleportation.vip": 5
      },
      "VIP Countdowns": {
        "nteleportation.vip": 5
      },
      "Location": "0 0 0",
      "Locations": [],
      "Teleport To Random Location": false,
      "Usable Out Of Building Blocked": false,
      "Allow Crafting": false,
      "Pay": 0,
      "Bypass": 0
    },
    "Island": {
      "Command Enabled": true,
      "Allow TPB": false,
      "Allow Cave": false,
      "Cooldown": 600,
      "Countdown": 15,
      "Daily Limit": 5,
      "VIP Daily Limits": {
        "nteleportation.vip": 5
      },
      "VIP Cooldowns": {
        "nteleportation.vip": 5
      },
      "VIP Countdowns": {
        "nteleportation.vip": 5
      },
      "Location": "0 0 0",
      "Locations": [],
      "Teleport To Random Location": true,
      "Usable Out Of Building Blocked": false,
      "Allow Crafting": false,
      "Pay": 0,
      "Bypass": 0
    },
    "Outpost": {
      "Command Enabled": true,
      "Allow TPB": true,
      "Allow Cave": false,
      "Cooldown": 600,
      "Countdown": 15,
      "Daily Limit": 5,
      "VIP Daily Limits": {
        "nteleportation.vip": 5
      },
      "VIP Cooldowns": {
        "nteleportation.vip": 5
      },
      "VIP Countdowns": {
        "nteleportation.vip": 5
      },
      "Location": "0 0 0",
      "Locations": [],
      "Teleport To Random Location": true,
      "Usable Out Of Building Blocked": false,
      "Allow Crafting": false,
      "Pay": 0,
      "Bypass": 0
    },
    "Bandit": {
      "Command Enabled": true,
      "Allow TPB": true,
      "Allow Cave": false,
      "Cooldown": 600,
      "Countdown": 15,
      "Daily Limit": 5,
      "VIP Daily Limits": {
        "nteleportation.vip": 5
      },
      "VIP Cooldowns": {
        "nteleportation.vip": 5
      },
      "VIP Countdowns": {
        "nteleportation.vip": 5
      },
      "Location": "0 0 0",
      "Locations": [],
      "Teleport To Random Location": true,
      "Usable Out Of Building Blocked": false,
      "Allow Crafting": false,
      "Pay": 0,
      "Bypass": 0
    }
  }
}

可以在此处创建不同级别 VIP 的多个条目。默认和包含的条目是 的 。此处添加的其他内容将导致插件在插件重新加载时为它们注册 Oxide 权限。创建权限后,可以根据需要将其分配给氧化物用户或组。nteleportation.vip

如果为 、 或 支付 设置,并且 Economics 或 ServerRewards 可用,则使用这些命令将从其余额中提取配置的金额。/home/tpr/town

如果 绕过 设置为 、 或 ,并且经济学或服务器奖励可用,则在冷却期间使用这些命令将询问玩家是否要付费以绕过冷却时间。请注意,如果您选择通过支付 来绕过冷却时间,即使目标不接受通过 ,您也将支付绕过成本。只有在成功并传送后,您才会支付支付费用。/home/tpr/town|outpost|bandit/tpr/tpa/tpa

默认情况下,支付和旁路成本为 0,这意味着它们的成本为 0。设置为 -1 以禁用它们。设置为高于 0 以添加成本。

这还需要全局设置 Bypass CMD(默认为“pay”)。这是用于旁路的关键字(设置为空以禁用旁路),例如:

  • /镇支付
  • /home 1 支付

您还必须将 UseEconomics 设置为 true 才能启用 Economics 插件的这种用法。您还可以将 UseServerRewards 设置为 true 以启用 ServerRewards 插件的使用。如果两者都设置为 true,则将首先检查经济学。

对于 InterruptTPOnCold/Hot 设置,请小心调整 MinimumTemp 和 MaximumTemp 的默认值。用户将仅显示 0 到 40C 之间的冷/热。否则他们可能会感到困惑。但是,MinimumTemp 的负值应该是可能的。注意:如果你想实际更改默认值,你需要将 InterruptTPOnCold/Hot 设置为 true。然后设置最低/最高温度。即使您不想在冷/热时中断,也是如此 – 在这种情况下,将温度设置为一些不太可能满足的极端值,例如 -30 和 100。

如果 InterruptTPOnHostile 为 true,并且玩家被视为敌对,并且将被阻止/outpost/bandit

If InterruptTpOnHurt is true, the teleport may still be interrupted when hot/cold even if InterruptTPOnCold/Hot are false. This is because the player is taking damage when hot or cold.

The CaveDistance{Small/Medium/Large} settings are available to tweak distance from caves required when AllowCave == false inside of the Home/Town/TPR config sections. Anything within those distances (from the player) should be blocked.

StrictFoundationCheck: Default false. If set to true, perform an additional check to ensure that the player is at least near the center of a foundation or floor. This is not run on tpa/tpr but is on sethome/home.

DefaultMonumentSize: This is required if InterruptTPOnMonument is set to true. Many monuments do not present their size when queried – at least how we are currently doing it. For those that do not, this will be the default distance required for using /home, etc.

Admin Permissions

  • nteleportation.tp – /tp – DO NOT GIVE THIS TO PLAYERS! DO NOT GIVE THIS TO DEFAULT GROUP!
  • nteleportation.admin – /home tp and /tphome
  • nteleportation.tpconsole – teleport.topos & teleport.toplayer
  • nteleportation.tpn – /tpn
  • nteleportation.tpl – /tpl
  • nteleportation.tpremove – /tpremove
  • nteleportation.tpsave – /tpsave
  • nteleportation.wipehomes – /wipehomes
  • nteleportation.radiushome – /home 半径和 /radiushome
  • nteleportation.deletehome – /home 删除 &; /deletehome
  • nteleportation.homehomes – /home homes 和 /homehomes
  • nteleportation.importhomes – 传送.importhomes
  • nteleportation.tpmarker – 允许用户通过在地图上放置标记来传送
  • nteleportation.blocktpmarker – 阻止 nteleportation.tpmarker 权限

玩家权限

  • nteleportation.home – /home, /sethome, /removehome
  • nteleportation.tpb – /tpb
  • nteleportation.tpr – /tpr
  • nteleportation.tptown – /镇
  • nteleportation.tpoutpost – /前哨站
  • nteleportation.tpbandit – /bandit
  • nteleportation.crafthome – 允许在家庭 tp 期间进行 Craft
  • nteleportation.crafttown – 允许在城镇 TP 期间进行工艺
  • nteleportation.craftoutpost – 允许在前哨站TP期间进行飞行
  • nteleportation.craftbandit – 允许在强盗 TP 期间使用 Craft
  • nteleportation.crafttpr – 在 TPR TP 期间允许 Craft
  • nteleportation.tpt – 允许即时 TPA
  • nteleportation.tpisland – 允许使用 /island 和 /town island
  • nteleportation.craftisland – 允许在使用 /island 或 /town island 时进行制作
  • nteleportation.bypassfoundationcheck
  • nTeleportation.exemptFromInterruptCountdown – 免除用户在传送倒计时期间被打断
  • nteleportation.globalcooldownvip – 此 VIP 用户拥有全局冷却时间的时间

命令

此插件使用相同的语法提供聊天和控制台命令。在聊天中使用命令时,请以正斜杠为前缀:“/”。

聊天

  • home add NAME – 将您当前的位置保存为位置 NAME。(别名 sethome)
  • 主页列表 – 显示已保存的所有位置的列表。(别名列表家)
  • home remove NAME – 从已保存的房屋中删除位置名称。(别名 removehome)
  • home NAME – 将您传送到主位置。
  • home NAME 支付 – 将你传送到 home 位置 NAME,通过从你的经济余额中支付来绕过冷却时间。
  • tpr – 向玩家发送传送请求。
  • tpa – 接受传入的传送请求。
  • tpc – 取消传送或请求。
  • town – 将自己传送到城镇(如果已设置)。
  • outpost – 将自己传送到前哨站(如果已设置)。
  • 强盗 – 将自己传送到强盗镇(如果已设置)。
  • 城镇/前哨站/强盗支付 – 将你传送到城镇/前哨站/强盗,通过从你的经济余额中支付来绕过冷却时间。
    • 例如 /town pay
  • tpinfo – 显示限制和冷却时间。
  • tphelp – 显示帮助。
  • 岛屿<编号> – 将您传送到指定的岛屿
  • island add – 在管理员当前位置添加一个生成点(不要添加玩家可以建造的地方)
  • tpat – 为特定玩家打开/关闭自动 TPA –

管理:

  • tp – 将自己传送到目标玩家处。

  • tp – 将玩家传送到目标玩家身上。

  • tp – 将您传送到坐标集。

  • tpl – 显示已保存位置的列表。

  • tpl {name} – 将您传送到保存的位置。

  • tpsave – 将您当前的位置保存为位置名称。

  • tpremove – 从已保存列表中删除位置。

  • tpb – 将你传送到传送前的位置。

  • home radius – 查找半径内的所有房屋。

  • home delete – 从玩家中删除 home。

  • home tp – 将你传送到玩家名称为“name”的主位置。

  • home homes – 显示播放器中所有房屋的列表。

  • home wipe – 删除所有家庭。

  • town set – 将当前位置保存为城镇。

  • outpost set – 将当前位置另存为 Outpost。

  • bandit set – 将当前位置保存为 Bandit Town。

  • wipehomes – 删除所有主页。

    现在可以通过配置添加 Covalence 命令:

  • 在此列表中重新实现了前哨站、强盗、城镇和岛屿命令作为默认命令,因此它们的设置已被重置
  • 重新实施了所有相关的语言信息 – MoNaH 提供的俄语翻译
  • 添加了共价命令:
  • ntp add/remove/list <name> – requires permission nteleportation.admin
  • 例:
  • ntp add farm– 添加命令农场,需要权限:
  • nteleportation.tpfarm– 使用此命令传送
  • nteleportation.craftfarm– 使用此命令时制作
  • ntp remove farm– 删除命令场
  • ntp list– 列出所有命令(与tpinfo)
  • o.grant group default nteleportation.tpfarm– 允许所有玩家使用此命令
  • o.grant user nivex nteleportation.tpfarm– 允许使用此命令nivex
  • 命令被添加到配置文件中,可以根据自己的喜好进行设置

安慰

  • teleport.topos – 将玩家传送到位置
  • teleport.toplayer – 将玩家传送到目标玩家
  • teleport.importhomes – 从 m-Teleportation 导入 homes

对于开发人员

Dictionary GetHomes(object playerObj) // param playerObj string/ulong playerId

int GetLimitRemaining(BasePlayer player, string type) // param type: home, tpr, town

int GetCooldownRemaining(BasePlayer player, string type) // param type: home, tpr, town

int GetCountdownRemaining(BasePlayer player, string type) // param type: home, tpr, town

object CanTeleport(BasePlayer player, Vector3 to) // return string to cancel or null to allow

void OnTeleportInterrupted(BasePlayer player, string home, ulong userid, string town)

void OnHomeAdded(BasePlayer player, Vector3 position, string home)

void OnHomeRemoved(BasePlayer player, Vector3 position, string home)

void OnHomeAccepted(BasePlayer player, string home, int countdown) // called when player starts countdown for teleport to home

object OnTeleportRequested(BasePlayer target, BasePlayer player) // return true to cancel the request

void OnTeleportAccepted(BasePlayer target, BasePlayer player, int countdown) // called when target accepts player's TPR request

void OnTeleportRequestCompleted(BasePlayer target, BasePlayer player) // called after target has teleported to player

object OnTeleportCooldownNotify(BasePlayer player) // return true to not show message notification for cooldown

void OnTeleportRejected(BasePlayer player, BasePlayer target) // called when player cancels or rejects TPR request to target

void OnPlayerTeleported(BasePlayer player, Vector3 from, Vector3 to) // called after player has teleported

教程

SRT Bull N运输教程

学分

  • Nogrod,该插件的原作者
  • rfc1920,用于帮助维护插件
  • [FR] Bestiaire.eu 的 Loup-des-Neiges,感谢他们帮助和资助这个插件
  • CMEPTb,用于旧俄语翻译
  • MONaH,用于新的俄语翻译
  • nivex,帮助维护插件
© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容