关于贸易

交易允许两个玩家从远处交易物品并使用店面UI。

https://youtu.be/W92g1Wu0Af0

主要特点:

  • 锈店面用户界面。
  • 无错误交易 – 交换过程由 Rust 本地处理。
  • 交易日志(如果已启用)。
  • 各种事物的单独权限。
  • 支持 NoEscape 和 Ignore 插件。
  • 优化时考虑性能。没有垃圾分配。
  • 可选功能(可以在 Trade.json 配置文件中配置):
  • 在构建封锁区域中禁用接受交易和/或请求。
  • 在空中/水中或受伤时禁用交易。
  • 在安装或父级(货船、车辆、电梯)时禁用交易。
  • 控制玩家在交易时可以走多远。
  • 多个权限设置。
  • 每个权限的项目黑名单。
  • 每个权限的交易槽计数。
  • 每个权限的玩家之间的最大距离。
  • 更改聊天图标。
  • ..等等。

 

配置

此插件的设置和选项可以在 Trade.json 文件中的 oxide/config 目录下进行配置。建议使用 JSON 编辑器或验证站点(如 jsonlint.com),以避免格式问题和语法错误。

{"Disable accepting requests in Block zone": true,"Disable sending requests in Block zone": true,"Disable trading in air": true,"Disable trading in water": true,"Disable trading while wounded": true,"Disable trading in transport": false,"Enable individual trade slot count": false,"Trade request timeout (seconds)": 30.0,"Max distance from trade spot (0 - disabled)": 5.0,"Chat icon id": 0,"Allow trade logging": true,"Permissions (first one is always default)": [{"Order": 1,"Name": "default","Cooldown": 30.0,"MaxDist": 0.0,"TradingSlots": 6,"Banned Items": ["note"]},{"Order": 2,"Name": "vip_example","Cooldown": 10.0,"MaxDist": 0.0,"TradingSlots": 12,"Banned Items": null

    }],"Config revision (do not edit)": 1

}

 

地方化

此插件的本地化可以在 Trade.json 文件中的 oxide/lang/en 目录下配置。建议使用 JSON 编辑器或验证站点(如 jsonlint.com),以避免格式问题和语法错误。

{"Msg.TradeIntro": "To begin trade, type <color=#81B67A>/trade <Partial name or Steam ID></color>.","Msg.TradeRequestSent": "You've sent a trade request to <color=#81B67A>{0}</color>.","Msg.TradeRequestReceived": "<color=#81B67A>{0}</color> wants to trade with you!n<color=#81B67a>/trade yes</color> - Accept request.n<color=#DA5757>/trade no</color> - Deny request.","Msg.TradeSuccessful": "Your trade with <color=#81B67A>{0}</color> succeed.","Msg.TradeTimeoutVendor": "<color=#81B67A>{0}</color> didn't anwered to your trade request.","Msg.TradeTimeoutCustomer": "You haven't answered to <color=#81B67A>{0}</color>'s trade request.","Msg.TradeCancelledVendor": "<color=#81B67A>{0}</color> has cancelled a trade request.","Msg.TradeCancelledCustomer": "You have cancelled a trade request.","Msg.TradeInterrupted": "Trade was interrupted!","Msg.You": "<color=#81B67A>You</color>","Msg.YourPartner": "<color=#81B67A>Your partner</color>","Error.NoPerm": "{0} don't have permission to trade.","Error.NoSuchPlayer": "No such player found or he is offline.","Error.Ignored": "That player is ignoring you.","Error.MultiplePlayers": "Found multiple players with this name!nRefine your search please or use SteamID.","Error.SelfTrade": "Obviously, you can't trade with yourself :)","Error.NoPendingRequest": "You have no pending requests.","Error.CantTradeInWater": "{0} can't trade while in water!","Error.CantTradeInBuildingBlock": "{0} can't trade while in Building Block zone.","Error.CantTradeInAir": "{0} can't trade while flying.","Error.CantTradeWounded": "{0} can't trade while wounded.","Error.CantTradeSleeping": "{0} can't trade while sleeping.","Error.CantTradeInVehicle": "{0} can't trade in transport.","Error.CantTradeDead": "{0} can't trade while dead.","Error.CantTradeOffline": "{0} is offline.","Error.CantTradeRightNow": "{0} can't trade right now.","Error.TradeCooldown": "Trade is on cooldown. Please wait <color=#81B67A>{0:mm:ss}</color>.","Error.TooFar": "{0} is too far away from you.","Error.UnknownCommand": "Unrecognized command.nType either <color=#81B67a>/trade yes</color> or <color=#DA5757>/trade no</color>"

}

 

权限

该插件使用Oxide的权限系统。要分配权限,请使用 oxide.grant <用户或组> <名称或蒸汽 ID> <权限>。

要删除权限,请使用 oxide.revoke<用户或组> <名称或蒸汽 ID> <权限>。

trade.use – 允许玩家使用交易。

 

命令

此插件提供通用聊天和控制台命令。在聊天中使用命令时,请为其添加正斜杠前缀:/。

trade <name or steam id> – 向给定玩家发起交易请求

trade accept/yes/+ – 接受交易请求

trade cancel/no/- – 拒绝交易请求

 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。