Search the Community
Showing results for tags 'trigger'.
-
Version 0.1.6
636 downloads
A plugin that allows other plugins to interact with players and entities in monuments via API. The list of all monuments can be viewed in the: Default(Source of monument boundaries when changing the map or recreating boundaries) - *SERVER*\oxide\data\MonumentsWatcher\DefaultBounds.json Vanilla - *SERVER*\oxide\data\MonumentsWatcher\MonumentsBounds.json Custom - *SERVER*\oxide\data\MonumentsWatcher\CustomMonumentsBounds.json Note: MonumentsWatcher is utilized as an API for other plugins. You won't obtain any functionality beyond displaying monument boundaries without an additional plugin. The ability to automatically generate boundaries for vanilla and custom monuments; The ability to automatically regenerate boundaries for monuments on wipe; The ability to automatically adding languages for custom monuments; The ability to manually configure boundaries for monuments; The ability to track the entrance and exit of players, npcs and entities in a Monument and CargoShip; The ability to display boundaries. monumentswatcher.admin - Provides the capability to recreate or display monument boundaries. { "Chat command": "monument", "Is it worth enabling GameTips for messages?": true, "Is it worth recreating boundaries(excluding custom monuments) upon detecting a wipe?": true, "List of tracked categories of monuments. Leave blank to track all": [], "Wipe ID": null, "Version": { "Major": 0, "Minor": 1, "Patch": 7 } } Note: The list of available categories for monuments can be found in the Developer API section. ENG: https://pastebin.com/nsjBCqZe RUS: https://pastebin.com/ut2icv9T Note: After the plugin initialization, keys for custom monuments will be automatically added. show *monumentID*(optional) *floatValue*(optional) - Display the boundary of the monument you are in or specified. The display will last for the specified time or 30 seconds; list - List of available monuments; rotate *monumentID*(optional) *floatValue*(optional) - Rotate the monument you are in or specified, either in the direction you are looking or in the specified direction; recreate custom/all(optional) - Recreate the boundaries of vanilla/custom/all monuments. Note: Instead of a monumentID, you can leave it empty, but you must be inside a monument. You can also use the word 'closest' to select the nearest monument to you. Example: /monument show closest /monument show gas_station_1 /monument show gas_station_1_4 /monument rotation /monument rotation closest /monument rotation gas_station_1_0 256.5 /monument recreate void OnMonumentsWatcherLoaded() Called after the MonumentsWatcher plugin is fully loaded and ready. void OnCargoWatcherCreated(string monumentID, string type) Called when a watcher is created for a CargoShip. void OnCargoWatcherDeleted(string monumentID) Called when a watcher is removed for a CargoShip. void OnMonumentsWatcherLoaded() { Puts("MonumentsWatcher plugin is ready!"); } void OnCargoWatcherCreated(string monumentID, string type) { Puts($"Watcher for monument {monumentID}({type}) has been created!"); } void OnCargoWatcherDeleted(string monumentID) { Puts($"Watcher for monument {monumentID} has been deleted!"); } Entered hooks: void OnPlayerEnteredMonument(string monumentID, BasePlayer player, string type, string oldMonumentID) Called when a player enters any monument. void OnNpcEnteredMonument(string monumentID, BasePlayer npcPlayer, string type, string oldMonumentID) Called when an NPC player enters any monument. void OnEntityEnteredMonument(string monumentID, BaseEntity entity, string type, string oldMonumentID) Called when any other BaseEntity enters any monument. void OnPlayerEnteredMonument(string monumentID, BasePlayer player, string type, string oldMonumentID) { Puts($"{player.displayName} entered to {monumentID}({type}). His previous monument was {oldMonumentID}"); } void OnNpcEnteredMonument(string monumentID, BasePlayer npcPlayer, string type, string oldMonumentID) { Puts($"Npc({npcPlayer.displayName}) entered to {monumentID}({type}). Previous monument was {oldMonumentID}"); } void OnEntityEnteredMonument(string monumentID, BaseEntity entity, string type, string oldMonumentID) { Puts($"Entity({entity.net.ID}) entered to {monumentID}({type}). Previous monument was {oldMonumentID}"); } Exited hooks: void OnPlayerExitedMonument(string monumentID, BasePlayer player, string type, string reason, string newMonumentID) Called when a player exits any monument. void OnNpcExitedMonument(string monumentID, BasePlayer npcPlayer, string type, string reason, string newMonumentID) Called when an NPC player exits any monument. void OnEntityExitedMonument(string monumentID, BaseEntity entity, string type, string reason, string newMonumentID) Called when any other BaseEntity exits any monument. void OnPlayerExitedMonument(string monumentID, BasePlayer player, string type, string reason, string newMonumentID) { Puts($"{player.displayName} left from {monumentID}({type}). Reason: {reason}. They are now at '{newMonumentID}'."); } void OnNpcExitedMonument(string monumentID, BasePlayer npcPlayer, string type, string reason, string newMonumentID) { Puts($"Npc({npcPlayer.displayName}) left from {monumentID}({type}). Reason: {reason}. They are now in {newMonumentID}"); } void OnEntityExitedMonument(string monumentID, BaseEntity entity, string type, string reason, string newMonumentID) { Puts($"Entity({entity.net.ID}) left from {monumentID}({type}). Reason: {reason}. They are now in {newMonumentID}"); } [PluginReference] private Plugin MonumentsWatcher; There are 13 types of monuments: SafeZone(0): Bandit Camp, Outpost, Fishing Village, Ranch and Large Barn. RadTown(1): Airfield, Arctic Research Base, Abandoned Military Base, Giant Excavator Pit, Ferry Terminal, Harbor, Junkyard, Launch Site; Military Tunnel, Missile Silo, Power Plant, Sewer Branch, Satellite Dish, The Dome, Toxic Village(Legacy Radtown), Train Yard, Water Treatment Plant. RadTownWater(2): Oil Rigs, Underwater Labs and CargoShip. RadTownSmall(3): Lighthouse, Oxum's Gas Station, Abandoned Supermarket and Mining Outpost. TunnelStation(4) MiningQuarry(5): Sulfur Quarry, Stone Quarry and HQM Quarry. BunkerEntrance(6) Cave(7) Swamp(8) IceLake(9) PowerSubstation(10) WaterWell(11) Custom(12) There are 25 api methods: GetAllMonuments: Used to retrieve an array of IDs for all available monuments. (string[])(MonumentsWatcher?.Call("GetAllMonuments") ?? Array.Empty<string>()); GetAllMonumentsCategories: Used to retrieve a dictionary of IDs and categories for all available monuments. (Dictionary<string, string>)(MonumentsWatcher?.Call("GetAllMonumentsCategories") ?? new Dictionary<string, string>()); GetMonumentsByCategory: Used to retrieve all available monuments by category. To call the GetMonumentsByCategory method, you need to pass 1 parameter: monument category as a string. (string[])(MonumentsWatcher?.Call("GetMonumentsByCategory", "SafeZone") ?? Array.Empty<string>()); GetMonumentCategory: Used to retrieve the category of the specified monument. Returns an empty string on failure. To call the GetMonumentCategory method, you need to pass 1 parameter: monumentID as a string. (string)(MonumentsWatcher?.Call("GetMonumentCategory", monumentID) ?? string.Empty); GetMonumentDisplayName: Used to retrieve the nicename of a monument in the player's language. Returns an empty string on failure. To call the GetMonumentDisplayName method, you need to pass 3 parameters: monumentID as a string; Available options: userID as a ulong or a string; player as a BasePlayer or an IPlayer. displaySuffix as a bool. Should the suffix be displayed in the name if there are multiple such monuments? This parameter is optional. (string)(MonumentsWatcher?.Call("GetMonumentDisplayName", monumentID, player.userID, true) ?? string.Empty);//(ulong)userID (string)(MonumentsWatcher?.Call("GetMonumentDisplayName", monumentID, player, true) ?? string.Empty);//(BasePlayer/IPlayer)player (string)(MonumentsWatcher?.Call("GetMonumentDisplayName", monumentID, player.UserIDString, true) ?? string.Empty);//(string)userID ***recommended option*** GetMonumentDisplayNameByLang: Used to retrieve the nicename of a monument in the specified language. Returns an empty string on failure. To call the GetMonumentDisplayNameByLang method, you need to pass 3 parameters: monumentID as a string; two-char language as a string; displaySuffix as a bool. Should the suffix be displayed in the name if there are multiple such monuments? This parameter is optional. (string)(MonumentsWatcher?.Call("GetMonumentDisplayNameByLang", monumentID, "en", true) ?? string.Empty); GetMonumentPosition: Used to retrieve the Vector3 position of the specified monument. Returns Vector3.zero on failure. To call the GetMonumentPosition method, you need to pass 1 parameter: monumentID as a string. (Vector3)(MonumentsWatcher?.Call("GetMonumentPosition", monumentID) ?? Vector3.zero); GetMonumentByPos: Used to retrieve the monument at the specified position. Returns an empty string on failure. To call the GetMonumentByPos method, you need to pass 1 parameter: position as a Vector3. (string)(MonumentsWatcher?.Call("GetMonumentByPos", pos) ?? string.Empty); Note: This method returns the first encountered monument. Occasionally, there may be multiple monuments at a single point. Therefore, it is recommended to use the GetMonumentsByPos method. GetMonumentsByPos: Used to retrieve all monuments at the specified position. Returns null on failure. To call the GetMonumentsByPos method, you need to pass 1 parameter: position as a Vector3. (string[])(MonumentsWatcher?.Call("GetMonumentsByPos", pos) ?? Array.Empty<string>()); GetClosestMonument: Used to retrieve the nearest monument to the specified position. Returns an empty string on failure. To call the GetClosestMonument method, you need to pass 1 parameter: position as a Vector3. (string)(MonumentsWatcher?.Call("GetClosestMonument", pos) ?? string.Empty); IsPosInMonument: Used to check whether the specified position is within the specified monument. Returns a false on failure. To call the IsPosInMonument method, you need to pass 2 parameters: monumentID as a string; position as a Vector3. (bool)(MonumentsWatcher?.Call("IsPosInMonument", monumentID, pos) ?? false); ShowBounds: Used to display the boundaries of the specified monument to the specified player. To call the ShowBounds method, you need to pass 3 parameters: monumentID as a string; player as a BasePlayer; displayDuration as a float. Duration of displaying the monument boundaries in seconds. This parameter is optional. MonumentsWatcher?.Call("ShowBounds", monumentID, player, 20f); Note: Since an Admin flag is required for rendering, players without it will be temporarily granted an Admin flag and promptly revoked. PLAYERS API GetMonumentPlayers: Used to retrieve an array of all players located in the specified monument. Returns null on failure. To call the GetMonumentPlayers method, you need to pass 1 parameter: monumentID as a string. (BasePlayer[])(MonumentsWatcher?.Call("GetMonumentPlayers", monumentID) ?? Array.Empty<BasePlayer>()); GetPlayerMonument: Used to retrieve the monument in which the specified player is located. Returns an empty string on failure. To call the GetPlayerMonument method, you need to pass 1 parameter: Available options: player as a BasePlayer; userID as a ulong or a string. (string)(MonumentsWatcher?.Call("GetPlayerMonument", player.UserIDString) ?? string.Empty);//(string)userID (string)(MonumentsWatcher?.Call("GetPlayerMonument", player) ?? string.Empty);//(BasePlayer)player (string)(MonumentsWatcher?.Call("GetPlayerMonument", player.userID) ?? string.Empty);//(ulong)userID ***recommended option*** GetPlayerMonuments: Used to retrieve all monuments in which the specified player is located. Returns null on failure. To call the GetPlayerMonuments method, you need to pass 1 parameter: Available options: player as a BasePlayer; userID as a ulong or a string. (string[])(MonumentsWatcher?.Call("GetPlayerMonuments", player.UserIDString) ?? Array.Empty<string>());//(string)userID (string[])(MonumentsWatcher?.Call("GetPlayerMonuments", player) ?? Array.Empty<string>());//(BasePlayer)player (string[])(MonumentsWatcher?.Call("GetPlayerMonuments", player.userID) ?? Array.Empty<string>());//(ulong)userID ***recommended option*** GetPlayerClosestMonument: Used to retrieve the nearest monument to the specified player. Returns an empty string on failure. To call the GetPlayerClosestMonument method, you need to pass 1 parameter: Available options: player as a BasePlayer; userID as a ulong or a string. (string)(MonumentsWatcher?.Call("GetPlayerClosestMonument", player.UserIDString) ?? string.Empty);//(string)userID (string)(MonumentsWatcher?.Call("GetPlayerClosestMonument", player.userID) ?? string.Empty);//(ulong)userID (string)(MonumentsWatcher?.Call("GetPlayerClosestMonument", player) ?? string.Empty);//(BasePlayer)player ***recommended option*** IsPlayerInMonument: Used to check whether the specified player is in the specified monument. Returns a false on failure. To call the IsPlayerInMonument method, you need to pass 2 parameters: monumentID as a string; Available options: player as a BasePlayer; userID as a ulong or a string. (bool)(MonumentsWatcher?.Call("IsPlayerInMonument", monumentID, player.UserIDString) ?? false);//(string)userID (bool)(MonumentsWatcher?.Call("IsPlayerInMonument", monumentID, player) ?? false);//(BasePlayer)player (bool)(MonumentsWatcher?.Call("IsPlayerInMonument", monumentID, player.userID) ?? false);//(ulong)userID ***recommended option*** NPCS API GetMonumentNpcs: Used to retrieve an array of all npcs located in the specified monument. Returns null on failure. To call the GetMonumentNpcs method, you need to pass 1 parameter: monumentID as a string. (BasePlayer[])(MonumentsWatcher?.Call("GetMonumentNpcs", monumentID) ?? Array.Empty<BasePlayer>()); GetNpcMonument: Used to retrieve the monument in which the specified npc is located. Returns an empty string on failure. To call the GetNpcMonument method, you need to pass 1 parameter: Available options: npcPlayer as a BasePlayer; netID as a NetworkableId. (string)(MonumentsWatcher?.Call("GetNpcMonument", npcPlayer) ?? string.Empty);//(BasePlayer)npcPlayer (string)(MonumentsWatcher?.Call("GetNpcMonument", npcPlayer.net.ID) ?? string.Empty);//(NetworkableId)netID ***recommended option*** GetNpcMonuments: Used to retrieve all monuments in which the specified npc is located. Returns null on failure. To call the GetNpcMonuments method, you need to pass 1 parameter: Available options: npcPlayer as a BasePlayer; netID as a NetworkableId. (string[])(MonumentsWatcher?.Call("GetNpcMonuments", npcPlayer) ?? Array.Empty<string>());//(BasePlayer)npcPlayer (string[])(MonumentsWatcher?.Call("GetNpcMonuments", npcPlayer.net.ID) ?? Array.Empty<string>());//(NetworkableId)netID ***recommended option*** IsNpcInMonument: Used to check whether the specified npc is in the specified monument. Returns a false on failure. To call the IsNpcInMonument method, you need to pass 2 parameters: monumentID as a string; Available options: npcPlayer as a BasePlayer; netID as a NetworkableId. (bool)(MonumentsWatcher?.Call("IsNpcInMonument", monumentID, npcPlayer.net.ID) ?? false);//(NetworkableId)netID (bool)(MonumentsWatcher?.Call("IsNpcInMonument", monumentID, npcPlayer) ?? false);//(BasePlayer)npcPlayer ***recommended option*** ENTITIES API GetMonumentEntities: Used to retrieve an array of all entities located in the specified monument. Returns null on failure. To call the GetMonumentEntities method, you need to pass 1 parameter: monumentID as a string. (BaseEntity[])(MonumentsWatcher?.Call("GetMonumentEntities", monumentID) ?? Array.Empty<BaseEntity>()); GetEntityMonument: Used to retrieve the monument in which the specified entity is located. Returns an empty string on failure. To call the GetEntityMonument method, you need to pass 1 parameter: Available options: entity as a BaseEntity; netID as a NetworkableId. (string)(MonumentsWatcher?.Call("GetEntityMonument", entity) ?? string.Empty);//(BaseEntity)entity (string)(MonumentsWatcher?.Call("GetEntityMonument", entity.net.ID) ?? string.Empty);//(NetworkableId)netID ***recommended option*** GetEntityMonuments: Used to retrieve all monuments in which the specified entity is located. Returns null on failure. To call the GetEntityMonuments method, you need to pass 1 parameter: Available options: entity as a BaseEntity; netID as a NetworkableId. (string[])(MonumentsWatcher?.Call("GetEntityMonuments", entity) ?? Array.Empty<string>());//(BaseEntity)entity (string[])(MonumentsWatcher?.Call("GetEntityMonuments", entity.net.ID) ?? Array.Empty<string>());//(NetworkableId)netID ***recommended option*** IsEntityInMonument: Used to check whether the specified entity is in the specified monument. Returns a false on failure. To call the IsEntityInMonument method, you need to pass 2 parameters: monumentID as a string; Available options: entity as a BaseEntity; netID as a NetworkableId. (bool)(MonumentsWatcher?.Call("IsEntityInMonument", monumentID, entity.net.ID) ?? false);//(NetworkableId)netID (bool)(MonumentsWatcher?.Call("IsEntityInMonument", monumentID, entity) ?? false);//(BaseEntity)entity ***recommended option***Free -
Version 1.1.5
4,290 downloads
Display server population statistics in the chat using the !pop trigger. It provides detailed information about online, sleeping, joining, and queued players. Additionally, the !wipe trigger displays the time remaining until the next server wipe. The plugin supports cooldowns for trigger usage, customizable chat messages, and game tip responses. Features Cooldown Management Prevents spam by enforcing a configurable cooldown period for the !pop trigger. Detailed Player Statistics Displays the number of online players, sleeping players, players joining, and players in the queue. Customizable Messages Configure the chat prefix and SteamID for message icons. Customize messages' appearance, including colors and formats. Multi-Response Options Option to broadcast the server population message globally or to the player who issued the trigger. Supports both chat messages and game tip notifications. Welcome Messages Displays a customizable welcome message to players when they connect. Optionally shows the server population on player connect. Wipe Timer Displays time left till wipe with !wipe trigger. Trigger Filter Auto filters the !pop, !wipe, !bp, !purge, !st & !discord triggers so it isn't displayed in the chat (Reqs BetterChat) Configuration Options: Cooldown Settings • Cooldown (seconds): The cooldown period in seconds between uses of the !pop command. Chat Settings • Chat Prefix: The prefix displayed before the server population message in chat. • Chat Icon SteamID: The SteamID of the icon used for chat messages. Message Settings • Global Response: Determines if the response should be broadcast globally or sent only to the player who triggered the command. • Use Chat Response: If true, responses will be sent in the chat. • Use Game Tip Response: If true, responses will be shown as game tips (toasts). • Value Color (HEX): The color used for values in the messages. Response Settings • Show Online Players: Show the number of online players. • Show Sleeping Players: Show the number of sleeping players. • Show Joining Players: Show the number of players currently joining. • Show Queued Players: Show the number of players in the queue. Connect Settings • Show Pop On Connect: Show the server population message when a player connects. • Show Welcome Message: Show a welcome message when a player connects. • Show Wipe On Connect: Show wipe timer when a player connects. Wipe Settings • Wipe Timer Enabled: Enable the use of !wipe trigger to display wipe timer • Wipe Timer (epoch): Set the time till wipe using Epoch Time Stamp. Blueprint Wipe Settings • Blueprint Wipe Timer Enabled: Enable the use of !bp trigger to display blueprint wipe timer • Blueprint Wipe Timer (epoch): Set the time till blueprint wipe using Epoch Time Stamp. Purge Settings • Purge Enabled: Enable the use of !purge trigger to display purge timer • Purge Timer (epoch): Set the time till the purge using Epoch Time Stamp. Skill Tree Settings • Skill Tree Timer Enabled: Enable the use of !purge trigger to display purge timer • Skill Tree Timer (epoch): Set the time till skill tree using Epoch Time Stamp. Discord Settings • Discord Enabled Enable the use of !discord trigger to display invite link • Discord Invite Link: Set the discord link to be displayed. Triggers: !pop - displays server population !wipe - displays wipe time !bp - displays blueprint wipe time !purge - displays purge time !st - displays skill tree wipe time !discord - displays discord invite link Default Configuration: { "Cooldown Settings": { "Cooldown (seconds)": 60 }, "Chat Settings": { "Chat Prefix": "<size=16><color=#FFA500>| Server Pop |</color></size>", "Chat Icon SteamID": 76561199216745239 }, "Messgae Settings": { "Global Response (true = global response, false = player response)": true, "Use Chat Response": false, "Use Game Tip Response": true, "Use Single Line Chat Pop Response": false, "Value Color (HEX)": "#FFA500" }, "Response Settings": { "Show Online Players": true, "Show Sleeping Players": true, "Show Joining Players": true, "Show Queued Players": true }, "Connect Settings": { "Show Pop On Connect": true, "Show Welcome Message": true, "Show Wipe On Connect": true }, "Wipe Response Settings": { "Wipe Timer Enabled": false, "Wipe Timer (epoch)": 0 }, "Blueprint Wipe Response Settings": { "Blueprint Wipe Timer Enabled": false, "Blueprint Wipe Timer (epoch)": 0 }, "Purge Response Settings": { "Purge Timer Enabled": false, "Purge Timer (epoch)": 0 }, "Skill Tree Wipe Response Settings": { "Skill Tree Timer Enabled": false, "Skill Tree Wipe Timer (epoch)": 0 }, "Discord Response Settings": { "Discord Enabled": false, "Discord Invite Link": "" }, "Version": { "Major": 1, "Minor": 1, "Patch": 4 } } Default Language: { "Online": "{0} / {1} players online", "Sleeping": "{0} players sleeping", "Joining": "{0} players joining", "Queued": "{0} players queued", "WelcomeMessage": "Welcome to the server {0}!", "CooldownMessage": "You must wait {0} seconds before using this command again.", "WipeMessage": "Next wipe in: {0}", "DiscordMessage": "Join Us @ {0}", "OneLine": "{0} / {1} players with {2} joining! {3} queued", "BPWipeMessage": "Next blueprint wipe in: {0}", "PurgeMessage": "Purge starts in: {0}", "SkillMessage": "Next skill tree wipe in: {0}" }Free- 28 comments
- 5 reviews
-
- 7
-
-
-
- #population
- #server
-
(and 7 more)
Tagged with: