├── EventManager ├── Events │ ├── TDMEvent │ │ ├── TDMEvent.h │ │ ├── TDMEvent.vcxproj.user │ │ ├── PluginInfo.json │ │ └── TDMEvent.vcxproj.filters │ └── DeathmatchEvent │ │ ├── DeathmatchEvent.h │ │ ├── DeathmatchEvent.vcxproj.user │ │ ├── PluginInfo.json │ │ └── DeathmatchEvent.vcxproj.filters ├── PluginInfo.json ├── EventManager │ ├── EventManager.vcxproj.user │ ├── EventManager.vcxproj.filters │ └── Public │ │ └── Event.h ├── config.json └── AAEventManager.sln ├── KillFeed ├── KillFeed │ ├── KillFeed.cpp │ ├── KillFeed.vcxproj.user │ ├── KillFeed.h │ ├── KillFeedCommands.h │ ├── KillFeedConfig.h │ └── KillFeed.vcxproj.filters ├── config.json └── KillFeed.sln ├── Teleport ├── Teleport │ ├── Teleport.cpp │ ├── TeleportHooks.h │ ├── Teleport.vcxproj.filters │ └── TeleportConfig.h ├── Teleport.sln ├── config.json └── x64 │ └── Release │ └── Teleport │ └── config.json ├── DinoColourCommand ├── DinoColourCommand │ ├── DinoColourCommand.h │ ├── DinoColourCommand.vcxproj.user │ ├── DinoColourCommandConfig.h │ ├── DinoColourCommand.cpp │ ├── DinoColourCommand.vcxproj.filters │ ├── DinoColourCommandCommands.h │ └── DinoColourCommand.vcxproj ├── config.json └── DinoColourCommand.sln ├── PlayerList ├── PlayerList │ ├── PlayerList.cpp │ ├── PlayerList.h │ ├── PlayerList.vcxproj.user │ ├── PlayerListConfig.h │ ├── PlayerList.vcxproj.filters │ └── PlayerList.vcxproj ├── PluginInfo.json ├── config.json └── PlayerList.sln ├── Ping Limiter ├── .vs │ └── PingLimiter │ │ └── v15 │ │ └── .suo ├── PingLimiter │ ├── PingLimiter.cpp │ ├── PingLimiter.vcxproj.user │ ├── PingLimiter.h │ ├── PingLimiterConfig.h │ ├── PingLimiterCommands.h │ ├── PingLimiter.vcxproj.filters │ └── PingLimiterHooks.h ├── PluginInfo.json ├── config.json └── PingLimiter.sln ├── DinoTracker ├── DinoTracker │ ├── DinoTracker.cpp │ ├── DinoTracker.h │ ├── DinoTracker.vcxproj.user │ ├── DinoTrackerConfig.h │ └── DinoTracker.vcxproj.filters ├── config.json └── DinoTracker.sln ├── SafeZone ├── SafeZone │ ├── Private │ │ ├── Commands.h │ │ ├── Hooks.h │ │ ├── SafeZones.h │ │ ├── SzTools.h │ │ ├── SafeZones.cpp │ │ ├── SafeZoneManager.h │ │ └── SafeZone.cpp │ ├── SafeZone.vcxproj.user │ ├── Public │ │ ├── ISafeZoneManager.h │ │ └── SafeZone.h │ ├── SafeZone.sln │ ├── SafeZone.vcxproj.filters │ └── SafeZone.vcxproj ├── PluginInfo.json ├── SafeZone.sln └── config.json ├── Async SaveWorld ├── .vs │ └── Async SaveWorld │ │ └── v15 │ │ └── .suo ├── Async SaveWorld │ ├── Async SaveWorld.cpp │ ├── Async SaveWorld.h │ ├── Async SaveWorld.vcxproj.user │ ├── Async SaveWorldHooks.h │ ├── Async SaveWorld.vcxproj.filters │ └── Async SaveWorldConfig.h └── Async SaveWorld.sln ├── PluginUpdateChecker ├── config.json ├── PluginUpdateChecker │ ├── PluginUpdateChecker.vcxproj.user │ ├── PluginUpdateChecker.vcxproj.filters │ ├── PluginChecker.h │ └── Main.cpp └── PluginUpdateChecker.sln ├── PrivateMessage ├── PrivateMessage │ ├── PrivateMessage.cpp │ ├── PrivateMessage.vcxproj.user │ ├── PrivateMessageHooks.h │ ├── PrivateMessageConfig.h │ ├── PrivateMessage.h │ └── PrivateMessage.vcxproj.filters ├── config.json ├── x64 │ └── Release │ │ └── PrivateMessage │ │ ├── PluginInfo.json │ │ └── config.json └── PrivateMessage.sln ├── README.md ├── ArkShop └── ArkShop │ ├── Private │ ├── StoreSell.h │ ├── Database │ │ ├── PointsRepository.h │ │ ├── DbManager.h │ │ ├── KitRepository.h │ │ ├── DbManager.cpp │ │ ├── PointsRepository.cpp │ │ └── KitRepository.cpp │ ├── ArkShop.h │ ├── Tools.h │ ├── hdr │ │ └── sqlite_modern_cpp │ │ │ ├── utility │ │ │ ├── uncaught_exceptions.h │ │ │ └── function_traits.h │ │ │ ├── sqlcipher.h │ │ │ ├── errors.h │ │ │ └── log.h │ ├── DBHelper.cpp │ ├── ShopLog.h │ ├── TimedRewards.h │ └── TimedRewards.cpp │ └── Public │ ├── Base.h │ ├── DBHelper.h │ ├── Kits.h │ ├── Store.h │ └── Points.h ├── GameConfigManager ├── GameConfigManager │ ├── GameConfigManager.cpp │ ├── GameConfigManager.vcxproj.user │ └── GameConfigManager.vcxproj.filters ├── PdbConfig.json └── GameConfigManager.sln ├── Mutes ├── Mutes │ ├── Mutes.vcxproj.user │ ├── hdr │ │ └── sqlite_modern_cpp │ │ │ ├── utility │ │ │ ├── uncaught_exceptions.h │ │ │ └── function_traits.h │ │ │ ├── sqlcipher.h │ │ │ ├── errors.h │ │ │ └── log.h │ ├── Mutes.cpp │ ├── MuteConfig.h │ ├── Mutes.h │ ├── Mutes.vcxproj.filters │ └── MuteHooks.h ├── Mutes.sln └── config.json ├── WeekendRates ├── x64 │ └── Release │ │ └── WeekendRates │ │ ├── PluginInfo.json │ │ └── config.json ├── WeekendRates │ ├── WeekendRates.h │ ├── WeekendRates.cpp │ ├── WeekendRatesCommands.h │ ├── WeekendRatesConfig.h │ └── WeekendRates.vcxproj.filters ├── config.json └── WeekendRates.sln ├── PVPScheduler ├── PVPScheduler │ ├── PVPScheduler.vcxproj.user │ ├── PVPScheduler.h │ ├── PVPScheduler.cpp │ ├── PVPScheduler.vcxproj.filters │ ├── PVPSchedulerCommands.h │ ├── PVPSchedulerConfig.h │ └── PVPScheduler.vcxproj ├── config.json └── PVPScheduler.sln ├── VoteRewards ├── VoteRewards │ ├── VoteRewards.vcxproj.user │ ├── VoteRewards.vcxproj.filters │ ├── VoteRewardsConfig.h │ ├── OldRequests.h │ └── VoteRewards.h └── VoteRewards.sln └── .gitignore /EventManager/Events/TDMEvent/TDMEvent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "API\ARK\Ark.h" -------------------------------------------------------------------------------- /KillFeed/KillFeed/KillFeed.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ownprox/ArkServerApi/HEAD/KillFeed/KillFeed/KillFeed.cpp -------------------------------------------------------------------------------- /Teleport/Teleport/Teleport.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ownprox/ArkServerApi/HEAD/Teleport/Teleport/Teleport.cpp -------------------------------------------------------------------------------- /EventManager/Events/DeathmatchEvent/DeathmatchEvent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "API\ARK\Ark.h" -------------------------------------------------------------------------------- /DinoColourCommand/DinoColourCommand/DinoColourCommand.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | inline bool RequiresAdmin, RequiresPermission; 4 | -------------------------------------------------------------------------------- /PlayerList/PlayerList/PlayerList.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ownprox/ArkServerApi/HEAD/PlayerList/PlayerList/PlayerList.cpp -------------------------------------------------------------------------------- /Ping Limiter/.vs/PingLimiter/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ownprox/ArkServerApi/HEAD/Ping Limiter/.vs/PingLimiter/v15/.suo -------------------------------------------------------------------------------- /DinoColourCommand/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "DinoColourCommand":{ 3 | "RequireAdmin":false, 4 | "RequirePermission":true 5 | } 6 | } -------------------------------------------------------------------------------- /DinoTracker/DinoTracker/DinoTracker.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ownprox/ArkServerApi/HEAD/DinoTracker/DinoTracker/DinoTracker.cpp -------------------------------------------------------------------------------- /Ping Limiter/PingLimiter/PingLimiter.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ownprox/ArkServerApi/HEAD/Ping Limiter/PingLimiter/PingLimiter.cpp -------------------------------------------------------------------------------- /SafeZone/SafeZone/Private/Commands.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SafeZones::Commands 4 | { 5 | void Init(); 6 | void Clean(); 7 | } 8 | -------------------------------------------------------------------------------- /Async SaveWorld/.vs/Async SaveWorld/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ownprox/ArkServerApi/HEAD/Async SaveWorld/.vs/Async SaveWorld/v15/.suo -------------------------------------------------------------------------------- /PluginUpdateChecker/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "PluginChecker":{ 3 | "DiscordUseWebHooks":false, 4 | "DiscordWebHookURL":"" 5 | } 6 | } -------------------------------------------------------------------------------- /SafeZone/SafeZone/Private/Hooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace SafeZones::Hooks 4 | { 5 | void InitHooks(); 6 | void RemoveHooks(); 7 | } 8 | -------------------------------------------------------------------------------- /PrivateMessage/PrivateMessage/PrivateMessage.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ownprox/ArkServerApi/HEAD/PrivateMessage/PrivateMessage/PrivateMessage.cpp -------------------------------------------------------------------------------- /Async SaveWorld/Async SaveWorld/Async SaveWorld.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ownprox/ArkServerApi/HEAD/Async SaveWorld/Async SaveWorld/Async SaveWorld.cpp -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Server API 2 | Plugins for Michidu Ark Server API: https://github.com/Michidu/ARK-Server-API/ 3 | 4 | Wiki: https://wiki.arkserverapi.com/ 5 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/StoreSell.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ArkShop::StoreSell 4 | { 5 | void Init(); 6 | } // namespace StoreSell // namespace ArkShop 7 | -------------------------------------------------------------------------------- /GameConfigManager/GameConfigManager/GameConfigManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ownprox/ArkServerApi/HEAD/GameConfigManager/GameConfigManager/GameConfigManager.cpp -------------------------------------------------------------------------------- /PlayerList/PlayerList/PlayerList.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | inline std::wstring Messages[7]; 6 | bool StaffOnly = true; -------------------------------------------------------------------------------- /EventManager/PluginInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "FullName":"Event Manager", 3 | "Description":"Automatically run custom events.", 4 | "Version":1.1, 5 | "MinApiVersion":2.5, 6 | "ResourceId":-1 7 | } -------------------------------------------------------------------------------- /PlayerList/PluginInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "FullName":"PlayerList", 3 | "Description":"List all online player character names", 4 | "Version":1.3, 5 | "MinApiVersion":2.5, 6 | "ResourceId":22 7 | } -------------------------------------------------------------------------------- /Mutes/Mutes/Mutes.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Ping Limiter/PluginInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "FullName":"PingLimiter", 3 | "Description":"Limit Players ping allowed in the server", 4 | "Version":1.1, 5 | "MinApiVersion":2.5, 6 | "ResourceId":22 7 | } -------------------------------------------------------------------------------- /WeekendRates/x64/Release/WeekendRates/PluginInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "FullName":"WeekendRates", 3 | "Description":"Change multiplier's for weekend only", 4 | "Version":1.3, 5 | "MinApiVersion":2.1 6 | } -------------------------------------------------------------------------------- /PrivateMessage/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "PrivateMessage":{ 3 | "ServerMessage":true, 4 | "ServerMessageRGB":[ 5 | 0, 6 | 255, 7 | 0 8 | ] 9 | } 10 | } -------------------------------------------------------------------------------- /KillFeed/KillFeed/KillFeed.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /PrivateMessage/x64/Release/PrivateMessage/PluginInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "FullName":"Private Message", 3 | "Description":"Ability to private message other players", 4 | "Version":1.3, 5 | "MinApiVersion":2.1 6 | } -------------------------------------------------------------------------------- /SafeZone/SafeZone/SafeZone.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Async SaveWorld/Async SaveWorld/Async SaveWorld.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "API\ARK\Ark.h" 4 | 5 | std::thread SaveThread; 6 | bool CPUAffinityEnabled = false; 7 | DWORD_PTR CPUAffinityMask; -------------------------------------------------------------------------------- /DinoTracker/DinoTracker/DinoTracker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | inline bool PlayerCanTrack; 7 | inline float MaxDistance; 8 | inline std::wstring Messages[10]; 9 | -------------------------------------------------------------------------------- /GameConfigManager/PdbConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "structures": [ 3 | "FConfigCacheIni" 4 | ], 5 | "functions": [ 6 | "PrimalGameIni_GameModeInitValues" 7 | ], 8 | "globals": [ 9 | "GConfig" 10 | ] 11 | } -------------------------------------------------------------------------------- /PlayerList/PlayerList/PlayerList.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /DinoTracker/DinoTracker/DinoTracker.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /EventManager/EventManager/EventManager.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /PVPScheduler/PVPScheduler/PVPScheduler.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Ping Limiter/PingLimiter/PingLimiter.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /VoteRewards/VoteRewards/VoteRewards.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /EventManager/Events/TDMEvent/TDMEvent.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Async SaveWorld/Async SaveWorld/Async SaveWorld.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /PrivateMessage/PrivateMessage/PrivateMessage.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /DinoColourCommand/DinoColourCommand/DinoColourCommand.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /EventManager/Events/DeathmatchEvent/DeathmatchEvent.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /PrivateMessage/x64/Release/PrivateMessage/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "PrivateMessage":{ 3 | "ServerMessage":true, 4 | "ServerMessageRGB":[ 5 | 0, 6 | 255, 7 | 0 8 | ] 9 | } 10 | } -------------------------------------------------------------------------------- /SafeZone/PluginInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "FullName":"Safe Zone", 3 | "Description":"Create Safe Zones", 4 | "Version":3.2, 5 | "MinApiVersion":2.6, 6 | "ResourceId":2, 7 | "Dependencies":[ 8 | "Permissions" 9 | ] 10 | } -------------------------------------------------------------------------------- /GameConfigManager/GameConfigManager/GameConfigManager.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /PluginUpdateChecker/PluginUpdateChecker/PluginUpdateChecker.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /EventManager/Events/DeathmatchEvent/PluginInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "FullName":"DeathMatchEvent", 3 | "Description":"DM Event", 4 | "Version":1.1, 5 | "MinApiVersion":2.5, 6 | "ResourceId":-1, 7 | "Dependencies":[ 8 | "AAEventManager" 9 | ] 10 | } -------------------------------------------------------------------------------- /EventManager/Events/TDMEvent/PluginInfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "FullName":"TeamDeathMatchEvent", 3 | "Description":"TDM Event", 4 | "Version":1.0, 5 | "MinApiVersion":2.5, 6 | "ResourceId":-1, 7 | "Dependencies":[ 8 | "AAEventManager" 9 | ] 10 | } -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/Database/PointsRepository.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../ArkShop.h" 4 | 5 | namespace ArkShop::PointsRepository 6 | { 7 | int GetPoints(uint64 steam_id); 8 | bool SetPoints(uint64 steam_id, int amount); 9 | bool DeleteAllPoint(); 10 | } -------------------------------------------------------------------------------- /SafeZone/SafeZone/Private/SafeZones.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "json.hpp" 6 | 7 | namespace SafeZones 8 | { 9 | inline nlohmann::json config; 10 | 11 | FString GetText(const std::string& str); 12 | void ReadConfig(); 13 | } 14 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Public/Base.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #ifdef SHOP_EXPORTS 8 | #define SHOP_API __declspec(dllexport) 9 | #else 10 | #define SHOP_API __declspec(dllimport) 11 | #endif 12 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/Database/DbManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../hdr/sqlite_modern_cpp.h" 3 | #include "../ArkShop.h" 4 | 5 | namespace ArkShop::DbManager 6 | { 7 | sqlite::database& GetDb(); 8 | void CreateDatabase(); 9 | 10 | bool TryAddNewPlayer(uint64 steam_id); 11 | } 12 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/Database/KitRepository.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../ArkShop.h" 4 | #include "../hdr/sqlite_modern_cpp.h" 5 | 6 | namespace ArkShop::KitRepository 7 | { 8 | std::string GetPlayerKits(uint64 steam_id); 9 | bool UpdatePlayerKits(uint64 steam_id, std::string kits_data); 10 | bool DeleteAllKits(); 11 | } -------------------------------------------------------------------------------- /PlayerList/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "StaffOnly":true, 3 | "Messages":[ 4 | "ServerNameHere", 5 | "There is Currently {} Online!", 6 | "{}", 7 | "/players", 8 | "/steamids", 9 | "/playerids", 10 | "/tribeids" 11 | ] 12 | } -------------------------------------------------------------------------------- /ArkShop/ArkShop/Public/DBHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace ArkShop::DBHelper 6 | { 7 | /** 8 | * \brief Checks if player exists in shop database 9 | * \param steam_id Players steam id 10 | * \return True if exists, false otherwise 11 | */ 12 | SHOP_API bool IsPlayerExists(uint64 steam_id); 13 | } // namespace DBHelper // namespace ArkShop 14 | -------------------------------------------------------------------------------- /PVPScheduler/PVPScheduler/PVPScheduler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "API/ARK/Ark.h" 5 | #include "json.hpp" 6 | 7 | nlohmann::json PVPDays; 8 | bool ServerNotify, PVPEnabled, LogPvpSwitchAtConsole, ProtectCharacters = true, ProtectDinos = true, ProtectStructures = true, ProtectExplosives = true; 9 | FString ServerName; 10 | inline std::string PVPMessage[3]; -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/ArkShop.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "json.hpp" 6 | 7 | namespace ArkShop 8 | { 9 | extern nlohmann::json config; 10 | 11 | FString GetText(const std::string& str); 12 | bool IsStoreEnabled(AShooterPlayerController* player_controller); 13 | void ToogleStore(bool Enabled, const FString& Reason = ""); 14 | } // namespace ArkShop 15 | -------------------------------------------------------------------------------- /Ping Limiter/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "PingLimit":200, 3 | "TotalPingStrikes":5, 4 | "CheckPingSecondsInteval":60, 5 | "DisplayWarningsToUsers":true, 6 | "Messages":[ 7 | "ServerNameHere", 8 | "Your Ping: {}", 9 | "/ping", 10 | "Your ping is too high ({}/{}), Strike {}/{}", 11 | "You have been disconnected your ping was too high." 12 | ] 13 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/Tools.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "windows.h" 4 | 5 | namespace ArkShop::Tools 6 | { 7 | inline int GetRandomNumber(int min, int max) 8 | { 9 | const int n = max - min + 1; 10 | const int remainder = RAND_MAX % n; 11 | int x; 12 | 13 | do 14 | { 15 | x = rand(); 16 | } 17 | while (x >= RAND_MAX - remainder); 18 | 19 | return min + x % n; 20 | } 21 | } // namespace Tools // namespace ArkShop 22 | -------------------------------------------------------------------------------- /WeekendRates/WeekendRates/WeekendRates.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "API/ARK/Ark.h" 4 | #include "json.hpp" 5 | 6 | inline nlohmann::json WeekendConfig; 7 | inline bool WeekendRatesEnabled = false, MOTDChangeEnabled = false, Notification = true, Chatbox = false; 8 | inline FString ServerName, WeekendMOTD, NormalMOTD, WeekendRatesEnabledMessage, WeekendRatesDisabledMessage; 9 | inline FLinearColor WeekendRatesEnabledRGB{0.f, 1.f, 0.f, 1.f}, WeekendRatesDisabledRGB{1.f, 0.f, 0.f, 1.f}; 10 | inline int StartDay, EndDay; -------------------------------------------------------------------------------- /DinoTracker/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "DinoTracker":{ 3 | "PlayersCanTrack":true, 4 | "MinDistance":5000.0 5 | }, 6 | "Messages":[ 7 | "DinoTracker", 8 | "Incorrect Syntax: /track ", 9 | "{} wasn't found", 10 | "{0} Is Located At Long: {1:.1f}, Lat: {2:.1f}", 11 | "/track", 12 | "/atrack", 13 | "Please, login as admin to use this command", 14 | "Incorrect Syntax: /atrack " 15 | ] 16 | } -------------------------------------------------------------------------------- /PVPScheduler/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "PVPScheduler":{ 3 | "ServerName":"ServerNameHere", 4 | "NotifyServer":true, 5 | "LogPvpSwitchAtConsole":true, 6 | "Days":[ 7 | { 8 | "StartDay":5, 9 | "StartHour":18, 10 | "EndDay":0, 11 | "EndHour":18, 12 | "ProtectPlayers":true, 13 | "ProtectDinos":true, 14 | "ProtectStructures":true, 15 | "PVPEnabledMessage":"PVP is Enabled!.", 16 | "PVPDisabledMessage":"PVP is Disabled!." 17 | } 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /KillFeed/KillFeed/KillFeed.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "API\ARK\Ark.h" 4 | bool PlayerKillsEnabled, DinoKillsEnabled, DisplayInChatbox, DisplaySameTribeKills, DisplayDistance; 5 | int DisplayType; 6 | float DisplayScale, DisplayDelay; 7 | FLinearColor DisplayColour; 8 | FString ServerName; 9 | std::wstring Messages[8]; 10 | 11 | const float trunc_decs(const float& f, int decs) 12 | { 13 | int i1 = static_cast(floor(f)); 14 | float rmnd = f - i1; 15 | int i2 = static_cast(rmnd * pow(10, decs)); 16 | float f1 = static_cast(i2 / pow(10, decs)); 17 | return i1 + f1; 18 | } -------------------------------------------------------------------------------- /DinoColourCommand/DinoColourCommand/DinoColourCommandConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "json.hpp" 5 | 6 | inline void InitConfig() 7 | { 8 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/DinoColourCommand/config.json"); 9 | if (!file.is_open()) 10 | { 11 | RequiresAdmin = true; 12 | return; 13 | } 14 | 15 | nlohmann::json configData; 16 | file >> configData; 17 | file.close(); 18 | 19 | RequiresAdmin = configData["DinoColourCommand"]["RequireAdmin"]; 20 | RequiresPermission = configData["DinoColourCommand"].value("RequirePermission", false); 21 | } 22 | -------------------------------------------------------------------------------- /Mutes/Mutes/hdr/sqlite_modern_cpp/utility/uncaught_exceptions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace sqlite { 8 | namespace utility { 9 | #ifdef __cpp_lib_uncaught_exceptions 10 | class UncaughtExceptionDetector { 11 | public: 12 | operator bool() { 13 | return count != std::uncaught_exceptions(); 14 | } 15 | private: 16 | int count = std::uncaught_exceptions(); 17 | }; 18 | #else 19 | class UncaughtExceptionDetector { 20 | public: 21 | operator bool() { 22 | return std::uncaught_exception(); 23 | } 24 | }; 25 | #endif 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/hdr/sqlite_modern_cpp/utility/uncaught_exceptions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace sqlite { 8 | namespace utility { 9 | #ifdef __cpp_lib_uncaught_exceptions 10 | class UncaughtExceptionDetector { 11 | public: 12 | operator bool() { 13 | return count != std::uncaught_exceptions(); 14 | } 15 | private: 16 | int count = std::uncaught_exceptions(); 17 | }; 18 | #else 19 | class UncaughtExceptionDetector { 20 | public: 21 | operator bool() { 22 | return std::uncaught_exception(); 23 | } 24 | }; 25 | #endif 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Mutes/Mutes/Mutes.cpp: -------------------------------------------------------------------------------- 1 | #include "Mutes.h" 2 | #include "MuteManager.h" 3 | #include "MuteConfig.h" 4 | #include "MuteHooks.h" 5 | #include "MuteCommands.h" 6 | #pragma comment(lib, "ArkApi.lib") 7 | 8 | void Init() 9 | { 10 | Log::Get().Init("Mutes"); 11 | InitConfig(false); 12 | InitMutes(); 13 | InitHooks(); 14 | InitCommands(); 15 | } 16 | 17 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 18 | { 19 | switch (ul_reason_for_call) 20 | { 21 | case DLL_PROCESS_ATTACH: 22 | Init(); 23 | break; 24 | case DLL_PROCESS_DETACH: 25 | RemoveHooks(); 26 | RemoveCommands(); 27 | break; 28 | } 29 | return TRUE; 30 | } -------------------------------------------------------------------------------- /PVPScheduler/PVPScheduler/PVPScheduler.cpp: -------------------------------------------------------------------------------- 1 | #include "PVPScheduler.h" 2 | #include "PVPSchedulerConfig.h" 3 | #include "PVPSchedulerCommands.h" 4 | #include "PVPSchedulerHooks.h" 5 | 6 | #pragma comment(lib, "ArkApi.lib") 7 | 8 | void Init() 9 | { 10 | Log::Get().Init("PVPScheduler"); 11 | InitConfig(); 12 | InitCommands(); 13 | InitHooks(); 14 | } 15 | 16 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 17 | { 18 | switch (ul_reason_for_call) 19 | { 20 | case DLL_PROCESS_ATTACH: 21 | Init(); 22 | break; 23 | case DLL_PROCESS_DETACH: 24 | RemoveCommands(); 25 | RemoveHooks(); 26 | break; 27 | } 28 | return TRUE; 29 | } 30 | -------------------------------------------------------------------------------- /WeekendRates/WeekendRates/WeekendRates.cpp: -------------------------------------------------------------------------------- 1 | #include "WeekendRates.h" 2 | #include "WeekendRatesConfig.h" 3 | #include "WeekendRatesCommands.h" 4 | #include "WeekendRatesHooks.h" 5 | 6 | #pragma comment(lib, "ArkApi.lib") 7 | 8 | void Init() 9 | { 10 | Log::Get().Init("WeekendRates"); 11 | InitConfig(); 12 | InitCommands(); 13 | InitHooks(); 14 | } 15 | 16 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 17 | { 18 | switch (ul_reason_for_call) 19 | { 20 | case DLL_PROCESS_ATTACH: 21 | Init(); 22 | break; 23 | case DLL_PROCESS_DETACH: 24 | RemoveCommands(); 25 | RemoveHooks(); 26 | break; 27 | } 28 | return TRUE; 29 | } 30 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Public/Kits.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace ArkShop::Kits 6 | { 7 | void Init(); 8 | 9 | /** 10 | * \brief Adds or reduces kits of the specific player 11 | */ 12 | SHOP_API bool ChangeKitAmount(const FString& kit_name, int amount, uint64 steam_id); 13 | 14 | /** 15 | * \brief Checks if player has permissions to use this kit 16 | */ 17 | SHOP_API bool CanUseKit(AShooterPlayerController* player_controller, uint64 steam_id, const FString& kit_name); 18 | 19 | /** 20 | * \brief Checks if kit exists in server config 21 | */ 22 | SHOP_API bool IsKitExists(const FString& kit_name); 23 | } // namespace Kits // namespace ArkShop 24 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/DBHelper.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "ArkShop.h" 4 | #include "Database/DbManager.h" 5 | 6 | 7 | namespace ArkShop::DBHelper 8 | { 9 | bool IsPlayerExists(const uint64 steam_id) 10 | { 11 | auto& db = DbManager::GetDb(); 12 | 13 | int count = 0; 14 | 15 | try 16 | { 17 | db << "SELECT count(1) FROM Players WHERE SteamId = ?;" << steam_id >> count; 18 | } 19 | catch (const sqlite::sqlite_exception& exception) 20 | { 21 | Log::GetLog()->error("({} {}) Unexpected DB error {}", __FILE__, __FUNCTION__, exception.what()); 22 | return false; 23 | } 24 | 25 | return count != 0; 26 | } 27 | } // namespace DBHelper // namespace ArkShop 28 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Public/Store.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace ArkShop::Store 6 | { 7 | void Init(); 8 | 9 | /** 10 | * \brief Buys an item from shop for specific player 11 | * \param player_controller Player 12 | * \param item_id Shop's item id 13 | * \param amount Amount of items to buy (only for items) 14 | * \return True if success, false otherwise 15 | */ 16 | SHOP_API bool Buy(AShooterPlayerController* player_controller, const FString& item_id, int amount); 17 | SHOP_API bool IsStoreEnabled(AShooterPlayerController* player_controller); 18 | SHOP_API void ToogleStore(bool Enabled, const FString& Reason = ""); 19 | 20 | } // namespace Store // namespace ArkShop 21 | -------------------------------------------------------------------------------- /PrivateMessage/PrivateMessage/PrivateMessageHooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | DECLARE_HOOK(AShooterGameMode_Logout, void, AShooterGameMode*, AController*); 3 | 4 | void InitHooks() 5 | { 6 | ArkApi::GetHooks().SetHook("AShooterGameMode.Logout", &Hook_AShooterGameMode_Logout, reinterpret_cast(&AShooterGameMode_Logout_original)); 7 | } 8 | 9 | void RemoveHooks() 10 | { 11 | ArkApi::GetHooks().DisableHook("AShooterGameMode.Logout", &Hook_AShooterGameMode_Logout); 12 | } 13 | 14 | void _cdecl Hook_AShooterGameMode_Logout(AShooterGameMode* _this, AController* Exiting) 15 | { 16 | if (Exiting) RemovePlayer(ArkApi::GetApiUtils().GetSteamIdFromController(Exiting)); 17 | AShooterGameMode_Logout_original(_this, Exiting); 18 | } -------------------------------------------------------------------------------- /SafeZone/SafeZone/Public/ISafeZoneManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SafeZone.h" 4 | 5 | namespace SafeZones 6 | { 7 | class ZONE_API ISafeZoneManager 8 | { 9 | public: 10 | virtual ~ISafeZoneManager() = default; 11 | 12 | virtual bool CreateSafeZone(const std::shared_ptr& safe_zone) = 0; 13 | virtual bool RemoveSafeZone(const FString& name) = 0; 14 | 15 | virtual bool CanBuild(APlayerController* player, const FVector& location, bool notification = false) = 0; 16 | virtual bool CheckActorAction(AActor* actor, int type) = 0; 17 | virtual std::shared_ptr FindZoneByName(const FString& name) = 0; 18 | }; 19 | 20 | ZONE_API ISafeZoneManager& APIENTRY GetSafeZoneManager(); 21 | } 22 | -------------------------------------------------------------------------------- /DinoColourCommand/DinoColourCommand/DinoColourCommand.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "DinoColourCommand.h" 4 | #include "DinoColourCommandCommands.h" 5 | #include "DinoColourCommandConfig.h" 6 | 7 | #pragma comment(lib, "ArkApi.lib") 8 | #pragma comment(lib, "Permissions.lib") 9 | 10 | void Init() 11 | { 12 | Log::Get().Init("DinoColourCommand"); 13 | InitConfig(); 14 | InitCommands(); 15 | } 16 | 17 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 18 | { 19 | switch (ul_reason_for_call) 20 | { 21 | case DLL_PROCESS_ATTACH: 22 | Init(); 23 | break; 24 | case DLL_PROCESS_DETACH: 25 | RemoveCommands(); 26 | break; 27 | } 28 | return TRUE; 29 | } 30 | -------------------------------------------------------------------------------- /KillFeed/KillFeed/KillFeedCommands.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | void ReloadConfig(AShooterPlayerController* player, FString* message, int mode) 3 | { 4 | if (!player || !player->PlayerStateField() || !player->GetPlayerCharacter()) return; 5 | if (!player->GetPlayerCharacter()->bIsServerAdminField()) 6 | { 7 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(1, 0, 0), L"Please login as a admin."); 8 | return; 9 | } 10 | InitConfig(); 11 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(0, 1, 0), L"Kill Feed Config Reloaded!"); 12 | } 13 | 14 | void InitCommands() 15 | { 16 | ArkApi::GetCommands().AddChatCommand("/kfreload", &ReloadConfig); 17 | } 18 | 19 | void RemoveCommands() 20 | { 21 | ArkApi::GetCommands().RemoveChatCommand("/kfreload"); 22 | } -------------------------------------------------------------------------------- /PlayerList/PlayerList/PlayerListConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "json.hpp" 4 | 5 | inline void InitConfig() 6 | { 7 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/PlayerList/config.json"); 8 | if (!file.is_open()) 9 | { 10 | Log::GetLog()->error("Failed to load config.json"); 11 | throw; 12 | } 13 | 14 | nlohmann::json Config; 15 | 16 | try 17 | { 18 | file >> Config; 19 | } 20 | catch (const std::exception& error) 21 | { 22 | Log::GetLog()->error(error.what()); 23 | throw; 24 | } 25 | 26 | file.close(); 27 | int i = 0; 28 | StaffOnly = Config["StaffOnly"]; 29 | auto MessagesConfig = Config["Messages"]; 30 | for (nlohmann::json::iterator it = MessagesConfig.begin(); it != MessagesConfig.end(); ++it) 31 | { 32 | Messages[i++] = ArkApi::Tools::Utf8Decode(*it); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Ping Limiter/PingLimiter/PingLimiter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | inline std::wstring Messages[5]; 6 | int PingLimit = 120, CheckPingSecondsInteval = 60000, TotalPingStrikes = 5; 7 | bool DisplayWarningsToUsers = true; 8 | 9 | struct PingLimitData 10 | { 11 | uint64 PlayerID; 12 | DWORD PingStrikeTimeout; 13 | int Strike; 14 | 15 | PingLimitData(const uint64 PlayerID, const DWORD PingStrikeTimeout) : PlayerID(PlayerID), PingStrikeTimeout(PingStrikeTimeout), Strike(1) {} 16 | bool HasPingTimedOut(DWORD nNowTime) { return nNowTime > PingStrikeTimeout; } 17 | }; 18 | std::vector pingData; 19 | std::vector::iterator GetPingData(const uint64 PlayerID) { return std::find_if(pingData.begin(), pingData.end(), [PlayerID](const PingLimitData& ping) -> bool { return ping.PlayerID == PlayerID; }); } 20 | std::vector::iterator PingItr; -------------------------------------------------------------------------------- /SafeZone/SafeZone.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2036 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SafeZone", "SafeZone\SafeZone.vcxproj", "{47717CFF-70CC-445D-8BB0-FBD1EE5C6DB0}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Release|x64 = Release|x64 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {47717CFF-70CC-445D-8BB0-FBD1EE5C6DB0}.Release|x64.ActiveCfg = Release|x64 14 | {47717CFF-70CC-445D-8BB0-FBD1EE5C6DB0}.Release|x64.Build.0 = Release|x64 15 | EndGlobalSection 16 | GlobalSection(SolutionProperties) = preSolution 17 | HideSolutionNode = FALSE 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityGlobals) = postSolution 20 | SolutionGuid = {DDFC05C2-CD1A-4E0B-8812-06DFDD326886} 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /PlayerList/PlayerList.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlayerList", "PlayerList\PlayerList.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Release|x64 = Release|x64 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 14 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 15 | EndGlobalSection 16 | GlobalSection(SolutionProperties) = preSolution 17 | HideSolutionNode = FALSE 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityGlobals) = postSolution 20 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /DinoTracker/DinoTracker/DinoTrackerConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DinoTracker.h" 4 | 5 | #include 6 | #include "json.hpp" 7 | 8 | inline void InitConfig() 9 | { 10 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/DinoTracker/config.json"); 11 | if (!file.is_open()) 12 | { 13 | Log::GetLog()->error("Failed to load config.json"); 14 | throw; 15 | } 16 | 17 | nlohmann::json Config; 18 | 19 | try 20 | { 21 | file >> Config; 22 | } 23 | catch (const std::exception& error) 24 | { 25 | Log::GetLog()->error(error.what()); 26 | throw; 27 | } 28 | 29 | file.close(); 30 | 31 | PlayerCanTrack = Config["DinoTracker"]["PlayersCanTrack"]; 32 | MaxDistance = Config["DinoTracker"]["MaxDistance"]; 33 | 34 | int i = 0; 35 | 36 | auto MessagesConfig = Config["Messages"]; 37 | for (nlohmann::json::iterator it = MessagesConfig.begin(); it != MessagesConfig.end(); ++it) 38 | { 39 | Messages[i++] = ArkApi::Tools::Utf8Decode(*it); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /PVPScheduler/PVPScheduler.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27428.2037 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PVPScheduler", "PVPScheduler\PVPScheduler.vcxproj", "{825AEB15-4894-46B9-AB08-705667D8E848}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Release|x64 = Release|x64 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {825AEB15-4894-46B9-AB08-705667D8E848}.Release|x64.ActiveCfg = Release|x64 14 | {825AEB15-4894-46B9-AB08-705667D8E848}.Release|x64.Build.0 = Release|x64 15 | EndGlobalSection 16 | GlobalSection(SolutionProperties) = preSolution 17 | HideSolutionNode = FALSE 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityGlobals) = postSolution 20 | SolutionGuid = {1FFA35C5-84CA-48CB-AA9E-7AA4390F1999} 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Mutes/Mutes/MuteConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "json.hpp" 4 | 5 | void InitConfig(bool Reload) 6 | { 7 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/Mutes/config.json"); 8 | nlohmann::json MuteConfigData; 9 | std::string Data; 10 | 11 | if (!file.is_open()) return; 12 | file >> MuteConfigData; 13 | file.close(); 14 | 15 | if (Reload) 16 | BadWord.Empty(); 17 | 18 | DBPath = MuteConfigData["Mutes"].value("DBOverride", ""); 19 | 20 | SyncSeconds = MuteConfigData["Mutes"].value("DBSyncSeconds", 60); 21 | 22 | const auto& BLItemMap = MuteConfigData["Mutes"]["BlackList"]; 23 | for (const auto& szitem : BLItemMap) 24 | { 25 | Data = szitem["Word"]; 26 | BadWord.Add(BadWords(ArkApi::Tools::Utf8Decode(Data), szitem["Minutes"])); 27 | } 28 | 29 | int j = 0; 30 | const auto& Msgs = MuteConfigData["Mutes"]["Messages"]; 31 | for (const auto& Msg : Msgs) 32 | { 33 | Data = Msg; 34 | Messages[j++] = ArkApi::Tools::Utf8Decode(Data).c_str(); 35 | } 36 | } -------------------------------------------------------------------------------- /DinoColourCommand/DinoColourCommand.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2010 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DinoColourCommand", "DinoColourCommand\DinoColourCommand.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Release|x64 = Release|x64 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 14 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 15 | EndGlobalSection 16 | GlobalSection(SolutionProperties) = preSolution 17 | HideSolutionNode = FALSE 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityGlobals) = postSolution 20 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /EventManager/Events/TDMEvent/TDMEvent.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Header Files 16 | 17 | 18 | Header Files 19 | 20 | 21 | 22 | 23 | Source Files 24 | 25 | 26 | -------------------------------------------------------------------------------- /Ping Limiter/PingLimiter/PingLimiterConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "json.hpp" 4 | 5 | inline void InitConfig() 6 | { 7 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/PingLimiter/config.json"); 8 | if (!file.is_open()) 9 | { 10 | Log::GetLog()->error("Failed to load config.json"); 11 | throw; 12 | } 13 | 14 | nlohmann::json Config; 15 | 16 | try 17 | { 18 | file >> Config; 19 | } 20 | catch (const std::exception& error) 21 | { 22 | Log::GetLog()->error(error.what()); 23 | throw; 24 | } 25 | 26 | file.close(); 27 | PingLimit = Config["PingLimit"]; 28 | TotalPingStrikes = Config["TotalPingStrikes"]; 29 | CheckPingSecondsInteval = Config["CheckPingSecondsInteval"]; 30 | DisplayWarningsToUsers = Config["DisplayWarningsToUsers"]; 31 | int i = 0; 32 | auto MessagesConfig = Config["Messages"]; 33 | for (nlohmann::json::iterator it = MessagesConfig.begin(); it != MessagesConfig.end(); ++it) 34 | { 35 | Messages[i++] = ArkApi::Tools::Utf8Decode(*it); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /EventManager/Events/DeathmatchEvent/DeathmatchEvent.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | 14 | 15 | Header Files 16 | 17 | 18 | Header Files 19 | 20 | 21 | 22 | 23 | Source Files 24 | 25 | 26 | -------------------------------------------------------------------------------- /SafeZone/SafeZone/Private/SzTools.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "windows.h" 4 | 5 | namespace SafeZones::Tools 6 | { 7 | class Timer 8 | { 9 | public: 10 | template 11 | Timer(int after, bool async, callable&& f, arguments&&... args) 12 | { 13 | std::function::type()> task(std::bind(std::forward(f), std::forward(args)...)); 14 | 15 | if (async) 16 | { 17 | std::thread([after, task]() 18 | { 19 | std::this_thread::sleep_for(std::chrono::milliseconds(after)); 20 | task(); 21 | }).detach(); 22 | } 23 | else 24 | { 25 | std::this_thread::sleep_for(std::chrono::milliseconds(after)); 26 | task(); 27 | } 28 | } 29 | }; 30 | 31 | inline int GetRandomNumber(int min, int max) 32 | { 33 | const int n = max - min + 1; 34 | const int remainder = RAND_MAX % n; 35 | int x; 36 | 37 | do 38 | { 39 | x = rand(); 40 | } 41 | while (x >= RAND_MAX - remainder); 42 | 43 | return min + x % n; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Async SaveWorld/Async SaveWorld/Async SaveWorldHooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | DECLARE_HOOK(AShooterGameMode_SaveWorld, void, AShooterGameMode *); 3 | bool Saving = false; 4 | 5 | void InitHooks() 6 | { 7 | ArkApi::GetHooks().SetHook("AShooterGameMode.SaveWorld", &Hook_AShooterGameMode_SaveWorld, &AShooterGameMode_SaveWorld_original); 8 | } 9 | 10 | void RemoveHooks() 11 | { 12 | ArkApi::GetHooks().DisableHook("AShooterGameMode.SaveWorld", &Hook_AShooterGameMode_SaveWorld); 13 | } 14 | 15 | void Hook_AShooterGameMode_SaveWorld(AShooterGameMode* aShooterGameMode) 16 | { 17 | if (Saving) 18 | { 19 | Log::GetLog()->warn("World Already Saving!"); 20 | return; 21 | } 22 | Saving = true; 23 | SaveThread = std::thread([aShooterGameMode]() 24 | { 25 | __try 26 | { 27 | AShooterGameMode_SaveWorld_original(aShooterGameMode); 28 | } 29 | __except (EXCEPTION_EXECUTE_HANDLER) 30 | { Log::GetLog()->error("Error failed to save!"); } 31 | Saving = false; 32 | }); 33 | 34 | if (CPUAffinityEnabled) SetThreadAffinityMask(SaveThread.native_handle(), CPUAffinityMask); 35 | SaveThread.detach(); 36 | } -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/Database/DbManager.cpp: -------------------------------------------------------------------------------- 1 | #include "DbManager.h" 2 | 3 | #include 4 | 5 | 6 | namespace ArkShop::DbManager 7 | { 8 | sqlite::database& GetDb() 9 | { 10 | static sqlite::database db(config["General"].value("DbPathOverride", "").empty() 11 | ? ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/ArkShop/ArkShop.db" 12 | : config["General"]["DbPathOverride"]); 13 | return db; 14 | } 15 | 16 | void CreateDatabase() 17 | { 18 | auto& db = GetDb(); 19 | 20 | db << "create table if not exists Players (" 21 | "Id integer primary key autoincrement not null," 22 | "SteamId integer default 0," 23 | "Kits text default '{}'," 24 | "Points integer default 0" 25 | ");"; 26 | } 27 | 28 | bool TryAddNewPlayer(const uint64 steam_id) 29 | { 30 | auto& db = GetDb(); 31 | 32 | try 33 | { 34 | db << "INSERT INTO Players (SteamId) VALUES (?);" 35 | << steam_id; 36 | return true; 37 | } 38 | catch (const sqlite::sqlite_exception& exception) 39 | { 40 | Log::GetLog()->error("({} {}) Unexpected DB error {}", __FILE__, __FUNCTION__, exception.what()); 41 | return false; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /EventManager/EventManager/EventManager.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {d0e77c45-0ae5-4784-b839-bf0c4d2d43de} 6 | 7 | 8 | {0fd0f479-0cf9-4225-9c55-ebd9c5bcba10} 9 | 10 | 11 | 12 | 13 | Private 14 | 15 | 16 | Public 17 | 18 | 19 | Public 20 | 21 | 22 | Private 23 | 24 | 25 | 26 | 27 | 28 | Private 29 | 30 | 31 | -------------------------------------------------------------------------------- /PrivateMessage/PrivateMessage/PrivateMessageConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "json.hpp" 4 | 5 | void InitConfig() 6 | { 7 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/PrivateMessage/config.json"); 8 | if (!file.is_open()) 9 | { 10 | ServerMessage = false; 11 | ServerMessageRGB[1] = 255; 12 | return; 13 | } 14 | nlohmann::json PrivateMessageConfig; 15 | file >> PrivateMessageConfig; 16 | file.close(); 17 | ServerMessage = PrivateMessageConfig["PrivateMessage"]["ServerMessage"]; 18 | 19 | std::string Data = PrivateMessageConfig["PrivateMessage"].value("PmPrefixStart", "[PM"); 20 | PmPrefixStart = ArkApi::Tools::Utf8Decode(Data).c_str(); 21 | 22 | Data = PrivateMessageConfig["PrivateMessage"].value("PmPrefixMiddle", "->"); 23 | PmPrefixMiddle = ArkApi::Tools::Utf8Decode(Data).c_str(); 24 | 25 | Data = PrivateMessageConfig["PrivateMessage"].value("PmPrefixEnd", "] "); 26 | PmPrefixEnd = ArkApi::Tools::Utf8Decode(Data).c_str(); 27 | 28 | nlohmann::json ServRGB = PrivateMessageConfig["PrivateMessage"]["ServerMessageRGB"]; 29 | for (int i = 0; i < 3; i++) 30 | ServerMessageRGB[i] = ServRGB[i]; 31 | } -------------------------------------------------------------------------------- /SafeZone/SafeZone/SafeZone.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2036 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SafeZone", "SafeZone\SafeZone.vcxproj", "{47717CFF-70CC-445D-8BB0-FBD1EE5C6DB0}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Release|x64 = Release|x64 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {47717CFF-70CC-445D-8BB0-FBD1EE5C6DB0}.Debug|x64.ActiveCfg = Debug|x64 15 | {47717CFF-70CC-445D-8BB0-FBD1EE5C6DB0}.Debug|x64.Build.0 = Debug|x64 16 | {47717CFF-70CC-445D-8BB0-FBD1EE5C6DB0}.Release|x64.ActiveCfg = Release|x64 17 | {47717CFF-70CC-445D-8BB0-FBD1EE5C6DB0}.Release|x64.Build.0 = Release|x64 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {DDFC05C2-CD1A-4E0B-8812-06DFDD326886} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /PrivateMessage/PrivateMessage/PrivateMessage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "API\ARK\Ark.h" 4 | bool ServerMessage; 5 | std::wstring PmPrefixStart, PmPrefixMiddle, PmPrefixEnd; 6 | float ServerMessageRGB[4] = { 0, 0, 0, 1 }; 7 | 8 | struct PlayerS 9 | { 10 | __int64 SteamID, LastPmSteamID; 11 | PlayerS(__int64 SteamID) 12 | { 13 | this->SteamID = SteamID; 14 | this->LastPmSteamID = -1; 15 | } 16 | }; 17 | 18 | typedef std::vector PlayerArray; 19 | typedef PlayerArray::iterator PlayerArrayItr; 20 | PlayerArray Players; 21 | 22 | PlayerS* GetPlayer(__int64 SteamID) 23 | { 24 | PlayerArrayItr player = std::find_if(Players.begin(), Players.end(), [SteamID](const PlayerS & ps) -> bool { return ps.SteamID == SteamID; }); 25 | if (player != Players.end()) return &(*player); 26 | else 27 | { 28 | Players.push_back(PlayerS(SteamID)); 29 | return &(*(Players.end()-1)); 30 | } 31 | } 32 | 33 | void RemovePlayer(__int64 SteamID) 34 | { 35 | PlayerArrayItr player = std::find_if(Players.begin(), Players.end(), [SteamID](const PlayerS & ps) -> bool { return ps.SteamID == SteamID; }); 36 | if (player != Players.end()) Players.erase(player); 37 | } -------------------------------------------------------------------------------- /ArkShop/ArkShop/Public/Points.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Base.h" 4 | 5 | namespace ArkShop::Points 6 | { 7 | void Init(); 8 | 9 | /** 10 | * \brief Add points to the specific player 11 | * \param amount Amount of points to add 12 | * \param steam_id Players steam id 13 | * \return True if success, false otherwise 14 | */ 15 | SHOP_API bool AddPoints(int amount, uint64 steam_id); 16 | 17 | /** 18 | * \brief Subtracts points from the specific player 19 | * \param amount Amount of points 20 | * \param steam_id Players steam id 21 | * \return True if success, false otherwise 22 | */ 23 | SHOP_API bool SpendPoints(int amount, uint64 steam_id); 24 | 25 | /** 26 | * \brief Receives points from the specific player 27 | * \param steam_id Players steam id 28 | * \return Amount of points the player has 29 | */ 30 | SHOP_API int GetPoints(uint64 steam_id); 31 | 32 | /** 33 | * \brief Change points amount for the specific player 34 | * \param steam_id Players steam id 35 | * \param new_amount New amount of points 36 | * \return True if success, false otherwise 37 | */ 38 | SHOP_API bool SetPoints(uint64 steam_id, int new_amount); 39 | } // namespace Points // namespace ArkShop 40 | -------------------------------------------------------------------------------- /WeekendRates/WeekendRates/WeekendRatesCommands.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | inline void ReloadConfig(AShooterPlayerController* player, FString* message, int mode) 6 | { 7 | if (!player || !player->PlayerStateField() || !player->GetPlayerCharacter() || 8 | !player->GetPlayerCharacter()->bIsServerAdminField()) 9 | return; 10 | 11 | InitConfig(); 12 | ArkApi::GetApiUtils().SendServerMessage(player, FColorList::Green, "Config Reloaded!"); 13 | } 14 | 15 | inline void ReloadConfigCon(APlayerController* player_controller, FString* message, bool lol) 16 | { 17 | AShooterPlayerController* shooter_controller = static_cast(player_controller); 18 | InitConfig(); 19 | ArkApi::GetApiUtils().SendServerMessage(shooter_controller, FColorList::Green, "Config Reloaded!"); 20 | } 21 | 22 | inline void InitCommands() 23 | { 24 | ArkApi::GetCommands().AddChatCommand("/wrreload", &ReloadConfig); 25 | ArkApi::GetCommands().AddConsoleCommand("wrreload", &ReloadConfigCon); 26 | } 27 | 28 | inline void RemoveCommands() 29 | { 30 | ArkApi::GetCommands().RemoveChatCommand("/wrreload"); 31 | ArkApi::GetCommands().RemoveChatCommand("wrreload"); 32 | } 33 | -------------------------------------------------------------------------------- /PluginUpdateChecker/PluginUpdateChecker/PluginUpdateChecker.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {b2d46d29-29b4-427c-ae32-c7fcea11cd37} 14 | 15 | 16 | 17 | 18 | Header Files\Includes 19 | 20 | 21 | Header Files 22 | 23 | 24 | 25 | 26 | Source Files 27 | 28 | 29 | -------------------------------------------------------------------------------- /EventManager/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "EventManager":{ 3 | "ServerName":"ServerNameHere", 4 | "JoinCommand":"/join", 5 | "LeaveCommand":"/leave", 6 | "AdminStartEventConsoleCommand":"startevent", 7 | "EventStartAuto":true, 8 | "EventStartMinuteMin":45, 9 | "EventStartMinuteMax":60, 10 | "StartEventOnServerStart":true, 11 | "DebugLogToConsole":true, 12 | "Messages":[ 13 | "{} has joined {} event queue!", 14 | "To leave the queue type /leave", 15 | "you are already in the {} event queue!", 16 | "{} has left {} event queue!", 17 | "You left {} event queue!", 18 | "you are not in the {} event queue!", 19 | "{} event Started!", 20 | "{} event is already running!", 21 | "You can't join the event while dead!", 22 | "Inventory not found.", 23 | "You must be naked! ({})" 24 | ] 25 | } 26 | } -------------------------------------------------------------------------------- /Mutes/Mutes/Mutes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "API\ARK\Ark.h" 4 | #include "hdr/sqlite_modern_cpp.h" 5 | std::string DBPath; 6 | 7 | sqlite::database& GetDB() 8 | { 9 | static sqlite::database db((DBPath.empty() ? ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/Mutes/Mutes.db" : DBPath)); 10 | return db; 11 | } 12 | 13 | FString Messages[5]; 14 | int SyncSeconds = 60; 15 | 16 | AShooterPlayerController* FindPlayerFromCharacterName(const FString& character_name) 17 | { 18 | const int NameLength = character_name.Len(); 19 | int LastNameLenDiff = 999; 20 | FString char_name; 21 | AShooterPlayerController* Player = nullptr, *PlayerCon; 22 | const auto& player_controllers = ArkApi::GetApiUtils().GetWorld()->PlayerControllerListField(); 23 | for (TWeakObjectPtr player_controller : player_controllers) 24 | { 25 | PlayerCon = static_cast(player_controller.Get()); 26 | if (!PlayerCon) continue; 27 | char_name = ArkApi::GetApiUtils().GetCharacterName(PlayerCon); 28 | if (!char_name.IsEmpty() && char_name.StartsWith(character_name, ESearchCase::Type::IgnoreCase) && LastNameLenDiff > (char_name.Len() - NameLength)) 29 | { 30 | Player = PlayerCon; 31 | LastNameLenDiff = char_name.Len() - NameLength; 32 | } 33 | } 34 | return Player; 35 | } -------------------------------------------------------------------------------- /KillFeed/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "KillFeed":{ 3 | "ServerName":"ServerNameHere", 4 | "PlayerKillsEnabled":true, 5 | "TamedDinoKillsEnabled":true, 6 | "DisplaySameTribeKills":false, 7 | "DisplayType":0, 8 | "DisplayScale":1.0, 9 | "DisplayDelay":10, 10 | "DisplayColour":[ 11 | 0.0, 12 | 0.8, 13 | 0.8, 14 | 1.0 15 | ], 16 | "DisplayDistance":false, 17 | "DisplayInChatbox":true, 18 | "Messages":[ 19 | "{KillerTribe}{KillerName} Killed {VictimTribe}{VictimName} with a {WeaponName}", 20 | "{KillerTribe}{KillerName} Killed Dino: {VictimTribe}{VictimName} with a {WeaponName}", 21 | "{KillerTribe}{KillerName}{KillerDinoName} Killed {VictimTribe}{VictimName}", 22 | "{KillerTribe}{KillerName}{KillerDinoName} Killed Dino: {VictimTribe}{VictimName}", 23 | "{KillerTribe}{KillerName} Killed {VictimTribe}{VictimName} with a {WeaponName} at {Distance}m", 24 | "{KillerTribe}{KillerName} Killed Dino: {VictimTribe}{VictimName} with a {WeaponName} at {Distance}m", 25 | "{KillerTribe}{KillerName}{KillerDinoName} Killed {VictimTribe}{VictimName} at {Distance}m", 26 | "{KillerTribe}{KillerName}{KillerDinoName} Killed Dino: {VictimTribe}{VictimName} at {Distance}m" 27 | ] 28 | } 29 | } -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/ShopLog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Logger/spdlog/spdlog.h" 4 | #include 5 | #include 6 | 7 | class ShopLog 8 | { 9 | public: 10 | ShopLog(const ShopLog&) = delete; 11 | ShopLog(ShopLog&&) = delete; 12 | ShopLog& operator=(const ShopLog&) = delete; 13 | ShopLog& operator=(ShopLog&&) = delete; 14 | 15 | static ShopLog& Get() 16 | { 17 | static ShopLog instance; 18 | return instance; 19 | } 20 | 21 | static std::shared_ptr& GetLog() 22 | { 23 | return Get().logger_; 24 | } 25 | 26 | private: 27 | ShopLog() 28 | { 29 | try 30 | { 31 | FString map_name; 32 | ArkApi::GetApiUtils().GetShooterGameMode()->GetMapName(&map_name); 33 | 34 | auto sink = std::make_shared( 35 | ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/ArkShop/ShopLog_" + ArkApi::Tools:: 36 | Utf8Encode(*map_name) + ".log", 37 | 1024 * 1024, 5); 38 | 39 | logger_ = std::make_shared("ArkShop", sink); 40 | 41 | logger_->set_pattern("%D %R [%l] %v"); 42 | logger_->flush_on(spdlog::level::info); 43 | } 44 | catch (const std::exception&) 45 | { 46 | std::cout << "Failed to create log file\n"; 47 | } 48 | } 49 | 50 | ~ShopLog() = default; 51 | 52 | std::shared_ptr logger_; 53 | }; 54 | -------------------------------------------------------------------------------- /GameConfigManager/GameConfigManager/GameConfigManager.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Header Files 25 | 26 | 27 | Header Files 28 | 29 | 30 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/TimedRewards.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "ArkShop.h" 6 | #include "Base.h" 7 | 8 | namespace ArkShop 9 | { 10 | /** 11 | * \brief Added players will be receiving points every n minutes 12 | */ 13 | class TimedRewards 14 | { 15 | public: 16 | static TimedRewards& Get(); 17 | 18 | TimedRewards(const TimedRewards&) = delete; 19 | TimedRewards(TimedRewards&&) = delete; 20 | TimedRewards& operator=(const TimedRewards&) = delete; 21 | TimedRewards& operator=(TimedRewards&&) = delete; 22 | 23 | void AddPlayer(uint64 steam_id); 24 | void RemovePlayer(uint64 steam_id); 25 | 26 | private: 27 | struct OnlinePlayersData 28 | { 29 | OnlinePlayersData(uint64 steam_id, int points_amount, 30 | const std::chrono::time_point& next_reward_time) 31 | : steam_id(steam_id), 32 | points_amount(points_amount), 33 | next_reward_time(next_reward_time) 34 | { 35 | } 36 | 37 | uint64 steam_id; 38 | int points_amount; 39 | std::chrono::time_point next_reward_time; 40 | }; 41 | 42 | TimedRewards(); 43 | ~TimedRewards() = default; 44 | 45 | void RewardTimer(); 46 | 47 | int points_interval_; 48 | std::vector> online_players_; 49 | }; 50 | } // namespace ArkShop 51 | -------------------------------------------------------------------------------- /WeekendRates/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "WeekendRates":{ 3 | "ServerName":"ServerNameHere", 4 | "Notification":true, 5 | "Chatbox":true, 6 | "WeekendRatesEnabledRGB":[ 7 | 0, 8 | 1, 9 | 0, 10 | 1 11 | ], 12 | "WeekendRatesEnabledMessage":"Double Weekend Rates Active (Xp, Taming, Resources)", 13 | "WeekendRatesDisabledRGB":[ 14 | 1, 15 | 0, 16 | 0, 17 | 1 18 | ], 19 | "WeekendRatesDisabledMessage":"Double Weekend Rates Disabled", 20 | "MOTDChangeEnabled":true, 21 | "WeekendMOTD":"Double Weekend (Xp, Taming, Resources)", 22 | "NormalMOTD":"Welcome to back", 23 | "StartDay":6, 24 | "EndDay":1, 25 | "XPMultiplier":4.0, 26 | "TamingSpeedMultiplier":2.0, 27 | "HarvestAmountMultiplier":4.0, 28 | "HarvestHealthMultiplier":1.0, 29 | "CraftXPMultiplier":1.0, 30 | "FishingLootQualityMultiplier":1.0, 31 | "BabyMatureSpeedMultiplier":1.0, 32 | "MateBoostEffectMultiplier":1.0, 33 | "MatingIntervalMultiplier":1.0, 34 | "MatingSpeedMultiplier":1.0, 35 | "EggHatchSpeedMultiplier":1.0, 36 | "LayEggIntervalMultiplier":1.0, 37 | "ResourcesRespawnPeriodMultiplier":1.0, 38 | "SupplyCrateLootQualityMultiplier":1.0, 39 | "StructureResistanceMultiplier":1.0 40 | } 41 | } -------------------------------------------------------------------------------- /WeekendRates/x64/Release/WeekendRates/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "WeekendRates":{ 3 | "ServerName":"ServerNameHere", 4 | "Notification":true, 5 | "Chatbox":true, 6 | "WeekendRatesEnabledRGB":[ 7 | 0, 8 | 1, 9 | 0, 10 | 1 11 | ], 12 | "WeekendRatesEnabledMessage":"Double Weekend Rates Active (Xp, Taming, Resources)", 13 | "WeekendRatesDisabledRGB":[ 14 | 1, 15 | 0, 16 | 0, 17 | 1 18 | ], 19 | "WeekendRatesDisabledMessage":"Double Weekend Rates Disabled", 20 | "MOTDChangeEnabled":true, 21 | "WeekendMOTD":"Double Weekend (Xp, Taming, Resources)", 22 | "NormalMOTD":"Welcome to back", 23 | "StartDay":6, 24 | "EndDay":1, 25 | "XPMultiplier":4.0, 26 | "TamingSpeedMultiplier":2.0, 27 | "HarvestAmountMultiplier":4.0, 28 | "HarvestHealthMultiplier":1.0, 29 | "CraftXPMultiplier":1.0, 30 | "FishingLootQualityMultiplier":1.0, 31 | "BabyMatureSpeedMultiplier":1.0, 32 | "MateBoostEffectMultiplier":1.0, 33 | "MatingIntervalMultiplier":1.0, 34 | "MatingSpeedMultiplier":1.0, 35 | "EggHatchSpeedMultiplier":1.0, 36 | "LayEggIntervalMultiplier":1.0, 37 | "ResourcesRespawnPeriodMultiplier":1.0, 38 | "SupplyCrateLootQualityMultiplier":1.0, 39 | "StructureResistanceMultiplier":1.0 40 | } 41 | } -------------------------------------------------------------------------------- /VoteRewards/VoteRewards/VoteRewards.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | 29 | 30 | Source Files 31 | 32 | 33 | -------------------------------------------------------------------------------- /Mutes/Mutes/hdr/sqlite_modern_cpp/sqlcipher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef SQLITE_HAS_CODEC 4 | #define SQLITE_HAS_CODEC 5 | #endif 6 | 7 | #include "../sqlite_modern_cpp.h" 8 | 9 | namespace sqlite { 10 | struct sqlcipher_config : public sqlite_config { 11 | std::string key; 12 | }; 13 | 14 | class sqlcipher_database : public database { 15 | public: 16 | sqlcipher_database(std::string db, const sqlcipher_config &config): database(db, config) { 17 | set_key(config.key); 18 | } 19 | 20 | sqlcipher_database(std::u16string db, const sqlcipher_config &config): database(db, config) { 21 | set_key(config.key); 22 | } 23 | 24 | void set_key(const std::string &key) { 25 | if(auto ret = sqlite3_key(_db.get(), key.data(), key.size())) 26 | errors::throw_sqlite_error(ret); 27 | } 28 | 29 | void set_key(const std::string &key, const std::string &db_name) { 30 | if(auto ret = sqlite3_key_v2(_db.get(), db_name.c_str(), key.data(), key.size())) 31 | errors::throw_sqlite_error(ret); 32 | } 33 | 34 | void rekey(const std::string &new_key) { 35 | if(auto ret = sqlite3_rekey(_db.get(), new_key.data(), new_key.size())) 36 | errors::throw_sqlite_error(ret); 37 | } 38 | 39 | void rekey(const std::string &new_key, const std::string &db_name) { 40 | if(auto ret = sqlite3_rekey_v2(_db.get(), db_name.c_str(), new_key.data(), new_key.size())) 41 | errors::throw_sqlite_error(ret); 42 | } 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/Database/PointsRepository.cpp: -------------------------------------------------------------------------------- 1 | #include "PointsRepository.h" 2 | #include "DbManager.h" 3 | 4 | namespace ArkShop::PointsRepository 5 | { 6 | int GetPoints(const uint64 steam_id) 7 | { 8 | auto& db = DbManager::GetDb(); 9 | int points = 0; 10 | 11 | try 12 | { 13 | db << "SELECT Points FROM Players WHERE SteamId = ?;" << steam_id >> points; 14 | } 15 | catch (const sqlite::sqlite_exception& exception) 16 | { 17 | Log::GetLog()->error("({} {}) Unexpected DB error {}", __FILE__, __FUNCTION__, exception.what()); 18 | } 19 | 20 | return points; 21 | } 22 | 23 | bool SetPoints(const uint64 steam_id, const int amount) 24 | { 25 | auto& db = DbManager::GetDb(); 26 | 27 | try 28 | { 29 | db << "UPDATE Players SET Points = ? WHERE SteamId = ?;" << amount << steam_id; 30 | return true; 31 | } 32 | catch (const sqlite::sqlite_exception& exception) 33 | { 34 | Log::GetLog()->error("({} {}) Unexpected DB error {}", __FILE__, __FUNCTION__, exception.what()); 35 | return false; 36 | } 37 | } 38 | 39 | bool DeleteAllPoint() 40 | { 41 | auto& db = DbManager::GetDb(); 42 | 43 | try 44 | { 45 | db << "UPDATE Players SET Points = 0;"; 46 | return true; 47 | } 48 | catch (const sqlite::sqlite_exception& exception) 49 | { 50 | Log::GetLog()->error("({} {}) Unexpected DB error {}", __FILE__, __FUNCTION__, exception.what()); 51 | return false; 52 | } 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/hdr/sqlite_modern_cpp/sqlcipher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef SQLITE_HAS_CODEC 4 | #define SQLITE_HAS_CODEC 5 | #endif 6 | 7 | #include "../sqlite_modern_cpp.h" 8 | 9 | namespace sqlite { 10 | struct sqlcipher_config : public sqlite_config { 11 | std::string key; 12 | }; 13 | 14 | class sqlcipher_database : public database { 15 | public: 16 | sqlcipher_database(std::string db, const sqlcipher_config &config): database(db, config) { 17 | set_key(config.key); 18 | } 19 | 20 | sqlcipher_database(std::u16string db, const sqlcipher_config &config): database(db, config) { 21 | set_key(config.key); 22 | } 23 | 24 | void set_key(const std::string &key) { 25 | if(auto ret = sqlite3_key(_db.get(), key.data(), key.size())) 26 | errors::throw_sqlite_error(ret); 27 | } 28 | 29 | void set_key(const std::string &key, const std::string &db_name) { 30 | if(auto ret = sqlite3_key_v2(_db.get(), db_name.c_str(), key.data(), key.size())) 31 | errors::throw_sqlite_error(ret); 32 | } 33 | 34 | void rekey(const std::string &new_key) { 35 | if(auto ret = sqlite3_rekey(_db.get(), new_key.data(), new_key.size())) 36 | errors::throw_sqlite_error(ret); 37 | } 38 | 39 | void rekey(const std::string &new_key, const std::string &db_name) { 40 | if(auto ret = sqlite3_rekey_v2(_db.get(), db_name.c_str(), new_key.data(), new_key.size())) 41 | errors::throw_sqlite_error(ret); 42 | } 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /Mutes/Mutes/hdr/sqlite_modern_cpp/utility/function_traits.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace sqlite { 7 | namespace utility { 8 | 9 | template struct function_traits; 10 | 11 | template 12 | struct function_traits : public function_traits< 13 | decltype(&std::remove_reference::type::operator()) 14 | > { }; 15 | 16 | template < 17 | typename ClassType, 18 | typename ReturnType, 19 | typename... Arguments 20 | > 21 | struct function_traits< 22 | ReturnType(ClassType::*)(Arguments...) const 23 | > : function_traits { }; 24 | 25 | /* support the non-const operator () 26 | * this will work with user defined functors */ 27 | template < 28 | typename ClassType, 29 | typename ReturnType, 30 | typename... Arguments 31 | > 32 | struct function_traits< 33 | ReturnType(ClassType::*)(Arguments...) 34 | > : function_traits { }; 35 | 36 | template < 37 | typename ReturnType, 38 | typename... Arguments 39 | > 40 | struct function_traits< 41 | ReturnType(*)(Arguments...) 42 | > { 43 | typedef ReturnType result_type; 44 | 45 | template 46 | using argument = typename std::tuple_element< 47 | Index, 48 | std::tuple 49 | >::type; 50 | 51 | static const std::size_t arity = sizeof...(Arguments); 52 | }; 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/Database/KitRepository.cpp: -------------------------------------------------------------------------------- 1 | #include "KitRepository.h" 2 | #include "DbManager.h" 3 | 4 | namespace ArkShop::KitRepository 5 | { 6 | std::string GetPlayerKits(const uint64 steam_id) 7 | { 8 | auto& db = DbManager::GetDb(); 9 | 10 | std::string kits_config = "{}"; 11 | 12 | try 13 | { 14 | db << "SELECT Kits FROM Players WHERE SteamId = ?;" << steam_id >> kits_config; 15 | } 16 | catch (const sqlite::sqlite_exception& exception) 17 | { 18 | Log::GetLog()->error("({} {}) Unexpected DB error {}", __FILE__, __FUNCTION__, exception.what()); 19 | } 20 | 21 | return kits_config; 22 | } 23 | 24 | bool UpdatePlayerKits(const uint64 steam_id, const std::string kits_data) 25 | { 26 | auto& db = DbManager::GetDb(); 27 | 28 | try 29 | { 30 | db << "UPDATE Players SET Kits = ? WHERE SteamId = ?;" << kits_data << steam_id; 31 | return true; 32 | } 33 | catch (const sqlite::sqlite_exception& exception) 34 | { 35 | Log::GetLog()->error("({} {}) Unexpected DB error {}", __FILE__, __FUNCTION__, exception.what()); 36 | return false; 37 | } 38 | } 39 | 40 | bool DeleteAllKits() 41 | { 42 | auto& db = DbManager::GetDb(); 43 | 44 | try 45 | { 46 | db << "UPDATE Players SET Kits = \"{}\";"; 47 | return true; 48 | } 49 | catch (const sqlite::sqlite_exception& exception) 50 | { 51 | Log::GetLog()->error("({} {}) Unexpected DB error {}", __FILE__, __FUNCTION__, exception.what()); 52 | return false; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/hdr/sqlite_modern_cpp/utility/function_traits.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace sqlite { 7 | namespace utility { 8 | 9 | template struct function_traits; 10 | 11 | template 12 | struct function_traits : public function_traits< 13 | decltype(&std::remove_reference::type::operator()) 14 | > { }; 15 | 16 | template < 17 | typename ClassType, 18 | typename ReturnType, 19 | typename... Arguments 20 | > 21 | struct function_traits< 22 | ReturnType(ClassType::*)(Arguments...) const 23 | > : function_traits { }; 24 | 25 | /* support the non-const operator () 26 | * this will work with user defined functors */ 27 | template < 28 | typename ClassType, 29 | typename ReturnType, 30 | typename... Arguments 31 | > 32 | struct function_traits< 33 | ReturnType(ClassType::*)(Arguments...) 34 | > : function_traits { }; 35 | 36 | template < 37 | typename ReturnType, 38 | typename... Arguments 39 | > 40 | struct function_traits< 41 | ReturnType(*)(Arguments...) 42 | > { 43 | typedef ReturnType result_type; 44 | 45 | template 46 | using argument = typename std::tuple_element< 47 | Index, 48 | std::tuple 49 | >::type; 50 | 51 | static const std::size_t arity = sizeof...(Arguments); 52 | }; 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Mutes/Mutes.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2010 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mutes", "Mutes\Mutes.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 17 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 18 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /KillFeed/KillFeed.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KillFeed", "KillFeed\KillFeed.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 17 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 18 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Teleport/Teleport.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2010 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Teleport", "Teleport\Teleport.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 17 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 18 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Teleport/Teleport/TeleportHooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | DECLARE_HOOK(AShooterGameMode_Logout, void, AShooterGameMode*, AController*); 3 | void CleanUpLoggedOutCoolDownPlayers(); 4 | 5 | void InitHooks() 6 | { 7 | if(TPREnabled) ArkApi::GetHooks().SetHook("AShooterGameMode.Logout", &Hook_AShooterGameMode_Logout, reinterpret_cast(&AShooterGameMode_Logout_original)); 8 | ArkApi::GetCommands().AddOnTimerCallback("CleanUpLoggedOutCoolDownPlayers", &CleanUpLoggedOutCoolDownPlayers); 9 | } 10 | 11 | void RemoveHooks() 12 | { 13 | if (TPREnabled) ArkApi::GetHooks().DisableHook("AShooterGameMode.Logout", &Hook_AShooterGameMode_Logout); 14 | ArkApi::GetCommands().RemoveOnTimerCallback("CleanUpLoggedOutCoolDownPlayers"); 15 | } 16 | 17 | void _cdecl Hook_AShooterGameMode_Logout(AShooterGameMode* _this, AController* Exiting) 18 | { 19 | if (Exiting) RemovePlayer(ArkApi::GetApiUtils().GetSteamIdFromController(Exiting)); 20 | AShooterGameMode_Logout_original(_this, Exiting); 21 | } 22 | 23 | 24 | std::vector::iterator CoolDownItr; 25 | int SecCounter = 0; 26 | DWORD64 CoolDownNowTime; 27 | void CleanUpLoggedOutCoolDownPlayers() 28 | { 29 | if (SecCounter++ == 7200) 30 | { 31 | if (!ArkApi::GetApiUtils().GetWorld()) 32 | { 33 | SecCounter = 0; 34 | return; 35 | } 36 | CoolDownNowTime = timeGetTime(); 37 | for (CoolDownItr = CoolData.begin(); CoolDownItr != CoolData.end(); CoolDownItr++) if (CoolDownNowTime > CoolDownItr->CoolDown) CoolDownItr = CoolData.erase(CoolDownItr); 38 | SecCounter = 0; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /DinoTracker/DinoTracker.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DinoTracker", "DinoTracker\DinoTracker.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 17 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 18 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Ping Limiter/PingLimiter.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PingLimiter", "PingLimiter\PingLimiter.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 17 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 18 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /WeekendRates/WeekendRates.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WeekendRates", "WeekendRates\WeekendRates.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 17 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 18 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /PrivateMessage/PrivateMessage.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2010 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrivateMessage", "PrivateMessage\PrivateMessage.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 17 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 18 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Async SaveWorld/Async SaveWorld.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2010 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Async SaveWorld", "Async SaveWorld\Async SaveWorld.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 17 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 18 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /GameConfigManager/GameConfigManager.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GameConfigManager", "GameConfigManager\GameConfigManager.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 17 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 18 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /PluginUpdateChecker/PluginUpdateChecker.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2026 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginUpdateChecker", "PluginUpdateChecker\PluginUpdateChecker.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 17 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 18 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 19 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Teleport/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "Teleport":{ 3 | "TPREnabled":false, 4 | "TPRCoolDownEnabled":true, 5 | "TPRCoolDownForPlayerTeleportedTo":false, 6 | "TPRCoolDownSeconds":120, 7 | "TPRDelaySeconds":60, 8 | "TPRMaxDistance":-1, 9 | "TPRAllowDinoTeleport":false, 10 | "Commands":{ 11 | "tpr":"/tpr", 12 | "tpa":"/tpa", 13 | "tp":"tp", 14 | "tpm":"tpm", 15 | "tpd":"tpd", 16 | "tpdp":"tpdp", 17 | "tpp":"tpp", 18 | "tt":"tt", 19 | "pos":"pos" 20 | }, 21 | "Messages":[ 22 | "Incorrect Syntax: /tpr ", 23 | "{} Is Dead.", 24 | "{} Would Like to teleport to you, /tpa", 25 | "Teleport Request sent to: {}", 26 | "Cant Find: {}", 27 | "You will Teleport to {} in {} Seconds.", 28 | "{} Is Teleporting to you in {} Seconds.", 29 | "Please login as Admin to use this command", 30 | "Incorrect Syntax: /tp ", 31 | "{} Teleported to you.", 32 | "Incorrect Syntax: /tpdp ", 33 | "Incorrect Syntax: /tpp ", 34 | "Pos: {0:.0f}, {1:.0f}, {2:.0f}", 35 | "Teleport Cooldown: {} mins, {} secs.", 36 | "Teleport Cooldown: {} seconds.", 37 | "{} is riding a Dino.", 38 | "Teleport Canceled, You are riding a Dino", 39 | "Teleport Distance is too far.", 40 | "You are already waiting for a Teleport.", 41 | "{} Is Teleporting to someone else." 42 | ] 43 | } 44 | } -------------------------------------------------------------------------------- /SafeZone/SafeZone/Private/SafeZones.cpp: -------------------------------------------------------------------------------- 1 | #include "SafeZones.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "SafeZoneManager.h" 7 | #include "Hooks.h" 8 | #include "Commands.h" 9 | 10 | #pragma comment(lib, "ArkApi.lib") 11 | #pragma comment(lib, "Permissions.lib") 12 | 13 | namespace SafeZones 14 | { 15 | FString GetText(const std::string& str) 16 | { 17 | return FString(ArkApi::Tools::Utf8Decode(config["Messages"].value(str, "No message")).c_str()); 18 | } 19 | 20 | void ReadConfig() 21 | { 22 | const std::string config_path = ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/SafeZone/config.json"; 23 | std::ifstream file{config_path}; 24 | if (!file.is_open()) 25 | throw std::runtime_error("Can't open config.json"); 26 | 27 | file >> config; 28 | 29 | file.close(); 30 | } 31 | 32 | void Init() 33 | { 34 | Log::Get().Init("SafeZone"); 35 | 36 | srand(static_cast(time(nullptr))); 37 | 38 | try 39 | { 40 | ReadConfig(); 41 | } 42 | catch (const std::exception& error) 43 | { 44 | Log::GetLog()->error(error.what()); 45 | return; 46 | } 47 | 48 | Hooks::InitHooks(); 49 | Commands::Init(); 50 | } 51 | 52 | void Clean() 53 | { 54 | Hooks::RemoveHooks(); 55 | Commands::Clean(); 56 | } 57 | } 58 | 59 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 60 | { 61 | switch (ul_reason_for_call) 62 | { 63 | case DLL_PROCESS_ATTACH: 64 | SafeZones::Init(); 65 | break; 66 | case DLL_PROCESS_DETACH: 67 | SafeZones::Clean(); 68 | break; 69 | } 70 | return TRUE; 71 | } 72 | -------------------------------------------------------------------------------- /Ping Limiter/PingLimiter/PingLimiterCommands.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | inline void Ping(AShooterPlayerController* player, FString* message, int mode) 3 | { 4 | if (!player || !player->PlayerStateField() || !player->GetPlayerCharacter()) 5 | return; 6 | 7 | ArkApi::GetApiUtils().SendChatMessage(player, Messages[0].c_str(), Messages[1].c_str(), (uint8)player->PlayerStateField()->PingField()); 8 | } 9 | 10 | void ReloadConfig(APlayerController* player_controller, FString* message, bool WriteToLog) 11 | { 12 | AShooterPlayerController* player = static_cast(player_controller); 13 | if (!player || !player->PlayerStateField()) return; 14 | InitConfig(); 15 | SecCounter = 0; 16 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(0, 255, 0), L"Config Reloaded!"); 17 | } 18 | 19 | void RconReloadConfig(RCONClientConnection* rcon_connection, RCONPacket* rcon_packet, UWorld* world) 20 | { 21 | InitConfig(); 22 | SecCounter = 0; 23 | FString Msg = "Config Reloaded"; 24 | rcon_connection->SendMessageW(rcon_packet->Id, 0, &Msg); 25 | } 26 | 27 | inline void InitCommands() 28 | { 29 | ArkApi::GetCommands().AddChatCommand(Messages[2].c_str(), &Ping); 30 | ArkApi::GetCommands().AddConsoleCommand("pingreload", &ReloadConfig); 31 | 32 | //RCON 33 | ArkApi::GetCommands().AddRconCommand("pingreload", &RconReloadConfig); 34 | } 35 | 36 | inline void RemoveCommands() 37 | { 38 | ArkApi::GetCommands().RemoveChatCommand(Messages[2].c_str()); 39 | ArkApi::GetCommands().RemoveConsoleCommand("pingreload"); 40 | 41 | //RCON 42 | ArkApi::GetCommands().RemoveRconCommand("pingreload"); 43 | } -------------------------------------------------------------------------------- /Teleport/x64/Release/Teleport/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "Teleport":{ 3 | "TPREnabled":true, 4 | "TPRCoolDownEnabled":true, 5 | "TPRCoolDownForPlayerTeleportedTo":false, 6 | "TPRCoolDownSeconds":120, 7 | "TPRDelaySeconds":60, 8 | "TPRMaxDistance":-1, 9 | "TPRAllowDinoTeleport":false, 10 | "Commands":{ 11 | "tpr":"/tpr", 12 | "tpa":"/tpa", 13 | "tp":"/tp", 14 | "tpm":"/tpm", 15 | "tpd":"/tpd", 16 | "tpdp":"/tpdp", 17 | "tpp":"/tpp", 18 | "tt":"/tt", 19 | "pos":"/pos" 20 | }, 21 | "Messages":[ 22 | "Incorrect Syntax: /tpr ", 23 | "{} Is Dead.", 24 | "{} Would Like to teleport to you, /tpa", 25 | "Teleport Request sent to: {}", 26 | "Cant Find: {}", 27 | "You will Teleport to {} in {} Seconds.", 28 | "{} Is Teleporting to you in {} Seconds.", 29 | "Please login as admin to use this command", 30 | "Incorrect Syntax: /tp ", 31 | "{} Teleported to you.", 32 | "Incorrect Syntax: /tpdp ", 33 | "Incorrect Syntax: /tpp ", 34 | "Pos: {0:.0f}, {1:.0f}, {2:.0f}", 35 | "Teleport Cooldown: {} mins, {} secs.", 36 | "Teleport Cooldown: {} seconds.", 37 | "{} is riding a Dino.", 38 | "Teleport Canceled, You are riding a Dino", 39 | "Teleport Distance is too far.", 40 | "You are already waiting for a Teleport.", 41 | "{} Is Teleporting to someone else." 42 | ] 43 | } 44 | } -------------------------------------------------------------------------------- /PVPScheduler/PVPScheduler/PVPScheduler.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | Header Files 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /KillFeed/KillFeed/KillFeedConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "json.hpp" 4 | 5 | void InitConfig() 6 | { 7 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/KillFeed/config.json"); 8 | if (!file.is_open()) 9 | { 10 | Log::GetLog()->error("Failed to load config.json"); 11 | DisplayType = 0; 12 | DisplayDelay = 5; 13 | DisplayDistance = DinoKillsEnabled = PlayerKillsEnabled = true; 14 | return; 15 | } 16 | nlohmann::json TeleportConfig, TempConfig; 17 | file >> TeleportConfig; 18 | file.close(); 19 | ServerName = FString(ArkApi::Tools::Utf8Decode(TeleportConfig["KillFeed"]["ServerName"]).c_str()); 20 | PlayerKillsEnabled = TeleportConfig["KillFeed"]["PlayerKillsEnabled"]; 21 | DinoKillsEnabled = TeleportConfig["KillFeed"]["TamedDinoKillsEnabled"]; 22 | DisplaySameTribeKills = TeleportConfig["KillFeed"]["DisplaySameTribeKills"]; 23 | DisplayType = TeleportConfig["KillFeed"]["DisplayType"]; 24 | DisplayScale = TeleportConfig["KillFeed"]["DisplayScale"]; 25 | DisplayDelay = TeleportConfig["KillFeed"]["DisplayDelay"]; 26 | TempConfig = TeleportConfig["KillFeed"]["DisplayColour"]; 27 | DisplayColour = FLinearColor(TempConfig[0], TempConfig[1], TempConfig[2], TempConfig[3]); 28 | DisplayDistance = TeleportConfig["KillFeed"]["DisplayDistance"]; 29 | DisplayInChatbox = TeleportConfig["KillFeed"]["DisplayInChatbox"]; 30 | 31 | TempConfig = TeleportConfig["KillFeed"]["Messages"]; 32 | int j = 0; 33 | std::string Data; 34 | for (nlohmann::json::iterator it = TempConfig.begin(); it != TempConfig.end(); it++) 35 | { 36 | Data = *it; 37 | Messages[j++] = ArkApi::Tools::Utf8Decode(Data).c_str(); 38 | } 39 | return; 40 | } -------------------------------------------------------------------------------- /DinoTracker/DinoTracker/DinoTracker.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {b2d46d29-29b4-427c-ae32-c7fcea11cd37} 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /PlayerList/PlayerList/PlayerList.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {b2d46d29-29b4-427c-ae32-c7fcea11cd37} 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files\Includes 32 | 33 | 34 | 35 | 36 | Source Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /Async SaveWorld/Async SaveWorld/Async SaveWorld.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {a39fef91-c837-4057-9e88-72ecfd52d165} 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files\Include 34 | 35 | 36 | Header Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /Async SaveWorld/Async SaveWorld/Async SaveWorldConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "json.hpp" 4 | 5 | void InitConfig() 6 | { 7 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/Async SaveWorld/config.json"); 8 | nlohmann::json json; 9 | file >> json; 10 | file.close(); 11 | std::string data; 12 | data = json["CpuThreads"]; 13 | 14 | TArray EnabledCPUThreads; 15 | FString CpuThreadString = ArkApi::Tools::Utf8Decode(data).c_str(); 16 | if (!CpuThreadString.IsEmpty()) 17 | { 18 | int ThreadCount = std::thread::hardware_concurrency(); 19 | TArray CPUThreadArray; 20 | CpuThreadString.ParseIntoArray(CPUThreadArray, L",", true); 21 | for (const FString& CpuThread : CPUThreadArray) 22 | { 23 | try 24 | { 25 | int ThreadIndex = std::stoi(*CpuThread); 26 | if (ThreadIndex >= ThreadCount) 27 | { 28 | Log::GetLog()->warn("You tried using Cpu Thread #{} but the max threads your server supports is {}.", ThreadIndex, ThreadCount); 29 | } else EnabledCPUThreads.Add(ThreadIndex); 30 | } 31 | catch (const std::exception&) 32 | { 33 | Log::GetLog()->error("Syntax error in CpuThreads Example: 0,4,5"); 34 | break; 35 | } 36 | } 37 | 38 | if (EnabledCPUThreads.Num() > 0) 39 | { 40 | for (int i = 0; i < ThreadCount; i++) 41 | { 42 | DWORD_PTR Enabled = static_cast(EnabledCPUThreads.Contains(i) ? 1 : 0); 43 | CPUAffinityMask |= (Enabled << i); 44 | if (Enabled == 1) 45 | { 46 | if (!CPUAffinityEnabled) Log::GetLog()->info("CPU Affinity Enabled!"); 47 | Log::GetLog()->info("Using CPU Thread[{}]!", i); 48 | CPUAffinityEnabled = true; 49 | } 50 | } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /DinoColourCommand/DinoColourCommand/DinoColourCommand.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {b2d46d29-29b4-427c-ae32-c7fcea11cd37} 18 | 19 | 20 | 21 | 22 | Header Files\Includes 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | 35 | 36 | Source Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /VoteRewards/VoteRewards/VoteRewardsConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "json.hpp" 4 | 5 | nlohmann::json VoteConfig; 6 | 7 | FString GetConfig(const std::string& Element) 8 | { 9 | const auto& Vote = VoteConfig.value("VoteRewards", nlohmann::json::array()); 10 | if (!Vote.empty()) 11 | return FString(ArkApi::Tools::Utf8Decode(Vote.value(Element, "")).c_str()); 12 | return L""; 13 | } 14 | 15 | FString GetMsg(const std::string& VoteSite, const int ID) 16 | { 17 | const auto& Vote = VoteConfig.value(VoteSite, nlohmann::json::array()); 18 | if (!Vote.empty()) 19 | { 20 | const auto& Msgs = Vote.value("Messages", nlohmann::json::array()); 21 | if (Msgs.size() > ID) 22 | return FString(ArkApi::Tools::Utf8Decode(Msgs[ID]).c_str()); 23 | } 24 | return L""; 25 | } 26 | 27 | void LoadConfig() 28 | { 29 | try 30 | { 31 | #ifdef ATLAS 32 | HasShop = ArkApi::Tools::IsPluginLoaded("AtlasShop"); 33 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/AtlasApi/Plugins/VoteRewards/config.json"); 34 | #else 35 | HasShop = ArkApi::Tools::IsPluginLoaded("ArkShop"); 36 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/VoteRewards/config.json"); 37 | #endif 38 | file >> VoteConfig; 39 | file.close(); 40 | 41 | TotalVoteSitesInConfig = 0; 42 | for (const auto& VoteSiteConfig : VoteSites) 43 | { 44 | auto VoteCnf = VoteConfig.value(VoteSiteConfig.Site, nlohmann::json::array()); 45 | if (!VoteCnf.empty()) TotalVoteSitesInConfig++; 46 | } 47 | TotalVoteSitesInConfig--; 48 | } 49 | catch (nlohmann::json::exception ex) 50 | { 51 | Log::GetLog()->error("Json Error: {}", ex.what()); 52 | } 53 | catch (std::exception ex) 54 | { 55 | Log::GetLog()->error("Config Read Error: {}", ex.what()); 56 | } 57 | } -------------------------------------------------------------------------------- /WeekendRates/WeekendRates/WeekendRatesConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "WeekendRates.h" 4 | 5 | #include 6 | 7 | inline void InitConfig() 8 | { 9 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/WeekendRates/config.json"); 10 | if (!file.is_open()) return; 11 | file >> WeekendConfig; 12 | file.close(); 13 | 14 | std::string Data = WeekendConfig["WeekendRates"]["ServerName"]; 15 | ServerName = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 16 | 17 | Notification = WeekendConfig["WeekendRates"]["Notification"]; 18 | 19 | Chatbox = WeekendConfig["WeekendRates"]["Chatbox"]; 20 | 21 | nlohmann::json ServRGB = WeekendConfig["WeekendRates"]["WeekendRatesEnabledRGB"]; 22 | WeekendRatesEnabledRGB = FLinearColor(ServRGB[0], ServRGB[1], ServRGB[2], ServRGB[3]); 23 | 24 | Data = WeekendConfig["WeekendRates"]["WeekendRatesEnabledMessage"]; 25 | WeekendRatesEnabledMessage = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 26 | 27 | ServRGB = WeekendConfig["WeekendRates"]["WeekendRatesDisabledRGB"]; 28 | WeekendRatesDisabledRGB = FLinearColor(ServRGB[0], ServRGB[1], ServRGB[2], ServRGB[3]); 29 | 30 | Data = WeekendConfig["WeekendRates"]["WeekendRatesDisabledMessage"]; 31 | WeekendRatesDisabledMessage = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 32 | 33 | MOTDChangeEnabled = WeekendConfig["WeekendRates"]["MOTDChangeEnabled"]; 34 | 35 | Data = WeekendConfig["WeekendRates"]["WeekendMOTD"]; 36 | WeekendMOTD = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 37 | 38 | Data = WeekendConfig["WeekendRates"]["NormalMOTD"]; 39 | NormalMOTD = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 40 | 41 | StartDay = WeekendConfig["WeekendRates"]["StartDay"]; 42 | EndDay = WeekendConfig["WeekendRates"]["EndDay"]; 43 | } 44 | -------------------------------------------------------------------------------- /KillFeed/KillFeed/KillFeed.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {b2d46d29-29b4-427c-ae32-c7fcea11cd37} 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files\Includes 40 | 41 | 42 | -------------------------------------------------------------------------------- /Teleport/Teleport/Teleport.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {b2d46d29-29b4-427c-ae32-c7fcea11cd37} 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files\Includes 32 | 33 | 34 | Header Files 35 | 36 | 37 | 38 | 39 | Source Files 40 | 41 | 42 | -------------------------------------------------------------------------------- /WeekendRates/WeekendRates/WeekendRates.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {b2d46d29-29b4-427c-ae32-c7fcea11cd37} 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files\Includes 35 | 36 | 37 | 38 | 39 | Source Files 40 | 41 | 42 | -------------------------------------------------------------------------------- /Ping Limiter/PingLimiter/PingLimiter.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {b2d46d29-29b4-427c-ae32-c7fcea11cd37} 18 | 19 | 20 | 21 | 22 | Header Files\Includes 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files\Includes 35 | 36 | 37 | 38 | 39 | Source Files 40 | 41 | 42 | -------------------------------------------------------------------------------- /PrivateMessage/PrivateMessage/PrivateMessage.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {b2d46d29-29b4-427c-ae32-c7fcea11cd37} 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files\Includes 32 | 33 | 34 | Header Files 35 | 36 | 37 | 38 | 39 | Source Files 40 | 41 | 42 | -------------------------------------------------------------------------------- /PVPScheduler/PVPScheduler/PVPSchedulerCommands.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | inline void PVP(AShooterPlayerController* player, FString* message, int mode) 4 | { 5 | if (!player || !player->PlayerStateField() || !player->GetPlayerCharacter() || !player->GetPlayerCharacter()-> 6 | bIsServerAdminField()) 7 | return; 8 | 9 | int EndDaya = 0, EndHoura = 0; 10 | if (PVPEnabled) 11 | { 12 | TArray Parsed; 13 | message->ParseIntoArray(Parsed, L" ", true); 14 | if (Parsed.IsValidIndex(2)) 15 | { 16 | try 17 | { 18 | EndDaya = std::stoi(Parsed[1].ToString().c_str()); 19 | EndHoura = std::stoi(Parsed[2].ToString().c_str()); 20 | } 21 | catch (...) 22 | { 23 | } 24 | 25 | //EndDay = EndDaya; 26 | //EndHour = EndHoura; 27 | } 28 | else 29 | { 30 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(1, 0, 0), "Incorrect Syntax: /pvp "); 31 | return; 32 | } 33 | } 34 | 35 | PVPEnabled = !PVPEnabled; 36 | 37 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(0, 1, 0), "PVP: {}", 38 | (PVPEnabled ? "Enabled" : "Disabled")); 39 | }*/ 40 | 41 | inline void PVPReloadConfig(APlayerController* player, FString*, bool) 42 | { 43 | InitConfig(); 44 | 45 | ArkApi::GetApiUtils().SendServerMessage(static_cast(player), FLinearColor(0, 1, 0), "Config Reloaded!"); 46 | } 47 | 48 | inline void InitCommands() 49 | { 50 | //ArkApi::GetCommands().AddChatCommand("/pvp", &PVP); 51 | ArkApi::GetCommands().AddConsoleCommand("pvpreload", &PVPReloadConfig); 52 | } 53 | 54 | inline void RemoveCommands() 55 | { 56 | //ArkApi::GetCommands().RemoveChatCommand("/pvp"); 57 | ArkApi::GetCommands().RemoveConsoleCommand("pvpreload"); 58 | } 59 | -------------------------------------------------------------------------------- /SafeZone/SafeZone/SafeZone.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {b3455fc6-e309-4c40-a1a7-c838c24bfb84} 6 | 7 | 8 | {bf1792bc-17d8-49dc-9128-33cb2279309a} 9 | 10 | 11 | 12 | 13 | Private 14 | 15 | 16 | Private 17 | 18 | 19 | Private 20 | 21 | 22 | Private 23 | 24 | 25 | Private 26 | 27 | 28 | 29 | 30 | Private 31 | 32 | 33 | Private 34 | 35 | 36 | Private 37 | 38 | 39 | Public 40 | 41 | 42 | Public 43 | 44 | 45 | Private 46 | 47 | 48 | Private 49 | 50 | 51 | Private 52 | 53 | 54 | -------------------------------------------------------------------------------- /SafeZone/SafeZone/Private/SafeZoneManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../Public/ISafeZoneManager.h" 4 | 5 | /*struct TClassCompiledInDefer_ATriggerSphere 6 | { 7 | static UField* Register() { return NativeCall(nullptr, "TClassCompiledInDefer.Register"); } 8 | }; 9 | 10 | struct ATriggerBase : AActor 11 | { 12 | FieldValue> CollisionComponentField() 13 | { 14 | return {this, "ATriggerBase.CollisionComponent"}; 15 | } 16 | };*/ 17 | 18 | namespace SafeZones 19 | { 20 | struct PlayerPos 21 | { 22 | SafeZone* zone{}; 23 | bool in_zone{}; 24 | FVector inzone_pos; 25 | FVector outzone_pos; 26 | }; 27 | 28 | class SafeZoneManager : public ISafeZoneManager 29 | { 30 | public: 31 | static SafeZoneManager& Get(); 32 | 33 | SafeZoneManager(const SafeZoneManager&) = delete; 34 | SafeZoneManager(SafeZoneManager&&) = delete; 35 | SafeZoneManager& operator=(const SafeZoneManager&) = delete; 36 | SafeZoneManager& operator=(SafeZoneManager&&) = delete; 37 | 38 | bool CreateSafeZone(const std::shared_ptr& safe_zone) override; 39 | bool RemoveSafeZone(const FString& name) override; 40 | 41 | bool CanBuild(APlayerController* player, const FVector& location, bool notification) override; 42 | bool CheckActorAction(AActor* actor, int type) override; 43 | 44 | void ReadSafeZones(); 45 | void UpdateOverlaps(); 46 | 47 | std::shared_ptr FindZoneByName(const FString& name) override; 48 | 49 | TArray>& GetAllSafeZones(); 50 | TArray& GetDefaultSafeZones(); 51 | 52 | std::unordered_map players_pos; 53 | 54 | private: 55 | SafeZoneManager() = default; 56 | ~SafeZoneManager() = default; 57 | 58 | TArray> all_safezones_; 59 | 60 | /** 61 | * \brief List of safe zone names created from the default config file, it's needed for reloading 62 | */ 63 | TArray default_safezones_; 64 | }; 65 | } 66 | -------------------------------------------------------------------------------- /PVPScheduler/PVPScheduler/PVPSchedulerConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | std::string Days[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; 6 | nlohmann::json PVPConfig; 7 | 8 | inline void InitConfig() 9 | { 10 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/PVPScheduler/config.json"); 11 | if (!file.is_open()) 12 | return; 13 | 14 | file >> PVPConfig; 15 | file.close(); 16 | 17 | std::string TempData; 18 | TempData = PVPConfig["PVPScheduler"]["ServerName"]; 19 | ServerName = FString(ArkApi::Tools::Utf8Decode(TempData).c_str()); 20 | ServerNotify = PVPConfig["PVPScheduler"]["NotifyServer"]; 21 | LogPvpSwitchAtConsole = PVPConfig["PVPScheduler"]["LogPvpSwitchAtConsole"]; 22 | PVPMessage[2] = PVPConfig["PVPScheduler"].value("ProtectExplosiveMessage", ""); 23 | 24 | Log::GetLog()->info("Loading PVP Schedule's"); 25 | 26 | PVPDays = PVPConfig["PVPScheduler"]["Days"]; 27 | for (int i = 0; i < PVPDays.size(); i++) 28 | { 29 | if (PVPDays[i]["StartDay"] > 6 || PVPDays[i]["StartDay"] < 0) 30 | PVPDays[i]["StartDay"] = 0; 31 | if (PVPDays[i]["EndDay"] > 6 || PVPDays[i]["EndDay"] < 0) 32 | PVPDays[i]["EndDay"] = 0; 33 | if (PVPDays[i]["StartHour"] > 23 || PVPDays[i]["StartHour"] < 0) 34 | PVPDays[i]["StartHour"] = 0; 35 | if (PVPDays[i]["EndHour"] > 23 || PVPDays[i]["EndHour"] < 0) 36 | PVPDays[i]["EndHour"] = 0; 37 | 38 | Log::GetLog()->info("Loaded PVP Schedule {} Start Day: {}, Hour: {} - End Day: {}, End Hour {}", (i + 1), 39 | Days[(int)PVPDays[i]["StartDay"]], (int)PVPDays[i]["StartHour"], Days[(int)PVPDays[i]["EndDay"]], 40 | (int)PVPDays[i]["EndHour"]); 41 | } 42 | 43 | ProtectCharacters = PVPConfig["PVPScheduler"].value("ProtectPlayersPVPOff", true); 44 | ProtectDinos = PVPConfig["PVPScheduler"].value("ProtectDinosPVPOff", true); 45 | ProtectStructures = PVPConfig["PVPScheduler"].value("ProtectStructuresPVPOff", true); 46 | ProtectExplosives = PVPConfig["PVPScheduler"].value("ProtectExplosivesPVPOff", true); 47 | } 48 | -------------------------------------------------------------------------------- /Teleport/Teleport/TeleportConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "json.hpp" 4 | 5 | bool InitConfig() 6 | { 7 | std::ifstream file(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/Teleport/config.json"); 8 | if (!file.is_open()) 9 | { 10 | Log::GetLog()->error("Failed to load config.json"); 11 | return false; 12 | } 13 | nlohmann::json TeleportConfig, Commands; 14 | file >> TeleportConfig; 15 | file.close(); 16 | TPREnabled = TeleportConfig["Teleport"]["TPREnabled"]; 17 | TPRCoolDownEnabled = TeleportConfig["Teleport"]["TPRCoolDownEnabled"]; 18 | TPRCoolDownForPlayerTeleportedTo = TeleportConfig["Teleport"]["TPRCoolDownForPlayerTeleportedTo"]; 19 | TPRCoolDownSeconds = TeleportConfig["Teleport"]["TPRCoolDownSeconds"]; 20 | TeleportDelay = TeleportConfig["Teleport"]["TPRDelaySeconds"]; 21 | MaxDistance = TeleportConfig["Teleport"]["TPRMaxDistance"]; 22 | AllowDinoTeleport = !(bool)TeleportConfig["Teleport"]["TPRAllowDinoTeleport"]; 23 | Commands = TeleportConfig["Teleport"]["Commands"]; 24 | std::string Data = Commands["tpr"]; 25 | TPR = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 26 | Data = Commands["tpa"]; 27 | TPA = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 28 | Data = Commands["tp"]; 29 | TP = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 30 | Data = Commands["tpm"]; 31 | TPM = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 32 | Data = Commands["tpd"]; 33 | TPD = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 34 | Data = Commands["tpdp"]; 35 | TPDP = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 36 | Data = Commands["tpp"]; 37 | TPP = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 38 | Data = Commands["tt"]; 39 | TT = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 40 | Data = Commands["pos"]; 41 | POS = FString(ArkApi::Tools::Utf8Decode(Data).c_str()); 42 | Commands = TeleportConfig["Teleport"]["Messages"]; 43 | int j = 0; 44 | for (nlohmann::json::iterator it = Commands.begin(); it != Commands.end(); it++) 45 | { 46 | Data = *it; 47 | Messages[j++] = ArkApi::Tools::Utf8Decode(Data).c_str(); 48 | } 49 | return true; 50 | } -------------------------------------------------------------------------------- /VoteRewards/VoteRewards.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2010 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoteRewards", "VoteRewards\VoteRewards.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Ark|x64 = Ark|x64 11 | Ark|x86 = Ark|x86 12 | Atlas|x64 = Atlas|x64 13 | Atlas|x86 = Atlas|x86 14 | Debug|x64 = Debug|x64 15 | Debug|x86 = Debug|x86 16 | Release|x64 = Release|x64 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Ark|x64.ActiveCfg = Ark|x64 21 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Ark|x64.Build.0 = Ark|x64 22 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Ark|x86.ActiveCfg = Ark|Win32 23 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Ark|x86.Build.0 = Ark|Win32 24 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Atlas|x64.ActiveCfg = Atlas|x64 25 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Atlas|x64.Build.0 = Atlas|x64 26 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Atlas|x86.ActiveCfg = Atlas|Win32 27 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Atlas|x86.Build.0 = Atlas|Win32 28 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 29 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 30 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 31 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 32 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 33 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 34 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 35 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | GlobalSection(ExtensibilityGlobals) = postSolution 41 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 42 | EndGlobalSection 43 | EndGlobal 44 | -------------------------------------------------------------------------------- /VoteRewards/VoteRewards/OldRequests.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | namespace OldRequests 3 | { 4 | struct Request 5 | { 6 | TSharedRef request; 7 | std::function, bool)> callback; 8 | bool completed; 9 | bool remove_manually; 10 | 11 | bool operator==(const Request& rhs) const 12 | { 13 | return request == rhs.request; 14 | } 15 | }; 16 | 17 | std::vector requests; 18 | bool CreateRequest(FString url, 19 | const std::function, bool)>& callback, FString verb = L"GET", 20 | const bool auto_remove = true, FString Postcontent = L"", FString header_value = L"text/html") 21 | { 22 | TSharedRef request; 23 | FHttpModule::Get()->CreateRequest(&request); 24 | 25 | FString header_name = "Content-Type"; 26 | FString Accepts_name = "Accepts"; 27 | FString Accepts_value = "*/*"; 28 | 29 | request->SetHeader(&header_name, &header_value); 30 | request->SetHeader(&Accepts_name, &Accepts_value); 31 | request->SetURL(&url); 32 | request->SetVerb(&verb); 33 | 34 | if(!Postcontent.IsEmpty()) request->SetContentAsString(&Postcontent); 35 | 36 | requests.push_back({ request, callback, false, !auto_remove }); 37 | 38 | return request->ProcessRequest(); 39 | } 40 | 41 | void RemoveRequest(const TSharedRef& request) 42 | { 43 | requests.erase(remove_if(requests.begin(), requests.end(), [&request](const Request& cur_request) 44 | { 45 | return cur_request.request == request; 46 | }), requests.end()); 47 | } 48 | 49 | void Update() 50 | { 51 | requests.erase(remove_if(requests.begin(), requests.end(), [](const Request& request) 52 | { 53 | return !request.remove_manually && request.completed; 54 | }), requests.end()); 55 | 56 | const auto size = requests.size(); 57 | for (auto i = 0; i < size; ++i) 58 | { 59 | auto& request = requests[i]; 60 | 61 | const auto status = request.request->GetStatus(); 62 | switch (status) 63 | { 64 | case EHttpRequestStatus::Succeeded: 65 | case EHttpRequestStatus::Failed: 66 | if (!request.completed) 67 | { 68 | request.completed = true; 69 | 70 | request.callback(request.request, status == EHttpRequestStatus::Succeeded); 71 | } 72 | break; 73 | case EHttpRequestStatus::NotStarted: 74 | case EHttpRequestStatus::Processing: 75 | break; 76 | default:; 77 | } 78 | } 79 | } 80 | } -------------------------------------------------------------------------------- /PluginUpdateChecker/PluginUpdateChecker/PluginChecker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "json.hpp" 5 | #include "API\ARK\Ark.h" 6 | 7 | const FString FindStarter = "muted\">"; 8 | FString DiscordWebHookURL; 9 | TSharedRef request; 10 | bool VerifyPost = false, IsCheckingArray = true, DiscordUseWebHooks = false; 11 | int PluginIndex = 0, SecCounter = 0; 12 | 13 | struct PluginS 14 | { 15 | FString Name; 16 | float Version; 17 | int ResourceID; 18 | PluginS(FString Name, float Version, int ResourceID) : Name(Name), Version(Version), ResourceID(ResourceID) {} 19 | }; 20 | 21 | TArray PluginsArray; 22 | 23 | void LoadAllPlugins() 24 | { 25 | namespace fs = std::experimental::filesystem; 26 | const std::string dir_path = ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins"; 27 | nlohmann::json Config; 28 | for (const auto& dir_name : fs::directory_iterator(dir_path)) 29 | { 30 | const auto& path = dir_name.path(); 31 | if (!is_directory(path)) continue; 32 | const auto& filename = path.filename().stem().generic_string(); 33 | const auto& ConfigName = dir_path + "/" + filename + "/PluginInfo.json"; 34 | if (!fs::exists(ConfigName)) continue; 35 | std::ifstream file(ConfigName); 36 | if (!file.is_open()) continue; 37 | try 38 | { 39 | file >> Config; 40 | const int ResourceId = Config.value("ResourceId", -1); 41 | if (ResourceId == -1) continue; 42 | PluginsArray.Add(PluginS(filename.c_str(), Config["Version"], ResourceId)); 43 | 44 | } 45 | catch (const std::exception& error) 46 | { 47 | Log::GetLog()->error(error.what()); 48 | throw; 49 | } 50 | file.close(); 51 | } 52 | } 53 | 54 | template 55 | void PostDiscord(const T* msg, Args&&... args) 56 | { 57 | static_cast(ArkApi::GetApiUtils().GetWorld()->GameStateField())->HTTPPostRequest(DiscordWebHookURL, FString::Format(msg, std::forward(args)...)); 58 | } 59 | 60 | float GetPluginVersion(const FString& Response) 61 | { 62 | float Version = 0.0f; 63 | int32 FindStart = Response.Find(FindStarter); 64 | if (FindStart != INDEX_NONE) 65 | { 66 | FindStart = FindStart + 7; 67 | const int32 FindEnd = Response.Find("<", ESearchCase::IgnoreCase, ESearchDir::FromStart, FindStart); 68 | if (FindEnd != INDEX_NONE) 69 | { 70 | try 71 | { 72 | Version = std::stof(Response.Mid(FindStart, FindEnd - FindStart).ToString().c_str()); 73 | } 74 | catch (...) {} 75 | } 76 | } 77 | return Version; 78 | } -------------------------------------------------------------------------------- /Mutes/Mutes/hdr/sqlite_modern_cpp/errors.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "../sqlite3.h" 7 | 8 | namespace sqlite { 9 | 10 | class sqlite_exception: public std::runtime_error { 11 | public: 12 | sqlite_exception(const char* msg, std::string sql, int code = -1): runtime_error(msg), code(code), sql(sql) {} 13 | sqlite_exception(int code, std::string sql): runtime_error(sqlite3_errstr(code)), code(code), sql(sql) {} 14 | int get_code() const {return code & 0xFF;} 15 | int get_extended_code() const {return code;} 16 | std::string get_sql() const {return sql;} 17 | private: 18 | int code; 19 | std::string sql; 20 | }; 21 | 22 | namespace errors { 23 | //One more or less trivial derived error class for each SQLITE error. 24 | //Note the following are not errors so have no classes: 25 | //SQLITE_OK, SQLITE_NOTICE, SQLITE_WARNING, SQLITE_ROW, SQLITE_DONE 26 | // 27 | //Note these names are exact matches to the names of the SQLITE error codes. 28 | #define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \ 29 | class name: public sqlite_exception { using sqlite_exception::sqlite_exception; };\ 30 | derived 31 | #define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \ 32 | class base ## _ ## sub: public base { using base::base; }; 33 | #include "lists/error_codes.h" 34 | #undef SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED 35 | #undef SQLITE_MODERN_CPP_ERROR_CODE 36 | 37 | //Some additional errors are here for the C++ interface 38 | class more_rows: public sqlite_exception { using sqlite_exception::sqlite_exception; }; 39 | class no_rows: public sqlite_exception { using sqlite_exception::sqlite_exception; }; 40 | class more_statements: public sqlite_exception { using sqlite_exception::sqlite_exception; }; // Prepared statements can only contain one statement 41 | 42 | static void throw_sqlite_error(const int& error_code, const std::string &sql = "") { 43 | switch(error_code & 0xFF) { 44 | #define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \ 45 | case SQLITE_ ## NAME: switch(error_code) { \ 46 | derived \ 47 | default: throw name(error_code, sql); \ 48 | } 49 | #define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \ 50 | case SQLITE_ ## BASE ## _ ## SUB: throw base ## _ ## sub(error_code, sql); 51 | #include "lists/error_codes.h" 52 | #undef SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED 53 | #undef SQLITE_MODERN_CPP_ERROR_CODE 54 | default: throw sqlite_exception(error_code, sql); 55 | } 56 | } 57 | } 58 | namespace exceptions = errors; 59 | } 60 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/hdr/sqlite_modern_cpp/errors.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "sqlite3.h" 7 | 8 | namespace sqlite { 9 | 10 | class sqlite_exception: public std::runtime_error { 11 | public: 12 | sqlite_exception(const char* msg, std::string sql, int code = -1): runtime_error(msg), code(code), sql(sql) {} 13 | sqlite_exception(int code, std::string sql): runtime_error(sqlite3_errstr(code)), code(code), sql(sql) {} 14 | int get_code() const {return code & 0xFF;} 15 | int get_extended_code() const {return code;} 16 | std::string get_sql() const {return sql;} 17 | private: 18 | int code; 19 | std::string sql; 20 | }; 21 | 22 | namespace errors { 23 | //One more or less trivial derived error class for each SQLITE error. 24 | //Note the following are not errors so have no classes: 25 | //SQLITE_OK, SQLITE_NOTICE, SQLITE_WARNING, SQLITE_ROW, SQLITE_DONE 26 | // 27 | //Note these names are exact matches to the names of the SQLITE error codes. 28 | #define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \ 29 | class name: public sqlite_exception { using sqlite_exception::sqlite_exception; };\ 30 | derived 31 | #define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \ 32 | class base ## _ ## sub: public base { using base::base; }; 33 | #include "lists/error_codes.h" 34 | #undef SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED 35 | #undef SQLITE_MODERN_CPP_ERROR_CODE 36 | 37 | //Some additional errors are here for the C++ interface 38 | class more_rows: public sqlite_exception { using sqlite_exception::sqlite_exception; }; 39 | class no_rows: public sqlite_exception { using sqlite_exception::sqlite_exception; }; 40 | class more_statements: public sqlite_exception { using sqlite_exception::sqlite_exception; }; // Prepared statements can only contain one statement 41 | 42 | static void throw_sqlite_error(const int& error_code, const std::string &sql = "") { 43 | switch(error_code & 0xFF) { 44 | #define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \ 45 | case SQLITE_ ## NAME: switch(error_code) { \ 46 | derived \ 47 | default: throw name(error_code, sql); \ 48 | } 49 | #define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \ 50 | case SQLITE_ ## BASE ## _ ## SUB: throw base ## _ ## sub(error_code, sql); 51 | #include "lists/error_codes.h" 52 | #undef SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED 53 | #undef SQLITE_MODERN_CPP_ERROR_CODE 54 | default: throw sqlite_exception(error_code, sql); 55 | } 56 | } 57 | } 58 | namespace exceptions = errors; 59 | } 60 | -------------------------------------------------------------------------------- /VoteRewards/VoteRewards/VoteRewards.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifdef ATLAS 3 | #include "API\Atlas\Atlas.h" 4 | #pragma comment(lib, "AtlasApi.lib") 5 | #pragma comment(lib, "AtlasShop.lib") 6 | #include "../../../2. AtlasServerApi/AtlasShop/AtlasShop/Public/Points.h" 7 | #else 8 | #include "API\ARK\Ark.h" 9 | #pragma comment(lib, "ArkApi.lib") 10 | #pragma comment(lib, "ArkShop.lib") 11 | #include "../../../MichsPlugins/ArkShop/ArkShop/Public/Points.h" 12 | #endif 13 | #include "Requests.h" 14 | #include 15 | 16 | std::default_random_engine intGen; 17 | std::mt19937 floatGen(std::random_device{}()); 18 | struct VoteSiteConfig 19 | { 20 | const char * const Site; 21 | const char * const Response; 22 | bool ExactMatch; 23 | 24 | constexpr VoteSiteConfig(const char * const Site, const char * const Response, const bool ExactMatch) : Site(Site), Response(Response), ExactMatch(ExactMatch) {} 25 | }; 26 | #ifdef ATLAS 27 | constexpr int TotalVoteSites = 3; 28 | constexpr std::array VoteSites{ 29 | VoteSiteConfig("atlasserverslist.com", "Success", false), 30 | VoteSiteConfig("trackyserver.com", "1", true), 31 | VoteSiteConfig("atlasserverlist.com", "1", true) 32 | }; 33 | #else 34 | constexpr int TotalVoteSites = 3; 35 | constexpr std::array VoteSites{ 36 | VoteSiteConfig("ark-servers.net", "1", true), 37 | VoteSiteConfig("trackyserver.com", "1", true), 38 | VoteSiteConfig("toparkservers.com", "1", true)}; 39 | #endif 40 | 41 | bool HasShop = false; 42 | int TotalVoteSitesInConfig = 0; 43 | 44 | struct PlayerDataS 45 | { 46 | long double NextVoteTime[TotalVoteSites]; 47 | bool HasRewarded; 48 | }; 49 | std::map PlayerData; 50 | 51 | struct VoteQueueS 52 | { 53 | int VoteSiteIndex; 54 | std::string VoteKey; 55 | int64 SteamID; 56 | AShooterPlayerController* player; 57 | bool IsLast; 58 | VoteQueueS(const int VoteSiteIndex, const std::string VoteKey, 59 | const int64 SteamID, AShooterPlayerController* player, const bool IsLast) 60 | : VoteSiteIndex(VoteSiteIndex), VoteKey(VoteKey), 61 | SteamID(SteamID), player(player), IsLast(IsLast) {} 62 | }; 63 | 64 | std::vector VoteQueue; 65 | 66 | const int GetVoteSiteIndex(const std::string& VoteSite) 67 | { 68 | for (int i = 0; i < VoteSites.size(); i++) if (VoteSites[i].Site == VoteSite) return i; 69 | return -1; 70 | } 71 | 72 | float RandomNumber(float min, float max) 73 | { 74 | std::uniform_real_distribution distribution(min, max); 75 | return distribution(floatGen); 76 | } 77 | 78 | int RandomNumber(int min, int max) 79 | { 80 | std::uniform_int_distribution distribution(min, max); 81 | return distribution(intGen); 82 | } -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/TimedRewards.cpp: -------------------------------------------------------------------------------- 1 | #include "TimedRewards.h" 2 | 3 | #include 4 | #include 5 | 6 | namespace ArkShop 7 | { 8 | TimedRewards::TimedRewards() 9 | { 10 | points_interval_ = config["General"]["TimedPointsReward"]["Interval"]; 11 | 12 | ArkApi::GetCommands().AddOnTimerCallback("RewardTimer", std::bind(&TimedRewards::RewardTimer, this)); 13 | } 14 | 15 | TimedRewards& TimedRewards::Get() 16 | { 17 | static TimedRewards instance; 18 | return instance; 19 | } 20 | 21 | void TimedRewards::AddPlayer(uint64 steam_id) 22 | { 23 | const auto iter = std::find_if( 24 | online_players_.begin(), online_players_.end(), 25 | [steam_id](const std::shared_ptr& data) -> bool { return data->steam_id == steam_id; }); 26 | 27 | if (iter != online_players_.end()) 28 | { 29 | return; 30 | } 31 | 32 | const int interval = points_interval_; 33 | 34 | const auto now = std::chrono::system_clock::now(); 35 | const auto next_time = now + std::chrono::minutes(interval); 36 | 37 | auto groups_map = config["General"]["TimedPointsReward"]["Groups"]; 38 | 39 | int points_amount = groups_map["Default"].value("Amount", 0); 40 | 41 | for (auto group_iter = groups_map.begin(); group_iter != groups_map.end(); ++group_iter) 42 | { 43 | const FString group_name(group_iter.key().c_str()); 44 | if (group_name == L"Default") 45 | { 46 | continue; 47 | } 48 | 49 | if (Permissions::IsPlayerInGroup(steam_id, group_name)) 50 | { 51 | points_amount = group_iter.value().value("Amount", 0); 52 | break; 53 | } 54 | } 55 | 56 | if (points_amount == 0) 57 | { 58 | return; 59 | } 60 | 61 | online_players_.push_back(std::make_shared(steam_id, points_amount, next_time)); 62 | } 63 | 64 | void TimedRewards::RemovePlayer(uint64 steam_id) 65 | { 66 | const auto iter = std::find_if( 67 | online_players_.begin(), online_players_.end(), 68 | [steam_id](const std::shared_ptr& data) -> bool { return data->steam_id == steam_id; }); 69 | 70 | if (iter != online_players_.end()) 71 | { 72 | online_players_.erase(std::remove(online_players_.begin(), online_players_.end(), *iter), 73 | online_players_.end()); 74 | } 75 | } 76 | 77 | void TimedRewards::RewardTimer() 78 | { 79 | const auto now = std::chrono::system_clock::now(); 80 | 81 | for (const auto& data : online_players_) 82 | { 83 | const auto next_time = data->next_reward_time; 84 | auto diff = std::chrono::duration_cast(next_time - now); 85 | 86 | if (diff.count() <= 0) 87 | { 88 | data->next_reward_time = now + std::chrono::minutes(points_interval_); 89 | 90 | Points::AddPoints(data->points_amount, data->steam_id); 91 | } 92 | } 93 | } 94 | } // namespace ArkShop 95 | -------------------------------------------------------------------------------- /SafeZone/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ServerName":"ServerNameHere", 3 | "NotificationScale":1.0, 4 | "NotificationDisplayTime":5.0, 5 | "AdminsIgnoreRestrictions":false, 6 | "SafeZones":[ 7 | { 8 | "Name":"Zone1", 9 | "Position":[ 10 | -111820, 11 | 233874, 12 | -14259.6 13 | ], 14 | "Radius":1800, 15 | "PreventPVP":true, 16 | "PreventStructureDamage":true, 17 | "PreventBuilding":true, 18 | "KillWildDinos":true, 19 | "PreventLeaving":false, 20 | "PreventEntering":false, 21 | "EnableEvents":true, 22 | "ScreenNotifications":true, 23 | "ChatNotifications":true, 24 | "SuccessNotificationColor":[ 25 | 0, 26 | 1, 27 | 0, 28 | 1 29 | ], 30 | "FailNotificationColor":[ 31 | 1, 32 | 0, 33 | 0, 34 | 1 35 | ], 36 | "Messages":[ 37 | "You have entered {0}", 38 | "You have left {0}", 39 | "This is a Community trade center you can not build here", 40 | "You are not allowed to enter", 41 | "You are not allowed to leave" 42 | ], 43 | "ItemsConfig":{ 44 | "Items":[ 45 | { 46 | "Amount":1, 47 | "Quality":0, 48 | "ForceBlueprint":false, 49 | "Blueprint":"Blueprint'/Game/PrimalEarth/CoreBlueprints/Items/Armor/Saddles/PrimalItemArmor_CarnoSaddle.PrimalItemArmor_CarnoSaddle'" 50 | } 51 | ], 52 | "Dinos":[ 53 | { 54 | "Level":10, 55 | "Blueprint":"Blueprint'/Game/PrimalEarth/Dinos/Carno/Carno_Character_BP.Carno_Character_BP'" 56 | } 57 | ] 58 | } 59 | }, 60 | { 61 | "Name":"Zone2", 62 | "Position":[ 63 | -107117, 64 | 231616, 65 | -13854.6 66 | ], 67 | "Radius":900, 68 | "PreventPVP":true, 69 | "PreventStructureDamage":false, 70 | "PreventBuilding":false, 71 | "KillWildDinos":true, 72 | "PreventLeaving":false, 73 | "PreventEntering":true, 74 | "EnableEvents":true, 75 | "ScreenNotifications":true, 76 | "ChatNotifications":true, 77 | "SuccessNotificationColor":[ 78 | 0, 79 | 1, 80 | 0, 81 | 1 82 | ], 83 | "FailNotificationColor":[ 84 | 1, 85 | 0, 86 | 0, 87 | 1 88 | ], 89 | "Messages":[ 90 | "You have entered {0}", 91 | "You have left {0}", 92 | "This is a Community trade center you can not build here", 93 | "You are not allowed to enter", 94 | "You are not allowed to leave" 95 | ] 96 | } 97 | ], 98 | "OverrideSpawnPoint":[ 99 | 100 | ] 101 | } -------------------------------------------------------------------------------- /Ping Limiter/PingLimiter/PingLimiterHooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | DECLARE_HOOK(AShooterGameMode_Logout, void, AShooterGameMode*, AController*); 3 | void CheckPingLimits(); 4 | void InitHooks() 5 | { 6 | ArkApi::GetCommands().AddOnTimerCallback("CheckPingLimits", &CheckPingLimits); 7 | ArkApi::GetHooks().SetHook("AShooterGameMode.Logout", &Hook_AShooterGameMode_Logout, &AShooterGameMode_Logout_original); 8 | } 9 | 10 | void RemoveHooks() 11 | { 12 | ArkApi::GetCommands().RemoveOnTimerCallback("CheckPingLimits"); 13 | ArkApi::GetHooks().DisableHook("AShooterGameMode.Logout", &Hook_AShooterGameMode_Logout); 14 | } 15 | 16 | int SecCounter = 0; 17 | DWORD nNowTime, WatchPingTill; 18 | 19 | void CheckPingLimits() 20 | { 21 | if (SecCounter++ == CheckPingSecondsInteval) 22 | { 23 | if (!ArkApi::GetApiUtils().GetWorld()) 24 | { 25 | SecCounter = 0; 26 | return; 27 | } 28 | 29 | nNowTime = timeGetTime(); 30 | WatchPingTill = nNowTime + (CheckPingSecondsInteval * TotalPingStrikes) + CheckPingSecondsInteval; 31 | 32 | const auto& player_controllers = ArkApi::GetApiUtils().GetWorld()->PlayerControllerListField(); 33 | for (TWeakObjectPtr player_controller : player_controllers) 34 | { 35 | AShooterPlayerController* shooter_pc = static_cast(player_controller.Get()); 36 | if (shooter_pc && shooter_pc->PlayerStateField() && (int)shooter_pc->PlayerStateField()->PingField() > PingLimit) 37 | { 38 | int Strike = 1; 39 | PingItr = GetPingData(shooter_pc->LinkedPlayerIDField()); 40 | if (PingItr == pingData.end()) pingData.push_back(PingLimitData(shooter_pc->LinkedPlayerIDField(), nNowTime + (CheckPingSecondsInteval * TotalPingStrikes) + CheckPingSecondsInteval)); 41 | else 42 | { 43 | PingItr->Strike++; 44 | Strike = PingItr->Strike; 45 | } 46 | 47 | if (Strike == TotalPingStrikes) 48 | { 49 | FString KickReason = Messages[4].c_str(); 50 | ArkApi::GetApiUtils().GetShooterGameMode()->KickPlayerController(shooter_pc, &KickReason); 51 | } 52 | else if(DisplayWarningsToUsers) 53 | { 54 | ArkApi::GetApiUtils().SendChatMessage(shooter_pc, Messages[0].c_str(), Messages[3].c_str(), (int)shooter_pc->PlayerStateField()->PingField(), PingLimit, Strike, TotalPingStrikes); 55 | } 56 | } 57 | } 58 | std::remove_if(pingData.begin(), pingData.end(), [](PingLimitData& PLD) -> bool { return PLD.HasPingTimedOut(nNowTime); }); 59 | SecCounter = 0; 60 | } 61 | } 62 | 63 | void _cdecl Hook_AShooterGameMode_Logout(AShooterGameMode* _this, AController* Exiting) 64 | { 65 | if (Exiting && Exiting->IsA(AShooterPlayerController::GetPrivateStaticClass())) 66 | { 67 | AShooterPlayerController* Player = static_cast(Exiting); 68 | if (Player) 69 | { 70 | const auto& PingLeaveItr = GetPingData(Player->LinkedPlayerIDField()); 71 | if (PingLeaveItr != pingData.end()) pingData.erase(PingLeaveItr); 72 | } 73 | } 74 | 75 | AShooterGameMode_Logout_original(_this, Exiting); 76 | } -------------------------------------------------------------------------------- /PluginUpdateChecker/PluginUpdateChecker/Main.cpp: -------------------------------------------------------------------------------- 1 | #include "PluginChecker.h" 2 | #pragma comment(lib, "ArkApi.lib") 3 | 4 | void PluginUpdateCheck() 5 | { 6 | if (PluginsArray.Num() == 0) return; 7 | SecCounter++; 8 | if(SecCounter > (IsCheckingArray ? 2 : 86400)) 9 | { 10 | SecCounter = 0; 11 | if (!VerifyPost) 12 | { 13 | FHttpModule::Get()->CreateRequest(&request); 14 | request->SetHeader(&FString("Content-Type"), &FString("text/html")); 15 | request->SetURL(&FString::Format("https://arkserverapi.com/resources/{}/", PluginsArray[PluginIndex].ResourceID)); 16 | request->SetVerb(&FString("GET")); 17 | request->ProcessRequest(); 18 | IsCheckingArray = VerifyPost = true; 19 | } 20 | else 21 | { 22 | switch (request->GetStatus()) 23 | { 24 | case EHttpRequestStatus::Succeeded: 25 | { 26 | FString Response; 27 | request->ResponseField()->GetContentAsString(&Response); 28 | request->FinishedRequest(); 29 | 30 | float Version = GetPluginVersion(Response); 31 | 32 | if (Version != 0.0f && PluginsArray[PluginIndex].Version != Version) 33 | { 34 | const long long& nNowTime = timeGetTime(); 35 | if(DiscordUseWebHooks) PostDiscord(L"{{\"content\":\"{} {} is now available for download from https://arkserverapi.com/resources/{}/\",\"username\":\"Plugin Update Checker\",\"avatar_url\":null}}", PluginsArray[PluginIndex].Name.ToString().c_str(), Version, PluginsArray[PluginIndex].ResourceID); 36 | Log::GetLog()->info("{} {} is now available for download from www.arkserverapi.com", PluginsArray[PluginIndex].Name.ToString().c_str(), Version); 37 | } 38 | PluginIndex++; 39 | if (PluginIndex == PluginsArray.Num()) 40 | { 41 | PluginIndex = 0; 42 | IsCheckingArray = false; 43 | } 44 | VerifyPost = false; 45 | } 46 | break; 47 | 48 | case EHttpRequestStatus::NotStarted: 49 | case EHttpRequestStatus::Failed: 50 | { 51 | IsCheckingArray = VerifyPost = false; 52 | } 53 | break; 54 | } 55 | } 56 | } 57 | } 58 | 59 | void Init() 60 | { 61 | Log::Get().Init("PluginChecker"); 62 | LoadAllPlugins(); 63 | ArkApi::GetCommands().AddOnTimerCallback("PluginUpdateCheck", &PluginUpdateCheck); 64 | } 65 | 66 | void InitConfig() 67 | { 68 | nlohmann::json PluginCheckerConfig; 69 | std::ifstream file = std::ifstream(ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/PluginUpdateChecker/config.json"); 70 | if (!file.is_open()) return; 71 | file >> PluginCheckerConfig; 72 | file.close(); 73 | 74 | DiscordUseWebHooks = PluginCheckerConfig["PluginChecker"]["DiscordUseWebHooks"]; 75 | std::string Data; 76 | Data = PluginCheckerConfig["PluginChecker"]["DiscordWebHookURL"]; 77 | DiscordWebHookURL = Data.c_str(); 78 | } 79 | 80 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 81 | { 82 | switch (ul_reason_for_call) 83 | { 84 | case DLL_PROCESS_ATTACH: 85 | InitConfig(); 86 | Init(); 87 | break; 88 | case DLL_PROCESS_DETACH: 89 | ArkApi::GetCommands().RemoveOnTimerCallback("PluginUpdateCheck"); 90 | break; 91 | } 92 | return TRUE; 93 | } -------------------------------------------------------------------------------- /SafeZone/SafeZone/Public/SafeZone.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #ifdef ZONE_EXPORTS 6 | #define ZONE_API __declspec(dllexport) 7 | #else 8 | #define ZONE_API __declspec(dllimport) 9 | #endif 10 | 11 | namespace SafeZones 12 | { 13 | struct SafeZone 14 | { 15 | SafeZone(FString name, const FVector& position, int radius, bool prevent_pvp, bool prevent_structure_damage, 16 | bool prevent_building, bool kill_wild_dinos, bool prevent_leaving, bool prevent_entering, bool enable_events, 17 | bool screen_notifications, bool chat_notifications, const FLinearColor& success_color, 18 | const FLinearColor& fail_color, std::vector messages) 19 | : name(std::move(name)), 20 | position(position), 21 | radius(radius), 22 | prevent_pvp(prevent_pvp), 23 | prevent_structure_damage(prevent_structure_damage), 24 | prevent_building(prevent_building), 25 | kill_wild_dinos(kill_wild_dinos), 26 | prevent_leaving(prevent_leaving), 27 | prevent_entering(prevent_entering), 28 | enable_events(enable_events), 29 | screen_notifications(screen_notifications), 30 | chat_notifications(chat_notifications), 31 | success_color(success_color), 32 | fail_color(fail_color), 33 | messages(std::move(messages)) 34 | { 35 | } 36 | 37 | /** 38 | * \brief Safe zone name 39 | */ 40 | FString name; 41 | 42 | /** 43 | * \brief Sphere position 44 | */ 45 | FVector position; 46 | 47 | /** 48 | * \brief Sphere radius 49 | */ 50 | int radius; 51 | 52 | bool prevent_pvp; 53 | bool prevent_structure_damage; 54 | bool prevent_building; 55 | 56 | /** 57 | * \brief Kills wild dinos on entering to safe zone, requires events to be enabled 58 | */ 59 | bool kill_wild_dinos; 60 | 61 | /** 62 | * \brief Doesn't allow players to leave safe zone 63 | */ 64 | bool prevent_leaving; 65 | 66 | bool prevent_entering; 67 | 68 | /** 69 | * \brief Enables OnEnter/OnLeave events 70 | */ 71 | bool enable_events; 72 | 73 | bool screen_notifications; 74 | bool chat_notifications; 75 | 76 | FLinearColor success_color; 77 | FLinearColor fail_color; 78 | 79 | std::vector messages; 80 | 81 | /** 82 | * \brief Actors that are currently in safe zone 83 | */ 84 | TArray actors; 85 | 86 | // Callbacks 87 | 88 | TArray> on_actor_begin_overlap; 89 | TArray> on_actor_end_overlap; 90 | TArray> can_join_zone; 91 | 92 | // Functions 93 | 94 | ZONE_API bool IsOverlappingActor(AActor* other) const; 95 | ZONE_API void SendNotification(AShooterPlayerController* player, const FString& message, 96 | const FLinearColor& color) const; 97 | 98 | void OnEnterSafeZone(AActor* other_actor); 99 | void OnLeaveSafeZone(AActor* other_actor); 100 | 101 | ZONE_API bool CanJoinZone(AShooterPlayerController* player) const; 102 | }; 103 | } 104 | -------------------------------------------------------------------------------- /Mutes/Mutes/Mutes.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {b2d46d29-29b4-427c-ae32-c7fcea11cd37} 14 | 15 | 16 | {7aea03d2-e134-4df0-8416-d43551469307} 17 | 18 | 19 | {22f7aeda-e5d3-4482-be4f-4b75cddd98ac} 20 | 21 | 22 | 23 | 24 | Header Files\Includes 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files\Includes\SQLLite\hdr 43 | 44 | 45 | Header Files\Includes\SQLLite\hdr 46 | 47 | 48 | Header Files\Includes\SQLLite\hdr 49 | 50 | 51 | Header Files\Includes\SQLLite\hdr 52 | 53 | 54 | Header Files\Includes\SQLLite\hdr 55 | 56 | 57 | Header Files\Includes\SQLLite\hdr 58 | 59 | 60 | Header Files\Includes\SQLLite\hdr 61 | 62 | 63 | Header Files\Includes\SQLLite\hdr 64 | 65 | 66 | Header Files\Includes\SQLLite 67 | 68 | 69 | 70 | 71 | Source Files 72 | 73 | 74 | Header Files\Includes\SQLLite 75 | 76 | 77 | -------------------------------------------------------------------------------- /EventManager/AAEventManager.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29021.104 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AZEventManager", "EventManager\EventManager.vcxproj", "{19177CA6-4863-4678-92FC-0B634C4F706F}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DeathmatchEvent", "Events\DeathmatchEvent\DeathmatchEvent.vcxproj", "{4A5ECE72-95AF-4664-ADBF-FAF997E56E5D}" 9 | ProjectSection(ProjectDependencies) = postProject 10 | {19177CA6-4863-4678-92FC-0B634C4F706F} = {19177CA6-4863-4678-92FC-0B634C4F706F} 11 | EndProjectSection 12 | EndProject 13 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TeamDeathmatchEvent", "Events\TDMEvent\TDMEvent.vcxproj", "{B9908074-D1BC-41A6-9132-3E15C9CF94BA}" 14 | ProjectSection(ProjectDependencies) = postProject 15 | {19177CA6-4863-4678-92FC-0B634C4F706F} = {19177CA6-4863-4678-92FC-0B634C4F706F} 16 | EndProjectSection 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|x64 = Debug|x64 21 | Debug|x86 = Debug|x86 22 | Release|x64 = Release|x64 23 | Release|x86 = Release|x86 24 | EndGlobalSection 25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.ActiveCfg = Debug|x64 27 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x64.Build.0 = Debug|x64 28 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.ActiveCfg = Debug|Win32 29 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Debug|x86.Build.0 = Debug|Win32 30 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.ActiveCfg = Release|x64 31 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x64.Build.0 = Release|x64 32 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.ActiveCfg = Release|Win32 33 | {19177CA6-4863-4678-92FC-0B634C4F706F}.Release|x86.Build.0 = Release|Win32 34 | {4A5ECE72-95AF-4664-ADBF-FAF997E56E5D}.Debug|x64.ActiveCfg = Debug|x64 35 | {4A5ECE72-95AF-4664-ADBF-FAF997E56E5D}.Debug|x64.Build.0 = Debug|x64 36 | {4A5ECE72-95AF-4664-ADBF-FAF997E56E5D}.Debug|x86.ActiveCfg = Debug|Win32 37 | {4A5ECE72-95AF-4664-ADBF-FAF997E56E5D}.Debug|x86.Build.0 = Debug|Win32 38 | {4A5ECE72-95AF-4664-ADBF-FAF997E56E5D}.Release|x64.ActiveCfg = Release|x64 39 | {4A5ECE72-95AF-4664-ADBF-FAF997E56E5D}.Release|x64.Build.0 = Release|x64 40 | {4A5ECE72-95AF-4664-ADBF-FAF997E56E5D}.Release|x86.ActiveCfg = Release|Win32 41 | {4A5ECE72-95AF-4664-ADBF-FAF997E56E5D}.Release|x86.Build.0 = Release|Win32 42 | {B9908074-D1BC-41A6-9132-3E15C9CF94BA}.Debug|x64.ActiveCfg = Debug|x64 43 | {B9908074-D1BC-41A6-9132-3E15C9CF94BA}.Debug|x64.Build.0 = Debug|x64 44 | {B9908074-D1BC-41A6-9132-3E15C9CF94BA}.Debug|x86.ActiveCfg = Debug|Win32 45 | {B9908074-D1BC-41A6-9132-3E15C9CF94BA}.Debug|x86.Build.0 = Debug|Win32 46 | {B9908074-D1BC-41A6-9132-3E15C9CF94BA}.Release|x64.ActiveCfg = Release|x64 47 | {B9908074-D1BC-41A6-9132-3E15C9CF94BA}.Release|x64.Build.0 = Release|x64 48 | {B9908074-D1BC-41A6-9132-3E15C9CF94BA}.Release|x86.ActiveCfg = Release|Win32 49 | {B9908074-D1BC-41A6-9132-3E15C9CF94BA}.Release|x86.Build.0 = Release|Win32 50 | EndGlobalSection 51 | GlobalSection(SolutionProperties) = preSolution 52 | HideSolutionNode = FALSE 53 | EndGlobalSection 54 | GlobalSection(ExtensibilityGlobals) = postSolution 55 | SolutionGuid = {8472890D-27EA-4F2D-8F8A-DD9815CAD02B} 56 | EndGlobalSection 57 | EndGlobal 58 | -------------------------------------------------------------------------------- /DinoColourCommand/DinoColourCommand/DinoColourCommandCommands.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "DinoColourCommand.h" 6 | 7 | inline void ChangeDinoColour(AShooterPlayerController* player, FString* message, int mode) 8 | { 9 | if (!player || !player->PlayerStateField() || RequiresAdmin && !player->bIsAdmin()()) 10 | return; 11 | 12 | const uint64 steam_id = ArkApi::IApiUtils::GetSteamIdFromController(player); 13 | if (RequiresPermission && !Permissions::IsPlayerHasPermission(steam_id, "DinoColorCommand")) 14 | { 15 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(255, 0, 0), 16 | "You don't have permissions to use this command"); 17 | return; 18 | } 19 | 20 | TArray Parsed; 21 | message->ParseIntoArray(Parsed, L" ", true); 22 | 23 | if (Parsed.Num() < 3) 24 | { 25 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(255, 0, 0), "Incorrect Syntax: /sdc "); 26 | return; 27 | } 28 | 29 | int Region = 0, Colour = 0; 30 | try 31 | { 32 | Region = std::stoi(Parsed[1].ToString().c_str()); 33 | Colour = std::stoi(Parsed[2].ToString().c_str()); 34 | } 35 | catch (...) 36 | { 37 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(255, 0, 0), "Incorrect Syntax: /sdc "); 38 | } 39 | 40 | if (Colour < 1 || Colour > 56 && Colour < 201 || Colour > 226) 41 | { 42 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(255, 0, 0), "Dino Colour must be 1 - 56 | 201-226"); 43 | return; 44 | } 45 | if (Region < 0 || Region > 5) 46 | { 47 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(255, 0, 0), "Dino Region must be 0-5"); 48 | return; 49 | } 50 | 51 | AActor* Actor = player->GetPlayerCharacter()->GetAimedActor(ECC_GameTraceChannel2, nullptr, 0.0, 0.0, nullptr, nullptr, 52 | false, false); 53 | if (Actor && Actor->IsA(APrimalDinoCharacter::GetPrivateStaticClass())) 54 | { 55 | APrimalDinoCharacter* Dino = static_cast(Actor); 56 | if (Dino && !Dino->IsDead()) 57 | { 58 | AShooterPlayerState* ASPS = static_cast(player->PlayerStateField()); 59 | if (ASPS && ASPS->MyPlayerDataStructField()) 60 | { 61 | if (Dino->TargetingTeamField() != player->TargetingTeamField()) 62 | { 63 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(255, 0, 0), "That is not your dinosaur"); 64 | return; 65 | } 66 | 67 | UFunction* Func = Dino->FindFunctionChecked(FName(L"ForceUpdateColorSets", EFindName::FNAME_Find, false)); 68 | int Args[] = {Region, Colour}; 69 | if (Func) Dino->ProcessEvent(Func, Args); 70 | 71 | FString DinoName = Dino->TamedNameField(); 72 | if (DinoName.Len() == 0) Dino->DinoNameTagField().ToString(&DinoName); 73 | 74 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(0, 255, 0), "{} Color updated", 75 | DinoName.ToString().c_str()); 76 | } 77 | } 78 | } 79 | else 80 | { 81 | ArkApi::GetApiUtils().SendServerMessage(player, FLinearColor(255, 0, 0), 82 | "Please face the middle of your screen towards the dino you want to color"); 83 | } 84 | } 85 | 86 | inline void InitCommands() 87 | { 88 | ArkApi::GetCommands().AddChatCommand("/sdc", &ChangeDinoColour); 89 | } 90 | 91 | inline void RemoveCommands() 92 | { 93 | ArkApi::GetCommands().RemoveChatCommand("/sdc"); 94 | } 95 | -------------------------------------------------------------------------------- /PlayerList/PlayerList/PlayerList.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | x64 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 15.0 20 | {19177CA6-4863-4678-92FC-0B634C4F706F} 21 | Win32Proj 22 | SafeZone 23 | 10.0.16299.0 24 | 25 | 26 | 27 | DynamicLibrary 28 | false 29 | v141 30 | true 31 | Unicode 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | false 44 | 45 | 46 | 47 | NotUsing 48 | Level3 49 | Full 50 | true 51 | true 52 | 53 | 54 | NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 55 | false 56 | E:\ArkServerModding\ArkServerAPIREP\version\Core\Public\; 57 | stdcpp17 58 | 59 | 60 | Windows 61 | 62 | 63 | 64 | 65 | true 66 | UseFastLinkTimeCodeGeneration 67 | E:\ArkServerModding\ArkServerAPIREP\x64\Release\; 68 | Winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) 69 | $(OutDir)$(TargetName)$(TargetExt) 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /PVPScheduler/PVPScheduler/PVPScheduler.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | x64 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 15.0 21 | {825AEB15-4894-46B9-AB08-705667D8E848} 22 | Win32Proj 23 | PVPScheduler 24 | 10.0 25 | 26 | 27 | 28 | DynamicLibrary 29 | false 30 | v142 31 | true 32 | Unicode 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | false 45 | $(MSBuildStartupDirectory)\..\..\ARK-Server-API\version\Core\Public;$(VC_IncludePath);$(WindowsSDK_IncludePath); 46 | d:\Projects;$(LibraryPath);$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64 47 | ../../ABin/$(ProjectName)/ 48 | 49 | 50 | 51 | NotUsing 52 | Level3 53 | MaxSpeed 54 | true 55 | true 56 | true 57 | NDEBUG;PVPSCHEDULER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 58 | true 59 | stdcpp17 60 | E:\ArkServerModding\ArkServerAPIREP\version\Core\Public\; 61 | 62 | 63 | Windows 64 | true 65 | true 66 | true 67 | E:\ArkServerModding\ArkServerAPIREP\x64\Ark\; 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /EventManager/EventManager/Public/Event.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "API\ARK\Ark.h" 3 | 4 | enum EventState 5 | { 6 | WaitingForPlayers = 0, 7 | TeleportingPlayers, 8 | WaitForFight, 9 | GiveEquipment, 10 | Fighting, 11 | Rewarding, 12 | Finished 13 | }; 14 | 15 | typedef std::map> SpawnsMap; //Change to unordered map 16 | typedef SpawnsMap::value_type SpawnsMapType; 17 | 18 | class Event 19 | { 20 | private: 21 | EventState State; 22 | FString Name; 23 | SpawnsMap Spawns; 24 | FVector StructureProtectionPosition; 25 | int StructureProtectionDistance, Counter, Timer, ArkShopPointsEntryFee, PlayersNeededToStart; 26 | float MovementSpeed; 27 | bool StructureProtection, ConfigLoaded, KillOnLogg, OverrideJoinAndLeave, FinalWarning, OnlyAllowNakedsOnJoinEventCommand; 28 | 29 | public: 30 | void InitDefaults(const FString& Name, const bool OverrideJoinAndLeave = false, const bool OnlyAllowNakedsOnJoinEventCommand = true, const bool KillOnLogg = true, const bool StructureProtection = false 31 | , const FVector StructureProtectionPosition = FVector(0, 0, 0), const int StructureProtectionDistance = 0, const float MovementSpeed = 0.f, const int ArkShopPointsEntryFee = 0, const int PlayersNeededToStart = 2) 32 | { 33 | this->Name = Name; 34 | this->KillOnLogg = KillOnLogg; 35 | this->OverrideJoinAndLeave = OverrideJoinAndLeave; 36 | this->OnlyAllowNakedsOnJoinEventCommand = OnlyAllowNakedsOnJoinEventCommand; 37 | this->StructureProtection = StructureProtection; 38 | this->StructureProtectionPosition = StructureProtectionPosition; 39 | this->StructureProtectionDistance = StructureProtectionDistance; 40 | this->MovementSpeed = MovementSpeed; 41 | this->ArkShopPointsEntryFee = ArkShopPointsEntryFee; 42 | this->PlayersNeededToStart = PlayersNeededToStart; 43 | FinalWarning = ConfigLoaded = false; 44 | } 45 | 46 | void Init(const int TimerSecs) 47 | { 48 | ConfigLoaded = true; 49 | FinalWarning = false; 50 | Timer = TimerSecs; 51 | Counter = 0; 52 | SetState(EventState::WaitingForPlayers); 53 | } 54 | 55 | FString& GetName() { return Name; } 56 | 57 | EventState& GetState() { return State; } 58 | void SetState(EventState state) { State = state; } 59 | 60 | bool IsEventOverrideJoinAndLeave() { 61 | return OverrideJoinAndLeave; 62 | } 63 | 64 | bool OnlyNakeds() { 65 | return OnlyAllowNakedsOnJoinEventCommand; 66 | } 67 | 68 | SpawnsMap& GetSpawns() 69 | { 70 | return Spawns; 71 | } 72 | 73 | void AddSpawn(FVector Spawn, int Team = 0) 74 | { 75 | auto itr = Spawns.find(Team); 76 | if (itr != Spawns.end()) itr->second.Add(Spawn); 77 | else 78 | { 79 | TArray Spawnz; 80 | Spawnz.Add(Spawn); 81 | Spawns.insert(SpawnsMapType(Team, Spawnz)); 82 | } 83 | } 84 | 85 | void ClearSpawns() 86 | { 87 | Spawns.clear(); 88 | } 89 | 90 | void ResetCounter() { Counter = 0; } 91 | bool WaitForCounter(int Count) { return Counter++ == Count; } 92 | int GetCounter() { return Counter; } 93 | bool GetFinalWarning() { return FinalWarning; } 94 | void SetFinalWarning(bool FinalWarning) { this->FinalWarning = FinalWarning; } 95 | 96 | 97 | void ResetTimer() { Timer = 0; } 98 | bool WaitForTimer(int Seconds) { Timer++; return Timer > Seconds; } 99 | 100 | bool HasConfigLoaded() { return ConfigLoaded; } 101 | void ResetConfigLoaded() { ConfigLoaded = false; } 102 | 103 | float GetMovementSpeed() { return MovementSpeed; } 104 | 105 | int GetArkShopEntryFee() { return ArkShopPointsEntryFee; } 106 | int GetPlayersNeededToStart() { return PlayersNeededToStart; } 107 | 108 | bool IsEventProtectedStructure(const FVector& StructurePos) 109 | { return StructureProtection && FVector::Distance(StructurePos, StructureProtectionPosition) < StructureProtectionDistance; } 110 | 111 | bool KillOnLoggout() { return KillOnLogg; } 112 | 113 | virtual void InitConfig(const FString& JoinEventCommand, const FString& ServerName, const FString& Map) {}; 114 | virtual void Update() {}; 115 | }; -------------------------------------------------------------------------------- /SafeZone/SafeZone/SafeZone.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | x64 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 15.0 28 | {47717CFF-70CC-445D-8BB0-FBD1EE5C6DB0} 29 | Win32Proj 30 | SafeZone 31 | 10.0.16299.0 32 | 33 | 34 | 35 | DynamicLibrary 36 | false 37 | v141 38 | true 39 | Unicode 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | false 52 | F:\Projects;$(LibraryPath) 53 | 54 | 55 | 56 | NotUsing 57 | Level3 58 | MaxSpeed 59 | true 60 | true 61 | true 62 | NDEBUG;SAFEZONE_EXPORTS;_WINDOWS;_USRDLL;ZONE_EXPORTS;%(PreprocessorDefinitions) 63 | true 64 | ..\..\..\MichsPlugins\Permissions\Permissions\Public\;E:\ArkServerModding\ArkServerAPIREP\version\Core\Public\; 65 | stdcpp17 66 | 67 | 68 | Windows 69 | true 70 | true 71 | true 72 | ../../../ArkServerAPIREP/x64/Release/;..\..\..\MichsPlugins\Permissions\x64\Release\; 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /DinoColourCommand/DinoColourCommand/DinoColourCommand.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Release 6 | x64 7 | 8 | 9 | 10 | 15.0 11 | {C52431A2-2954-4AD1-8A5D-1BB0C6730378} 12 | Win32Proj 13 | SafeZone 14 | 10.0 15 | 16 | 17 | 18 | DynamicLibrary 19 | false 20 | v142 21 | true 22 | Unicode 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | false 35 | $(MSBuildStartupDirectory)\..\Permissions\Permissions\Public;$(MSBuildStartupDirectory)\..\..\ARK-Server-API\version\Core\Public;$(IncludePath) 36 | F:\Projects;$(LibraryPath) 37 | ../../ABin/$(ProjectName)/ 38 | 39 | 40 | 41 | NotUsing 42 | Level3 43 | Full 44 | true 45 | true 46 | 47 | 48 | NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) 49 | false 50 | E:\ArkServerModding\ArkServerAPIREP\version\Core\Public\;../../../MichsPlugins/Permissions/Permissions/Public; 51 | stdcpp17 52 | 53 | 54 | Windows 55 | 56 | 57 | 58 | 59 | true 60 | UseFastLinkTimeCodeGeneration 61 | E:\ArkServerModding\ArkServerAPIREP\x64\Ark\;../../../MichsPlugins/Permissions/x64/Ark/; 62 | Winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) 63 | Permissions.dll 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /Mutes/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "Mutes":{ 3 | "Messages":[ 4 | "Muted For: {} hours, {} minutes.", 5 | "Muted For: {} seconds.", 6 | "Muted For: {} Minutes for saying {}.", 7 | "Banned For: {} hours, {} minutes.", 8 | "Banned For: {} seconds." 9 | ], 10 | "BlackList":[ 11 | { 12 | "Word":"cunt", 13 | "Minutes":5 14 | }, 15 | { 16 | "Word":"arsehole", 17 | "Minutes":5 18 | }, 19 | { 20 | "Word":"bellend", 21 | "Minutes":5 22 | }, 23 | { 24 | "Word":"fanny", 25 | "Minutes":5 26 | }, 27 | { 28 | "Word":"vagina", 29 | "Minutes":5 30 | }, 31 | { 32 | "Word":"penis", 33 | "Minutes":5 34 | }, 35 | { 36 | "Word":"nigg", 37 | "Minutes":5 38 | }, 39 | { 40 | "Word":"nigger", 41 | "Minutes":5 42 | }, 43 | { 44 | "Word":"nigga", 45 | "Minutes":5 46 | }, 47 | { 48 | "Word":"negro", 49 | "Minutes":5 50 | }, 51 | { 52 | "Word":"bitch", 53 | "Minutes":5 54 | }, 55 | { 56 | "Word":"whore", 57 | "Minutes":5 58 | }, 59 | { 60 | "Word":"slut", 61 | "Minutes":5 62 | }, 63 | { 64 | "Word":"prostitute", 65 | "Minutes":5 66 | }, 67 | { 68 | "Word":"fuck", 69 | "Minutes":5 70 | }, 71 | { 72 | "Word":"bastard", 73 | "Minutes":5 74 | }, 75 | { 76 | "Word":"dick", 77 | "Minutes":5 78 | }, 79 | { 80 | "Word":"bugger", 81 | "Minutes":5 82 | }, 83 | { 84 | "Word":"shag", 85 | "Minutes":5 86 | }, 87 | { 88 | "Word":"wanker", 89 | "Minutes":5 90 | }, 91 | { 92 | "Word":"twat", 93 | "Minutes":5 94 | }, 95 | { 96 | "Word":"balls", 97 | "Minutes":5 98 | }, 99 | { 100 | "Word":"munter", 101 | "Minutes":5 102 | }, 103 | { 104 | "Word":"tits", 105 | "Minutes":5 106 | }, 107 | { 108 | "Word":"clit", 109 | "Minutes":5 110 | }, 111 | { 112 | "Word":"clunge", 113 | "Minutes":5 114 | }, 115 | { 116 | "Word":"cock", 117 | "Minutes":5 118 | }, 119 | { 120 | "Word":"frapping", 121 | "Minutes":5 122 | }, 123 | { 124 | "Word":"gash", 125 | "Minutes":5 126 | }, 127 | { 128 | "Word":"minge", 129 | "Minutes":5 130 | }, 131 | { 132 | "Word":"prick", 133 | "Minutes":5 134 | }, 135 | { 136 | "Word":"punani", 137 | "Minutes":5 138 | }, 139 | { 140 | "Word":"slapper", 141 | "Minutes":5 142 | }, 143 | { 144 | "Word":"tart", 145 | "Minutes":5 146 | }, 147 | { 148 | "Word":"dildo", 149 | "Minutes":5 150 | }, 151 | { 152 | "Word":"nonce", 153 | "Minutes":5 154 | }, 155 | { 156 | "Word":"rape", 157 | "Minutes":5 158 | }, 159 | { 160 | "Word":"jizz", 161 | "Minutes":5 162 | }, 163 | { 164 | "Word":"pedo", 165 | "Minutes":5 166 | }, 167 | { 168 | "Word":"peado", 169 | "Minutes":5 170 | }, 171 | { 172 | "Word":"molester", 173 | "Minutes":5 174 | } 175 | ] 176 | } 177 | } -------------------------------------------------------------------------------- /Mutes/Mutes/MuteHooks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | DECLARE_HOOK(AShooterPlayerController_ServerSendChatMessage_Impl, void, AShooterPlayerController*, FString*, EChatSendMode::Type); 3 | DECLARE_HOOK(AShooterGameMode_HandleNewPlayer, bool, AShooterGameMode*, AShooterPlayerController*, UPrimalPlayerData*, AShooterCharacter*, bool); 4 | void SyncAndClean(); 5 | 6 | void InitHooks() 7 | { 8 | ArkApi::GetHooks().SetHook("AShooterPlayerController.ServerSendChatMessage_Implementation", &Hook_AShooterPlayerController_ServerSendChatMessage_Impl, &AShooterPlayerController_ServerSendChatMessage_Impl_original); 9 | ArkApi::GetHooks().SetHook("AShooterGameMode.HandleNewPlayer_Implementation", &Hook_AShooterGameMode_HandleNewPlayer, &AShooterGameMode_HandleNewPlayer_original); 10 | ArkApi::GetCommands().AddOnTimerCallback("MutesSyncAndClean", &SyncAndClean); 11 | } 12 | 13 | void RemoveHooks() 14 | { 15 | ArkApi::GetHooks().DisableHook("AShooterPlayerController.ServerSendChatMessage_Implementation", &Hook_AShooterPlayerController_ServerSendChatMessage_Impl); 16 | ArkApi::GetHooks().DisableHook("AShooterGameMode.HandleNewPlayer_Implementation", &Hook_AShooterGameMode_HandleNewPlayer); 17 | ArkApi::GetCommands().RemoveOnTimerCallback("MutesSyncAndClean"); 18 | } 19 | 20 | std::vector::iterator MuteItr; 21 | int SecCounter = 0, SecCounter2 = 0; 22 | DWORD MuteTimePasted; 23 | void SyncAndClean() 24 | { 25 | 26 | if (SecCounter2++ >= SyncSeconds) 27 | { 28 | SecCounter2 = 0; 29 | SyncMutes(); 30 | } 31 | 32 | if (SecCounter++ == 14400) 33 | { 34 | if (!ArkApi::GetApiUtils().GetWorld()) 35 | { 36 | SecCounter = 0; 37 | return; 38 | } 39 | MuteTimePasted = timeGetTime(); 40 | muteData.RemoveAll([](const MuteData& muteddata) { return MuteTimePasted > muteddata.MutedTill; }); 41 | SecCounter = 0; 42 | } 43 | } 44 | 45 | bool _cdecl Hook_AShooterGameMode_HandleNewPlayer(AShooterGameMode* _this, AShooterPlayerController* NewPlayer, UPrimalPlayerData* PlayerData, AShooterCharacter* PlayerCharacter, bool bIsFromLogin) 46 | { 47 | if (NewPlayer) 48 | { 49 | const int Muted = IsMuted(ArkApi::GetApiUtils().GetSteamIdFromController(NewPlayer), ArkApi::GetApiUtils().GetIPAddress(NewPlayer), true); 50 | if (Muted != 0) 51 | { 52 | const int64 hours = (Muted > 3600 ? (Muted / 3600) : 0), mins((hours > 0 && (Muted - (hours * 3600)) > 60) ? ((Muted - (hours * 3600)) / 60) : (Muted > 60 ? (Muted / 60) : 0)); 53 | FString BanMsg; 54 | if ((mins != 0 || hours != 0)) BanMsg = FString::Format(*Messages[3], hours, mins); 55 | else BanMsg = FString::Format(*Messages[4], Muted); 56 | ArkApi::GetApiUtils().GetShooterGameMode()->KickPlayerController(NewPlayer, &BanMsg); 57 | return false; 58 | } 59 | } 60 | return AShooterGameMode_HandleNewPlayer_original(_this, NewPlayer, PlayerData, PlayerCharacter, bIsFromLogin); 61 | } 62 | 63 | void _cdecl Hook_AShooterPlayerController_ServerSendChatMessage_Impl(AShooterPlayerController* _this, FString* Message, EChatSendMode::Type Mode) 64 | { 65 | if (_this && Mode == EChatSendMode::Type::GlobalChat && !Message->IsEmpty()) 66 | { 67 | const uint64 SteamID = ArkApi::GetApiUtils().GetSteamIdFromController(_this); 68 | const int Muted = IsMuted(SteamID, ArkApi::GetApiUtils().GetIPAddress(_this), false); 69 | if (Muted != 0) 70 | { 71 | const int64 hours = (Muted > 3600 ? (Muted / 3600) : 0), mins((hours > 0 && (Muted - (hours * 3600)) > 60) ? ((Muted - (hours * 3600)) / 60) : (Muted > 60 ? (Muted / 60) : 0)); 72 | if (_this && (mins != 0 || hours != 0)) ArkApi::GetApiUtils().SendServerMessage(_this, FLinearColor(255, 0, 0), *Messages[0], hours, mins); 73 | else if(_this) ArkApi::GetApiUtils().SendServerMessage(_this, FLinearColor(255, 0, 0), *Messages[1], Muted); 74 | return; 75 | } 76 | 77 | if (BadWord.Num() > 0) 78 | { 79 | const auto& Itr = BadWord.FindByPredicate([Message](const BadWords& bw) -> bool { return Message->Contains(bw.Word); }); 80 | if (Itr) 81 | { 82 | if (Itr->Minutes > 0) 83 | { 84 | 85 | if(_this) ArkApi::GetApiUtils().SendServerMessage(_this, FLinearColor(255, 0, 0), *Messages[2], Itr->Minutes, *Itr->Word); 86 | Log::GetLog()->info("Muted: {}, Word: {}, Minutes: {}", ArkApi::GetApiUtils().GetCharacterName(_this).ToString(), Itr->Word.ToString(), Itr->Minutes); 87 | AddMute(SteamID, Itr->Minutes, 0, false, false); 88 | } 89 | return; 90 | } 91 | } 92 | } 93 | AShooterPlayerController_ServerSendChatMessage_Impl_original(_this, Message, Mode); 94 | } -------------------------------------------------------------------------------- /Mutes/Mutes/hdr/sqlite_modern_cpp/log.h: -------------------------------------------------------------------------------- 1 | #include "errors.h" 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | namespace sqlite { 10 | namespace detail { 11 | template 12 | using void_t = void; 13 | template 14 | struct is_callable : std::false_type {}; 15 | template 16 | struct is_callable()(std::declval()...))>> : std::true_type {}; 17 | template 18 | class FunctorOverload: public Functor, public FunctorOverload { 19 | public: 20 | template 21 | FunctorOverload(Functor1 &&functor, Remaining &&... remaining): 22 | Functor(std::forward(functor)), 23 | FunctorOverload(std::forward(remaining)...) {} 24 | using Functor::operator(); 25 | using FunctorOverload::operator(); 26 | }; 27 | template 28 | class FunctorOverload: public Functor { 29 | public: 30 | template 31 | FunctorOverload(Functor1 &&functor): 32 | Functor(std::forward(functor)) {} 33 | using Functor::operator(); 34 | }; 35 | template 36 | class WrapIntoFunctor: public Functor { 37 | public: 38 | template 39 | WrapIntoFunctor(Functor1 &&functor): 40 | Functor(std::forward(functor)) {} 41 | using Functor::operator(); 42 | }; 43 | template 44 | class WrapIntoFunctor { 45 | ReturnType(*ptr)(Arguments...); 46 | public: 47 | WrapIntoFunctor(ReturnType(*ptr)(Arguments...)): ptr(ptr) {} 48 | ReturnType operator()(Arguments... arguments) { return (*ptr)(std::forward(arguments)...); } 49 | }; 50 | inline void store_error_log_data_pointer(std::shared_ptr ptr) { 51 | static std::shared_ptr stored; 52 | stored = std::move(ptr); 53 | } 54 | template 55 | std::shared_ptr::type> make_shared_inferred(T &&t) { 56 | return std::make_shared::type>(std::forward(t)); 57 | } 58 | } 59 | template 60 | typename std::enable_if::value>::type 61 | error_log(Handler &&handler); 62 | template 63 | typename std::enable_if::value>::type 64 | error_log(Handler &&handler); 65 | template 66 | typename std::enable_if=2>::type 67 | error_log(Handler &&...handler) { 68 | return error_log(detail::FunctorOverload::type>...>(std::forward(handler)...)); 69 | } 70 | template 71 | typename std::enable_if::value>::type 72 | error_log(Handler &&handler) { 73 | return error_log(std::forward(handler), [](const sqlite_exception&) {}); 74 | } 75 | template 76 | typename std::enable_if::value>::type 77 | error_log(Handler &&handler) { 78 | auto ptr = detail::make_shared_inferred([handler = std::forward(handler)](int error_code, const char *errstr) mutable { 79 | switch(error_code & 0xFF) { 80 | #define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \ 81 | case SQLITE_ ## NAME: switch(error_code) { \ 82 | derived \ 83 | default: handler(errors::name(errstr, "", error_code)); \ 84 | };break; 85 | #define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \ 86 | case SQLITE_ ## BASE ## _ ## SUB: \ 87 | handler(errors::base ## _ ## sub(errstr, "", error_code)); \ 88 | break; 89 | #include "lists/error_codes.h" 90 | #undef SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED 91 | #undef SQLITE_MODERN_CPP_ERROR_CODE 92 | default: handler(sqlite_exception(errstr, "", error_code)); \ 93 | } 94 | }); 95 | 96 | sqlite3_config(SQLITE_CONFIG_LOG, (void(*)(void*,int,const char*))[](void *functor, int error_code, const char *errstr) { 97 | (*static_cast(functor))(error_code, errstr); 98 | }, ptr.get()); 99 | detail::store_error_log_data_pointer(std::move(ptr)); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /ArkShop/ArkShop/Private/hdr/sqlite_modern_cpp/log.h: -------------------------------------------------------------------------------- 1 | #include "errors.h" 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | namespace sqlite { 10 | namespace detail { 11 | template 12 | using void_t = void; 13 | template 14 | struct is_callable : std::false_type {}; 15 | template 16 | struct is_callable()(std::declval()...))>> : std::true_type {}; 17 | template 18 | class FunctorOverload: public Functor, public FunctorOverload { 19 | public: 20 | template 21 | FunctorOverload(Functor1 &&functor, Remaining &&... remaining): 22 | Functor(std::forward(functor)), 23 | FunctorOverload(std::forward(remaining)...) {} 24 | using Functor::operator(); 25 | using FunctorOverload::operator(); 26 | }; 27 | template 28 | class FunctorOverload: public Functor { 29 | public: 30 | template 31 | FunctorOverload(Functor1 &&functor): 32 | Functor(std::forward(functor)) {} 33 | using Functor::operator(); 34 | }; 35 | template 36 | class WrapIntoFunctor: public Functor { 37 | public: 38 | template 39 | WrapIntoFunctor(Functor1 &&functor): 40 | Functor(std::forward(functor)) {} 41 | using Functor::operator(); 42 | }; 43 | template 44 | class WrapIntoFunctor { 45 | ReturnType(*ptr)(Arguments...); 46 | public: 47 | WrapIntoFunctor(ReturnType(*ptr)(Arguments...)): ptr(ptr) {} 48 | ReturnType operator()(Arguments... arguments) { return (*ptr)(std::forward(arguments)...); } 49 | }; 50 | inline void store_error_log_data_pointer(std::shared_ptr ptr) { 51 | static std::shared_ptr stored; 52 | stored = std::move(ptr); 53 | } 54 | template 55 | std::shared_ptr::type> make_shared_inferred(T &&t) { 56 | return std::make_shared::type>(std::forward(t)); 57 | } 58 | } 59 | template 60 | typename std::enable_if::value>::type 61 | error_log(Handler &&handler); 62 | template 63 | typename std::enable_if::value>::type 64 | error_log(Handler &&handler); 65 | template 66 | typename std::enable_if=2>::type 67 | error_log(Handler &&...handler) { 68 | return error_log(detail::FunctorOverload::type>...>(std::forward(handler)...)); 69 | } 70 | template 71 | typename std::enable_if::value>::type 72 | error_log(Handler &&handler) { 73 | return error_log(std::forward(handler), [](const sqlite_exception&) {}); 74 | } 75 | template 76 | typename std::enable_if::value>::type 77 | error_log(Handler &&handler) { 78 | auto ptr = detail::make_shared_inferred([handler = std::forward(handler)](int error_code, const char *errstr) mutable { 79 | switch(error_code & 0xFF) { 80 | #define SQLITE_MODERN_CPP_ERROR_CODE(NAME,name,derived) \ 81 | case SQLITE_ ## NAME: switch(error_code) { \ 82 | derived \ 83 | default: handler(errors::name(errstr, "", error_code)); \ 84 | };break; 85 | #define SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED(BASE,SUB,base,sub) \ 86 | case SQLITE_ ## BASE ## _ ## SUB: \ 87 | handler(errors::base ## _ ## sub(errstr, "", error_code)); \ 88 | break; 89 | #include "lists/error_codes.h" 90 | #undef SQLITE_MODERN_CPP_ERROR_CODE_EXTENDED 91 | #undef SQLITE_MODERN_CPP_ERROR_CODE 92 | default: handler(sqlite_exception(errstr, "", error_code)); \ 93 | } 94 | }); 95 | 96 | sqlite3_config(SQLITE_CONFIG_LOG, (void(*)(void*,int,const char*))[](void *functor, int error_code, const char *errstr) { 97 | (*static_cast(functor))(error_code, errstr); 98 | }, ptr.get()); 99 | detail::store_error_log_data_pointer(std::move(ptr)); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /SafeZone/SafeZone/Private/SafeZone.cpp: -------------------------------------------------------------------------------- 1 | #include "../Public/SafeZone.h" 2 | 3 | #include 4 | 5 | #include "SafeZones.h" 6 | #include "SafeZoneManager.h" 7 | 8 | namespace SafeZones 9 | { 10 | bool SafeZone::IsOverlappingActor(AActor* other) const 11 | { 12 | return actors.Find(other) != INDEX_NONE; 13 | } 14 | 15 | void SafeZone::SendNotification(AShooterPlayerController* player, const FString& message, 16 | const FLinearColor& color) const 17 | { 18 | if (screen_notifications) 19 | { 20 | const float display_scale = config["NotificationScale"]; 21 | const float display_time = config["NotificationDisplayTime"]; 22 | 23 | ArkApi::GetApiUtils().SendNotification(player, color, display_scale, display_time, 24 | nullptr, *message); 25 | } 26 | 27 | if (chat_notifications) 28 | { 29 | ArkApi::GetApiUtils().SendChatMessage(player, name, 30 | fmt::format(L"{4}", color.R, 31 | color.G, color.B, color.A, *message).c_str()); 32 | } 33 | } 34 | 35 | void SafeZone::OnEnterSafeZone(AActor* other_actor) 36 | { 37 | if (!other_actor) 38 | return; 39 | 40 | if (other_actor->IsA(AShooterCharacter::GetPrivateStaticClass())) 41 | { 42 | AShooterPlayerController* player = ArkApi::GetApiUtils().FindControllerFromCharacter( 43 | static_cast(other_actor)); 44 | if (player) 45 | { 46 | if (prevent_leaving || prevent_entering) 47 | { 48 | auto& players_pos = SafeZoneManager::Get().players_pos; 49 | if (players_pos.find(player) != players_pos.end()) 50 | { 51 | auto& player_pos = players_pos[player]; 52 | 53 | player_pos.zone = this; 54 | player_pos.in_zone = true; 55 | 56 | if (!CanJoinZone(player)) 57 | { 58 | SendNotification(player, messages[3], fail_color); 59 | 60 | const FVector& last_pos = player_pos.outzone_pos; 61 | player->SetPlayerPos(last_pos.X, last_pos.Y, last_pos.Z); 62 | return; 63 | } 64 | } 65 | else 66 | { 67 | players_pos[player] = {this, true, player->DefaultActorLocationField(), player->DefaultActorLocationField()}; 68 | } 69 | } 70 | 71 | SendNotification(player, FString::Format(*messages[0], *name), 72 | success_color); 73 | } 74 | } 75 | else if (kill_wild_dinos && other_actor->TargetingTeamField() < 50000 && 76 | other_actor->IsA(APrimalDinoCharacter::GetPrivateStaticClass())) 77 | { 78 | APrimalDinoCharacter* dino = static_cast(other_actor); 79 | dino->Suicide(); 80 | } 81 | 82 | // Execute callbacks 83 | for (const auto& callback : on_actor_begin_overlap) 84 | { 85 | callback(other_actor); 86 | } 87 | } 88 | 89 | void SafeZone::OnLeaveSafeZone(AActor* other_actor) 90 | { 91 | if (!other_actor) 92 | return; 93 | 94 | if (other_actor->IsA(AShooterCharacter::GetPrivateStaticClass())) 95 | { 96 | AShooterPlayerController* player = ArkApi::GetApiUtils().FindControllerFromCharacter( 97 | static_cast(other_actor)); 98 | if (player) 99 | { 100 | if (prevent_leaving || prevent_entering) 101 | { 102 | auto& players_pos = SafeZoneManager::Get().players_pos; 103 | auto& player_pos = players_pos[player]; 104 | 105 | if (player_pos.zone && !player_pos.zone->CanJoinZone(player)) 106 | { 107 | player_pos.zone = nullptr; 108 | return; 109 | } 110 | 111 | if (prevent_leaving) 112 | { 113 | player_pos.in_zone = false; 114 | 115 | SendNotification(player, messages[4], fail_color); 116 | 117 | const FVector& last_pos = player_pos.inzone_pos; 118 | player->SetPlayerPos(last_pos.X, last_pos.Y, last_pos.Z); 119 | 120 | actors.Add(other_actor); 121 | return; 122 | } 123 | 124 | player_pos.zone = nullptr; 125 | } 126 | 127 | SendNotification(player, FString::Format(*messages[1], *name), 128 | fail_color); 129 | } 130 | } 131 | 132 | // Execute callbacks 133 | for (const auto& callback : on_actor_end_overlap) 134 | { 135 | callback(other_actor); 136 | } 137 | } 138 | 139 | bool SafeZone::CanJoinZone(AShooterPlayerController* player) const 140 | { 141 | bool result = true; 142 | 143 | if (prevent_entering) 144 | { 145 | const uint64 steam_id = ArkApi::IApiUtils::GetSteamIdFromController(player); 146 | 147 | result = Permissions::IsPlayerHasPermission(steam_id, "SafeZones." + name); 148 | } 149 | 150 | for (const auto& callback : can_join_zone) 151 | { 152 | result = callback(player); 153 | } 154 | 155 | return result; 156 | } 157 | } 158 | --------------------------------------------------------------------------------