├── Examples.py ├── FougeritePlugins ├── AAscii │ └── AAscii.py ├── AdminChat │ └── AdminChat.py ├── AdminDoors │ └── AdminDoors.py ├── AdminTools │ └── AdminTools.py ├── Airdrops │ └── Airdrops.py ├── AntiAdvert │ └── AntiAdvert.py ├── AntiCheat │ └── AntiCheat.py ├── AntiDizzy │ └── AntiDizzy.py ├── AntiSpam │ └── AntiSpam.py ├── AutoAnnouncer │ └── AutoAnnouncer.py ├── AutoDoorCloser │ └── AutoDoorCloser.py ├── BambeeProtector │ └── BambeeProtector.py ├── BannedPeople │ ├── BannedPeople.ini │ └── BannedPeople.py ├── C4Log │ └── C4Log.py ├── ChangeOwner │ └── ChangeOwner.py ├── ChestLog │ └── ChestLog.py ├── Clans │ └── Clans.py ├── Color │ └── Color.py ├── CommandRestrict │ └── CommandRestrict.py ├── DamageDisplay │ └── DamageDisplay.py ├── DeathMSG │ ├── BannedPeopleDM.ini │ ├── DeathMSG.py │ ├── DeathMSGConfig.ini │ ├── bodyparts.ini │ └── range.ini ├── DerpDonator │ └── DerpDonator.py ├── DestroySystem │ └── DestroySystem.py ├── FPSBoost │ └── FPSBoost.py ├── Give │ └── Give.py ├── HighPing │ └── HighPing.py ├── HomeSystem │ ├── DefaultLoc.ini │ ├── HomeConfig.ini │ └── HomeSystem.py ├── HomeSystem3 │ ├── DefaultLoc.ini │ └── HomeSystem3.py ├── HungerGames │ └── HungerGames.py ├── IdIdentifier │ └── IdIdentifier.py ├── IllegalName │ ├── IllegalName.py │ ├── IllegalNameConfig.ini │ └── IllegalNames.ini ├── Introduction │ └── Introduction.py ├── InvLookup │ └── InvLookup.py ├── JZap │ └── JZap.py ├── KillingSpree │ └── KillingSpree.py ├── Kits │ ├── Kits.py │ └── LoadOuts │ │ ├── admin.ini │ │ └── starter.ini ├── LevelSystem │ └── LevelSystem.py ├── Loadout │ └── Loadout.py ├── Location │ └── Location.py ├── Moderators │ └── Moderators.py ├── NavMeshRunner │ └── NavMeshRunner.py ├── NoSuicide │ └── NoSuicide.py ├── PM │ └── PM.py ├── RampFix │ └── RampFix.py ├── Recorder │ ├── Buildings │ │ ├── raidbase.ini │ │ └── tinyhouse.ini │ └── Recorder.py ├── ResourceSpawner │ └── ResourceSpawner.py ├── SetHealth │ └── SetHealth.py ├── SleeperLog │ └── SleeperLog.py ├── SpikeDamage │ └── SpikeDamage.py ├── SteamProfiler │ └── SteamProfiler.py ├── TDM │ ├── TDM.ini │ └── TDM.py ├── TpFriend │ ├── DefaultLoc.ini │ ├── TpFriend.py │ └── TpFriendConfig.ini ├── Warps │ └── Warps.py ├── Wiper │ ├── Health.ini │ └── Wiper.py └── iConomy │ ├── ShopData.ini │ └── iConomy.py ├── IronPythonModule.dll ├── Pluton ├── Attacker.py ├── AuthEvent.py ├── BaseCorpse.py ├── BaseEntity.py ├── BasePlayer.py ├── BuildingEvent.py ├── BuildingPart.py ├── ChatEvent.py ├── ClientConsoleEvent.py ├── CommandPermissionEvent.py ├── Connection.py ├── CorpseHurtEvent.py ├── CorpseInitEvent.py ├── CraftEvent.py ├── DataStore.py ├── DeathEvent.py ├── DoorCodeEvent.py ├── DoorUseEvent.py ├── Entity.py ├── EntityLootEvent.py ├── GatherEvent.py ├── Ini.py ├── ItemAmount.py ├── ItemBlueprint.py ├── ItemDefinition.py ├── MetabolismDamageEvent.py ├── MetabolismTickEvent.py ├── NPC.py ├── NPCDeathEvent.py ├── NPCHurtEvent.py ├── OfflinePlayer.py ├── Player.py ├── PlayerDeathEvent.py ├── PlayerHurtEvent.py ├── PlayerMetabolism.py ├── Plugin.py ├── Rarity.py ├── RespawnEvent.py ├── Server.py ├── ServerConsoleEvent.py ├── Stats.py ├── TimedEvent.py ├── Util.py ├── Victim.py ├── World.py ├── Zone2D.py ├── __init__.py ├── _info.py └── cmd.py ├── PlutonPlugins ├── AdminCommands │ ├── AdminCommands.py │ └── Resources.ini ├── BannedPeople │ └── BannedPeople.py ├── Clans │ └── Clans.py ├── CraftingFix │ └── CraftingFix.py ├── DeathMSG │ └── DeathMSG.py ├── DestroyLog │ └── DestroyLog.py ├── Help │ └── Help.py ├── HomeSystem │ ├── HomeConfig.ini │ └── HomeSystem.py ├── IdIdentifier │ └── IdIdentifier.py ├── IllegalName │ ├── IllegalName.py │ ├── IllegalNameConfig.ini │ └── IllegalNames.ini ├── InstaBuild │ └── InstaBuild.py ├── InstaCraft │ └── InstaCraft.py ├── Kits │ └── Kits.py ├── MethodVarsGetter │ └── MethodVarsGetter.py ├── PluIRC │ └── PluIRC.py ├── Report │ └── Report.py ├── Test.py ├── TpFriend │ ├── TpFriend.py │ └── TpFriendConfig.ini └── iConomy │ ├── Resources.ini │ └── iConomy.py └── README.md /Examples.py: -------------------------------------------------------------------------------- 1 | __author__ = 'Balu92' 2 | import clr 3 | import sys 4 | clr.AddReferenceByPartialName("UnityEngine") 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import UnityEngine 7 | import Fougerite 8 | from UnityEngine import Debug 9 | 10 | class Test: 11 | def On_TablesLoaded(self, tables): 12 | # Debug.Log("On_TablesLoaded hooked with " + tables.Count.ToString() + " element, from Python") 13 | Plugin.DumpObjToFile("On_TablesLoaded.Tables", tables, 3, 20, True, True) 14 | return tables 15 | 16 | def On_AllPluginsLoaded(self): 17 | Debug.Log("The knights who say NI!") 18 | 19 | def On_ServerInit(self): 20 | Debug.Log("On_ServerInit hooked from Python") 21 | dic = Plugin.CreateDict() 22 | dic.Add("first", "timer is:") 23 | dic.Add("second", "working") 24 | Plugin.CreateTimer("testtimer", 5000, dic).Start() 25 | 26 | def testtimerCallback(self, dic): 27 | plug2 = Plugin.GetPlugin("Test2") 28 | plug2.Invoke("TestSharedFunction", dic["first"], dic["second"]) 29 | Debug.Log(dic["first"]) 30 | Debug.Log(dic["second"]) 31 | Plugin.DumpObjToFile("testtimerCallback.dict", dic, 3, 20, True, True) 32 | Plugin.KillTimers() 33 | 34 | def On_PluginInit(self): 35 | Debug.Log("On_PluginInit hooked from Python") 36 | 37 | def On_ServerShutdown(self): 38 | Debug.Log("On_ServerShutdown hooked from Python") 39 | 40 | def On_ItemsLoaded(self, items): 41 | # Debug.Log("On_ItemsLoaded hooked with " + items.Count + " element, from Python") 42 | Plugin.DumpObjToFile("On_ItemsLoaded.Items", items, 3, 20, True, True) 43 | return items 44 | 45 | def On_Chat(self, Player, Text): 46 | # Debug.Log(Player.Name + " says: " + Text) 47 | Plugin.DumpObjToFile("On_Chat.Player", Player, 3, 20, True, True) 48 | Plugin.DumpObjToFile("On_Chat.Text", Text, 3, 20, True, True) 49 | 50 | def On_BlueprintUse(self, Player, BPUseEvent): 51 | # Debug.Log(Player.Name + " researched " + BPUseEvent.ItemName) 52 | Plugin.DumpObjToFile("On_BlueprintUse.Player", Player, 3, 20, True, True) 53 | Plugin.DumpObjToFile("On_BlueprintUse.BPUseEvent", BPUseEvent, 3, 20, True, True) 54 | 55 | def On_Command(self, Player, cmd, args): 56 | # Debug.Log("On_Command(" + Player.Name + ", " + cmd + ", " + args + ")") 57 | Plugin.DumpObjToFile("On_Command.Player", Player, 3, 20, True, True) 58 | Plugin.DumpObjToFile("On_Command.cmd", cmd, 3, 20, True, True) 59 | Plugin.DumpObjToFile("On_Command.args", args, 3, 20, True, True) 60 | 61 | def On_Console(self, Player, Arg): 62 | # Debug.Log(Player.Name + " used " + Arg.Class + "." + Arg.Function + " in console ") 63 | Plugin.DumpObjToFile("On_Console.Player", Player, 3, 20, True, True) 64 | Plugin.DumpObjToFile("On_Console.Arg", Arg, 3, 20, True, True) 65 | 66 | def On_DoorUse(self, Player, DoorEvent): 67 | # Debug.Log(Player.Name + " tried to use a door") 68 | # Debug.Log("Succeded? " + ("yes" if DoorEvent.Open else "no")) 69 | Plugin.DumpObjToFile("On_DoorUse.Player", Player, 3, 20, True, True) 70 | Plugin.DumpObjToFile("On_DoorUse.DoorEvent", DoorEvent, 3, 20, True, True) 71 | 72 | def On_EntityDecay(self, DecayEvent): 73 | Plugin.DumpObjToFile("On_EntityDecay.DecayEvent", DecayEvent, 3, 20, True, True) 74 | return DecayEvent.DamageAmount 75 | 76 | def On_EntityDeployed(self, Player, Entity): 77 | Plugin.DumpObjToFile("On_EntityDeployed.Player", Player, 3, 20, True, True) 78 | Plugin.DumpObjToFile("On_EntityDeployed.Entity", Entity, 3, 20, True, True) 79 | 80 | def On_EntityHurt(self, HurtEvent): 81 | Plugin.DumpObjToFile("On_EntityHurt.HurtEvent", HurtEvent, 3, 20, True, True) 82 | 83 | def On_EntityDestroyed(self, DestroyEvent): 84 | Plugin.DumpObjToFile("On_EntityDestroyed.DestroyEvent", DestroyEvent, 3, 20, True, True) 85 | 86 | def On_NPCKilled(self, DeathEvent): 87 | Plugin.DumpObjToFile("On_NPCKilled.DeathEvent", DeathEvent, 3, 20, True, True) 88 | 89 | def On_NPCHurt(self, HurtEvent): 90 | Plugin.DumpObjToFile("On_NPCHurt.HurtEvent", HurtEvent, 3, 20, True, True) 91 | 92 | def On_PlayerGathering(self, Player, GatherEvent): 93 | Plugin.DumpObjToFile("On_PlayerGathering.Player", Player, 3, 20, True, True) 94 | Plugin.DumpObjToFile("On_PlayerGathering.GatherEvent", GatherEvent, 3, 20, True, True) 95 | 96 | def On_PlayerSpawning(self, Player, SpawnEvent): 97 | Plugin.DumpObjToFile("On_PlayerSpawning.Player", Player, 3, 20, True, True) 98 | Plugin.DumpObjToFile("On_PlayerSpawning.SpawnEvent", SpawnEvent, 3, 20, True, True) 99 | return Util.CreateVector(SpawnEvent.X, SpawnEvent.Y, SpawnEvent.Z) 100 | 101 | def On_PlayerSpawned(self, Player, SpawnEvent): 102 | Plugin.DumpObjToFile("On_PlayerSpawned.Player", Player, 3, 20, True, True) 103 | Plugin.DumpObjToFile("On_PlayerSpawned.SpawnEvent", SpawnEvent, 3, 20, True, True) 104 | 105 | def On_PlayerKilled(self, DeathEvent): 106 | Plugin.DumpObjToFile("On_PlayerKilled.DeathEvent", DeathEvent, 3, 20, True, True) 107 | 108 | def On_PlayerHurt(self, HurtEvent): 109 | Plugin.DumpObjToFile("On_PlayerHurt.HurtEvent", HurtEvent, 3, 20, True, True) 110 | 111 | def On_PlayerConnected(self, Player): 112 | Plugin.DumpObjToFile("On_PlayerConnected.Player", Player, 3, 20, True, True) 113 | 114 | def On_PlayerDisconnected(self, Player): 115 | Plugin.DumpObjToFile("On_PlayerDisconnected.Player", Player, 3, 20, True, True) -------------------------------------------------------------------------------- /FougeritePlugins/AAscii/AAscii.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | __author__ = 'DreTaX' 3 | __version__ = '1.6.5' 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | import re 9 | 10 | RandNames = [] 11 | Names = [] 12 | Restricted = [] 13 | red = "[color #FF0000]" 14 | 15 | 16 | class AAscii: 17 | 18 | a = None 19 | m = None 20 | maxl = None 21 | DeleteIllegalCharsMods = None 22 | DeleteIllegalCharsAdmins = None 23 | KickInsteadOfRenaming = None 24 | 25 | def On_PluginInit(self): 26 | ini = self.ANA() 27 | self.a = int(ini.GetSetting("Settings", "DontRenameAdmins")) 28 | self.m = int(ini.GetSetting("Settings", "DontRenameMods")) 29 | self.DeleteIllegalCharsAdmins = int(ini.GetSetting("Settings", "DeleteIllegalCharsAdmins")) 30 | self.DeleteIllegalCharsMods = int(ini.GetSetting("Settings", "DeleteIllegalCharsMods")) 31 | self.maxl = int(ini.GetSetting("Settings", "NameLength")) 32 | self.KickInsteadOfRenaming = int(ini.GetSetting("Settings", "KickInsteadOfRenaming")) 33 | enum = ini.EnumSection("Restrict") 34 | for checkn in enum: 35 | get = ini.GetSetting("Restrict", checkn).lower() 36 | Restricted.append(get) 37 | Util.ConsoleLog("AAscii (ANA) by " + __author__ + " Version: " + __version__ + " loaded.", False) 38 | 39 | def ANA(self): 40 | if not Plugin.IniExists("ANA"): 41 | ini = Plugin.CreateIni("ANA") 42 | ini.AddSetting("Settings", "KickInsteadOfRenaming", "0") 43 | ini.AddSetting("Settings", "DontRenameAdmins", "1") 44 | ini.AddSetting("Settings", "DontRenameMods", "1") 45 | ini.AddSetting("Settings", "DeleteIllegalCharsAdmins", "1") 46 | ini.AddSetting("Settings", "DeleteIllegalCharsMods", "1") 47 | ini.AddSetting("Settings", "NameLength", "17") 48 | ini.AddSetting("Restrict", "1", "DerpTeamNoob") 49 | ini.AddSetting("Restrict", "2", "Changeme") 50 | ini.Save() 51 | return Plugin.GetIni("ANA") 52 | 53 | def GetNum(self): 54 | for x in xrange(0, 1000): 55 | if x in RandNames: 56 | continue 57 | RandNames.append(x) 58 | return x 59 | 60 | def CutName(self, string): 61 | name = re.sub(r'[^\x00-\x7F]+', '', string) 62 | return name 63 | 64 | def Replace(self, Old, To, Text): 65 | return re.sub('(?i)' + re.escape(Old), lambda m: To, Text) 66 | 67 | def Rename(self, Player): 68 | name = Player.Name 69 | c = re.match(r'[^\x00-\x7F]+', name) 70 | if not c: 71 | if self.KickInsteadOfRenaming == 1: 72 | Player.Message(red + "You have illegal characters in your name! Rename yourself!") 73 | Player.Disconnect() 74 | return 75 | name = self.CutName(name) 76 | name = re.sub(' +', ' ', name) 77 | name = re.sub('[\t]+', '', name) 78 | starts = name.startswith(' ') 79 | ends = name.endswith(' ') 80 | if starts is True: 81 | name = name.replace(name[0], '') 82 | if ends is True: 83 | n = len(name) 84 | if n > 1: 85 | name = name.replace(name[n - 1], '') 86 | a = re.match('^[a-zA-Z0-9_!+?()<>/@#,. \[\]\\-]+$', name) 87 | if not a: 88 | if self.KickInsteadOfRenaming == 1: 89 | Player.Message(red + "You have illegal characters in your name! Rename yourself!") 90 | Player.Disconnect() 91 | return 92 | name = re.sub('^[a-zA-Z0-9_!+?()<>/@#,. \[\]\\-]+$', "", name) 93 | n = len(name) 94 | if n > self.maxl: 95 | n = 1 96 | if name.lower() in str.join(' ', Restricted).lower(): 97 | n = 1 98 | if name.lower() in str.join(' ', Names).lower() and "stranger" not in name.lower(): 99 | n = 1 100 | if n <= 1: 101 | name = "Stranger" 102 | rand = self.GetNum() 103 | name = name + str(rand) 104 | Player.Name = name 105 | Names.append(name) 106 | 107 | def On_PlayerConnected(self, Player): 108 | if Player.Admin and self.a == 1: 109 | if self.DeleteIllegalCharsAdmins == 1: 110 | name = Player.Name 111 | name = self.CutName(name) 112 | Player.Name = name 113 | Names.append(name) 114 | return 115 | if Player.Moderator and self.m == 1: 116 | if self.DeleteIllegalCharsMods == 1: 117 | name = Player.Name 118 | name = self.CutName(name) 119 | Player.Name = name 120 | Names.append(name) 121 | return 122 | self.Rename(Player) 123 | 124 | def On_PlayerDisconnected(self, Player): 125 | name = Player.Name 126 | if "Stranger" in name: 127 | ssw = [int(s) for s in name if s.isdigit()] 128 | ssw = int(''.join(str(e) for e in ssw)) 129 | if ssw in RandNames: 130 | RandNames.remove(ssw) 131 | if name in Names: 132 | Names.remove(name) 133 | -------------------------------------------------------------------------------- /FougeritePlugins/AdminChat/AdminChat.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | 8 | """ 9 | Class 10 | """ 11 | 12 | # Set It to False to disable 13 | EnableForModerators = True 14 | 15 | teal = "[color #00FFFF]" 16 | green = "[color #009900]" 17 | class AdminChat: 18 | 19 | """ 20 | Methods 21 | """ 22 | 23 | def On_PluginInit(self): 24 | Util.ConsoleLog("AdminChat by " + __author__ + " Version: " + __version__ + " loaded.", False) 25 | 26 | def On_Command(self, Player, cmd, args): 27 | if cmd == "adc": 28 | if Player.Admin or (Player.Moderator and EnableForModerators): 29 | if len(args) == 0: 30 | Player.MessageFrom("AdminChat", "Usage /adc sentence") 31 | return 32 | name = Player.Name 33 | sentence = str.join(" ", args) 34 | for x in Server.Players: 35 | if x.Admin or (x.Moderator and EnableForModerators): 36 | x.MessageFrom("AdminChat", green + name + " => " + teal + sentence) -------------------------------------------------------------------------------- /FougeritePlugins/AntiAdvert/AntiAdvert.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.1' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | import re 8 | 9 | whitelist = ["equinoxgamers.com", "dretaxmc.eu"] 10 | 11 | 12 | class AntiAdvert: 13 | 14 | def On_Chat(self, Player, ChatEvent): 15 | if Player.Admin or Player.Moderator: 16 | return 17 | Text = ChatEvent.OriginalMessage.lower() 18 | Text = re.sub(r'[0-9]+(?:\.[0-9]+){3}(:[0-9]+)?', '', Text) 19 | a = re.findall(r'([\.a-z]*\.)(com|en|org|de|ro|ru|hu|eu|net)(:[0-9]+)', Text) 20 | for x in a: 21 | n = str.join('', x) 22 | if n not in whitelist: 23 | Text = Text.replace(n, '') 24 | if ChatEvent.OriginalMessage.lower() != Text: 25 | Plugin.Log("Test", "- " + Player.Name + " : " + ChatEvent.OriginalMessage.lower()) 26 | Player.Message("Please do not advertise!") 27 | ChatEvent.NewText = Text 28 | -------------------------------------------------------------------------------- /FougeritePlugins/AntiCheat/AntiCheat.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | 8 | class AntiCheat: 9 | 10 | red = "[color #FF0000]" 11 | Players = [] 12 | 13 | def On_PluginInit(self): 14 | DataStore.Flush("EquinoxAntiCheat") 15 | for p in Server.Players: 16 | self.Players.append(p) 17 | Plugin.CreateTimer("CheckLOC", 5000).Start() 18 | 19 | def TrytoGrabID(self, Player): 20 | try: 21 | id = Player.SteamID 22 | return id 23 | except: 24 | return None 25 | 26 | def On_PlayerConnected(self, Player): 27 | id = self.TrytoGrabID(Player) 28 | if id is None: 29 | try: 30 | Player.Disconnect() 31 | except: 32 | pass 33 | return 34 | DataStore.Remove("EquinoxAntiCheat", id) 35 | self.Players.append(Player) 36 | 37 | def On_PlayerDisconnected(self, Player): 38 | self.Players.remove(Player) 39 | id = self.TrytoGrabID(Player) 40 | if id is None: 41 | return 42 | DataStore.Remove("EquinoxAntiCheat", id) 43 | 44 | def CheckLOCCallback(self): 45 | Plugin.KillTimer("CheckLOC") 46 | for player in self.Players: 47 | try: 48 | id = player.SteamID 49 | name = player.Name 50 | except: 51 | continue 52 | tpfriendteleport = DataStore.Get("tpfriendautoban", id) 53 | hometeleport = DataStore.Get("homesystemautoban", id) 54 | if not player.Admin and not self.isMod(id) and tpfriendteleport != "using" and hometeleport != "using": 55 | if player.X == 0.0 and player.Y == 0.0 and player.Z == 0.0: 56 | continue 57 | loc = player.Location 58 | if DataStore.Get("EquinoxAntiCheat", id) is None: 59 | DataStore.Add('EquinoxAntiCheat', id, str(player.X) + "," + str(player.Y) + "," + str(player.Z)) 60 | continue 61 | locl = DataStore.Get("EquinoxAntiCheat", id).split(",") 62 | vector = Util.CreateVector(float(locl[0]), float(locl[1]), float(locl[2])) 63 | fdist = Util.GetVectorsDistance(vector, loc) 64 | ndist = round(fdist, 2) 65 | ndistt = round(float(player.Y) - float(locl[1]), 2) 66 | if ndistt > 23: 67 | player.Message(self.red + "You moved too fast!") 68 | Server.Broadcast(self.red + str(name) + " was moving too fast. Kicked. (" + str(ndistt) + " m)") 69 | player.Disconnect() 70 | continue 71 | if ndist >= 43: 72 | player.Message(self.red + "You moved too fast!") 73 | Server.Broadcast(self.red + str(name) + " was moving too fast. Kicked. (" + str(ndist) + " m)") 74 | player.Disconnect() 75 | continue 76 | DataStore.Add('EquinoxAntiCheat', id, str(player.X) + "," + str(player.Y) + "," + str(player.Z)) 77 | Plugin.CreateTimer("CheckLOC", 5000).Start() 78 | 79 | def On_PlayerKilled(self, DeathEvent): 80 | if DeathEvent.Victim is not None and DeathEvent.Attacker is not None: 81 | DeathEvent.Victim.X = 0.0 82 | DeathEvent.Victim.Y = 0.0 83 | DeathEvent.Victim.Z = 0.0 84 | DataStore.Remove("EquinoxAntiCheat", DeathEvent.Victim.SteamID) 85 | 86 | def On_PlayerSpawned(self, Player, SpawnEvent): 87 | id = Player.SteamID 88 | DataStore.Remove("EquinoxAntiCheat", id) 89 | 90 | def isMod(self, id): 91 | if DataStore.ContainsKey("Moderators", id): 92 | return True 93 | return False -------------------------------------------------------------------------------- /FougeritePlugins/AntiDizzy/AntiDizzy.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | import re 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | DStable = 'AntiDizzy' 14 | class AntiDizzy: 15 | 16 | """ 17 | Timer Functions 18 | """ 19 | 20 | def addJob(self, id, xtime): 21 | epoch = Plugin.GetTimestamp() 22 | exectime = int(epoch) + int(xtime) 23 | DataStore.Add(DStable, id, exectime) 24 | self.startTimer() 25 | 26 | def killJob(self, id): 27 | DataStore.Remove(DStable, id) 28 | 29 | def startTimer(self): 30 | gfjfhg = 2000 31 | try: 32 | if not Plugin.GetTimer("AntiDizzy"): 33 | Plugin.CreateTimer("AntiDizzy", gfjfhg).Start() 34 | except: 35 | pass 36 | 37 | def stopTimer(self): 38 | Plugin.KillTimer("AntiDizzy") 39 | 40 | def getPlayer(self, d): 41 | try: 42 | pl = Server.FindPlayer(d) 43 | return pl 44 | except: 45 | return None 46 | 47 | def clearTimers(self): 48 | DataStore.Flush(DStable) 49 | self.stopTimer() 50 | 51 | 52 | def TrytoGrabID(self, Player): 53 | try: 54 | id = Player.SteamID 55 | return id 56 | except: 57 | return None 58 | 59 | def Replace(self, String): 60 | str = re.sub('[(\)]', '', String) 61 | return str.split(',') 62 | 63 | def On_PlayerSpawned(self, Player, SpawnEvent): 64 | id = self.TrytoGrabID(Player) 65 | if id is None: 66 | try: 67 | Player.SteamID 68 | except: 69 | pass 70 | return 71 | if DataStore.Get("LastLoc", id) is not None: 72 | loc = DataStore.Get("LastLoc", id) 73 | loc = self.Replace(loc) 74 | Player.TeleportTo(float(loc[0]), float(loc[1]) + float(2.5), float(loc[2])) 75 | self.addJob(id, 4) 76 | Server.Broadcast("Tp1") 77 | 78 | def AntiDizzyCallback(self): 79 | epoch = int(Plugin.GetTimestamp()) 80 | if DataStore.Count(DStable) >= 1: 81 | pending = DataStore.Keys(DStable) 82 | for id in pending: 83 | if DataStore.Get(DStable, id) is None: 84 | DataStore.Remove(DStable, id) 85 | continue 86 | param = DataStore.Get(DStable, id) 87 | if epoch >= int(param): 88 | Player = self.getPlayer(id) 89 | self.killJob(id) 90 | if Player is None: 91 | continue 92 | loc = DataStore.Get("LastLoc", id) 93 | if loc is None: 94 | continue 95 | loc = self.Replace(loc) 96 | #Player.TeleportTo(float(loc[0]), float(loc[1]) + float(2.5), float(loc[2])) 97 | vec = Util.CreateVector(float(loc[0]), float(loc[1]), float(loc[2])) 98 | Server.Broadcast("Current: " + str(float(Player.Y)) + " Last: " + str(float(loc[1]))) 99 | Server.Broadcast("Y dist: " + str(float(Player.Y) - float(loc[1]))) 100 | d = float(Player.Y) - float(loc[1]) 101 | if d < (0 - float(2.0)) and d < 0.0: 102 | Server.Broadcast("This fag had dizzy.") 103 | DataStore.Remove("LastLoc", id) 104 | Server.Broadcast("Tp2") 105 | 106 | def On_PlayerDisconnected(self, Player): 107 | id = Player.SteamID 108 | loc = Player.Location 109 | DataStore.Remove("LastLoc", id) 110 | DataStore.Add("LastLoc", id, str(loc)) -------------------------------------------------------------------------------- /FougeritePlugins/AntiSpam/AntiSpam.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.1' 3 | 4 | import clr 5 | clr.AddReferenceByPartialName("Fougerite") 6 | 7 | import Fougerite 8 | import System 9 | from System import * 10 | 11 | Cooldown = {} 12 | Detection = {} 13 | # Seconds that must pass after a player's message before he can send another one. 14 | FloodSeconds = 3 15 | # Amount of flood messages the player will be kicked after. -1 to disable 16 | KickAfter = 3 17 | 18 | 19 | class AntiSpam: 20 | 21 | def On_Chat(self, Player, ChatEvent): 22 | if Player.Admin or Player.Moderator: 23 | return 24 | if Player.UID not in Cooldown: 25 | Cooldown[Player.UID] = float(TimeSpan.FromTicks(DateTime.Now.Ticks).TotalSeconds) 26 | else: 27 | calc = float(TimeSpan.FromTicks(DateTime.Now.Ticks).TotalSeconds) - Cooldown[Player.UID] 28 | if calc < FloodSeconds: 29 | ChatEvent.NewText = " " 30 | Player.Message("[color red]PLEASE DON'T SPAM") 31 | if Player.UID not in Detection.keys(): 32 | Detection[Player.UID] = 0 33 | Detection[Player.UID] = Detection[Player.UID] + 1 34 | if Detection[Player.UID] == KickAfter and Detection[Player.UID] != -1: 35 | Player.Disconnect() 36 | Server.BroadcastNotice(Player.Name + " Has been auto kicked for spamming") 37 | else: 38 | Cooldown[Player.UID] = float(TimeSpan.FromTicks(DateTime.Now.Ticks).TotalSeconds) 39 | if Player.UID in Detection.keys(): 40 | Detection.pop(Player.UID) 41 | 42 | def On_PlayerDisconnected(self, Player): 43 | if Player.UID in Cooldown.keys(): 44 | Cooldown.pop(Player.UID) 45 | if Player.UID in Detection.keys(): 46 | Detection.pop(Player.UID) 47 | -------------------------------------------------------------------------------- /FougeritePlugins/AutoAnnouncer/AutoAnnouncer.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | import sys 10 | path = Util.GetRootFolder() 11 | sys.path.append(path + "\\Save\\Lib\\") 12 | 13 | Lib = True 14 | try: 15 | import random 16 | except ImportError: 17 | Lib = False 18 | 19 | """ 20 | Class 21 | """ 22 | 23 | 24 | class AutoAnnouncer: 25 | 26 | Timer = None 27 | AdvertNumber = None 28 | Sys = None 29 | 30 | def On_PluginInit(self): 31 | Util.ConsoleLog("AutoAnnouncer by " + __author__ + " Version: " + __version__ + " loaded.", False) 32 | ini = self.AutoAnnouncer() 33 | self.Timer = int(ini.GetSetting("Settings", "Timer")) 34 | self.AdvertNumber = int(ini.GetSetting("Settings", "AdvertNumber")) 35 | self.Sys = ini.GetSetting("Settings", "Sys") 36 | Plugin.CreateTimer("AutoAnnouncer", self.Timer).Start() 37 | 38 | def AutoAnnouncer(self): 39 | if not Plugin.IniExists("AutoAnnouncer"): 40 | ini = Plugin.CreateIni("AutoAnnouncer") 41 | ini.AddSetting("Settings", "Timer", "120000") 42 | ini.AddSetting("Settings", "AdvertNumber", "2") 43 | ini.AddSetting("Settings", "Sys", "[Advert]") 44 | ini.AddSetting("Announce1", "Message", "Welcome to Nigeria!") 45 | ini.AddSetting("Announce1", "Message2", "But I'm going to ban you now :P") 46 | ini.AddSetting("Announce2", "Message", "Welcome to Nigeria!") 47 | ini.AddSetting("Announce2", "Message2", "Hey you are lucky! You won't get banned.") 48 | ini.Save() 49 | return Plugin.GetIni("AutoAnnouncer") 50 | 51 | def AutoAnnouncerCallback(self): 52 | Plugin.KillTimer("AutoAnnouncer") 53 | r = random.randint(1, self.AdvertNumber) 54 | ini = self.AutoAnnouncer() 55 | sec = ini.EnumSection("Announce" + str(r)) 56 | for msg in sec: 57 | val = ini.GetSetting("Announce" + str(r), msg) 58 | Server.BroadcastFrom(sys, val) 59 | Plugin.CreateTimer("AutoAnnouncer", self.Timer).Start() -------------------------------------------------------------------------------- /FougeritePlugins/AutoDoorCloser/AutoDoorCloser.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | clr.AddReferenceByPartialName("UnityEngine") 7 | clr.AddReferenceByPartialName("System.Core", "IronPythonModule") 8 | import IronPythonModule 9 | from IronPythonModule import Extensions 10 | import Fougerite 11 | import re 12 | import UnityEngine 13 | from UnityEngine import * 14 | import System 15 | from System import * 16 | 17 | """ 18 | Class 19 | """ 20 | 21 | DStable = "DoorCloser" 22 | class AutoDoorCloser: 23 | 24 | bd = None 25 | params = System.Linq.Enumerable.ToArray[System.Object]([None, System.Convert.ToUInt64(Plugin.GetTimestamp()), None]) 26 | 27 | def On_PluginInit(self): 28 | self.bd = Util.TryFindReturnType("BasicDoor") 29 | DataStore.Flush(DStable) 30 | 31 | def On_Command(self, Player, cmd, args): 32 | if cmd == "doorcloser": 33 | string = str.join(' ', args) 34 | if not string.isnumeric(): 35 | Player.Message("Usage: /doorcloser number") 36 | return 37 | string = int(string) 38 | if 5 <= string <= 30: 39 | DataStore.Add(DStable, Player.UID, string) 40 | else: 41 | Player.Message("Number must be between 5-30") 42 | 43 | def On_DoorUse(self, Player, DoorUseEvent): 44 | if str(DoorUseEvent.BasicDoor.state) != "Closed: 3": 45 | return 46 | if DataStore.ContainsKey(DStable, Player.UID): 47 | n = DataStore.Get(DStable, Player.UID) 48 | List = Plugin.CreateDict() 49 | List["BasicDoor"] = DoorUseEvent.BasicDoor 50 | Plugin.CreateParallelTimer("AutoCloser", n * 1000, List).Start() 51 | 52 | def AutoCloserCallback(self, timer): 53 | timer.Kill() 54 | List = timer.Args 55 | BasicDoor = List["BasicDoor"] 56 | if str(BasicDoor.state) == "Opened: 1": 57 | self.bd.ToggleStateServer(BasicDoor, self.params) -------------------------------------------------------------------------------- /FougeritePlugins/BambeeProtector/BambeeProtector.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | import System 9 | from System import * 10 | import math 11 | 12 | """ 13 | Class 14 | """ 15 | 16 | red = "[color #FF0000]" 17 | green = "[color #009900]" 18 | white = "[color #FFFFFF]" 19 | DS = "Bambee" 20 | Name = "BambeeProtector" 21 | 22 | ProtectedPlayers = [] 23 | 24 | class BambeeProtector: 25 | 26 | """ 27 | Methods 28 | """ 29 | cooldown = None 30 | npcs = False 31 | 32 | def On_PluginInit(self): 33 | config = self.Config() 34 | self.cooldown = int(config.GetSetting("Settings", "Cooldown")) * 60000 35 | self.npcs = bool(config.GetSetting("Settings", "ProtectFromNpcs")) 36 | Util.ConsoleLog("BambeeProtector by " + __author__ + " Version: " + __version__ + " loaded.", False) 37 | 38 | def Config(self): 39 | if not Plugin.IniExists("Config"): 40 | ini = Plugin.CreateIni("Config") 41 | ini.AddSetting("Settings", "Cooldown", "60") 42 | ini.AddSetting("Settings", "ProtectFromNpcs", "True") 43 | ini.Save() 44 | return Plugin.GetIni("Config") 45 | 46 | def isMod(self, id): 47 | if DataStore.ContainsKey("Moderators", id): 48 | return True 49 | return False 50 | 51 | def TrytoGrabID(self, Player): 52 | try: 53 | id = Player.SteamID 54 | return id 55 | except: 56 | return None 57 | 58 | def TimeisUp(self, Player): 59 | id = Player.SteamID 60 | if (System.Environment.TickCount - DataStore.Get(DS, id)) >= self.cooldown: 61 | DataStore.Add(DS, id, False) 62 | ProtectedPlayers.remove(Player) 63 | Player.MessageFrom(Name, red + "You lost your protection. Time is over.") 64 | return True 65 | return False 66 | 67 | def On_PlayerHurt(self, HurtEvent): 68 | if HurtEvent.Attacker is not None and HurtEvent.Victim is not None: 69 | if not HurtEvent.AttackerIsPlayer and self.npcs and HurtEvent.Victim in ProtectedPlayers: 70 | if not self.TimeisUp(HurtEvent.Victim): 71 | HurtEvent.DamageAmount = 0 72 | return 73 | if HurtEvent.AttackerIsPlayer: 74 | if HurtEvent.Victim in ProtectedPlayers: 75 | if self.TimeisUp(HurtEvent.Victim): 76 | return 77 | HurtEvent.DamageAmount = 0 78 | HurtEvent.Attacker.MessageFrom(Name, red + HurtEvent.Victim.Name + " is under protection") 79 | if HurtEvent.Attacker in ProtectedPlayers: 80 | HurtEvent.DamageAmount = 0 81 | HurtEvent.Attacker.MessageFrom(Name, red + "You cannot attack people while you are under protection") 82 | 83 | def On_EntityHurt(self, HurtEvent): 84 | if HurtEvent.Attacker is not None and HurtEvent.Entity is not None and not HurtEvent.IsDecay \ 85 | and HurtEvent.DamageType is not None: 86 | if not HurtEvent.AttackerIsPlayer: 87 | return 88 | if HurtEvent.DamageType == "Explosion" and HurtEvent.Attacker in ProtectedPlayers: 89 | HurtEvent.DamageAmount = 0 90 | HurtEvent.Attacker.MessageFrom(Name, red + "You cannot use c4/grenade under protection") 91 | 92 | def GiveProtection(self, Player): 93 | id = Player.SteamID 94 | if DataStore.ContainsKey(DS, id): 95 | time = DataStore.Get(DS, id) 96 | if not bool(time): 97 | return 98 | calc = System.Environment.TickCount - time 99 | if calc < 0 or math.isnan(calc): 100 | Player.MessageFrom(Name, red + "Your protection is off.") 101 | DataStore.Add(DS, id, False) 102 | return 103 | if calc >= self.cooldown : 104 | ProtectedPlayers.append(Player) 105 | done = str(round((time / 1000) / 60, 2)) 106 | done2 = str(round((self.cooldown / 1000) / 60, 2)) 107 | Player.MessageFrom(Name, green + "You still have protection. " + done + " passed of " + done2 + " minutes") 108 | Player.MessageFrom(Name, green + "You can disable this by typing /protectionoff") 109 | return 110 | DataStore.Add(DS, id, False) 111 | done2 = str(round((self.cooldown / 1000) / 60, 2)) 112 | DataStore.Add(DS, id, System.Environment.TickCount) 113 | ProtectedPlayers.append(Player) 114 | Player.MessageFrom(Name, green + "You are a new player! You got " + done2 + " minute(s) kill protection.") 115 | Player.MessageFrom(Name, green + "You can't kill anyone.") 116 | Player.MessageFrom(Name, green + "You can disable this by typing /protectionoff") 117 | 118 | def On_PlayerConnected(self, Player): 119 | id = self.TrytoGrabID(Player) 120 | if id is None: 121 | try: 122 | Player.Disconnect() 123 | except: 124 | pass 125 | return 126 | self.GiveProtection(Player) 127 | 128 | def On_PlayerDisconnected(self, Player): 129 | if Player in ProtectedPlayers: 130 | ProtectedPlayers.remove(Player) 131 | 132 | def On_Command(self, Player, cmd, args): 133 | if cmd == "protectionoff": 134 | if Player in ProtectedPlayers: 135 | ProtectedPlayers.remove(Player) 136 | DataStore.Add(DS, Player.SteamID, False) 137 | Player.MessageFrom(Name, "Protection disabled.") 138 | return 139 | Player.MessageFrom(Name, "You aren't protected.") 140 | elif cmd == "resetprotection": 141 | if Player.Admin or self.isMod(Player.SteamID): 142 | DataStore.Flush(DS) 143 | Player.MessageFrom(Name, "Flushed!") -------------------------------------------------------------------------------- /FougeritePlugins/BannedPeople/BannedPeople.ini: -------------------------------------------------------------------------------- 1 | [RangeBan] 2 | 46.16.=1 3 | 199.188.=1 4 | 198.144.=1 5 | 92.81.=1 6 | 190.179.=1 -------------------------------------------------------------------------------- /FougeritePlugins/C4Log/C4Log.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.2' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | import System 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | class C4Log: 14 | """ 15 | Methods 16 | """ 17 | 18 | def On_PluginInit(self): 19 | Util.ConsoleLog("C4Log by" + __author__ + " Version: " + __version__ + " loaded.", False) 20 | 21 | 22 | def C4Log(self): 23 | if not Plugin.IniExists("C4Log"): 24 | ini = Plugin.CreateIni("C4Log") 25 | ini.AddSetting("C4Log") 26 | ini.Save() 27 | return Plugin.GetIni("C4Log") 28 | 29 | def TrytoGrabID(self, Player): 30 | try: 31 | id = Player.SteamID 32 | return id 33 | except: 34 | return None 35 | 36 | #There is an error while converting ownerid to string in C#. Hax it. 37 | def GetIt(self, Entity): 38 | try: 39 | if Entity.IsDeployableObject(): 40 | return Entity.Object.ownerID 41 | if Entity.IsStructure(): 42 | return Entity.Object._master.ownerID 43 | except: 44 | return None 45 | 46 | 47 | def On_EntityHurt(self, HurtEvent): 48 | if HurtEvent.Attacker is not None and HurtEvent.Entity is not None and not HurtEvent.IsDecay and HurtEvent.DamageType is not None: 49 | #On Entity hurt the attacker is an NPC and a Player for some reason. We will try to grab his ID 50 | id = self.TrytoGrabID(HurtEvent.Attacker) 51 | if id is None: 52 | return 53 | if HurtEvent.Entity.IsStructure() or HurtEvent.Entity.IsDeployableObject(): 54 | if HurtEvent.DamageType == "Explosion": 55 | entityloc = str(Util.CreateVector(HurtEvent.Entity.X, HurtEvent.Entity.Y, HurtEvent.Entity.Z)) 56 | entityid = str(self.GetIt(HurtEvent.Entity)) 57 | if HurtEvent.WeaponName == "Explosive Charge": 58 | Plugin.Log("C4", str(HurtEvent.Attacker.Location) + " | " + HurtEvent.Attacker.Name + " | " + id + " | Entity: " + HurtEvent.Entity.Name + " | " + entityloc + " | " + entityid) 59 | else: 60 | Plugin.Log("Grenade", str(HurtEvent.Attacker.Location) + " | " + HurtEvent.Attacker.Name + " | " + id + " | Entity: " + HurtEvent.Entity.Name + " | " + entityloc + " | " + entityid) -------------------------------------------------------------------------------- /FougeritePlugins/ChangeOwner/ChangeOwner.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | """ 10 | Class 11 | """ 12 | green = "[color #009900]" 13 | sysname = "ChangeOwner" 14 | 15 | 16 | class ChangeOwner: 17 | """ 18 | Methods 19 | """ 20 | 21 | def On_PluginInit(self): 22 | Util.ConsoleLog("BannedPeople by " + __author__ + " Version: " + __version__ + " loaded.", False) 23 | 24 | """ 25 | CheckV method based on Spock's method. 26 | Upgraded by DreTaX 27 | Can Handle Single argument and Array args. 28 | V4.1 29 | """ 30 | 31 | def GetPlayerName(self, namee): 32 | try: 33 | name = namee.lower() 34 | for pl in Server.Players: 35 | if pl.Name.lower() == name: 36 | return pl 37 | return None 38 | except: 39 | return None 40 | 41 | def CheckV(self, Player, args): 42 | count = 0 43 | if hasattr(args, '__len__') and (not isinstance(args, str)): 44 | p = self.GetPlayerName(str.join(" ", args)) 45 | if p is not None: 46 | return p 47 | for pl in Server.Players: 48 | for namePart in args: 49 | if namePart.lower() in pl.Name.lower(): 50 | p = pl 51 | count += 1 52 | continue 53 | else: 54 | nargs = str(args).lower() 55 | p = self.GetPlayerName(nargs) 56 | if p is not None: 57 | return p 58 | for pl in Server.Players: 59 | if nargs in pl.Name.lower(): 60 | p = pl 61 | count += 1 62 | continue 63 | if count == 0: 64 | if Player is not None: 65 | Player.MessageFrom(sysname, "Couldn't find [color#00FF00]" + str.join(" ", args) + "[/color]!") 66 | return None 67 | elif count == 1 and p is not None: 68 | return p 69 | else: 70 | if Player is not None: 71 | Player.MessageFrom(sysname, "Found [color#FF0000]" + str(count) + 72 | "[/color] player with similar name. [color#FF0000] Use more correct name!") 73 | return None 74 | 75 | 76 | def On_Command(self, Player, cmd, args): 77 | if cmd == "changeowner": 78 | if Player.Admin: 79 | if len(args) == 2: 80 | player = self.CheckV(Player, args[0]) 81 | if player is not None: 82 | if not args[1].isdigit(): 83 | Player.MessageFrom(sysname, "The id is only made of numbers") 84 | return 85 | c = 0 86 | for x in World.Entities: 87 | if x.OwnerID == args[1]: 88 | x.ChangeOwner(player) 89 | c += 1 90 | Player.MessageFrom(sysname, "Successfully changed " + str(c) + " objects of " + player.Name) 91 | player.MessageFrom(sysname, "You became an owner of " + str(c) + " objects") 92 | else: 93 | Player.MessageFrom(sysname, "Usage: /changeowner TheNewOwnerPlayerName STEAMIDOfOldOwner") 94 | elif cmd == "changeowner2": 95 | if Player.Admin: 96 | if len(args) == 1: 97 | player = self.CheckV(Player, args[0]) 98 | if player is not None: 99 | DataStore.Add("ChangeOwner", Player.UID, player.UID) 100 | Player.MessageFrom(sysname, "Hit the house to change ownership") 101 | 102 | def On_EntityHurt(self, HurtEvent): 103 | if not HurtEvent.AttackerIsPlayer: 104 | return 105 | if HurtEvent.Entity is not None and HurtEvent.Attacker is not None: 106 | if HurtEvent.Attacker.Admin and DataStore.ContainsKey("ChangeOwner", HurtEvent.Attacker.UID): 107 | entity = HurtEvent.Entity 108 | player = Server.FindPlayer(DataStore.Get("ChangeOwner", HurtEvent.Attacker.UID)) 109 | if player is not None: 110 | c = 1 111 | entity.ChangeOwner(player) 112 | structs = entity.GetLinkedStructs() 113 | for ent in structs: 114 | ent.ChangeOwner(player) 115 | c += 1 116 | HurtEvent.Attacker.MessageFrom(sysname, "Successfully changed " + str(c) + " objects of " 117 | + player.Name) 118 | player.MessageFrom(sysname, "You became an owner of " + str(c) + " objects") 119 | DataStore.Remove("ChangeOwner", HurtEvent.Attacker.UID) 120 | else: 121 | HurtEvent.Attacker.MessageFrom(sysname, "Selected Player is Offline.") 122 | DataStore.Remove("ChangeOwner", HurtEvent.Attacker.UID) 123 | -------------------------------------------------------------------------------- /FougeritePlugins/ChestLog/ChestLog.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.2' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | 8 | """ 9 | Class 10 | """ 11 | 12 | class ChestLog: 13 | """ 14 | Methods 15 | """ 16 | def On_PluginInit(self): 17 | Util.ConsoleLog("ChestLog by " + __author__ + " Version: " + __version__ + " loaded.", False) 18 | 19 | #There is an error while converting ownerid to string in C#. Hax it. 20 | def GetIt(self, Entity): 21 | try: 22 | if Entity.IsDeployableObject(): 23 | return Entity.Object.ownerID 24 | if Entity.IsStructure(): 25 | return Entity.Object._master.ownerID 26 | except: 27 | return None 28 | 29 | def TrytoGrabID(self, Player): 30 | try: 31 | id = Player.SteamID 32 | return id 33 | except: 34 | return None 35 | 36 | def On_EntityHurt(self, HurtEvent): 37 | if HurtEvent.Attacker is not None and HurtEvent.Entity is not None and not HurtEvent.IsDecay: 38 | id = self.TrytoGrabID(HurtEvent.Attacker) 39 | if id is None: 40 | return 41 | if HurtEvent.Entity.Name == "WoodBoxLarge" or HurtEvent.Entity.Name == "WoodBox" or HurtEvent.Entity.Name == "SmallStash": 42 | name = HurtEvent.Attacker.Name 43 | loc = str(HurtEvent.Attacker.Location) 44 | entityid = str(self.GetIt(HurtEvent.Entity)) 45 | entityloc = Util.CreateVector(HurtEvent.Entity.X, HurtEvent.Entity.Y, HurtEvent.Entity.Z) 46 | Plugin.Log("ChestLog", str(entityloc) + " | " + HurtEvent.Entity.Name + " | " + entityid + " | PlayerDatas: " + id + "|" + name + "|" + loc) -------------------------------------------------------------------------------- /FougeritePlugins/Color/Color.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | import re 8 | 9 | sysn = "Colors" 10 | 11 | 12 | teal = "[color #00FFFF]" 13 | gold = "[color #EEC900]" 14 | silver = "[color #BFBFBF]" 15 | bronze = "[color #A67D3D]" 16 | yellow = "[color #EEEE00]" 17 | red = "[color #FF0000]" 18 | 19 | Colors = { 20 | 21 | } 22 | 23 | Selected = { 24 | 25 | } 26 | 27 | # Check if player is writing in color and if they do then remove it 28 | NoPlayerColor = True 29 | 30 | 31 | class Color: 32 | 33 | def On_PluginInit(self): 34 | cl = self.Colors() 35 | enum = cl.EnumSection("Colors") 36 | for name in enum: 37 | code = cl.GetSetting("Colors", name) 38 | Colors[name] = str(code) 39 | 40 | def On_PlayerConnected(self, Player): 41 | ini = self.Colors() 42 | if ini.GetSetting("ColorSet", Player.SteamID) is not None: 43 | Selected[Player] = ini.GetSetting("ColorSet", Player.SteamID) 44 | 45 | def Colors(self): 46 | if not Plugin.IniExists("Colors"): 47 | ini = Plugin.CreateIni("Colors") 48 | ini.AddSetting("Colors", "red", "#FF0000") 49 | ini.AddSetting("Colors", "teal", "#00FFFF") 50 | ini.AddSetting("Colors", "yellow", "#EEEE00") 51 | ini.AddSetting("Colors", "silver", "#BFBFBF") 52 | ini.AddSetting("Colors", "gold", "#EEC900") 53 | ini.AddSetting("Colors", "green", "#008B00") 54 | ini.AddSetting("Colors", "orange", "#A67D3D") 55 | ini.AddSetting("Colors", "bronze", "#EE9A00") 56 | ini.AddSetting("Colors", "black", "#000000") 57 | ini.AddSetting("Colors", "blue", "#0000FF") 58 | ini.AddSetting("Colors", "white", "#FFFFFF") 59 | ini.Save() 60 | return Plugin.GetIni("Colors") 61 | 62 | def On_Chat(self, Player, ChatEvent): 63 | if NoPlayerColor: 64 | if not Player.Admin and not Player.Moderator: 65 | Text = ChatEvent.OriginalMessage 66 | if "color" not in Text.lower(): 67 | return 68 | Text = re.sub(r'\[color\s*([^\]]+)\]', '', Text) 69 | Text = re.sub(r'\[/color\s*\]', '', Text) 70 | Text = Text.replace('"', '') 71 | ChatEvent.NewText = " " 72 | Server.BroadcastFrom(Player.Name, Text) 73 | return 74 | if Player in Selected.keys(): 75 | Text = ChatEvent.OriginalMessage 76 | ChatEvent.NewText = " " 77 | c = "[color " + Selected[Player] + "] " + Text 78 | c = c.replace('"', '') 79 | Server.BroadcastFrom(Player.Name, c.strip(' ')) 80 | 81 | def On_Command(self, Player, cmd, args): 82 | if cmd == "color": 83 | if Player.Admin or Player.Moderator: 84 | if len(args) == 0: 85 | Player.MessageFrom(sysn, "List of colors: ") 86 | Player.MessageFrom(sysn, str.join(', ', Colors.keys())) 87 | return 88 | color = str.join(' ', args) 89 | if Colors.get(color) is None: 90 | Player.MessageFrom(sysn, "Couldn't find color!") 91 | Player.MessageFrom(sysn, "List of colors: ") 92 | Player.MessageFrom(sysn, str.join(', ', Colors.keys())) 93 | return 94 | Selected[Player] = Colors.get(color) 95 | ini = self.Colors() 96 | if ini.GetSetting("ColorSet", Player.SteamID) is not None: 97 | ini.SetSetting("ColorSet", Player.SteamID, Colors.get(color)) 98 | else: 99 | ini.AddSetting("ColorSet", Player.SteamID, Colors.get(color)) 100 | ini.Save() 101 | Player.MessageFrom(sysn, "Color set!") 102 | -------------------------------------------------------------------------------- /FougeritePlugins/CommandRestrict/CommandRestrict.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | 8 | GlobalChatCommands = [] 9 | 10 | 11 | class CommandRestrict: 12 | 13 | def Commands(self): 14 | if not Plugin.IniExists("Commands"): 15 | loc = Plugin.CreateIni("Commands") 16 | loc.AddSetting("ConsoleCommands", "1", "suicide") 17 | loc.AddSetting("ConsoleCommands", "2", "allahakbar") 18 | loc.AddSetting("ChatCommands", "1", "yell") 19 | loc.Save() 20 | return Plugin.GetIni("Commands") 21 | 22 | def On_PluginInit(self): 23 | ini = self.Commands() 24 | for x in ini.EnumSection("ConsoleCommands"): 25 | Server.RestrictConsoleCommand(ini.GetSetting("ConsoleCommands", x)) 26 | for x in ini.EnumSection("ChatCommands"): 27 | GlobalChatCommands.append(ini.GetSetting("ConsoleCommands", x)) 28 | 29 | def On_PlayerConnected(self, Player): 30 | for x in GlobalChatCommands: 31 | Player.RestrictCommand(x) 32 | 33 | def On_Command(self, Player, cmd, args): 34 | # Todo: Make Player type Console Restriction instead of global in Fougerite 35 | if cmd == "restrict": 36 | if Player.Admin: 37 | if len(args) == 0: 38 | Player.MessageFrom("Restrict", "Usage: /restrict name commandname") 39 | elif len(args) == 2: 40 | name = args[0] 41 | command = args[1].lower() 42 | pl = self.CheckV(Player, name) 43 | if pl is not None: 44 | pl.RestrictCommand(command) 45 | Player.MessageFrom("Restrict", pl.Name + " is now not able to use " + command) 46 | elif cmd == "unrestrict": 47 | if Player.Admin: 48 | if len(args) == 0: 49 | Player.MessageFrom("Restrict", "Usage: /restrict name commandname") 50 | elif len(args) == 2: 51 | name = args[0] 52 | command = args[1].lower() 53 | pl = self.CheckV(Player, name) 54 | if pl is not None: 55 | pl.UnRestrictCommand(command) 56 | Player.MessageFrom("Restrict", pl.Name + " now has access to " + command) 57 | 58 | 59 | """ 60 | CheckV method based on Spock's method. 61 | Upgraded by DreTaX 62 | Can Handle Single argument and Array args. 63 | V4.1 64 | """ 65 | 66 | def GetPlayerName(self, namee): 67 | try: 68 | name = namee.lower() 69 | for pl in Server.Players: 70 | if pl.Name.lower() == name: 71 | return pl 72 | return None 73 | except: 74 | return None 75 | 76 | def CheckV(self, Player, args): 77 | count = 0 78 | if hasattr(args, '__len__') and (not isinstance(args, str)): 79 | p = self.GetPlayerName(str.join(" ", args)) 80 | if p is not None: 81 | return p 82 | for pl in Server.Players: 83 | for namePart in args: 84 | if namePart.lower() in pl.Name.lower(): 85 | p = pl 86 | count += 1 87 | continue 88 | else: 89 | nargs = str(args).lower() 90 | p = self.GetPlayerName(nargs) 91 | if p is not None: 92 | return p 93 | for pl in Server.Players: 94 | if nargs in pl.Name.lower(): 95 | p = pl 96 | count += 1 97 | continue 98 | if count == 0: 99 | Player.MessageFrom("Restrict", "Couldn't find [color#00FF00]" + str.join(" ", args) + "[/color]!") 100 | return None 101 | elif count == 1 and p is not None: 102 | return p 103 | else: 104 | Player.MessageFrom("Restrict", "Found [color#FF0000]" + str(count) 105 | + "[/color] player with similar name. [color#FF0000] Use more correct name!") 106 | return None 107 | -------------------------------------------------------------------------------- /FougeritePlugins/DamageDisplay/DamageDisplay.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | # Use notifications instead of messages? False/True 14 | Notice = False 15 | sys = "DamageDisplay" 16 | 17 | 18 | class DamageDisplay: 19 | 20 | def On_PlayerHurt(self, HurtEvent): 21 | if HurtEvent.Attacker is None or HurtEvent.Victim is None: 22 | return 23 | if HurtEvent.AttackerIsPlayer and HurtEvent.VictimIsPlayer: 24 | if Notice: 25 | HurtEvent.Attacker.Notice("Remaining Health: " + str(HurtEvent.Victim.Health)) 26 | else: 27 | HurtEvent.Attacker.MessageFrom(sys, "Remaining Health: " + str(HurtEvent.Victim.Health)) 28 | 29 | def On_NPCHurt(self, HurtEvent): 30 | if HurtEvent.Attacker is None or HurtEvent.Victim is None: 31 | return 32 | if HurtEvent.AttackerIsPlayer: 33 | if Notice: 34 | HurtEvent.Attacker.Notice("Remaining Health: " + str(HurtEvent.Victim.Health)) 35 | else: 36 | HurtEvent.Attacker.MessageFrom(sys, "Remaining Health: " + str(HurtEvent.Victim.Health)) 37 | -------------------------------------------------------------------------------- /FougeritePlugins/DeathMSG/BannedPeopleDM.ini: -------------------------------------------------------------------------------- 1 | [Ips] 2 | 3 | [Ids] 4 | 5 | [NameIps] 6 | 7 | [NameIds] 8 | 9 | [Logistical] 10 | 11 | [KillLog] 12 | -------------------------------------------------------------------------------- /FougeritePlugins/DeathMSG/DeathMSGConfig.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | autoban=1 3 | msg=victim was killed by killer with weapon DMG: damage Distance: number m In: bodyPart 4 | bmsg=victim bleed out. Killer: killer 5 | banmsg=killer was banned, due to making an impossible shot. 6 | explosionmsg=victim was killed with weapon Killer: killer 7 | huntingbow=victim was killed by killer with Hunting Bow DMG: damage Distance: number m In: bodyPart 8 | spike=victim was killed by killer 's weapon 9 | enablesuicidemsg=0 10 | suicide=victim suicided 11 | enableanimalmsg=1 12 | animalkill=victim was killed by a killer 13 | killog=1 14 | displaykilllog=1 15 | deathmsgname=[Equinox DeathMSG] 16 | TpaMsg=killer was teleporting just right at the last shot. Ignoring ban. 17 | tpbackmsg=You have been teleported to your last location. 18 | enablesleepermsg=1 19 | SleeperKill=victim was killed by killer while sleeping DMG: damage Distance number m In: bodyPart -------------------------------------------------------------------------------- /FougeritePlugins/DeathMSG/bodyparts.ini: -------------------------------------------------------------------------------- 1 | [bodyparts] 2 | Undefined=Body 3 | Hip=Hip 4 | Spine0=Chest 5 | Spine1=Chest 6 | Spine2=Chest 7 | Spine3=Chest 8 | Spine4=Chest 9 | Spine5=Chest 10 | Neck=Neck 11 | Head=Head 12 | Scalp=Head 13 | Nostrils=Head 14 | Jaw=Head 15 | TongueRear=Head 16 | TongueFront=Head 17 | Heart=Heart 18 | Brain=Head 19 | Stomache=Gut 20 | L_Lung=Chest 21 | R_Lung=Chest 22 | L_Eye=Head 23 | R_Eye=Head 24 | L_Clavical=Chest 25 | R_Clavical=Chest 26 | L_UpperArm0=Left Arm 27 | R_UpperArm0=Right Arm 28 | L_UpperArm1=Left Arm 29 | R_UpperArm1=Right Arm 30 | L_ForeArm0=Left Arm 31 | R_ForeArm0=Right Arm 32 | L_ForeArm1=Left Arm 33 | R_ForeArm1=Right Arm 34 | L_Hand=Left Hand 35 | R_Hand=Right Hand 36 | L_Finger_Index0=Left Hand 37 | R_Finger_Index0=Right Hand 38 | L_Finger_Index1=Left Hand 39 | R_Finger_Index1=Right Hand 40 | L_Finger_Index2=Left Hand 41 | R_Finger_Index2=Right Hand 42 | L_Finger_Index3=Left Hand 43 | R_Finger_Index3=Right Hand 44 | L_Finger_Index4=Left Hand 45 | R_Finger_Index4=Right Hand 46 | L_Finger_Middle0=Left Hand 47 | R_Finger_Middle0=Right Hand 48 | L_Finger_Middle1=Left Hand 49 | R_Finger_Middle1=Right Hand 50 | L_Finger_Middle2=Left Hand 51 | R_Finger_Middle2=Right Hand 52 | L_Finger_Middle3=Left Hand 53 | R_Finger_Middle3=Right Hand 54 | L_Finger_Middle4=Left Hand 55 | R_Finger_Middle4=Right Hand 56 | L_Finger_Ring0=Left Hand 57 | R_Finger_Ring0=Right Hand 58 | L_Finger_Ring1=Left Hand 59 | R_Finger_Ring1=Right Hand 60 | L_Finger_Ring2=Left Hand 61 | R_Finger_Ring2=Right Hand 62 | L_Finger_Ring3=Left Hand 63 | R_Finger_Ring3=Right Hand 64 | L_Finger_Ring4=Left Hand 65 | R_Finger_Ring4=Right Hand 66 | L_Finger_Pinky0=Left Hand 67 | R_Finger_Pinky0=Right Hand 68 | L_Finger_Pinky1=Left Hand 69 | R_Finger_Pinky1=Right Hand 70 | L_Finger_Pinky2=Left Hand 71 | R_Finger_Pinky2=Right Hand 72 | L_Finger_Pinky3=Left Hand 73 | R_Finger_Pinky3=Right Hand 74 | L_Finger_Pinky4=Left Hand 75 | R_Finger_Pinky4=Right Hand 76 | L_Finger_Thumb0=Left Hand 77 | R_Finger_Thumb0=Right Hand 78 | L_Finger_Thumb1=Left Hand 79 | R_Finger_Thumb1=Right Hand 80 | L_Finger_Thumb2=Left Hand 81 | R_Finger_Thumb2=Right Hand 82 | L_Finger_Thumb3=Left Hand 83 | R_Finger_Thumb3=Right Hand 84 | L_Finger_Thumb4=Left Hand 85 | R_Finger_Thumb4=Right Hand 86 | L_Fingers=Left Hand 87 | R_Fingers=Right Hand 88 | L_Thigh0=Left Leg 89 | R_Thigh0=Right Leg 90 | L_Thigh1=Left Leg 91 | R_Thigh1=Right Leg 92 | L_Shin0=Left Leg 93 | R_Shin0=Right Leg 94 | L_Shin1=Left Leg 95 | R_Shin1=Right Leg 96 | L_Foot=Left Foot 97 | R_Foot=Right Foot 98 | L_Heel0=Left Foot 99 | R_Heel0=Right Foot 100 | L_Heel1=Left Foot 101 | R_Heel1=Right Foot 102 | L_Toe0=Left Foot 103 | R_Toe0=Right Foot 104 | L_Toe1=Left Foot 105 | R_Toe1=Right Foot 106 | L_EyeLidLower=Head 107 | R_EyeLidLower=Head 108 | L_EyeLidUpper=Head 109 | R_EyeLidUpper=Head 110 | L_BrowInner=Head 111 | R_BrowInner=Head 112 | L_BrowOuter=Head 113 | R_BrowOuter=Head 114 | L_Cheek=Head 115 | R_Cheek=Head 116 | L_LipUpper=Head 117 | R_LipUpper=Head 118 | L_LipLower=Head 119 | R_LipLower=Head 120 | L_LipCorner=Head 121 | R_LipCorner=Head -------------------------------------------------------------------------------- /FougeritePlugins/DeathMSG/range.ini: -------------------------------------------------------------------------------- 1 | [range] 2 | HandCannon=20 3 | Pipe Shotgun=80 4 | Revolver=80 5 | 9mm Pistol=80 6 | P250=120 7 | Shotgun=30 8 | Bolt Action Rifle=250 9 | M4=140 10 | MP5A4=80 11 | Hunting Bow=120 -------------------------------------------------------------------------------- /FougeritePlugins/FPSBoost/FPSBoost.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.4' 3 | 4 | import clr 5 | import math 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | import System 9 | from System import * 10 | 11 | """ 12 | Class 13 | """ 14 | 15 | 16 | class FPSBoost: 17 | """ 18 | Methods 19 | """ 20 | 21 | name = None 22 | scooldown = None 23 | 24 | def On_PluginInit(self): 25 | Util.ConsoleLog("FPSBOOSTER by " + __author__ + " Version: " + __version__ + " loaded.", False) 26 | DataStore.Flush("FPSBoost") 27 | ini = self.FPSINI() 28 | self.name = ini.GetSetting("Settings", "name") 29 | self.cooldown = int(ini.GetSetting("Settings", "cd")) 30 | 31 | def FPSINI(self): 32 | if not Plugin.IniExists("FPSBoost"): 33 | ini = Plugin.CreateIni("FPSBoost") 34 | ini.AddSetting("Settings", "cd", "10000") 35 | ini.AddSetting("Settings", "name", "FPSBOOSTER") 36 | ini.Save() 37 | return Plugin.GetIni("FPSBoost") 38 | 39 | def SendGraph(self, Player): 40 | Player.SendCommand("grass.on true") 41 | Player.SendCommand("grass.forceredraw true") 42 | Player.SendCommand("grass.displacement false") 43 | Player.SendCommand("grass.disp_trail_seconds 10") 44 | Player.SendCommand("grass.shadowcast true") 45 | Player.SendCommand("grass.shadowreceive true") 46 | Player.SendCommand("render.level 1") 47 | Player.SendCommand("render.vsync true") 48 | Player.SendCommand("footsteps.quality 2") 49 | Player.SendCommand("gfx.grain true") 50 | Player.SendCommand("gfx.ssao true") 51 | Player.SendCommand("gfx.shafts true") 52 | Player.SendCommand("gfx.damage true") 53 | Player.SendCommand("gfx.tonemap true") 54 | Player.SendCommand("gfx.ssaa true") 55 | Player.SendCommand("gfx.bloom true") 56 | Player.MessageFrom(self.name, "You Switched to Graphics Mode!") 57 | 58 | 59 | def SendFPS(self, Player): 60 | Player.SendCommand("grass.on false") 61 | Player.SendCommand("grass.forceredraw False") 62 | Player.SendCommand("grass.displacement True") 63 | Player.SendCommand("grass.disp_trail_seconds 0") 64 | Player.SendCommand("grass.shadowcast False") 65 | Player.SendCommand("grass.shadowreceive False") 66 | Player.SendCommand("render.level 0") 67 | Player.SendCommand("render.vsync False") 68 | Player.SendCommand("footsteps.quality 2") 69 | Player.SendCommand("gfx.grain False") 70 | Player.SendCommand("gfx.ssao False") 71 | Player.SendCommand("gfx.shafts false") 72 | Player.SendCommand("gfx.damage false") 73 | Player.SendCommand("gfx.ssaa False") 74 | Player.SendCommand("gfx.bloom False") 75 | Player.SendCommand("gfx.tonemap False") 76 | Player.MessageFrom(self.name, "You Switched to FPS Mode!") 77 | 78 | def On_Command(self, Player, cmd, args): 79 | if cmd == "fps": 80 | time = DataStore.Get("FPSBoost", Player.SteamID) 81 | if time is None: 82 | DataStore.Add("FPSBoost", Player.SteamID, System.Environment.TickCount) 83 | time = 7 84 | if self.cooldown > 0: 85 | calc = System.Environment.TickCount - time 86 | if calc < 0 or math.isnan(calc): 87 | DataStore.Add("FPSBoost", Player.SteamID, System.Environment.TickCount) 88 | time = 7 89 | 90 | if calc >= self.cooldown or time == 7: 91 | DataStore.Add("FPSBoost", Player.SteamID, System.Environment.TickCount) 92 | self.SendFPS(Player) 93 | else: 94 | Player.Notice("You have to wait before typing it again!") 95 | next = (calc / 1000) / 60 96 | last = (self.cooldown / 1000) / 60 97 | Player.MessageFrom(self.name, "Time Remaining: " + str(round(next, 2)) + "/" + str(round(last, 2))) 98 | else: 99 | self.SendFPS(Player) 100 | elif cmd == "graph": 101 | time = DataStore.Get("FPSBoost", Player.SteamID) 102 | if time is None: 103 | DataStore.Add("FPSBoost", Player.SteamID, System.Environment.TickCount) 104 | time = 7 105 | if self.cooldown > 0: 106 | calc = System.Environment.TickCount - time 107 | if calc < 0 or math.isnan(calc): 108 | DataStore.Add("FPSBoost", Player.SteamID, System.Environment.TickCount) 109 | time = 7 110 | if calc >= self.cooldown or time == 7: 111 | DataStore.Add("FPSBoost", Player.SteamID, System.Environment.TickCount) 112 | self.SendGraph(Player) 113 | else: 114 | Player.Notice("You have to wait before typing it again!") 115 | next = (calc / 1000) / 60 116 | last = (self.cooldown / 1000) / 60 117 | Player.MessageFrom(self.name, "Time Remaining: " + str(round(next, 2)) + "/" + str(round(last, 2))) 118 | else: 119 | self.SendGraph(Player) 120 | 121 | def On_PlayerConnected(self, Player): 122 | ini = self.FPSINI() 123 | name = ini.GetSetting("Settings", "name") 124 | Player.MessageFrom(name, "Type /fps to increase /graph to decrease your fps.") -------------------------------------------------------------------------------- /FougeritePlugins/Give/Give.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | class Give: 14 | 15 | def isMod(self, id): 16 | if DataStore.ContainsKey("Moderators", id): 17 | return True 18 | return False 19 | 20 | def GetQuoted(self, array): 21 | text = str.join(" ", array) 22 | groups = text.split('"') 23 | n = len(groups) 24 | list = [] 25 | for x in xrange(0, n): 26 | if x % 2 != 0: 27 | list.append(groups[x]) 28 | return list 29 | 30 | """ 31 | CheckV method based on Spock's method. 32 | Upgraded by DreTaX 33 | Can Handle Single argument and Array args. 34 | V4.1 35 | """ 36 | 37 | def GetPlayerName(self, namee): 38 | try: 39 | name = namee.lower() 40 | for pl in Server.Players: 41 | if pl.Name.lower() == name: 42 | return pl 43 | return None 44 | except: 45 | return None 46 | 47 | def CheckV(self, Player, args): 48 | systemname = "Give" 49 | count = 0 50 | if hasattr(args, '__len__') and (not isinstance(args, str)): 51 | p = self.GetPlayerName(str.join(" ", args)) 52 | if p is not None: 53 | return p 54 | for pl in Server.Players: 55 | for namePart in args: 56 | if namePart.lower() in pl.Name.lower(): 57 | p = pl 58 | count += 1 59 | continue 60 | else: 61 | nargs = str(args).lower() 62 | p = self.GetPlayerName(nargs) 63 | if p is not None: 64 | return p 65 | for pl in Server.Players: 66 | if nargs in pl.Name.lower(): 67 | p = pl 68 | count += 1 69 | continue 70 | if count == 0: 71 | Player.MessageFrom(systemname, "Couldn't find [color#00FF00]" + str.join(" ", args) + "[/color]!") 72 | return None 73 | elif count == 1 and p is not None: 74 | return p 75 | else: 76 | Player.MessageFrom(systemname, "Found [color#FF0000]" + str(count) + "[/color] player with similar name. [color#FF0000] Use more correct name!") 77 | return None 78 | 79 | def On_Command(self, Player, cmd, args): 80 | if cmd == "give": 81 | if Player.Admin or self.isMod(Player.SteamID): 82 | if len(args) <= 2: 83 | Player.MessageFrom('Give', 'Usage: /give "PlayerName" "ItemName" "Amount"') 84 | Player.MessageFrom('Give', 'Quote signs (") are required.') 85 | return 86 | array = self.GetQuoted(args) 87 | playerr = self.CheckV(Player, array[0]) 88 | if playerr is None: 89 | return 90 | if not array[2].isdigit(): 91 | Player.MessageFrom('Give', 'You must specify a quantity...') 92 | return 93 | inventory = Player.Inventory 94 | inventory.AddItem(array[1], int(array[2])) 95 | Player.MessageFrom('Give', 'Given ' + str(array[2]) + " of " + str(array[1]) + " to " + playerr.Name) -------------------------------------------------------------------------------- /FougeritePlugins/HighPing/HighPing.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.2' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | 8 | Players = [] 9 | 10 | 11 | class HighPing: 12 | 13 | Timer = None 14 | MaxPing = None 15 | 16 | def On_PluginInit(self): 17 | ini = self.PingConfig() 18 | self.Timer = int(ini.GetSetting("Settings", "Timer")) 19 | self.MaxPing = int(ini.GetSetting("Settings", "MaxPing")) 20 | Plugin.CreateTimer("PingCheck", self.Timer).Start() 21 | 22 | def PingConfig(self): 23 | if not Plugin.IniExists("PingConfig"): 24 | ini = Plugin.CreateIni("PingConfig") 25 | ini.AddSetting("Settings", "MaxPing", "250") 26 | ini.AddSetting("Settings", "Timer", "120000") 27 | ini.Save() 28 | return Plugin.GetIni("PingConfig") 29 | 30 | def On_PlayerConnected(self, Player): 31 | Players.append(Player) 32 | 33 | def On_PlayerDisconnected(self, Player): 34 | if Player in Players: 35 | Players.remove(Player) 36 | 37 | def PingCheckCallback(self, timer): 38 | timer.Kill() 39 | for pl in Players: 40 | if pl.IsOnline: 41 | if int(pl.Ping) >= self.MaxPing: 42 | pl.MessageFrom("[High Ping Kicker]", "[color#FF2222]Your Ping: " + str(pl.Ping) + 43 | " Maximum you can have: " + str(self.MaxPing) + ".") 44 | pl.Disconnect() 45 | Plugin.CreateTimer("PingCheck", self.Timer).Start() -------------------------------------------------------------------------------- /FougeritePlugins/HomeSystem/HomeConfig.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | ; Timer and Cooldown Settings 3 | Cooldown=300000 4 | safetpcheck=2 5 | tpdelay=10 6 | ; Extras 7 | Maxhomes=1 8 | Antihack=1 9 | ; Home Setting Type: Foundation/PlayerLocation 10 | foundationhome=True 11 | CheckCloseWall=0 12 | DistanceCheck=0 13 | Distance=15 14 | ; Other Extra Settings 15 | TestTeleport=1 16 | movecheck=1 17 | checkdamage=1 18 | homesystemname=[HomeSystem] 19 | ;This is the roof glitch bypass, don't enable this if you use EAC, Rustbuster, etc.. 20 | antiroofdizzy=0 21 | ; Double teleport player? 22 | doubleteleport=True 23 | ; I don't recommend to enable these 24 | SendPlayertoHomeorRandom=0 25 | EJoinCooldown=0 26 | randomlocnumber=8156 27 | rejoincd=15 28 | jointpdelay=12 -------------------------------------------------------------------------------- /FougeritePlugins/IdIdentifier/IdIdentifier.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.4' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | 8 | """ 9 | Class 10 | """ 11 | 12 | 13 | class IdIdentifier: 14 | """ 15 | Methods 16 | """ 17 | 18 | def On_PluginInit(self): 19 | Util.ConsoleLog("IdIdentifier by " + __author__ + " Version: " + __version__ + " loaded.", False) 20 | 21 | def PlayersIni(self): 22 | if not Plugin.IniExists("Players"): 23 | ini = Plugin.CreateIni("Players") 24 | ini.Save() 25 | return Plugin.GetIni("Players") 26 | 27 | #There is an error while converting ownerid to string in C#. Hax it. 28 | def GetIt(self, Entity): 29 | try: 30 | if Entity.IsDeployableObject(): 31 | return Entity.Object.ownerID 32 | if Entity.IsStructure(): 33 | return Entity.Object._master.ownerID 34 | except: 35 | return None 36 | 37 | def TrytoGrabID(self, Player): 38 | try: 39 | id = Player.SteamID 40 | return id 41 | except: 42 | return None 43 | 44 | def ManualBan(self): 45 | if not Plugin.IniExists("ManualBan"): 46 | ini = Plugin.CreateIni("ManualBan") 47 | ini.Save() 48 | return Plugin.GetIni("ManualBan") 49 | 50 | def isMod(self, id): 51 | if DataStore.ContainsKey("Moderators", id): 52 | return True 53 | return False 54 | 55 | def On_PlayerConnected(self, Player): 56 | sid = self.TrytoGrabID(Player) 57 | if sid is None: 58 | try: 59 | Player.Disconnect() 60 | except: 61 | pass 62 | return 63 | name = Player.Name 64 | ip = str(Player.IP) 65 | ini = self.PlayersIni() 66 | if ini.GetSetting("Track", sid) is not None: 67 | ini.SetSetting("Track", sid, name) 68 | ini.Save() 69 | else: 70 | ini.AddSetting("Track", sid, name) 71 | ini.Save() 72 | Plugin.Log("LastJoin", str(name) + "|" + sid + "|" + ip) 73 | 74 | 75 | def On_PlayerDisconnected(self, Player): 76 | name = Player.Name 77 | id = self.TrytoGrabID(Player) 78 | if id is None: 79 | return 80 | location = str(Player.Location) 81 | Plugin.Log("LastQuit", str(name) + "|" + id + "|" + location) 82 | 83 | def On_Command(self, Player, cmd, args): 84 | if cmd == "owner": 85 | if Player.Admin or self.isMod(Player.SteamID): 86 | id = Player.SteamID 87 | if not DataStore.ContainsKey("OwnerMode", id): 88 | Player.Message("---Owner---") 89 | Player.Message("You are in Owner mode") 90 | Player.Message("If you finished, don't forget to quit from It!") 91 | Player.Message("Shotgun cannot be used in Owner mode!") 92 | DataStore.Add("OwnerMode", id, "true") 93 | else: 94 | DataStore.Remove("OwnerMode", id) 95 | Player.Message("---Owner---") 96 | Player.Message("You quit Owner mode!") 97 | elif cmd == "closedeployed": 98 | if Player.Admin or self.isMod(Player.SteamID): 99 | loc = Player.Location 100 | for x in World.Entities: 101 | name = str(x.Name) 102 | if not "barricade" in name.lower(): 103 | continue 104 | dist = round(Util.GetVectorsDistance(loc, x.Location), 2) 105 | if dist < 3.0: 106 | Player.Message("Found: " + name + " OwnerID: " + x.OwnerID) 107 | 108 | 109 | 110 | def On_EntityHurt(self, HurtEvent): 111 | if HurtEvent.Attacker is not None and HurtEvent.Entity is not None and not HurtEvent.IsDecay: 112 | #On Entity hurt the attacker is an NPC and a Player for somereason. We will try to grab his ID 113 | id = self.TrytoGrabID(HurtEvent.Attacker) 114 | if id is None: 115 | return 116 | gun = HurtEvent.WeaponName 117 | if gun == "Shotgun": 118 | return 119 | else: 120 | #Dirty fucking hack against current bug. (Entity OWNERID request isn't working good yet, so hax it) 121 | OwnerID = self.GetIt(HurtEvent.Entity) 122 | if OwnerID is None: 123 | return 124 | get = DataStore.Get("OwnerMode", HurtEvent.Attacker.SteamID) 125 | if get is not None and get == "true": 126 | HurtEvent.DamageAmount = 0 127 | OwnerID = HurtEvent.Entity.OwnerID 128 | name = self.PlayersIni().GetSetting("Track", OwnerID) 129 | if name is not None: 130 | HurtEvent.Attacker.Notice(HurtEvent.Entity.Name + " is owned by " + name + ".") 131 | else: 132 | HurtEvent.Attacker.Notice(HurtEvent.Entity.Name + " is owned by " + OwnerID + ".") -------------------------------------------------------------------------------- /FougeritePlugins/IllegalName/IllegalName.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.4' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | import re 8 | 9 | 10 | class IllegalName: 11 | 12 | def On_PluginInit(self): 13 | Util.ConsoleLog("IllegalName by " + __author__ + " Version: " + __version__ + " loaded.", False) 14 | 15 | def getIllegal(self): 16 | if not Plugin.IniExists("IllegalNames"): 17 | IllegalNames = Plugin.CreateIni("IllegalNames") 18 | IllegalNames.AddSetting("IllegalNames", "Name1", "Suck") 19 | IllegalNames.AddSetting("IllegalNames", "Name2", "Fuck") 20 | IllegalNames.AddSetting("IllegalNames", "Name3", "SHITSERVER") 21 | IllegalNames.Save() 22 | return Plugin.GetIni("IllegalNames") 23 | 24 | 25 | def IllegalNameConfig(self): 26 | if not Plugin.IniExists("IllegalNameConfig"): 27 | loc = Plugin.CreateIni("IllegalNameConfig") 28 | loc.Save() 29 | return Plugin.GetIni("IllegalNameConfig") 30 | 31 | 32 | def TrytoGrabID(self, Player): 33 | try: 34 | id = Player.SteamID 35 | return id 36 | except: 37 | return None 38 | 39 | 40 | def On_PlayerConnected(self, Player): 41 | id = self.TrytoGrabID(Player) 42 | if id is None: 43 | try: 44 | Player.Disconnect() 45 | except: 46 | pass 47 | return 48 | name = Player.Name 49 | n = len(name) 50 | ini = self.getIllegal() 51 | config = self.IllegalNameConfig() 52 | f = int(config.GetSetting("Settings", "Protection")) 53 | reason = config.GetSetting("Settings", "DisconnectReason") 54 | reason2 = config.GetSetting("Settings", "DisconnectReason2") 55 | space = int(config.GetSetting("Settings", "Spaces")) 56 | listnames = ini.EnumSection("IllegalNames") 57 | for checkn in listnames: 58 | get = ini.GetSetting("IllegalNames", checkn) 59 | lowername = name.lower() 60 | lowercheck = get.lower() 61 | if lowercheck in lowername: 62 | Player.Message(reason) 63 | Player.Disconnect() 64 | return 65 | if f == 1: 66 | if space == 0: 67 | a = re.match('^[a-zA-Z0-9_!+?()<>/@#,.\[\]\\-]+$', name) 68 | if not a: 69 | Player.Message(reason2) 70 | Player.Message("Allowed Chars: a-z,0-9,!@#$/\[]<>+=.-") 71 | Player.Message("Spaces are not allowed") 72 | Player.Disconnect() 73 | else: 74 | a = re.match('^[a-zA-Z0-9_!+?()<>/@#,. \[\]\\-]+$', name) 75 | if not a or n <= 1: 76 | Player.Message(reason2) 77 | Player.Message("Allowed Chars: a-z,0-9,!@#$/\[]<>+=.-") 78 | Player.Disconnect() 79 | elif f == 2: 80 | if n <= 1: 81 | Player.Message(reason2) 82 | Player.Message("Allowed Chars: a-z,0-9,!@#$%/\[]<>+=.-") 83 | Player.Disconnect() 84 | elif f == 3: 85 | if space == 0: 86 | a = re.match('^[a-zA-Z0-9_!+?()<>/@#,.\[\]\\-]+$', name) 87 | if not a or n <= 1: 88 | Player.Message(reason2) 89 | Player.Message("Allowed Chars: a-z,0-9,!@#$%/\[]<>+=.-") 90 | Player.Message("Spaces are not allowed") 91 | Player.Disconnect() 92 | else: 93 | a = re.match('^[a-zA-Z0-9_!+?()<>/@#,. \[\]\\-]+$', name) 94 | if not a or n <= 1: 95 | Player.Message(reason2) 96 | Player.Message("Allowed Chars: a-z,0-9,!@#$%/\[]<>+=.-") 97 | Player.Disconnect() 98 | -------------------------------------------------------------------------------- /FougeritePlugins/IllegalName/IllegalNameConfig.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | Protection=3 3 | DisconnectReason=Your name is not appropriate for our server. Change It. 4 | DisconnectReason2=Your name is too short, or contains illegal characters. Change It. 5 | Spaces=0 -------------------------------------------------------------------------------- /FougeritePlugins/IllegalName/IllegalNames.ini: -------------------------------------------------------------------------------- 1 | [IllegalNames] 2 | Name1=Suck 3 | Name2=Fuck 4 | Name3=SHITSERVER 5 | 6 | -------------------------------------------------------------------------------- /FougeritePlugins/Introduction/Introduction.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | import time 3 | import math 4 | 5 | def Calc1(): 6 | s = time.time() 7 | for i in xrange(750000): 8 | fct = i**.5 9 | print "Took %f seconds" % (time.time() - s) 10 | 11 | def Calc2(): 12 | s = time.time() 13 | for i in xrange(750000): 14 | fct = math.sqrt(i) 15 | print "Took %f seconds" % (time.time() - s) 16 | 17 | def Calc3(arg=math.sqrt): 18 | s = time.time() 19 | for i in xrange(750000): 20 | fct = arg(i) 21 | print "Took %f seconds" % (time.time() - s) 22 | 23 | Calc1() 24 | Calc2() 25 | Calc3() -------------------------------------------------------------------------------- /FougeritePlugins/InvLookup/InvLookup.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.1' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | sysname = "InventoryViewer" 14 | red = "[color #FF0000]" 15 | green = "[color #009900]" 16 | 17 | 18 | class InvLookup: 19 | 20 | def On_Command(self, Player, cmd, args): 21 | if cmd == "inv": 22 | if Player.Admin or Player.Moderator: 23 | if len(args) >= 1: 24 | if args[0] == "reset": 25 | self.returnInventory(Player) 26 | else: 27 | user = str.join(' ', args) 28 | self.recordInventory(Player) 29 | self.recordUserInventory(Player, user) 30 | self.returnUserInventory(Player, user) 31 | else: 32 | Player.MessageFrom(sysname, 33 | "/inv playername (Checks Inv), /inv reset (Returns original inv)") 34 | else: 35 | Player.MessageFrom(sysname, "You can't use this command") 36 | 37 | def recordInventory(self, Player): 38 | Inventory = [] 39 | id = Player.SteamID 40 | for Item in Player.Inventory.Items: 41 | if Item and Item.Name: 42 | myitem = {'name': Item.Name, 'quantity': Item.Quantity, 'slot': Item.Slot} 43 | Inventory.append(myitem) 44 | for Item in Player.Inventory.ArmorItems: 45 | if Item and Item.Name: 46 | myitem = {'name': Item.Name, 'quantity': Item.Quantity, 'slot': Item.Slot} 47 | Inventory.append(myitem) 48 | for Item in Player.Inventory.BarItems: 49 | if Item and Item.Name: 50 | myitem = {'name': Item.Name, 'quantity': Item.Quantity, 'slot': Item.Slot} 51 | Inventory.append(myitem) 52 | 53 | DataStore.Add("pinv", id, Inventory) 54 | DataStore.Save() 55 | Player.Inventory.ClearAll() 56 | 57 | def recordUserInventory(self, Player, userString): 58 | user = Server.FindPlayer(userString) 59 | if user is None: 60 | Player.MessageFrom(sysname, userString + " is not online") 61 | else: 62 | Inventory = [] 63 | id = user.SteamID 64 | for Item in user.Inventory.Items: 65 | if Item and Item.Name: 66 | myitem = {'name': Item.Name, 'quantity': Item.Quantity, 'slot': Item.Slot} 67 | Inventory.append(myitem) 68 | for Item in user.Inventory.ArmorItems: 69 | if Item and Item.Name: 70 | myitem = {'name': Item.Name, 'quantity': Item.Quantity, 'slot': Item.Slot} 71 | Inventory.append(myitem) 72 | for Item in user.Inventory.BarItems: 73 | if Item and Item.Name: 74 | myitem = {'name': Item.Name, 'quantity': Item.Quantity, 'slot': Item.Slot} 75 | Inventory.append(myitem) 76 | 77 | DataStore.Add("pinv", id, Inventory) 78 | DataStore.Save() 79 | 80 | def returnInventory(self, Player): 81 | id = Player.SteamID 82 | if DataStore.ContainsKey("pinv", id): 83 | Inventory = DataStore.Get("pinv", id) 84 | Player.Inventory.ClearAll() 85 | for dictionary in Inventory: 86 | if dictionary['name'] is not None: 87 | Player.Inventory.AddItemTo(dictionary['name'], dictionary['slot'], dictionary['quantity']) 88 | else: 89 | Player.MessageFrom(sysname, red + "No dictionary found in the for cycle?!") 90 | Player.MessageFrom(sysname, green + "Your have received your original inventory") 91 | DataStore.Remove("pinv", id) 92 | else: 93 | Player.MessageFrom(sysname, red + "No Items of your last inventory found!") 94 | 95 | def returnUserInventory(self, Player, userString): 96 | user = Server.FindPlayer(userString) 97 | if user is None: 98 | Player.MessageFrom(sysname, userString + " is not online") 99 | else: 100 | if DataStore.ContainsKey("pinv", user.SteamID): 101 | Player.Inventory.ClearAll() 102 | Inventory = DataStore.Get("pinv", user.SteamID) 103 | if Inventory: 104 | for dictionary in Inventory: 105 | if dictionary['name'] is not None: 106 | Player.Inventory.AddItemTo(dictionary['name'], dictionary['slot'], dictionary['quantity']) 107 | else: 108 | Player.MessageFrom(sysname, red + "No dictionary found in the for cycle?!") 109 | Player.MessageFrom(sysname, green + "Your inventory represents " + user.Name + "'s inventory") 110 | else: 111 | Player.MessageFrom(sysname, "Inventory == null") 112 | DataStore.Remove("pinv", user.SteamID) 113 | else: 114 | Player.MessageFrom(sysname, red + "No Items found!") 115 | -------------------------------------------------------------------------------- /FougeritePlugins/JZap/JZap.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | __author__ = 'Mike, Converted by DreTaX' 3 | __version__ = '1.5' 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | JZapDB = 'JZap' 10 | """ 11 | Class 12 | """ 13 | 14 | emon = '[color#FFA500]' 15 | noem = '[color#FFFFFF]' 16 | 17 | 18 | class JZap: 19 | 20 | """ 21 | Methods 22 | """ 23 | 24 | def isMod(self, id): 25 | if DataStore.ContainsKey('Moderators', id): 26 | return True 27 | return False 28 | 29 | def AllStuff(self, OwnerID): 30 | arr = World.Entities.ToArray() 31 | return [e for e in arr if e.UOwnerID == OwnerID] 32 | 33 | """ 34 | Events 35 | """ 36 | 37 | def On_PluginInit(self): 38 | DataStore.Flush(JZapDB) 39 | Plugin.CommandList.Add(JZapDB.lower()) 40 | 41 | def On_Command(self, Player, cmd, args): 42 | if cmd == JZapDB.lower(): 43 | if not Player.Admin and not Player.Moderator: 44 | Player.Message("You aren't an admin.") 45 | return 46 | get = DataStore.Get(JZapDB, 'Active') 47 | if get is not None and get != Player.UID: 48 | Player.MessageFrom('☒ ', 'Wait a moment, someone else is zapping stuff.') 49 | return 50 | elif get != Player.UID: 51 | DataStore.Add(JZapDB, 'Active', Player.UID) 52 | Player.InventoryNotice(JZapDB + ' is activated!') 53 | else: 54 | DataStore.Flush(JZapDB) 55 | Player.InventoryNotice(JZapDB + ' is de-activated!') 56 | 57 | def On_EntityHurt(self, he): 58 | if DataStore.Get(JZapDB, 'Active') is None: 59 | return 60 | if he.Attacker is None or he.Entity is None or he.IsDecay: 61 | return 62 | OwnerID = DataStore.Get(JZapDB, 'Target') 63 | if "NPC" in str(he.Attacker): 64 | return 65 | if he.Entity.Health > 0: 66 | if not he.Attacker.Admin and not he.Attacker.Moderator: 67 | return 68 | if not Server.HasRustPP: 69 | return 70 | dict = Server.GetRustPPAPI().Cache 71 | if not dict.ContainsKey(long(he.Entity.UOwnerID)): 72 | name = "UnKnown" 73 | else: 74 | name = dict[he.Entity.UOwnerID] 75 | if OwnerID is None and DataStore.Get(JZapDB, 'Active') == he.Attacker.UID: 76 | DataStore.Add(JZapDB, 'Target', he.Entity.UOwnerID) 77 | he.Attacker.MessageFrom('☑ ', 'This thing belongs to ' + emon + str(name) + 78 | noem + ' (' + he.Entity.OwnerID + ').') 79 | he.Attacker.MessageFrom('☑ ☑ ', 'Hit it once more to zap ' + emon + name + '\'s' + 80 | noem + ' stuff completely off the map.') 81 | return 82 | elif OwnerID == he.Entity.UOwnerID: 83 | DataStore.Flush(JZapDB) 84 | stuff = self.AllStuff(OwnerID) 85 | for e in stuff: 86 | try: 87 | e.Destroy() 88 | except: 89 | pass 90 | he.Attacker.MessageFrom('☑ ☑ ☑ ', emon + str(len(stuff)) + noem + ' objects were zapped.') 91 | he.Attacker.Notice('☠', name.upper() + '\'S RUST STUFF\'S DUST!', 10) 92 | he.Attacker.InventoryNotice(JZapDB + ' is de-activated!') 93 | return 94 | -------------------------------------------------------------------------------- /FougeritePlugins/KillingSpree/KillingSpree.py: -------------------------------------------------------------------------------- 1 | __title__ = 'KillingSpree' 2 | __author__ = 'DreTaX' 3 | __version__ = '1.2' 4 | 5 | import clr 6 | 7 | clr.AddReferenceByPartialName("Fougerite") 8 | import Fougerite 9 | import time 10 | 11 | """ 12 | Class 13 | """ 14 | 15 | 16 | class KillingSpree: 17 | 18 | def On_PluginInit(self): 19 | DataStore.Flush("Peak_KS_LastSeen") 20 | 21 | def On_PlayerKilled(self, DeathEvent): 22 | if DeathEvent.Victim is not None and DeathEvent.Attacker is not None: 23 | if DeathEvent.VictimIsPlayer and DeathEvent.AttackerIsPlayer and DeathEvent.Victim.UID != DeathEvent.Attacker.UID: 24 | CurrentSpree = int(self.GetCurrentKillingSpree(DeathEvent.Attacker.UID)) + 1 25 | self.SetKillingSpree(DeathEvent.Victim.UID, 0) 26 | self.SetKillingSpree(DeathEvent.Attacker.UID, CurrentSpree) 27 | self.ShowKillingSpreeNotification(DeathEvent.Attacker, CurrentSpree) 28 | 29 | def On_PlayerConnected(self, Player): 30 | id = Player.UID 31 | LastSeen = self.GetLastSeen(id) 32 | TimeStamp = round(time.time()) 33 | CurrentSpree = self.GetCurrentKillingSpree(id) 34 | 35 | if LastSeen is not None: 36 | if int(CurrentSpree) > 0 and (TimeStamp - int(LastSeen)) >= 900: 37 | self.SetKillingSpree(Player.UID, 0) 38 | Player.Message("Your killing spree has been reset.") 39 | 40 | def On_PlayerDisconnected(self, Player): 41 | TimeStamp = int(round(time.time())) 42 | self.SetLastSeen(Player.UID, TimeStamp) 43 | 44 | def GetLastSeen(self, SteamID): 45 | return DataStore.Get("Peak_KS_LastSeen", SteamID) 46 | 47 | def SetLastSeen(self, SteamID, LastSeen): 48 | DataStore.Add("Peak_KS_LastSeen", SteamID, int(LastSeen)) 49 | 50 | def GetCurrentKillingSpree(self, SteamID): 51 | KillingSpree = DataStore.Get("Peak_KS_CurrentSpree", SteamID) 52 | if KillingSpree is None: 53 | return 0 54 | return int(KillingSpree) 55 | 56 | def SetKillingSpree(self, SteamID, Spree): 57 | DataStore.Add("Peak_KS_CurrentSpree", SteamID, Spree) 58 | 59 | def ShowKillingSpreeNotification(self, Name, CurrentSpree): 60 | CurrentSpree = int(CurrentSpree) 61 | if CurrentSpree == 5: 62 | Server.BroadcastNotice(Name + " is on a killing spree!") 63 | elif CurrentSpree == 10: 64 | Server.BroadcastNotice(Name + " is on a rampage!") 65 | elif CurrentSpree == 15: 66 | Server.BroadcastNotice(Name + " is dominating!") 67 | elif CurrentSpree == 20: 68 | Server.BroadcastNotice(Name + " is unstoppable!") 69 | elif CurrentSpree == 25: 70 | Server.BroadcastNotice(Name + " is godlike!") 71 | -------------------------------------------------------------------------------- /FougeritePlugins/Kits/LoadOuts/admin.ini: -------------------------------------------------------------------------------- 1 | [Kit] 2 | Enabled=true 3 | Cooldown=0 4 | AdminCanUse=true 5 | ModeratorCanUse=true 6 | NormalCanUse=false 7 | AutoGiveOnSpawn=false 8 | OnlyGiveOnSpawnIfHavingDefaultItems=true 9 | AdminCanBypassCooldown=false 10 | ModeratorCanBypassCooldown=false 11 | AdminCanBypassMaxUses=false 12 | ModeratorCanBypassMaxUses=false 13 | MaxUses=0 14 | ClearInvOnUse=false 15 | HowCanOneGetTheKit=0 16 | 17 | [Items] 18 | M4=1,30 19 | 556 Ammo=250 20 | P250=1,31 21 | 9mm Ammo=120 -------------------------------------------------------------------------------- /FougeritePlugins/Kits/LoadOuts/starter.ini: -------------------------------------------------------------------------------- 1 | [Kit] 2 | Enabled=true 3 | Cooldown=120000 4 | AdminCanUse=true 5 | ModeratorCanUse=true 6 | NormalCanUse=true 7 | AutoGiveOnSpawn=false 8 | OnlyGiveOnSpawnIfHavingDefaultItems=true 9 | AdminCanBypassCooldown=false 10 | ModeratorCanBypassCooldown=false 11 | AdminCanBypassMaxUses=false 12 | ModeratorCanBypassMaxUses=false 13 | MaxUses=10 14 | ClearInvOnUse=false 15 | HowCanOneGetTheKit=0 16 | 17 | [Items] 18 | P250=1 19 | 9mm Ammo=10 -------------------------------------------------------------------------------- /FougeritePlugins/Loadout/Loadout.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | import System 9 | 10 | """ 11 | Class 12 | """ 13 | 14 | 15 | class Loadout: 16 | """ 17 | Methods 18 | """ 19 | 20 | def On_PluginInit(self): 21 | Util.ConsoleLog("Loadout by " + __author__ + " Version: " + __version__ + " loaded.", False) 22 | 23 | def isMod(self, id): 24 | if DataStore.ContainsKey("Moderators", id): 25 | return True 26 | return False 27 | 28 | def On_Command(self, Player, cmd, args): 29 | if cmd == "inv": 30 | if Player.Admin or self.isMod(Player.SteamID): 31 | inventory = Player.Inventory 32 | inventory.AddItem("Invisible Helmet", 1) 33 | inventory.AddItem("Invisible Vest", 1) 34 | inventory.AddItem("Invisible Pants", 1) 35 | inventory.AddItem("Invisible Boots", 1) -------------------------------------------------------------------------------- /FougeritePlugins/Location/Location.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.1' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | 8 | 9 | class Location: 10 | 11 | d = { 12 | "Hacker Valley South": "5907,-1848", 13 | "Hacker Mountain South": "5268,-1961", 14 | "Hacker Valley Middle": "5268,-2700", 15 | "Hacker Mountain North": "4529,-2274", 16 | "Hacker Valley North": "4416,-2813", 17 | "Wasteland North": "3208,-4191", 18 | "Wasteland South": "6433,-2374", 19 | "Wasteland East": "4942,-2061", 20 | "Wasteland West": "3827,-5682", 21 | "Sweden": "3677,-4617", 22 | "Everust Mountain": "5005,-3226", 23 | "North Everust Mountain": "4316,-3439", 24 | "South Everust Mountain": "5907,-2700", 25 | "Metal Valley": "6825,-3038", 26 | "Metal Mountain": "7185,-3339", 27 | "Metal Hill": "5055,-5256", 28 | "Resource Mountain": "5268,-3665", 29 | "Resource Valley": "5531,-3552", 30 | "Resource Hole": "6942,-3502", 31 | "Resource Road": "6659,-3527", 32 | "Beach": "5494,-5770", 33 | "Beach Mountain": "5108,-5875", 34 | "Coast Valley": "5501,-5286", 35 | "Coast Mountain": "5750,-4677", 36 | "Coast Resource": "6120,-4930", 37 | "Secret Mountain": "6709,-4730", 38 | "Secret Valley": "7085,-4617", 39 | "Factory Radtown": "6446,-4667", 40 | "Small Radtown": "6120,-3452", 41 | "Big Radtown": "5218,-4800", 42 | "Hangar": "6809,-4304", 43 | "Tanks": "6859,-3865", 44 | "Civilian Forest": "6659,-4028", 45 | "Civilian Mountain": "6346,-4028", 46 | "Civilian Road": "6120,-4404", 47 | "Ballzack Mountain": "4316,-5682", 48 | "Ballzack Valley": "4720,-5660", 49 | "Spain Valley": "4742,-5143", 50 | "Portugal Mountain": "4203,-4570", 51 | "Portugal": "4579,-4637", 52 | "Lone Tree Mountain": "4842,-4354", 53 | "Forest": "5368,-4434", 54 | "Rad-Town Valley": "5907,-3400", 55 | "Next Valley": "4955,-3900", 56 | "Silk Valley": "5674,-4048", 57 | "French Valley": "5995,-3978", 58 | "Ecko Valley": "7085,-3815", 59 | "Ecko Mountain": "7348,-4100", 60 | "Zombie Hill": "6396,-3428" 61 | } 62 | 63 | Vector2s = { 64 | 65 | } 66 | 67 | 68 | def On_PluginInit(self): 69 | for x in self.d.keys(): 70 | v = self.d[x].split(',') 71 | self.Vector2s[Util.CreateVector2(float(v[0]), float(v[1]))] = x 72 | self.d.clear() 73 | 74 | def On_Command(self, Player, cmd, args): 75 | if cmd == "location": 76 | closest = float(999999999) 77 | loc = Util.CreateVector2(Player.X, Player.Z) 78 | v = None 79 | for x in self.Vector2s.keys(): 80 | dist = Util.GetVector2sDistance(loc, x) 81 | if dist < closest: 82 | v = x 83 | closest = dist 84 | Player.MessageFrom("DetailedLocation", "You are near: " + self.Vector2s[v] + " - " + str(Player.Location)) 85 | -------------------------------------------------------------------------------- /FougeritePlugins/Moderators/Moderators.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.4b' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | import Fougerite 7 | 8 | """ 9 | Class 10 | """ 11 | 12 | class Moderators: 13 | """ 14 | Methods 15 | """ 16 | 17 | def ModeratorsIni(self): 18 | if not Plugin.IniExists("Moderators"): 19 | ini = Plugin.CreateIni("Moderators") 20 | ini.AddSetting("Moderators", "ModNameHere", "76561197999999999") 21 | ini.Save() 22 | return Plugin.GetIni("Moderators") 23 | 24 | def argsToText(self, args): 25 | text = str.join(" ", args) 26 | return text 27 | 28 | """ 29 | CheckV method based on Spock's method. 30 | Upgraded by DreTaX 31 | Can Handle Single argument and Array args. 32 | V4.1 33 | """ 34 | 35 | def GetPlayerName(self, namee): 36 | try: 37 | name = namee.lower() 38 | for pl in Server.Players: 39 | if pl.Name.lower() == name: 40 | return pl 41 | return None 42 | except: 43 | return None 44 | 45 | def CheckV(self, Player, args): 46 | systemname = "Moderators" 47 | count = 0 48 | if hasattr(args, '__len__') and (not isinstance(args, str)): 49 | p = self.GetPlayerName(str.join(" ", args)) 50 | if p is not None: 51 | return p 52 | for pl in Server.Players: 53 | for namePart in args: 54 | if namePart.lower() in pl.Name.lower(): 55 | p = pl 56 | count += 1 57 | continue 58 | else: 59 | nargs = str(args).lower() 60 | p = self.GetPlayerName(nargs) 61 | if p is not None: 62 | return p 63 | for pl in Server.Players: 64 | if nargs in pl.Name.lower(): 65 | p = pl 66 | count += 1 67 | continue 68 | if count == 0: 69 | Player.MessageFrom(systemname, "Couldn't find [color#00FF00]" + str.join(" ", args) + "[/color]!") 70 | return None 71 | elif count == 1 and p is not None: 72 | return p 73 | else: 74 | Player.MessageFrom(systemname, "Found [color#FF0000]" + str(count) 75 | + "[/color] player with similar name. [color#FF0000] Use more correct name!") 76 | return None 77 | 78 | def On_PluginInit(self): 79 | self.AddIdsToDS() 80 | 81 | def AddIdsToDS(self): 82 | DataStore.Flush("Moderators") 83 | ini = self.ModeratorsIni() 84 | mods = ini.EnumSection("Moderators") 85 | for mod in mods: 86 | modid = ini.GetSetting("Moderators", mod) 87 | DataStore.Add("Moderators", modid, mod) 88 | DataStore.Save() 89 | 90 | def On_Command(self, Player, cmd, args): 91 | if cmd == "addmoderator": 92 | if Player.Admin: 93 | if len(args) == 0: 94 | Player.Message("Usage: /addmoderator name") 95 | else: 96 | playerr = self.CheckV(Player, args) 97 | if playerr is None: 98 | return 99 | name = playerr.Name 100 | id = playerr.SteamID 101 | ini = self.ModeratorsIni() 102 | for x in ini.EnumSection("Moderators"): 103 | if ini.GetSetting("Moderators", x) == id: 104 | Player.Message(name + " is already a moderator.") 105 | return 106 | ini.AddSetting("Moderators", name, id) 107 | ini.Save() 108 | DataStore.Add("Moderators", id, name) 109 | Player.Message(name + " was added to the moderators.") 110 | elif cmd == "delmoderator": 111 | if Player.Admin: 112 | if len(args) == 0: 113 | Player.Message("Usage: /delmoderator name") 114 | else: 115 | name = self.argsToText(args) 116 | name = name.lower() 117 | ini = self.ModeratorsIni() 118 | mods = ini.EnumSection("Moderators") 119 | for mod in mods: 120 | l = mod.lower() 121 | if name in l or name == l: 122 | id = ini.GetSetting("Moderators", mod) 123 | ini.DeleteSetting("Moderators", mod) 124 | ini.Save() 125 | DataStore.Remove("Moderators", id) 126 | Player.Message(mod + " was removed from the moderators.") 127 | return 128 | Player.Message("Couldn't find player. Use /listmods") 129 | elif cmd == "listmods": 130 | if Player.Admin: 131 | ini = self.ModeratorsIni() 132 | mods = ini.EnumSection("Moderators") 133 | Player.Message("Current Moderators:") 134 | for mod in mods: 135 | Player.Message("- " + str(mod)) 136 | elif cmd == "modflush": 137 | if Player.Admin: 138 | self.AddIdsToDS() 139 | Player.Message("Flushed!") -------------------------------------------------------------------------------- /FougeritePlugins/NavMeshRunner/NavMeshRunner.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.1' 3 | import clr 4 | clr.AddReferenceByPartialName("Fougerite") 5 | clr.AddReferenceByPartialName("UnityEngine") 6 | import Fougerite 7 | import UnityEngine 8 | from UnityEngine import * 9 | 10 | class NavMeshRunner: 11 | 12 | char = None 13 | dmg = None 14 | 15 | def On_PluginInit(self): 16 | self.char = Util.TryFindReturnType("Character") 17 | self.dmg = Util.TryFindReturnType("DamageEvent") 18 | Plugin.CreateTimer("KillThem", 1200000).Start() 19 | 20 | def isMod(self, id): 21 | if DataStore.ContainsKey("Moderators", id): 22 | return True 23 | return False 24 | 25 | def Kill(self): 26 | if self.char is None: 27 | Plugin.Log("Failed", "Failed...") 28 | return 29 | number = 0 30 | navmeshes = UnityEngine.Object.FindObjectsOfType[UnityEngine.NavMeshAgent]() 31 | for agent in navmeshes: 32 | if str(agent.pathStatus) in "PathInvalid": 33 | char = agent.GetComponent[self.char]() 34 | char.takeDamage.health = 0 35 | char.Signal_ServerCharacterDeath() 36 | try: 37 | char.SendMessage("OnKilled", self.dmg(), SendMessageOptions.DontRequireReceiver) 38 | except: 39 | pass 40 | number += 1 41 | return number 42 | 43 | def KillThemCallback(self, timer): 44 | timer.Kill() 45 | self.Kill() 46 | Plugin.CreateTimer("KillThem", 1200000).Start() 47 | 48 | def On_Command(self, Player, cmd, args): 49 | if cmd == "navmeshcheck": 50 | if Player.Admin or self.isMod(Player.SteamID): 51 | n = self.Kill() 52 | Player.MessageFrom("NavMesh", "Killed: " + str(n) + " animals.") -------------------------------------------------------------------------------- /FougeritePlugins/NoSuicide/NoSuicide.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | 10 | class NoSuicide: 11 | 12 | def On_PlayerHurt(self, HurtEvent): 13 | if HurtEvent.AttackerIsPlayer and HurtEvent.VictimIsPlayer: 14 | if HurtEvent.Attacker is None or HurtEvent.Victim is None: 15 | return 16 | if HurtEvent.Attacker.UID == HurtEvent.Victim.UID: 17 | if HurtEvent.DamageType == "Bleeding" and str(HurtEvent.DamageAmount) == "inf" \ 18 | and HurtEvent.WeaponName == "Fall Damage": 19 | HurtEvent.DamageAmount = 0 20 | HurtEvent.Victim.MessageFrom("NoSuicide", "Why would you kill yourself retard?") 21 | -------------------------------------------------------------------------------- /FougeritePlugins/PM/PM.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.1' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | green = "[color #009900]" 14 | white = "[color #FFFFFF]" 15 | teal = "[color #00FFFF]" 16 | red = "[color #FF0000]" 17 | class PM: 18 | 19 | def On_PluginInit(self): 20 | DataStore.Flush("PmSys") 21 | Util.ConsoleLog("PM by " + __author__ + " Version: " + __version__ + " loaded.", False) 22 | 23 | def GetQuoted(self, array, Player): 24 | text = str.join(" ", array) 25 | if not '"' in text: 26 | Player.MessageFrom('PrivateMessage', 'Usage: /report "PlayerName" "message"') 27 | Player.MessageFrom('PrivateMessage', 'Quote signs (") are required.') 28 | return False 29 | groups = text.split('"') 30 | n = len(groups) 31 | list = [] 32 | for x in xrange(0, n): 33 | if x % 2 != 0: 34 | list.append(str(groups[x]).strip('\\')) 35 | if len(list) < 2: 36 | return False 37 | return list 38 | 39 | def FindPlayerById(self, id): 40 | try: 41 | p = Server.FindPlayer(id) 42 | return p 43 | except: 44 | return None 45 | 46 | """ 47 | CheckV method based on Spock's method. 48 | Upgraded by DreTaX 49 | Can Handle Single argument and Array args. 50 | V4.1 51 | """ 52 | 53 | def GetPlayerName(self, namee): 54 | try: 55 | name = namee.lower() 56 | for pl in Server.Players: 57 | if pl.Name.lower() == name: 58 | return pl 59 | return None 60 | except: 61 | return None 62 | 63 | def CheckV(self, Player, args): 64 | systemname = "PrivateMessage" 65 | count = 0 66 | if hasattr(args, '__len__') and (not isinstance(args, str)): 67 | p = self.GetPlayerName(str.join(" ", args)) 68 | if p is not None: 69 | return p 70 | for pl in Server.Players: 71 | for namePart in args: 72 | if namePart.lower() in pl.Name.lower(): 73 | p = pl 74 | count += 1 75 | continue 76 | else: 77 | nargs = str(args).lower() 78 | p = self.GetPlayerName(nargs) 79 | if p is not None: 80 | return p 81 | for pl in Server.Players: 82 | if nargs in pl.Name.lower(): 83 | p = pl 84 | count += 1 85 | continue 86 | if count == 0: 87 | Player.MessageFrom(systemname, "Couldn't find [color#00FF00]" + str.join(" ", args) + "[/color]!") 88 | return None 89 | elif count == 1 and p is not None: 90 | return p 91 | else: 92 | Player.MessageFrom(systemname, "Found [color#FF0000]" + str(count) + "[/color] player with similar name. [color#FF0000] Use more correct name!") 93 | return None 94 | 95 | def On_Command(self, Player, cmd, args): 96 | if cmd == "pm": 97 | if len(args) <= 1: 98 | Player.MessageFrom('PrivateMessage', 'Usage: /pm "PlayerName" "message"') 99 | Player.MessageFrom('PrivateMessage', 'Quote signs (") are required.') 100 | return 101 | array = self.GetQuoted(args, Player) 102 | if not array: 103 | return 104 | playerr = self.CheckV(Player, array[0]) 105 | if playerr is None: 106 | return 107 | playerr.MessageFrom("PrivateMessage", green + "(" + Player.Name + " -> You): " + teal + array[1]) 108 | Player.MessageFrom("PrivateMessage", green + "(You -> " + playerr.Name + "): " + teal + array[1]) 109 | DataStore.Add("PmSys", Player.SteamID, playerr.SteamID) 110 | DataStore.Add("PmSys", playerr.SteamID, Player.SteamID) 111 | elif cmd == "r": 112 | if len(args) == 0: 113 | Player.MessageFrom('PrivateMessage', 'Usage: /r message') 114 | return 115 | if not DataStore.ContainsKey("PmSys", Player.SteamID): 116 | Player.MessageFrom('PrivateMessage', 'You have to send a Private Message first via /pm') 117 | return 118 | id = DataStore.Get("PmSys", Player.SteamID) 119 | text = str.join(" ", args) 120 | playerr = self.FindPlayerById(id) 121 | if playerr is None: 122 | DataStore.Remove("PmSys", Player.SteamID) 123 | Player.MessageFrom('PrivateMessage', red + "Player must be offline. Removing from /r") 124 | return 125 | playerr.MessageFrom("PrivateMessage", green + "(" + Player.Name + " -> You): " + teal + text) 126 | Player.MessageFrom("PrivateMessage", green + "(You -> " + playerr.Name + "): " + teal + text) 127 | 128 | def On_PlayerDisconnected(self, Player): 129 | id = Player.SteamID 130 | DataStore.Remove("PmSys", id) -------------------------------------------------------------------------------- /FougeritePlugins/RampFix/RampFix.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | import System 9 | 10 | """ 11 | Class 12 | """ 13 | 14 | 15 | class RampFix: 16 | """ 17 | Methods 18 | """ 19 | 20 | def On_PluginInit(self): 21 | Util.ConsoleLog("RampFix by " + __author__ + " Version: " + __version__ + " loaded.", False) 22 | 23 | def On_EntityDeployed(self, Player, Entity): 24 | if Entity is not None: 25 | if "Ramp" in Entity.Name or "Foundation" in Entity.Name: 26 | loott = Util.TryFindReturnType('LootableObject') 27 | lob = UnityEngine.Object.FindObjectsOfType(loott) 28 | for i in xrange(0, len(lob)): 29 | one = lob[i].collider.bounds 30 | two = Entity.Object.collider.bounds 31 | if two.Intersects(one): 32 | Entity.Destroy() 33 | return 34 | stt = Util.TryFindReturnType('StructureComponent') 35 | sc = UnityEngine.Object.FindObjectsOfType(stt) 36 | for i in xrange(0, len(sc)): 37 | if sc[i].name.index("Foundation") != -1 or sc[i] == Entity.Object: 38 | continue 39 | 40 | if sc[i].name.index("Ramp(Clone)") != -1: 41 | one = sc[i].collider.bounds 42 | two = Entity.Object.collider.bounds 43 | if two.Intersects(one): 44 | Entity.Destroy() 45 | return -------------------------------------------------------------------------------- /FougeritePlugins/Recorder/Buildings/tinyhouse.ini: -------------------------------------------------------------------------------- 1 | [Init] 2 | X=5439.625 3 | Y=329.1113 4 | Z=-5243.754 5 | 6 | [Part0] 7 | Prefab=;struct_wood_foundation 8 | PosX=0 9 | PosY=-3.499878 10 | PosZ=0 11 | RotX=0 12 | RotY=0.560976 13 | RotZ=0 14 | RotW=-0.8278321 15 | 16 | [Part1] 17 | Prefab=;struct_wood_pillar 18 | PosX=-1.395508 19 | PosY=0.5001221 20 | PosZ=3.248535 21 | RotX=0 22 | RotY=0.560976 23 | RotZ=0 24 | RotW=-0.8278321 25 | 26 | [Part2] 27 | Prefab=;struct_wood_pillar 28 | PosX=3.248535 29 | PosY=0.5001221 30 | PosZ=1.395508 31 | RotX=0 32 | RotY=0.560976 33 | RotZ=0 34 | RotW=-0.8278321 35 | 36 | [Part3] 37 | Prefab=;struct_wood_pillar 38 | PosX=-3.248535 39 | PosY=0.5001221 40 | PosZ=-1.395508 41 | RotX=0 42 | RotY=0.560976 43 | RotZ=0 44 | RotW=-0.8278321 45 | 46 | [Part4] 47 | Prefab=;struct_wood_pillar 48 | PosX=1.395508 49 | PosY=0.5001221 50 | PosZ=-3.248535 51 | RotX=0 52 | RotY=0.560976 53 | RotZ=0 54 | RotW=-0.8278321 55 | 56 | [Part5] 57 | Prefab=;struct_wood_wall 58 | PosX=2.321777 59 | PosY=0.5001221 60 | PosZ=-0.9267578 61 | RotX=0 62 | RotY=0.560976 63 | RotZ=0 64 | RotW=-0.8278321 65 | 66 | [Part6] 67 | Prefab=;struct_wood_wall 68 | PosX=0.9267578 69 | PosY=0.5001221 70 | PosZ=2.321777 71 | RotX=0 72 | RotY=0.9820356 73 | RotZ=0 74 | RotW=-0.1886958 75 | 76 | [Part7] 77 | Prefab=;struct_wood_wall 78 | PosX=-2.321777 79 | PosY=0.5001221 80 | PosZ=0.9267578 81 | RotX=0 82 | RotY=0.8278322 83 | RotZ=0 84 | RotW=0.560976 85 | 86 | [Part8] 87 | Prefab=;struct_wood_doorway 88 | PosX=-0.9267578 89 | PosY=0.5001221 90 | PosZ=-2.321777 91 | RotX=0 92 | RotY=0.9820356 93 | RotZ=0 94 | RotW=-0.1886958 95 | 96 | [Part9] 97 | Prefab=;deploy_metal_door 98 | PosX=-0.9267578 99 | PosY=0.5320129 100 | PosZ=-2.321777 101 | RotX=-0.1334281 102 | RotY=-0.6944041 103 | RotZ=-0.6944041 104 | RotW=0.1334281 105 | 106 | [Part10] 107 | Prefab=;struct_wood_ceiling 108 | PosX=0 109 | PosY=0.5001221 110 | PosZ=0 111 | RotX=0 112 | RotY=0.560976 113 | RotZ=0 114 | RotW=-0.8278321 115 | 116 | [Part11] 117 | Prefab=;deploy_camp_sleepingbag 118 | PosX=1.375488 119 | PosY=0.5316772 120 | PosZ=-0.6245117 121 | RotX=0.001017261 122 | RotY=0.1821872 123 | RotZ=0.004513471 124 | RotW=0.983253 125 | 126 | [Part12] 127 | Prefab=;deploy_camp_bonfire 128 | PosX=0.6025391 129 | PosY=0.5316772 130 | PosZ=1.327637 131 | RotX=0.008759017 132 | RotY=-0.2707104 133 | RotZ=-0.002561014 134 | RotW=-0.9626176 135 | 136 | [Part13] 137 | Prefab=;deploy_wood_box 138 | PosX=-1.719727 139 | PosY=0.5316772 140 | PosZ=0.09619141 141 | RotX=-0.00628832 142 | RotY=-0.5758699 143 | RotZ=-0.003874613 144 | RotW=0.817508 145 | 146 | -------------------------------------------------------------------------------- /FougeritePlugins/ResourceSpawner/ResourceSpawner.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | import clr 4 | 5 | clr.AddReferenceByPartialName("Fougerite") 6 | clr.AddReferenceByPartialName("UnityEngine") 7 | import UnityEngine 8 | import Fougerite 9 | from Fougerite import Player 10 | from UnityEngine import Vector3 11 | 12 | """ 13 | Class 14 | """ 15 | 16 | class ResourceSpawner: 17 | 18 | def On_Command(self, Player, cmd, args): 19 | if cmd == "spawn": 20 | if not Player.Admin and not Player.Moderator: 21 | Player.Message("You are not allowed to use this command!") 22 | return 23 | 24 | num = 1 25 | if len(args) == 2: 26 | numb = str(args[1]) 27 | if numb.isnumeric(): 28 | num = int(numb) 29 | resource = args[0].lower() 30 | else: 31 | resource = str.join(' ', args).lower() 32 | loc = Util.Infront(Player, 10) 33 | y = World.GetGround(loc.x, loc.z) 34 | loc = Vector3(loc.x, y, loc.z) 35 | if resource == "wood": 36 | World.Spawn(";res_woodpile", loc, num) 37 | Player.Notice("\u2714", "Wood Pile has been spawned!", 3) 38 | elif resource == "sulfur": 39 | World.Spawn(";res_ore_1", loc, num) 40 | Player.Notice("\u2714", "Sulfur Ore has been spawned!", 3) 41 | elif resource == "metal": 42 | World.Spawn(";res_ore_2", loc, num) 43 | Player.Notice("\u2714", "Metal Ore has been spawned!", 3) 44 | elif resource == "stone": 45 | World.Spawn(";res_ore_3", loc, num) 46 | Player.Notice("\u2714", "Stone Ore has been spawned!", 3) 47 | elif resource == "stag": 48 | World.Spawn(":stag_prefab", loc, num) 49 | Player.Notice("\u2714", "Stag has been spawned!", 3) 50 | elif resource == "chicken": 51 | World.Spawn(":chicken_prefab", loc, num) 52 | Player.Notice("\u2714", "Chicken has been spawned!", 3) 53 | elif resource == "rabbit": 54 | World.Spawn(":rabbit_prefab_a", loc, num) 55 | Player.Notice("\u2714", "Rabbit has been spawned!", 3) 56 | elif resource == "bear": 57 | World.Spawn(":bear_prefab", loc, num) 58 | Player.Notice("\u2714", "Bear has been spawned!", 3) 59 | elif resource == "mbear": 60 | World.Spawn(":mutant_bear", loc, num) 61 | Player.Notice("\u2714", "Mutant Bear has been spawned!", 3) 62 | elif resource == "pig": 63 | World.Spawn(":boar_prefab", loc, num) 64 | Player.Notice("\u2714", "Pig has been spawned!", 3) 65 | elif resource == "wolf": 66 | World.Spawn(":wolf_prefab", loc, num) 67 | Player.Notice("\u2714", "Wolf has been spawned!", 3) 68 | elif resource == "mwolf": 69 | World.Spawn(":mutant_wolf", loc, num) 70 | Player.Notice("\u2714", "Mutant Wolf has been spawned!", 3) 71 | elif resource == "animals": 72 | loc1 = Util.Infront(Player, 16) 73 | y = World.GetGround(loc.x, loc.z) 74 | loc1 = Vector3(loc1.x, y, loc1.z) 75 | zonex = loc1.x 76 | zonez = loc1.z 77 | # zoney = World.GetGround(loc1.x, loc1.z) 78 | for i in xrange(0, 15): 79 | x = zonex + (i * 2) 80 | y = World.GetGround(loc1.x, loc1.z) 81 | loc1 = Vector3(x, y, loc1.z) 82 | World.Spawn(":wolf_prefab", loc1) 83 | z = zonez + (i * 2) 84 | y = World.GetGround(loc1.x, loc1.z) 85 | loc1 = Vector3(loc1.x, y, z) 86 | World.Spawn(":wolf_prefab", loc1) 87 | x = zonex - (i * 2) 88 | y = World.GetGround(loc1.x, loc1.z) 89 | loc1 = Vector3(x, y, loc1.z) 90 | World.Spawn(":mutant_wolf", loc1) 91 | z = zonez - (i * 2) 92 | y = World.GetGround(loc1.x, loc1.z) 93 | loc1 = Vector3(loc1.x, y, z) 94 | World.Spawn(":mutant_wolf", loc1) 95 | Player.Notice("\u2714", "Animals has been spawned!", 3) 96 | elif resource == "airdrop": 97 | World.AirdropAtPlayer(Player) 98 | Player.Notice("\u2708", "Airdrop has been spawned!", 3) 99 | elif resource == "ammobox": 100 | World.Spawn("AmmoLootBox", loc, num) 101 | Player.Notice("\u2327", "Ammo Box has been spawned!", 3) 102 | elif resource == "medicalbox": 103 | World.Spawn("MedicalLootBox", loc, num) 104 | Player.Notice("\u2327", "Medical Box has been spawned!", 3) 105 | elif resource == "lootbox": 106 | World.Spawn("BoxLoot", loc, num) 107 | Player.Notice("\u2327", "Loot Box has been spawned!", 3) 108 | elif resource == "weaponbox": 109 | World.Spawn("WeaponLootBox", loc, num) 110 | Player.Notice("\u2327", "Weapon Box has been spawned!", 3) 111 | elif resource == "supplycrate": 112 | World.Spawn("SupplyCrate", loc, num) 113 | Player.Notice("\u2327", "SupplyCrate has been spawned!", 3) 114 | """elif resource == "Human".lower(): 115 | npc = World.Spawn(":player_soldier", loc, num) 116 | Server.Broadcast(str(npc)) 117 | Player.Notice("\u2327", "Human has been spawned!", 3)""" 118 | else: 119 | Player.Message\ 120 | ("Spawnable: Wood, Sulfur, Metal, Stone, Stag, Chicken, Rabbit, Bear, MBear Pig, Wolf, MWolf") 121 | Player.Message\ 122 | ("Spawnable: Animals, Airdrop, AmmoBox, MedicalBox, LootBox, WeaponBox, SupplyCrate, Human") -------------------------------------------------------------------------------- /FougeritePlugins/SetHealth/SetHealth.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | sysname = "SetHealth" 14 | class SetHealth: 15 | 16 | """ 17 | Methods 18 | """ 19 | 20 | def On_PluginInit(self): 21 | Util.ConsoleLog("SetHealth by " + __author__ + " Version: " + __version__ + " loaded.", False) 22 | 23 | 24 | """ 25 | CheckV method based on Spock's method. 26 | Upgraded by DreTaX 27 | Can Handle Single argument and Array args. 28 | V4.1 29 | """ 30 | 31 | def GetPlayerName(self, namee): 32 | try: 33 | name = namee.lower() 34 | for pl in Server.Players: 35 | if pl.Name.lower() == name: 36 | return pl 37 | return None 38 | except: 39 | return None 40 | 41 | def CheckV(self, Player, args): 42 | count = 0 43 | if hasattr(args, '__len__') and (not isinstance(args, str)): 44 | p = self.GetPlayerName(str.join(" ", args)) 45 | if p is not None: 46 | return p 47 | for pl in Server.Players: 48 | for namePart in args: 49 | if namePart.lower() in pl.Name.lower(): 50 | p = pl 51 | count += 1 52 | continue 53 | else: 54 | nargs = str(args).lower() 55 | p = self.GetPlayerName(nargs) 56 | if p is not None: 57 | return p 58 | for pl in Server.Players: 59 | if nargs in pl.Name.lower(): 60 | p = pl 61 | count += 1 62 | continue 63 | if count == 0: 64 | if Player is not None: 65 | Player.MessageFrom(sysname, "Couldn't find [color#00FF00]" + str.join(" ", args) + "[/color]!") 66 | return None 67 | elif count == 1 and p is not None: 68 | return p 69 | else: 70 | if Player is not None: 71 | Player.MessageFrom(sysname, "Found [color#FF0000]" + str(count) + 72 | "[/color] player with similar name. [color#FF0000] Use more correct name!") 73 | return None 74 | 75 | def On_Command(self, Player, cmd, args): 76 | if cmd == "sethealth": 77 | if Player.Admin or Player.Moderator: 78 | if 1 >= len(args) or len(args) > 2: 79 | Player.MessageFrom(sysname, "Usage: /sethealth playername amount") 80 | return 81 | pl = self.CheckV(Player, args[0]) 82 | if pl is None: 83 | return 84 | if not args[1].isnumeric(): 85 | Player.MessageFrom(sysname, "Usage: /sethealth playername amount") 86 | return 87 | pl.Health = float(args[1]) -------------------------------------------------------------------------------- /FougeritePlugins/SleeperLog/SleeperLog.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | 14 | class SleeperLog: 15 | """ 16 | Methods 17 | """ 18 | 19 | def On_PluginInit(self): 20 | Util.ConsoleLog("SleeperLog by " + __author__ + " Version: " + __version__ + " loaded.", False) 21 | 22 | def SleeperId(self): 23 | if not Plugin.IniExists("SleeperId"): 24 | ini = Plugin.CreateIni("SleeperId") 25 | ini.Save() 26 | return Plugin.GetIni("SleeperId") 27 | 28 | def IsAnimal(self, Entity): 29 | if "NPC" in str(Entity): 30 | return True 31 | return False 32 | 33 | def On_PlayerConnected(self, Player): 34 | name = Player.Name 35 | id = Player.SteamID 36 | ini = self.SleeperId() 37 | if ini.GetSetting("Sleeper", id) is None: 38 | ini.AddSetting("Sleeper", id, name) 39 | ini.Save() 40 | else: 41 | ini.SetSetting("Sleeper", id, name) 42 | ini.Save() 43 | 44 | def On_PlayerHurt(self, HurtEvent): 45 | if not self.IsAnimal(HurtEvent.Attacker) and HurtEvent.Sleeper: 46 | ini = self.SleeperId() 47 | n = ini.GetSetting("Sleeper", HurtEvent.Attacker.SteamID) 48 | n2 = ini.GetSetting("Sleeper", HurtEvent.Victim.OwnerID) 49 | Plugin.Log("SleeperLog", "Attacker: " + n + " | " + HurtEvent.Attacker.SteamID + " | " + 50 | str(HurtEvent.Attacker.Location) + " Vic: " + HurtEvent.Victim.OwnerID + " | " + n2) -------------------------------------------------------------------------------- /FougeritePlugins/SpikeDamage/SpikeDamage.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.3' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Fougerite") 7 | import Fougerite 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | 14 | class SpikeDamage: 15 | """ 16 | Methods 17 | """ 18 | 19 | def On_PluginInit(self): 20 | Util.ConsoleLog("SpikeDamage by " + __author__ + " Version: " + __version__ + " loaded.", False) 21 | 22 | def SpikeL(self): 23 | if not Plugin.IniExists("SpikeL"): 24 | SpikeL = Plugin.CreateIni("SpikeL") 25 | SpikeL.Save() 26 | return Plugin.GetIni("SpikeL") 27 | 28 | def FriendOf(self, id, selfid): 29 | ini = self.SpikeL() 30 | check = ini.GetSetting(id, selfid) 31 | if check is not None: 32 | return True 33 | return False 34 | 35 | def TrytoGrabID(self, Player): 36 | try: 37 | id = Player.SteamID 38 | return id 39 | except: 40 | return None 41 | 42 | """ 43 | CheckV method based on Spock's method. 44 | Upgraded by DreTaX 45 | Can Handle Single argument and Array args. 46 | V4.1 47 | """ 48 | 49 | def GetPlayerName(self, namee): 50 | try: 51 | name = namee.lower() 52 | for pl in Server.Players: 53 | if pl.Name.lower() == name: 54 | return pl 55 | return None 56 | except: 57 | return None 58 | 59 | def CheckV(self, Player, args): 60 | systemname = "[SpikeDamage]" 61 | count = 0 62 | if hasattr(args, '__len__') and (not isinstance(args, str)): 63 | p = self.GetPlayerName(str.join(" ", args)) 64 | if p is not None: 65 | return p 66 | for pl in Server.Players: 67 | for namePart in args: 68 | if namePart.lower() in pl.Name.lower(): 69 | p = pl 70 | count += 1 71 | continue 72 | else: 73 | nargs = str(args).lower() 74 | p = self.GetPlayerName(nargs) 75 | if p is not None: 76 | return p 77 | for pl in Server.Players: 78 | if nargs in pl.Name.lower(): 79 | p = pl 80 | count += 1 81 | continue 82 | if count == 0: 83 | Player.MessageFrom(systemname, "Couldn't find [color#00FF00]" + str.join(" ", args) + "[/color]!") 84 | return None 85 | elif count == 1 and p is not None: 86 | return p 87 | else: 88 | Player.MessageFrom(systemname, "Found [color#FF0000]" + str(count) + "[/color] player with similar name. [color#FF0000] Use more correct name!") 89 | return None 90 | 91 | def On_PlayerHurt(self, HurtEvent): 92 | if HurtEvent.Attacker is not None and HurtEvent.Victim is not None: 93 | if self.TrytoGrabID(HurtEvent.Attacker) is None: 94 | return 95 | if HurtEvent.Attacker.SteamID == HurtEvent.Victim.SteamID: 96 | damage = HurtEvent.DamageAmount 97 | if damage == 10 or damage == 15: 98 | HurtEvent.DamageAmount = 0 99 | else: 100 | if self.FriendOf(HurtEvent.Attacker.SteamID, HurtEvent.Victim.SteamID): 101 | damage = HurtEvent.DamageAmount 102 | if damage == 10 or damage == 15: 103 | HurtEvent.DamageAmount = 0 104 | 105 | def On_Command(self, Player, cmd, args): 106 | if cmd == "spikedmg": 107 | if len(args) == 0: 108 | Player.Message("---SpikeDamage---") 109 | Player.Message("Makes ur friends not to get dmg from ur spikes") 110 | Player.Message("/spikedmg - List Commands") 111 | Player.Message("/spikedmga name - Adds friend to whitelist") 112 | Player.Message("/spikedmgd name - Deletes friend from whitelist") 113 | Player.Message("/spikedmgl - Lists Friends in Whitelist") 114 | elif cmd == "spikedmga": 115 | if len(args) == 0: 116 | Player.Message("/spikedmga name - Adds friend to whitelist") 117 | elif len(args) > 0: 118 | playerr = self.CheckV(Player, args) 119 | if playerr is None: 120 | return 121 | idof = playerr.SteamID 122 | name = str(playerr.Name) 123 | ini = self.SpikeL() 124 | ini.AddSetting(Player.SteamID, idof, name) 125 | ini.Save() 126 | elif cmd == "spikedmgd": 127 | if len(args) == 0: 128 | Player.Message("Usage: /spikedmgd playername") 129 | return 130 | elif len(args) > 0: 131 | name = args[0] 132 | ini = self.SpikeL() 133 | id = Player.SteamID 134 | players = ini.EnumSection(id) 135 | name = name.lower() 136 | for playerid in players: 137 | nameof = ini.GetSetting(id, playerid) 138 | if nameof.lower() == name: 139 | ini.DeleteSetting(id, playerid) 140 | ini.Save() 141 | Player.Message("Player Removed from Whitelist") 142 | return 143 | Player.Message("Player doesn't exist!") 144 | elif cmd == "spikedmgl": 145 | ini = self.SpikeL() 146 | id = Player.SteamID 147 | players = ini.EnumSection(id) 148 | for playerid in players: 149 | nameof = ini.GetSetting(id, playerid) 150 | Player.Message("Whitelisted: " + nameof) -------------------------------------------------------------------------------- /FougeritePlugins/TDM/TDM.ini: -------------------------------------------------------------------------------- 1 | [Default] 2 | Leather Helmet=1 3 | Leather Vest=1 4 | Leather Pants=1 5 | Leather Boots=1 6 | Bandage=5 7 | Revolver=1 8 | 9mm Ammo=40 9 | Hatchet=1 10 | Small Rations=1 11 | 12 | [Equipment] 13 | ; ANYTHING BETWEEN THE () IS IGNORED. PRICE-QUANITY 14 | Kevlar=650 15 | KevlarH=1000 16 | Large Medkit(x 5)=2500 17 | Large Medkit(x 3)=1800 18 | Large Medkit(x 1)=600 19 | Small Medkit(x 3)=750 20 | Small Medkit(x 1)=300 21 | F1 Grenade(x 3)=900 22 | F1 Grenade(x 1)=300 23 | 24 | [Tactical] 25 | Barricade(x 14)=500 26 | Barricade(x 7)=250 27 | Holo sight=400 28 | Silencer=300 29 | Laser Sight=350 30 | Flashlight Mod=270 31 | 32 | [Guns] 33 | Sniper=4750 34 | M4=3100 35 | MP5A4=2500 36 | P250=650 37 | 9mm Pistol=300 38 | 39 | [Ammo] 40 | ; ANYTHING BETWEEN THE () IS IGNORED. PRICE-QUANITY 41 | 9mm Ammo(x 250)=1020-250 42 | 9mm Ammo(x 100)=600-100 43 | 9mm Ammo(x 50)=300-50 44 | 556 Ammo(x 250)=1500-250 45 | 556 Ammo(x 100)=1000-100 46 | 556 Ammo(x 50)=500-50 47 | Shotgun Shells(x 90)=1000-90 48 | Shotgun Shells(x 60)=800-60 49 | Shotgun Shells(x 30)=400-30 -------------------------------------------------------------------------------- /FougeritePlugins/TpFriend/TpFriendConfig.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | Maxuses=0 3 | cooldown=1200000 4 | timeoutr=35 5 | tpdelay=10 6 | run_timer=2 7 | safetpcheck=2 8 | sysname=[TpFriend] 9 | DizzyDist=2.6 10 | CheckIfPlayerIsNearStructure=0 11 | CheckIfPlayerIsOnDeployable=0 12 | CheckIfPlayerIsInShelter=0 -------------------------------------------------------------------------------- /FougeritePlugins/Wiper/Health.ini: -------------------------------------------------------------------------------- 1 | [Damage] 2 | WoodFoundation=0 3 | WoodDoorFrame=25 4 | WoodPillar=80 5 | WoodWall=25 6 | MetalWall=32 7 | WoodCeiling=25 8 | WoodWindowFrame=25 9 | WoodStairs=25 10 | MetalCeiling=25 11 | MetalDoorFrame=32 12 | MetalPillar=80 13 | MetalFoundation=0 14 | WoodRamp=25 15 | MetalStairs=25 16 | MetalRamp=25 17 | MetalWindowFrame=32 18 | SmallStash=1 19 | MetalDoor=25 20 | LargeWoodSpikeWall=35 21 | WoodBox=4 22 | WoodGate=30 23 | WoodGateway=32 24 | Campfire=5 25 | WoodBoxLarge=25 26 | Furnace=5 27 | WoodenDoor=5 28 | Wood_Shelter=25 29 | Workbench=25 30 | WoodSpikeWall=7 31 | MetalBarsWindow=32 32 | Barricade_Fence_Deployable=25 33 | RepairBench=25 34 | SleepingBagA=5 35 | SingleBed=5 -------------------------------------------------------------------------------- /IronPythonModule.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dretax/Python-Plugins/c338ec94656247ee8651c076209ff0e7b4c38915/IronPythonModule.dll -------------------------------------------------------------------------------- /Pluton/Attacker.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | """ 11 | Please note that an Attacker can be an NPC too! 12 | It's useful (and if known that the attacker is an NPC) 13 | to define the variable as npc so you can see the methods of the NPC class 14 | Example: 15 | npc = DeathEvent.Attacker 16 | """ 17 | 18 | class Attacker: 19 | GameID = None 20 | 21 | def OnPlayerDeserialized(StreamingContext): 22 | return 23 | 24 | def Find(stringnameOrSteamidOrIP): 25 | return 26 | 27 | def FindByGameID(ulongsteamID): 28 | return 29 | 30 | def FindBySteamID(stringsteamID): 31 | return 32 | 33 | def Ban(stringreason = "no reason"): 34 | return 35 | 36 | def Kick(stringreason = "no reason"): 37 | return 38 | 39 | def Reject(stringreason = "no reason"): 40 | return 41 | 42 | def GetLookPoint(FloatMaxDist = 500): 43 | return 44 | 45 | def GetLookHit(FloatMaxDist = 500, intLayers = ""): 46 | return 47 | 48 | def GetLookPlayer(FloatMaxDist = 500): 49 | return 50 | 51 | def GetLookBuildingPart(FloatMaxDist = 500): 52 | return 53 | 54 | def Kill(self): 55 | return 56 | 57 | def KnowsBlueprint(intItemID): 58 | return 59 | 60 | def KnowsBlueprint(ItemBlueprint): 61 | return 62 | 63 | def KnowsBlueprint(ItemDefinition): 64 | return 65 | 66 | def KnowsBlueprints(itemIDs): 67 | return 68 | 69 | def KnowsBlueprints(itemBPs): 70 | return 71 | 72 | def KnowsBlueprints(itemdefs): 73 | return 74 | 75 | def KnownBlueprints(self): 76 | return 77 | 78 | def LearnBlueprint(intItemID): 79 | return 80 | 81 | def LearnBlueprint(ItemBlueprint): 82 | return 83 | 84 | def LearnBlueprint(ItemDefinition): 85 | return 86 | 87 | def LearnBlueprints(itemIDs): 88 | return 89 | 90 | def LearnBlueprints(itembps): 91 | return 92 | 93 | def LearnBlueprints(itemdefs): 94 | return 95 | 96 | def MakeNone(stringreason = "no reason"): 97 | return 98 | 99 | def MakeModerator(stringreason = "no reason"): 100 | return 101 | 102 | def MakeOwner(stringreason = "no reason"): 103 | return 104 | 105 | def Message(stringmsg): 106 | return 107 | 108 | def MessageFrom(stringfrom, stringmsg): 109 | return 110 | 111 | def ConsoleMessage(stringmsg): 112 | return 113 | 114 | def IsPlayer(self): 115 | return True 116 | 117 | def SendConsoleCommand(stringcmd): 118 | return 119 | 120 | def GroundTeleport(floatX, floatY, floatZ): 121 | return 122 | 123 | def GroundTeleport(Vector3): 124 | return 125 | 126 | def Teleport(Vector3): 127 | return 128 | 129 | worldSizeHalf = None 130 | firstLocations = [] 131 | 132 | def Teleport(floatX, floatY, floatZ): 133 | return 134 | 135 | 136 | Admin = None 137 | AuthStatus = None 138 | basePlayer = BasePlayer 139 | Health = None 140 | Inventory = None 141 | IP = None 142 | IsWounded = None 143 | Location = None 144 | Moderator = None 145 | Name = None 146 | Offline = None 147 | Owner = None 148 | OS = None 149 | Ping = None 150 | Stats = None 151 | SteamID = None 152 | TimeOnline = None 153 | Teleporting = None -------------------------------------------------------------------------------- /Pluton/AuthEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import Connection 10 | import Player 11 | class AuthEvent: 12 | 13 | GameID = None 14 | IP = None 15 | Name = None 16 | OS = None 17 | approved = None 18 | _reason = None 19 | Connection = Connection 20 | 21 | 22 | def Reject(StringReason = "no reason"): 23 | return -------------------------------------------------------------------------------- /Pluton/BaseCorpse.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import BaseEntity 10 | class BaseCorpse: 11 | ragdollPrefab = None 12 | parentEnt = BaseEntity 13 | 14 | def ServerInit(self): 15 | return 16 | 17 | def InitCorpse(BaseEntity): 18 | return 19 | 20 | def CanRemove(self): 21 | return 22 | 23 | def RemoveCorpse(self): 24 | return 25 | 26 | def ResetRemovalTime(FloatDur): 27 | return 28 | 29 | def ResetRemovalTime(self): 30 | return 31 | 32 | def Save(BaseNetworkableSaveInfo): 33 | return 34 | 35 | def Load(BaseNetworkableLoadInfo): 36 | return 37 | 38 | def OnAttacked(HitInfo): 39 | return -------------------------------------------------------------------------------- /Pluton/BaseEntity.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class BaseEntity: 11 | enableSaving = True 12 | model = None 13 | ragdoll = None 14 | flags = None 15 | parentEntity = None 16 | rpcCache = None 17 | globalBroadcast = None 18 | syncPosition = None 19 | parentBone = None 20 | radiationLevel = None 21 | currentTemperature = None 22 | 23 | def DebugServer(IntRep, FloatTime): 24 | return 25 | 26 | def OnDebugStart(self): 27 | return 28 | 29 | def HasFlag(BaseEntityFlags): 30 | return 31 | 32 | def SetFlag(BaseEntityFlags, bool): 33 | return 34 | 35 | def IsOn(self): 36 | return 37 | 38 | def IsOpen(self): 39 | return 40 | 41 | def IsOnFire(self): 42 | return 43 | 44 | def IsLocked(self): 45 | return 46 | 47 | def IsDebugging(self): 48 | return 49 | 50 | def IsDisabled(self): 51 | return 52 | 53 | def OnFlagsChanged(BaseEntityFlagsold, BaseEntityFlagsnext): 54 | return 55 | 56 | def GetParentEntity(self): 57 | return 58 | 59 | def SetParent(BaseEntity, stringstrBone = ""): 60 | return 61 | 62 | 63 | def SV_RPCMessage(uintnameID, NetworkMessage): 64 | return 65 | 66 | 67 | def ClientRPC(ConnectionsourceConnection, BasePlayer, stringfuncName, paramsobjectlistobj): 68 | return 69 | 70 | def ClientRPC(ConnectionsourceConnection, stringfuncName, paramsobjectobj): 71 | return 72 | 73 | def FindRPCMessage(uintnameID): 74 | return 75 | 76 | def RadiationExposureFraction(self): 77 | return 1.0 78 | 79 | def ServerInit(self): 80 | return 81 | 82 | def GetEstimatedWorldPosition(self): 83 | return 84 | 85 | def TransformChanged(self): 86 | return 87 | 88 | def DoMovingWithoutARigidBodyCheck(self): 89 | return 90 | 91 | def SpawnAsMapEntity(self): 92 | return 93 | 94 | def OnInvalidPosition(self): 95 | return 96 | 97 | def DropCorpse(stringCorpsePrefab): 98 | return 99 | 100 | def UpdateNetworkGroup(self): 101 | return 102 | 103 | def AddChild(BaseEntity): 104 | return 105 | 106 | def RemoveChild(BaseEntity): 107 | return 108 | 109 | def OnDeployed(BaseEntity): 110 | return 111 | 112 | def ShouldNetworkTo(BasePlayer): 113 | return 114 | 115 | def AttackerInfo(PlayerLifeStoryDeathInfo): 116 | return 117 | 118 | def Push(Vector3): 119 | return 120 | 121 | def SetVelocity(Vector3): 122 | return 123 | 124 | def SetAngularVelocity(Vector3): 125 | return 126 | 127 | def GetDropPosition(self): 128 | return 129 | 130 | def GetDropVelocity(self): 131 | return 132 | 133 | def SignalBroadcast(BaseEntitySignal, Connection): 134 | return 135 | 136 | def HasAnySlot(self): 137 | return 138 | 139 | def GetSlot(BaseEntitySlot): 140 | return 141 | 142 | def SetSlot(BaseEntitySlot, BaseEntity): 143 | return 144 | 145 | def HasSlot(BaseEntitySlot): 146 | return 147 | 148 | def ToPlayer(self): 149 | return 150 | 151 | def EnterTrigger(TriggerBase): 152 | return 153 | 154 | def LeaveTrigger(TriggerBase): 155 | return 156 | 157 | def RemoveFromTriggers(self): 158 | return 159 | 160 | def OnEnterWater(WaterLevel): 161 | return 162 | 163 | def OnLeaveWater(WaterLevel): 164 | return 165 | 166 | def OnThinkWater(self): 167 | return 168 | 169 | def Stability(self): 170 | return -1 171 | 172 | def Health(self): 173 | return 0.0 174 | 175 | def MaxHealth(self): 176 | return 0.0 177 | 178 | def OnAttacked(HitInfo): 179 | return 180 | 181 | def TestAttack(HitInfo): 182 | return 183 | 184 | def GetItem(self): 185 | return 186 | 187 | def GiveItem(Item): 188 | return 189 | 190 | def DistanceTo(BaseEntity): 191 | return 192 | 193 | def CanBeLooted(BasePlayer): 194 | return 195 | 196 | def Save(BaseNetworkableSaveInfo): 197 | return 198 | 199 | def Load(BaseNetworkableLoadInfo): 200 | return 201 | 202 | def SaveAll(Save): 203 | return 204 | 205 | def Signal(Enum): 206 | return 207 | 208 | def Slot(Enum): 209 | return 210 | 211 | def FindTargets(stringFilter, boolonlyPlayers): 212 | return -------------------------------------------------------------------------------- /Pluton/BuildingEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import Player 11 | import BuildingPart 12 | 13 | class BuildingEvent: 14 | BuildingPart = BuildingPart 15 | Builder = Player 16 | Construction = None 17 | Target = None 18 | NeedsValidPlacement = None 19 | 20 | DestroyReason = "" 21 | DoDestroy = False 22 | 23 | def Destroy(reason = "Plugin blocks building!"): 24 | return -------------------------------------------------------------------------------- /Pluton/BuildingPart.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class BuildingPart: 11 | 12 | def FindSocket(stringname): 13 | return 14 | 15 | def Destroy(self): 16 | return 17 | 18 | def IsBuildingPart(self): 19 | return True 20 | 21 | def Rotate(self): 22 | return 23 | 24 | buildingBlock = None 25 | Grade = None 26 | Health = None -------------------------------------------------------------------------------- /Pluton/ChatEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import Player 11 | class ChatEvent: 12 | _arg = None 13 | OriginalText = None 14 | User = Player 15 | BroadcastName = None 16 | FinalText = None 17 | Reply = None 18 | 19 | def ReplyWith(StringMessage): 20 | return -------------------------------------------------------------------------------- /Pluton/ClientConsoleEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import Player 10 | import cmd 11 | class ClientConsoleEvent: 12 | Internal = None 13 | User = Player 14 | cmd = cmd 15 | Args = None 16 | Reply = None 17 | 18 | def ReplyWith(stringmsg): 19 | return -------------------------------------------------------------------------------- /Pluton/CommandPermissionEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class CommandPermissionEvent: 11 | 12 | blocked = False 13 | chatCommand = None 14 | 15 | def BlockCommand(StringReason): 16 | return 17 | 18 | PluginName = None -------------------------------------------------------------------------------- /Pluton/Connection.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import Player 10 | class Connection: 11 | authLevel = None 12 | authstatus = None 13 | connected = None 14 | connectionTime = None 15 | ipaddress = None 16 | os = None 17 | ownerid = None 18 | ping = None 19 | player = Player 20 | rejected = None 21 | userid = None 22 | username = None -------------------------------------------------------------------------------- /Pluton/CorpseHurtEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import BaseCorpse 10 | import _info 11 | class CorpseHurtEvent: 12 | BaseCorpse = BaseCorpse 13 | _info = _info 14 | 15 | def CorpseHurtEvent(BaseCorpse, HitInfo): 16 | return -------------------------------------------------------------------------------- /Pluton/CorpseInitEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import BaseCorpse 10 | import Entity 11 | class CorpseInitEvent: 12 | Corpse = BaseCorpse 13 | Parent = Entity 14 | def CorpseInitEvent(BaseCorpse, BaseEntity): 15 | return -------------------------------------------------------------------------------- /Pluton/CraftEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class CraftEvent: 11 | Crafter = None 12 | Target = None 13 | itemCrafter = None 14 | bluePrint = None 15 | Cancel = False 16 | cancelReason = "A plugin stops you from crafting that!" 17 | 18 | 19 | def Stop(stringreason = "A plugin stops you from crafting that!"): 20 | return 21 | 22 | CraftTime = None 23 | FreeCraft = None -------------------------------------------------------------------------------- /Pluton/DataStore.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class DataStore: 11 | 12 | def RemoveChars(string): 13 | return 14 | 15 | def ToIni(StringInifileName = "DataStore"): 16 | return 17 | 18 | def Add(StringTableName, Key, Value): 19 | return 20 | 21 | def ContainsKey(StringTableName, Key): 22 | return 23 | 24 | def ContainsValue(StringTableName, Value): 25 | return 26 | 27 | def Count(StringTableName): 28 | return 29 | 30 | def Flush(StringTableName): 31 | return 32 | 33 | def Get(StringTableName, Key): 34 | return 35 | 36 | def GetTable(StringTableName): 37 | return 38 | 39 | def Keys(StringTableName): 40 | return 41 | 42 | def Load(self): 43 | return 44 | 45 | def Remove(StringTableName, Key): 46 | return 47 | 48 | def Save(self): 49 | return 50 | 51 | def Values(StringTableName): 52 | return -------------------------------------------------------------------------------- /Pluton/DeathEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import _info 11 | class DeathEvent: 12 | 13 | _info = _info 14 | dropLoot = True 15 | HitBone = "" 16 | 17 | """****************** 18 | * * 19 | * Generic 0 * 20 | * Hunger 1 * 21 | * Thirst 2 * 22 | * Cold 3 * 23 | * Drowned 4 * 24 | * Heat 5 * 25 | * Bleeding 6 * 26 | * Poison 7 * 27 | * Suicide 8 * 28 | * Bullet 9 * 29 | * Slash 10 * 30 | * Blunt 11 * 31 | * Fall 12 * 32 | * Radiation 13 * 33 | * Bite 14 * 34 | * Stab 15 * 35 | * * 36 | ******************""" 37 | 38 | DamageAmounts = [] 39 | DamageType = None 40 | Attacker = None 41 | Weapon = None -------------------------------------------------------------------------------- /Pluton/DoorCodeEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import Player 11 | class DoorCodeEvent: 12 | #todo needs fix in pluton 13 | codeLock = None 14 | msg = None 15 | doorCode = None 16 | Player = Player 17 | CodeEntered = None 18 | 19 | def IsCorrect(self): 20 | return 21 | 22 | def Deny(self): 23 | return -------------------------------------------------------------------------------- /Pluton/DoorUseEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import Player 11 | import Entity 12 | class DoorUseEvent: 13 | Open = None 14 | Player = Player 15 | Door = Entity 16 | 17 | DenyReason = "" 18 | 19 | def Deny(stringreason = ""): 20 | return -------------------------------------------------------------------------------- /Pluton/Entity.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class Entity: 11 | Location = None 12 | Name = None 13 | X = None 14 | Y = None 15 | Z = None 16 | 17 | baseEntity = None 18 | Prefab = None 19 | PrefabID = None 20 | 21 | def Kill(self): 22 | return 23 | 24 | def IsBuildingPart(self): 25 | return 26 | 27 | def IsNPC(self): 28 | return 29 | 30 | def IsPlayer(self): 31 | return 32 | 33 | def ToBuildingPart(self): 34 | return 35 | 36 | def ToNPC(self): 37 | return 38 | 39 | def ToPlayer(self): 40 | return -------------------------------------------------------------------------------- /Pluton/EntityLootEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import Entity 11 | class EntityLootEvent: 12 | Target = Entity 13 | 14 | def EntityLootEvent(PlayerLoot, PlayerLooter, LootedEntity): 15 | return -------------------------------------------------------------------------------- /Pluton/GatherEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import Entity 11 | import Player 12 | import ItemAmount 13 | 14 | class GatherEvent: 15 | 16 | resourceDispenser = None 17 | Gatherer = Player 18 | Resource = Entity 19 | ItemAmount = ItemAmount 20 | Amount = 1 21 | origAmount = 1 -------------------------------------------------------------------------------- /Pluton/Ini.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class Ini: 11 | def AddSetting(StringSectionName, StringSettingName): 12 | return 13 | 14 | def AddSetting(StringSectionName, StringSettingName, settingValue): 15 | return 16 | 17 | def Count(self): 18 | return 19 | 20 | def DeleteSetting(StringSectionName, StringSettingName): 21 | return 22 | 23 | def EnumSection(StringSectionName): 24 | return 25 | 26 | Sections = [] 27 | 28 | def GetSetting(StringSectionName, StringSettingName): 29 | return 30 | 31 | def GetBoolSetting(StringSectionName, StringSettingName): 32 | return 33 | 34 | def isCommandOn(StringcmdName): 35 | return 36 | 37 | def Save(self): 38 | return 39 | 40 | def SaveSettings(StringnewFilePath): 41 | return 42 | 43 | def SetSetting(StringSectionName, StringSettingName): 44 | return 45 | 46 | def ContainsSetting(StringSectionName, StringSettingName): 47 | return -------------------------------------------------------------------------------- /Pluton/ItemAmount.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import ItemDefinition 11 | class ItemAmount: 12 | itemDef = ItemDefinition 13 | amount = 0 14 | startAmount = 0 15 | itemid = 0 -------------------------------------------------------------------------------- /Pluton/ItemBlueprint.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import ItemDefinition 10 | import Rarity 11 | 12 | class ItemBlueprint: 13 | 14 | ingredients = [] 15 | amountToCreate = 1 16 | userCraftable = True 17 | targetItem = ItemDefinition 18 | time = 0.0 19 | defaultBlueprint = None 20 | rarity = Rarity -------------------------------------------------------------------------------- /Pluton/ItemDefinition.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import Rarity 10 | 11 | class ItemDefinition: 12 | itemid = 0 13 | shortname = "" 14 | displayName = None 15 | displayDescription = None 16 | iconSprite = None 17 | category = None 18 | stackable = 0 19 | rarity = Rarity 20 | condition = None 21 | worldModel = None -------------------------------------------------------------------------------- /Pluton/MetabolismDamageEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import Player 10 | class MetabolismDamageEvent: 11 | Victim = Player 12 | HungerDamage = 0.0 13 | ThirstDamage = 0.0 14 | ColdDamage = 0.0 15 | HeatDamage = 0.0 16 | DrownedDamage = 0.0 17 | BleedingDamage = 0.0 18 | PoisonDamage = 0.0 19 | RadiationDamage = 0.0 20 | metabolism = None -------------------------------------------------------------------------------- /Pluton/MetabolismTickEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import Player 10 | import PlayerMetabolism 11 | class MetabolismTickEvent : 12 | Victim = Player 13 | 14 | CurrentTemperature = 0.0 15 | FutureTemperature = 0.0 16 | 17 | debug = 0.0 18 | debug2 = 0.0 19 | 20 | CaloriesHealthChange = 0.0 21 | HydrationHealthChange = 0.0 22 | CaloriesChange = 0.0 23 | HydrationChange = 0.0 24 | HeartrateValue = 0.0 25 | OxygenValue = 0.0 26 | WetnessValue = 0.0 27 | BleedingValue = 0.0 28 | PoisonValue = 0.0 29 | RadiationValue = 0.0 30 | PreventDamage = False 31 | metabolism = None -------------------------------------------------------------------------------- /Pluton/NPC.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class NPC: 11 | 12 | baseNPC = None 13 | ID = None 14 | Health = None 15 | 16 | 17 | def Kill(self): 18 | return 19 | 20 | def IsNPC(self): 21 | return True 22 | -------------------------------------------------------------------------------- /Pluton/NPCDeathEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import NPC 11 | import _info 12 | 13 | class NPCDeathEvent: 14 | Victim = NPC 15 | _info = _info 16 | dropLoot = True 17 | HitBone = None 18 | DamageAmounts = [] 19 | DamageType = None 20 | Attacker = None 21 | Weapon = None -------------------------------------------------------------------------------- /Pluton/NPCHurtEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import NPC 11 | import _info 12 | class NPCHurtEvent: 13 | Victim = NPC 14 | _info = _info 15 | dropLoot = True 16 | HitBone = None 17 | DamageAmounts = [] 18 | DamageType = None 19 | Attacker = None 20 | Weapon = None -------------------------------------------------------------------------------- /Pluton/OfflinePlayer.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class OfflinePlayer: 11 | Name = None 12 | SteamID = None 13 | IP = None 14 | OS = None 15 | X = None 16 | Y = None 17 | Z = None 18 | totalTimeOnline = None 19 | Admin = None 20 | 21 | def Get(UlongSteamID): 22 | return 23 | 24 | def Get(StringSteamID): 25 | return 26 | 27 | def Update(Player): 28 | return -------------------------------------------------------------------------------- /Pluton/Player.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import BasePlayer 11 | class Player: 12 | GameID = None 13 | 14 | def OnPlayerDeserialized(StreamingContext): 15 | return 16 | 17 | def Find(stringnameOrSteamidOrIP): 18 | return 19 | 20 | def FindByGameID(ulongsteamID): 21 | return 22 | 23 | def FindBySteamID(stringsteamID): 24 | return 25 | 26 | def Ban(stringreason = "no reason"): 27 | return 28 | 29 | def Kick(stringreason = "no reason"): 30 | return 31 | 32 | def Reject(stringreason = "no reason"): 33 | return 34 | 35 | def GetLookPoint(FloatMaxDist = 500): 36 | return 37 | 38 | def GetLookHit(FloatMaxDist = 500, intLayers = ""): 39 | return 40 | 41 | def GetLookPlayer(FloatMaxDist = 500): 42 | return 43 | 44 | def GetLookBuildingPart(FloatMaxDist = 500): 45 | return 46 | 47 | def Kill(self): 48 | return 49 | 50 | def KnowsBlueprint(intItemID): 51 | return 52 | 53 | def KnowsBlueprint(ItemBlueprint): 54 | return 55 | 56 | def KnowsBlueprint(ItemDefinition): 57 | return 58 | 59 | def KnowsBlueprints(itemIDs): 60 | return 61 | 62 | def KnowsBlueprints(itemBPs): 63 | return 64 | 65 | def KnowsBlueprints(itemdefs): 66 | return 67 | 68 | def KnownBlueprints(self): 69 | return 70 | 71 | def LearnBlueprint(intItemID): 72 | return 73 | 74 | def LearnBlueprint(ItemBlueprint): 75 | return 76 | 77 | def LearnBlueprint(ItemDefinition): 78 | return 79 | 80 | def LearnBlueprints(itemIDs): 81 | return 82 | 83 | def LearnBlueprints(itembps): 84 | return 85 | 86 | def LearnBlueprints(itemdefs): 87 | return 88 | 89 | def MakeNone(stringreason = "no reason"): 90 | return 91 | 92 | def MakeModerator(stringreason = "no reason"): 93 | return 94 | 95 | def MakeOwner(stringreason = "no reason"): 96 | return 97 | 98 | def Message(stringmsg): 99 | return 100 | 101 | def MessageFrom(stringfrom, stringmsg): 102 | return 103 | 104 | def ConsoleMessage(stringmsg): 105 | return 106 | 107 | def IsPlayer(self): 108 | return True 109 | 110 | def SendConsoleCommand(stringcmd): 111 | return 112 | 113 | def GroundTeleport(floatX, floatY, floatZ): 114 | return 115 | 116 | def GroundTeleport(Vector3): 117 | return 118 | 119 | def Teleport(Vector3): 120 | return 121 | 122 | worldSizeHalf = None 123 | firstLocations = [] 124 | 125 | def Teleport(floatX, floatY, floatZ): 126 | return 127 | 128 | 129 | Admin = None 130 | AuthStatus = None 131 | basePlayer = BasePlayer 132 | Health = None 133 | Inventory = None 134 | IP = None 135 | IsWounded = None 136 | Location = None 137 | Moderator = None 138 | Name = None 139 | Offline = None 140 | Owner = None 141 | OS = None 142 | Ping = None 143 | Stats = None 144 | SteamID = None 145 | TimeOnline = None 146 | Teleporting = None -------------------------------------------------------------------------------- /Pluton/PlayerDeathEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import Player 11 | import _info 12 | 13 | class PlayerDeathEvent: 14 | _info = _info 15 | Victim = Player 16 | DamageAmounts = [] 17 | DamageType = None 18 | Attacker = None 19 | Weapon = None -------------------------------------------------------------------------------- /Pluton/PlayerHurtEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import Player 11 | import _info 12 | 13 | class PlayerHurtEvent: 14 | _info = _info 15 | Victim = Player 16 | DamageAmounts = [] 17 | DamageType = None 18 | Attacker = None 19 | Weapon = None -------------------------------------------------------------------------------- /Pluton/PlayerMetabolism.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class PlayerMetabolism: 11 | health = None 12 | calories = None 13 | hydration = None 14 | heartrate = None 15 | temperature = None 16 | poison = None 17 | radiation_level = None 18 | wetness = None 19 | dirtyness = None 20 | oxygen = None 21 | bleeding = None 22 | radiation_poisoning = None 23 | comfort = None 24 | pending_health = None 25 | # todo: add more -------------------------------------------------------------------------------- /Pluton/Plugin.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import Ini 10 | class Plugin: 11 | LibPath = None 12 | 13 | def Invoke(func, obj): 14 | """ 15 | -Runs a method in another Plugin. 16 | :param func: String Function Name 17 | :param obj: Object Plugin 18 | :return: None 19 | """ 20 | return 21 | 22 | def NormalizePath(StringPath): 23 | return 24 | 25 | def FormatException(Exception): 26 | return 27 | 28 | def ValidateRelativePath(StringPath): 29 | return 30 | 31 | def CreateDir(StringPath): 32 | return 33 | 34 | def DeleteLog(StringPath): 35 | return 36 | 37 | def Log(StringPath, StringText): 38 | return 39 | 40 | def GetIni(StringPath): 41 | return Ini 42 | 43 | def IniExists(StringPath): 44 | return 45 | 46 | def CreateIni(StringPathOrName): 47 | return 48 | 49 | def GetInis(StringPath): 50 | return 51 | 52 | def GetPlugin(StringName): 53 | return 54 | 55 | def GetDate(self): 56 | return 57 | 58 | def GetTicks(self): 59 | return 60 | 61 | def GetTime(self): 62 | return 63 | 64 | def GetTimestamp(self): 65 | return 66 | 67 | def CreateTimer(Name, timeoutDelay): 68 | return 69 | 70 | def CreateTimer(StringName, timeoutDelay, Dictionary): 71 | return 72 | 73 | def GetTimer(StringName): 74 | 75 | return 76 | 77 | def KillTimer(StringName): 78 | return 79 | 80 | def KillTimers(self): 81 | return 82 | 83 | def CreateParallelTimer(StringName, timeoutDelay, Dictionary): 84 | return 85 | 86 | def GetParallelTimer(StringName): 87 | return 88 | 89 | def KillParallelTimer(StringName): 90 | return 91 | 92 | def GET(StringUrl): 93 | return 94 | 95 | def POST(StringUrl, StringData): 96 | return 97 | 98 | def POSTJSON(StringUrl, StringJson): 99 | return 100 | 101 | def CreateDict(IntCapacity = 10): 102 | return -------------------------------------------------------------------------------- /Pluton/Rarity.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class Rarity: 11 | none = None 12 | Common = None 13 | Uncommon = None 14 | Rare = None 15 | VeryRare = None 16 | NoSpawn = None -------------------------------------------------------------------------------- /Pluton/RespawnEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import Player 10 | class RespawnEvent: 11 | GiveDefault = None 12 | ChangePos = None 13 | WakeUp = None 14 | StartHealth = -1 15 | SpawnPos = None 16 | Player = Player -------------------------------------------------------------------------------- /Pluton/Server.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | 11 | class Server: 12 | Loaded = False 13 | Players = None 14 | OfflinePlayers = None 15 | LoadOuts = None 16 | server_message_name = "Pluton" 17 | blueprints = None 18 | ActivePlayers = None 19 | SleepingPlayers = None 20 | 21 | def Broadcast(StringMessage): 22 | return 23 | 24 | def BroadcastFrom(StringName, StringMessage): 25 | return 26 | 27 | def BroadcastNotice(StringMessage): 28 | return 29 | 30 | 31 | def FindPlayer(StringName): 32 | return 33 | 34 | 35 | def FindPlayer(UlongSteamID): 36 | return 37 | 38 | def GetPlayer(BasePlayer): 39 | return 40 | 41 | def GetServer(self): 42 | return 43 | 44 | def CraftingTimeScale(self): 45 | return 46 | 47 | def ReloadBlueprints(self): 48 | return 49 | 50 | def LoadLoadouts(self): 51 | return 52 | 53 | def LoadOfflinePlayers(self): 54 | return 55 | 56 | def Save(self): 57 | return 58 | 59 | def SendCommand(StringCommand, BooleanWantsReply=True): 60 | return 61 | 62 | def OnShutdown(self): 63 | return -------------------------------------------------------------------------------- /Pluton/ServerConsoleEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class ServerConsoleEvent: 11 | cmd = None 12 | _args = [] 13 | Args = [] 14 | Reply = "" 15 | 16 | def ReplyWith(stringreply): 17 | return -------------------------------------------------------------------------------- /Pluton/Stats.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | 11 | class Stats: 12 | Kills = None 13 | Deaths = None 14 | PlayerKills = None 15 | PlayerDeaths = None 16 | NPCKills = None 17 | NPCDeaths = None 18 | TotalDamageTaken = None 19 | TotalDamageDone = None 20 | DamageToPlayers = None 21 | DamageFromPlayers = None 22 | DamageToNPCs = None 23 | DamageFromNPCs = None 24 | DamageToEntities = None 25 | FallDamage = None 26 | 27 | def PlayerStats(StringSteamid): 28 | return 29 | 30 | def AddKill(BooleanPlayer, BooleanNpc): 31 | return 32 | 33 | def AddDeath(BooleanPlayer, BooleanNpc): 34 | return 35 | 36 | def AddDamageFrom(FloatDmgAmount, BooleanPlayer, BooleanNpc, BooleanFall): 37 | return 38 | 39 | def AddDamageTo(FloatDmgAmount, BooleanPlayer, BooleanNpc, BooleanEntity): 40 | return -------------------------------------------------------------------------------- /Pluton/TimedEvent.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class TimedEvent: 11 | def Start(self): 12 | return 13 | 14 | def Stop(self): 15 | return 16 | 17 | def Kill(self): 18 | return 19 | 20 | Args = {} 21 | 22 | Interval = None 23 | 24 | Name = None 25 | TimeLeft = None 26 | 27 | ElapsedCount = None -------------------------------------------------------------------------------- /Pluton/Util.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import Zone2D 10 | class Util: 11 | zones = { 12 | 'StringName', Zone2D 13 | } 14 | 15 | def GetZone(stringname): 16 | return 17 | 18 | def SetZone(Zone2DZone): 19 | return 20 | 21 | def CreateZone(stringname): 22 | return 23 | 24 | def LoadZones(self): 25 | return 26 | 27 | def SaveZones(self): 28 | return 29 | 30 | def ChangeTriggerRadius(TriggerBase, floatNewRadius): 31 | return 32 | 33 | def ConsoleLog(String, BooleanAdminOnly = False): 34 | return 35 | 36 | def CheckDependencies(self): 37 | return 38 | 39 | def CreateLoadOut(StringName): 40 | return 41 | 42 | def DestroyEntity(BaseEntity): 43 | return 44 | 45 | def DestroyEntityGib(BaseEntity): 46 | return 47 | 48 | def DestroyObject(GameObject): 49 | return 50 | 51 | def DumpObjToFile(StringPath, object, StringPrefix = ""): 52 | return 53 | 54 | def DumpObjToFile(StringPath, object, IntDepth, StringPrefix = ""): 55 | return 56 | 57 | def DumpObjToFile(StringPath, object, IntDepth, IntMaxItems, StringPrefix = ""): 58 | return 59 | 60 | def DumpObjToFile(StringPath, object, IntDepth, IntMaxItems, BooleandisPrivate, StringPrefix = ""): 61 | return 62 | 63 | def DumpObjToFile(StringPath, object, IntDepth, IntMaxItems, BooleandisPrivate, BooleanFullClassName, StringPrefix = ""): 64 | return 65 | 66 | def NormalizePath(StringPath): 67 | return 68 | 69 | def GetAbsoluteFilePath(StringFileName): 70 | return 71 | 72 | def GetIdentityFolder(self): 73 | return 74 | 75 | def GetLoadoutFolder(self): 76 | return 77 | 78 | def GetPublicFolder(self): 79 | return 80 | 81 | def GetRootFolder(self): 82 | return 83 | 84 | def GetServerFolder(self): 85 | return 86 | 87 | def GetStructuresFolder(self): 88 | return 89 | 90 | def GetUtil(self): 91 | return 92 | 93 | def GetVectorsDistance(Vector1, Vector2): 94 | return 95 | 96 | def GetQuotedArgs(Array): 97 | return 98 | 99 | def HashtableFromFile(StringPath): 100 | return 101 | 102 | def HashtableToFile(Hashtable, StringPath): 103 | return 104 | 105 | def Infront(Player, FloatLength): 106 | return 107 | 108 | def Items(self): 109 | return 110 | 111 | def IsNull(object): 112 | return 113 | 114 | def Log(String): 115 | return 116 | 117 | def Regex(StringInput, StringMatch): 118 | return 119 | 120 | def RotateX(Quaternion, FloatAngle): 121 | return 122 | 123 | def RotateY(Quaternion, FloatAngle): 124 | return 125 | 126 | def RotateZ(Quaternion, FloatAngle): 127 | return 128 | 129 | def TryFindType(StringTypeName, SystemType): 130 | return 131 | 132 | def TryFindReturnType(StringTypeName): 133 | return -------------------------------------------------------------------------------- /Pluton/Victim.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | """ 11 | Please note that a Victim can be an NPC too! 12 | It's useful (and if known that the victim is an NPC) 13 | to define the variable as npc so you can see the methods of the NPC class 14 | Example: 15 | npc = DeathEvent.Victim 16 | """ 17 | 18 | class Victim: 19 | 20 | GameID = None 21 | 22 | def OnPlayerDeserialized(StreamingContext): 23 | return 24 | 25 | def Find(stringnameOrSteamidOrIP): 26 | return 27 | 28 | def FindByGameID(ulongsteamID): 29 | return 30 | 31 | def FindBySteamID(stringsteamID): 32 | return 33 | 34 | def Ban(stringreason = "no reason"): 35 | return 36 | 37 | def Kick(stringreason = "no reason"): 38 | return 39 | 40 | def Reject(stringreason = "no reason"): 41 | return 42 | 43 | def GetLookPoint(FloatMaxDist = 500): 44 | return 45 | 46 | def GetLookHit(FloatMaxDist = 500, intLayers = ""): 47 | return 48 | 49 | def GetLookPlayer(FloatMaxDist = 500): 50 | return 51 | 52 | def GetLookBuildingPart(FloatMaxDist = 500): 53 | return 54 | 55 | def Kill(self): 56 | return 57 | 58 | def KnowsBlueprint(intItemID): 59 | return 60 | 61 | def KnowsBlueprint(ItemBlueprint): 62 | return 63 | 64 | def KnowsBlueprint(ItemDefinition): 65 | return 66 | 67 | def KnowsBlueprints(itemIDs): 68 | return 69 | 70 | def KnowsBlueprints(itemBPs): 71 | return 72 | 73 | def KnowsBlueprints(itemdefs): 74 | return 75 | 76 | def KnownBlueprints(self): 77 | return 78 | 79 | def LearnBlueprint(intItemID): 80 | return 81 | 82 | def LearnBlueprint(ItemBlueprint): 83 | return 84 | 85 | def LearnBlueprint(ItemDefinition): 86 | return 87 | 88 | def LearnBlueprints(itemIDs): 89 | return 90 | 91 | def LearnBlueprints(itembps): 92 | return 93 | 94 | def LearnBlueprints(itemdefs): 95 | return 96 | 97 | def MakeNone(stringreason = "no reason"): 98 | return 99 | 100 | def MakeModerator(stringreason = "no reason"): 101 | return 102 | 103 | def MakeOwner(stringreason = "no reason"): 104 | return 105 | 106 | def Message(stringmsg): 107 | return 108 | 109 | def MessageFrom(stringfrom, stringmsg): 110 | return 111 | 112 | def ConsoleMessage(stringmsg): 113 | return 114 | 115 | def IsPlayer(self): 116 | return True 117 | 118 | def SendConsoleCommand(stringcmd): 119 | return 120 | 121 | def GroundTeleport(floatX, floatY, floatZ): 122 | return 123 | 124 | def GroundTeleport(Vector3): 125 | return 126 | 127 | def Teleport(Vector3): 128 | return 129 | 130 | worldSizeHalf = None 131 | firstLocations = [] 132 | 133 | def Teleport(floatX, floatY, floatZ): 134 | return 135 | 136 | 137 | Admin = None 138 | AuthStatus = None 139 | basePlayer = BasePlayer 140 | Health = None 141 | Inventory = None 142 | IP = None 143 | IsWounded = None 144 | Location = None 145 | Moderator = None 146 | Name = None 147 | Offline = None 148 | Owner = None 149 | OS = None 150 | Ping = None 151 | Stats = None 152 | SteamID = None 153 | TimeOnline = None 154 | Teleporting = None -------------------------------------------------------------------------------- /Pluton/World.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | 11 | class World: 12 | 13 | ResourceGatherMultiplier = 1.0 14 | freezeTimeTimer = None 15 | frozenTime = -1 16 | Time = None 17 | Timescale = None 18 | 19 | def AttachParachute(Player): 20 | return 21 | 22 | def AttachParachute(BaseEntity): 23 | return 24 | 25 | def AirDrop(self): 26 | return 27 | 28 | def AirDrop(FloatSpeed, FloatHeight = 400): 29 | return 30 | 31 | def AirDropAt(Vector3Position, FloatSpeed = 50, FloatHeight = 400): 32 | return 33 | 34 | def AirDropAt(FloatX, FloatY, FloatZ, FloatSpeed = 50, FloatHeight = 400): 35 | return 36 | 37 | def AirDropAtPlayer(Player, FloatSpeed = 50, FloatHeight = 400): 38 | return 39 | 40 | def GetGround(FloatX, FloatZ): 41 | return 42 | 43 | def GetGround(Vector3): 44 | return 45 | 46 | def GetPrefabNames(self): 47 | return 48 | 49 | def SpawnMapEntity(StringName, FloatX, FloatZ): 50 | return 51 | 52 | def SpawnMapEntity(StringName, Vector3): 53 | return 54 | 55 | def SpawnMapEntity(StringName, Vector3, Quaternion): 56 | return 57 | 58 | def SpawnMapEntity(StringName, FloatX, FloatY, FloatZ): 59 | return 60 | 61 | def SpawnAnimal(StringName, FloatX, FloatZ): 62 | return 63 | 64 | def SpawnAnimal(StringName, Vector3): 65 | return 66 | 67 | def SpawnEvent(StringEVT, FloatX, FloatZ): 68 | return 69 | 70 | def SpawnEvent(StringEVT, Vector3): 71 | return 72 | 73 | def SpawnEvent(StringEVT, FloatX, FloatY, FloatZ): 74 | return 75 | 76 | def SpawnAnimal(StringName, FloatX, FloatY, FloatZ): 77 | return 78 | 79 | def SpawnMapEntity(StringName, FloatX, FloatY, FloatZ, Quaternion): 80 | return 81 | 82 | def FreezeTime(self): 83 | return 84 | 85 | def Freeze(ObjectSender, ElapsedEventArgs): 86 | return 87 | 88 | def UnFreezeTime(self): 89 | frozenTime = -1 90 | 91 | def Initialize(self): 92 | return 93 | 94 | def CheckDependencies(self): 95 | return True 96 | 97 | def GetWorld(self): 98 | Instance = None 99 | return Instance 100 | 101 | list = None 102 | def PrintPrefabs(self): 103 | return -------------------------------------------------------------------------------- /Pluton/Zone2D.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | import World 10 | 11 | class Zone2D: 12 | 13 | zoneMesh = None 14 | zoneMeshFilter = None 15 | zoneCollider = None 16 | 17 | Name = "uninitalized" 18 | Verts = None 19 | 20 | min = -50.0 21 | max = World.Height 22 | 23 | Tris = None 24 | TrisCount = 0 25 | 26 | def ResetTris(self): 27 | return 28 | 29 | def ComputeAllTris(self): 30 | return 31 | 32 | def ComputeSideTris(self): 33 | return 34 | 35 | def ComputeTopTris(self): 36 | return 37 | 38 | def ComputeBottomTris(self): 39 | return 40 | 41 | def Awake(self): 42 | return 43 | 44 | def UpdateMesh(self): 45 | return 46 | 47 | def AddPoint(FloatX, FloatZ): 48 | return 49 | 50 | def AddPoint(FloatX, FloatY, FloatZ): 51 | return 52 | 53 | def AddPoint(Vector3): 54 | return 55 | 56 | def Clear(self): 57 | return 58 | 59 | def Contains(FloatX, FloatZ): 60 | return 61 | 62 | def Contains(FloatX, FloatY, FloatZ): 63 | return 64 | 65 | def Contains(Vector3): 66 | return 67 | 68 | def Draw(self): 69 | return 70 | 71 | def DrawLine(Vector3From, Vector3To, Color): 72 | return 73 | 74 | def Serialize(self): 75 | return -------------------------------------------------------------------------------- /Pluton/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | -------------------------------------------------------------------------------- /Pluton/_info.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | class _info: 11 | 12 | DoHitEffects = True 13 | damageTypes = None 14 | Initiator = None 15 | Weapon = None 16 | IsPredicting = None 17 | Predicted = None 18 | DidHit = None 19 | HitEntity = None 20 | HitBone = None 21 | HitPart = None 22 | HitMaterial = None 23 | HitPositionWorld = None 24 | HitPositionLocal = None 25 | HitNormalWorld = None 26 | HitNormalLocal = None 27 | PointStart = None 28 | PointEnd = None 29 | ProjectileID = None 30 | HitVelocity = None 31 | material = None 32 | CanGather = None 33 | DidGather = None 34 | hasDamage = None 35 | isHeadshot = None 36 | boneName = None 37 | 38 | def LoadFromAttack(Attack, boolserverSide): 39 | return -------------------------------------------------------------------------------- /Pluton/cmd.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | """ 5 | This file was created for plugin developers to be able to use the correct functions 6 | without looking at the wiki or the api. 7 | API showoff purposes only, and nothing else. 8 | """ 9 | 10 | import Player 11 | 12 | class cmd: 13 | Reply = None 14 | cmd = None 15 | args = None 16 | quotedArgs = None 17 | User = Player 18 | 19 | def ReplyWith(StringMessage): 20 | return -------------------------------------------------------------------------------- /PlutonPlugins/AdminCommands/Resources.ini: -------------------------------------------------------------------------------- 1 | [Resources] 2 | crystal=assets/bundled/prefabs/autospawn/resource/crystals/crystal1.prefab 3 | crystal2=assets/bundled/prefabs/autospawn/resource/crystals/crystal1b.prefab 4 | crystal3=assets/bundled/prefabs/autospawn/resource/crystals/crystal1c.prefab 5 | crystal4=assets/bundled/prefabs/autospawn/resource/crystals/crystal2.prefab 6 | crystal5=assets/bundled/prefabs/autospawn/resource/crystals/crystal2b.prefab 7 | crystal6=assets/bundled/prefabs/autospawn/resource/crystals/crystal2c.prefab 8 | loot=assets/bundled/prefabs/autospawn/resource/loot/loot-barrel-1.prefab 9 | loot2=assets/bundled/prefabs/autospawn/resource/loot/loot-barrel-2.prefab 10 | loot3=assets/bundled/prefabs/radtown/crate_normal.prefab 11 | loot4=assets/bundled/prefabs/radtown/crate_normal_2.prefab 12 | loot5=assets/bundled/prefabs/radtown/crate_normal_2_food.prefab 13 | loot6=assets/bundled/prefabs/radtown/crate_normal_2_medical.prefab 14 | helicopter=assets/bundled/prefabs/npc/patrol_helicopter/patrolhelicopter.prefab 15 | metalore=assets/bundled/prefabs/autospawn/collectable/stone/metalore-2.prefab 16 | stoneore=assets/bundled/prefabs/autospawn/collectable/stone/stone-1.prefab 17 | sulfurore=assets/bundled/prefabs/autospawn/collectable/stone/sulfurore-3.prefab 18 | woodore=assets/bundled/prefabs/autospawn/collectable/stone/wood.prefab 19 | bearcorpse=assets/bundled/prefabs/npc/animals/bear_corpse.prefab 20 | boarcorpse=assets/bundled/prefabs/npc/animals/boar_corpse.prefab 21 | chickencorpse=assets/bundled/prefabs/npc/animals/chicken_corpse.prefab 22 | stagcorpse=assets/bundled/prefabs/npc/animals/stag_corpse.prefab 23 | wolfcorpse=assets/bundled/prefabs/npc/animals/wolf_corpse.prefab 24 | playercorpse=assets/bundled/prefabs/player/player_corpse.prefab 25 | horsecorpse=assets/bundled/prefabs/npc/animals/horse_corpse.prefab -------------------------------------------------------------------------------- /PlutonPlugins/CraftingFix/CraftingFix.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Pluton") 7 | import Pluton 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | class CraftingFix: 14 | 15 | def On_PlayerStartCrafting(self, CraftEvent): 16 | CraftEvent.FreeCraft = False 17 | items = CraftEvent.Crafter.Inventory.AllItems().ToArray() 18 | ingreds = CraftEvent.bluePrint.ingredients.ToArray() 19 | Items = {} 20 | for item in items: 21 | l = item.Name.lower().replace('_', ' ') 22 | Items[l] = item.Quantity 23 | for ingred in ingreds: 24 | name = str(ingred.itemDef).replace(' (ItemDefinition)', '').lower().replace('_', ' ') 25 | if name not in Items.keys(): 26 | CraftEvent.Stop("You don't have enough materials for this") 27 | return 28 | inventoryq = Items.get(name, None) 29 | if int(ingred.startAmount) > inventoryq: 30 | CraftEvent.Stop("You don't have enough materials for this") 31 | return 32 | CraftEvent.Crafter.Inventory._inv.Take(None, ingred.itemid, ingred.startAmount) -------------------------------------------------------------------------------- /PlutonPlugins/DestroyLog/DestroyLog.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.2' 3 | 4 | import clr 5 | clr.AddReferenceByPartialName("Pluton") 6 | import Pluton, datetime 7 | path = Util.GetPublicFolder() 8 | 9 | 10 | class DestroyLog: 11 | 12 | def On_PluginInit(self): 13 | Plugin.CreateDir(path + "\\Plugins\\DestroyLog\\Logs") 14 | 15 | def On_CombatEntityHurt(self, HurtEvent): 16 | if HurtEvent.Attacker is not None: 17 | attacker = str(HurtEvent.Attacker.Name) 18 | if HurtEvent.Weapon is not None: 19 | weapon = str(HurtEvent.Weapon.Name) 20 | id = HurtEvent.Attacker.SteamID 21 | ip = HurtEvent.Attacker.IP 22 | loc = str(HurtEvent.Attacker.Location) 23 | else: 24 | weapon = "Null Weapon" 25 | id = "None" 26 | ip = "None" 27 | loc = "None" 28 | type = str(HurtEvent.DamageType) 29 | if type == "Stab" or type == "Bullet" or type == "Slash" or type == "Explosion": 30 | try: 31 | h = HurtEvent.Victim.Health 32 | except: 33 | return 34 | for x in HurtEvent.DamageAmounts: 35 | if x > h: 36 | Plugin.Log(path + "\\Plugins\\DestroyLog\\Logs\\" + str(datetime.date.today()), 37 | HurtEvent.Victim.Name + 38 | " | " + str(HurtEvent.Victim.Location) + 39 | " | " + weapon + " | " + attacker + 40 | " | " + loc + " | " + id + " | " + ip) 41 | break 42 | -------------------------------------------------------------------------------- /PlutonPlugins/Help/Help.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.1' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Pluton") 7 | import Pluton 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | class Help: 14 | 15 | def On_PluginInit(self): 16 | self.HelpCfg() 17 | Commands.Register("help")\ 18 | .setCallback("help")\ 19 | .setDescription("Gives you help commands")\ 20 | .setUsage("/help") 21 | 22 | def HelpCfg(self): 23 | if not Plugin.IniExists("Help"): 24 | loc = Plugin.CreateIni("Help") 25 | loc.AddSetting("Settings", "SysName", "Help") 26 | loc.AddSetting("AdminCommands", "/god", "Gives You godmode!") 27 | loc.AddSetting("AdminCommands", "/tphere playername", "Teleports Player to you!") 28 | loc.AddSetting("PlayerCommands", "/playerlist", "Lists Current Players!") 29 | loc.Save() 30 | return Plugin.GetIni("Help") 31 | 32 | def SendAdminCommands(self, Player): 33 | ini = self.HelpCfg() 34 | sys = ini.GetSetting("Settings", "SysName") 35 | enum = ini.EnumSection("AdminCommands") 36 | Player.MessageFrom(sys, "Admin Commands") 37 | for com in enum: 38 | get = ini.GetSetting("AdminCommands", com) 39 | Player.MessageFrom(sys, com + " - " + get) 40 | 41 | def SendPlayerCommands(self, Player): 42 | ini = self.HelpCfg() 43 | sys = ini.GetSetting("Settings", "SysName") 44 | enum = ini.EnumSection("PlayerCommands") 45 | Player.MessageFrom(sys, "Player Commands") 46 | for com in enum: 47 | get = ini.GetSetting("PlayerCommands", com) 48 | Player.MessageFrom(sys, com + " - " + get) 49 | 50 | def help(self, args, Player): 51 | if len(args) == 0: 52 | ini = self.HelpCfg() 53 | sys = ini.GetSetting("Settings", "SysName") 54 | Player.MessageFrom(sys, "Lists you the commands of Admins or Players") 55 | Player.MessageFrom(sys, "Usage: /help player or /help admin") 56 | else: 57 | if args[0] == "admin": 58 | if not Player.Admin: 59 | self.SendPlayerCommands(Player) 60 | return 61 | self.SendAdminCommands(Player) 62 | else: 63 | self.SendPlayerCommands(Player) 64 | -------------------------------------------------------------------------------- /PlutonPlugins/HomeSystem/HomeConfig.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | Cooldown=300000 3 | safetpcheck=2 4 | Maxhomes=1 5 | tpdelay=10 6 | DistanceCheck=0 7 | Distance=15 8 | movecheck=0 9 | homesystemname=[HomeSystem] 10 | Foundation=0 -------------------------------------------------------------------------------- /PlutonPlugins/IdIdentifier/IdIdentifier.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.4' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Pluton") 7 | import Pluton 8 | from time import gmtime, strftime 9 | 10 | """ 11 | Class 12 | """ 13 | 14 | 15 | class IdIdentifier: 16 | 17 | def PlayersIni(self): 18 | if not Plugin.IniExists("Players"): 19 | ini = Plugin.CreateIni("Players") 20 | ini.Save() 21 | return Plugin.GetIni("Players") 22 | 23 | def ManualBan(self): 24 | if not Plugin.IniExists("ManualBan"): 25 | ini = Plugin.CreateIni("ManualBan") 26 | ini.Save() 27 | return Plugin.GetIni("ManualBan") 28 | 29 | """ 30 | CheckV Assistants 31 | """ 32 | 33 | def GetPlayerName(self, name, Mode=1): 34 | if Mode == 1 or Mode == 3: 35 | for pl in Server.ActivePlayers: 36 | if pl.Name.lower() == name: 37 | return pl 38 | if Mode == 2 or Mode == 3: 39 | for pl in Server.OfflinePlayers.Values: 40 | if pl.Name.lower() == name: 41 | return pl 42 | return None 43 | 44 | """ 45 | CheckV method based on Spock's method. 46 | Upgraded by DreTaX 47 | Can Handle Single argument and Array args. 48 | Mode: Search mode (Default: 1) 49 | 1 = Search Online Players 50 | 2 = Search Offline Players 51 | 3 = Both 52 | V6.0 53 | """ 54 | 55 | def CheckV(self, Player, args, Mode=1): 56 | count = 0 57 | if hasattr(args, '__len__') and (not isinstance(args, str)): 58 | p = self.GetPlayerName(str.Join(" ", args).lower(), Mode) 59 | if p is not None: 60 | return p 61 | if Mode == 1 or Mode == 3: 62 | for pl in Server.ActivePlayers: 63 | for namePart in args: 64 | if namePart.lower() in pl.Name.lower(): 65 | p = pl 66 | count += 1 67 | if Mode == 2 or Mode == 3: 68 | for offlineplayer in Server.OfflinePlayers.Values: 69 | for namePart in args: 70 | if namePart.lower() in offlineplayer.Name.lower(): 71 | p = offlineplayer 72 | count += 1 73 | else: 74 | ag = str(args).lower() # just incase 75 | p = self.GetPlayerName(ag, Mode) 76 | if p is not None: 77 | return p 78 | if Mode == 1 or Mode == 3: 79 | for pl in Server.ActivePlayers: 80 | if ag in pl.Name.lower(): 81 | p = pl 82 | count += 1 83 | if Mode == 2 or Mode == 3: 84 | for offlineplayer in Server.OfflinePlayers.Values: 85 | if ag in offlineplayer.Name.lower(): 86 | p = offlineplayer 87 | count += 1 88 | if count == 0: 89 | Player.MessageFrom("IdIdentifier", "Couldn't Find " + str.Join(" ", args) + "!") 90 | return None 91 | elif count == 1 and p is not None: 92 | return p 93 | else: 94 | Player.MessageFrom("IdIdentifier", "Found " + str(count) + 95 | " player with similar name. Use more correct name!") 96 | return None 97 | 98 | def On_PlayerConnected(self, Player): 99 | sid = Player.SteamID 100 | banini = self.ManualBan() 101 | isbanned = banini.GetSetting("Banned", sid) 102 | if str(isbanned) == "1": 103 | Player.Kick("You are banned.") 104 | return 105 | name = Player.Name 106 | ip = Player.IP 107 | location = str(Player.Location) 108 | ini = self.PlayersIni() 109 | if ini.GetSetting("Track", sid) is not None: 110 | ini.SetSetting("Track", sid, name) 111 | else: 112 | ini.AddSetting("Track", sid, name) 113 | ini.Save() 114 | Plugin.Log("LastJoin", name + "|" + sid + "|" + ip + "|" + location) 115 | 116 | def On_PlayerDisconnected(self, Player): 117 | name = Player.Name 118 | id = Player.SteamID 119 | ip = Player.IP 120 | location = str(Player.Location) 121 | Plugin.Log("LastQuit", name + "|" + id + "|" + ip + "|" + location) 122 | 123 | def On_Command(self, cmd): 124 | Player = cmd.User 125 | args = cmd.args 126 | if cmd.cmd == "offban": 127 | ini = self.ManualBan() 128 | if len(args) == 0: 129 | Player.Message("Specify an ID") 130 | elif len(args) == 1: 131 | if Player.Admin: 132 | id = str(args[0]) 133 | ini.AddSetting("Banned", id, "1") 134 | ini.Save() 135 | Player.Message("Id of Player (" + id + ") was banned.") 136 | elif cmd.cmd == "uid": 137 | if len(args) == 0: 138 | Player.Message("User name required!") 139 | elif len(args) > 0: 140 | playerr = self.CheckV(Player, args) 141 | if playerr is None: 142 | return 143 | Player.Message("UID of " + playerr.Name + " is:" + playerr.SteamID) -------------------------------------------------------------------------------- /PlutonPlugins/IllegalName/IllegalName.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | __author__ = 'DreTaX' 3 | __version__ = '1.4.1' 4 | 5 | import clr 6 | 7 | clr.AddReferenceByPartialName("Pluton") 8 | import Pluton 9 | import re 10 | import sys 11 | path = Util.GetPublicFolder() 12 | try: 13 | sys.path.append(path + "\\Python\\Lib\\") 14 | import random 15 | except ImportError: 16 | raise ImportError("IllegalName: Download the Python Extra libs from the website!") 17 | 18 | """ 19 | Class 20 | """ 21 | 22 | RandNames = [] 23 | Names = [] 24 | Restricted = [] 25 | 26 | 27 | class IllegalName: 28 | 29 | Words = {} 30 | asciie = None 31 | regex = None 32 | samename = None 33 | maxl = None 34 | 35 | def On_PluginInit(self): 36 | ini = self.IllegalNameConfig() 37 | replace = ini.EnumSection("ReplaceCharactersTo") 38 | for wr in replace: 39 | s = str(ini.GetSetting("ReplaceCharactersTo", wr)) 40 | self.Words.update({wr:s}) 41 | self.asciie = int(ini.GetSetting("Settings", "CheckForNonAscii")) 42 | self.regex = int(ini.GetSetting("Settings", "CheckWithRegEx")) 43 | self.samename = int(ini.GetSetting("Settings", "SameName")) 44 | self.maxl = int(ini.GetSetting("Settings", "NameLength")) 45 | illini = self.getIllegal() 46 | enum = illini.EnumSection("IllegalNames") 47 | for checkn in enum: 48 | get = illini.GetSetting("IllegalNames", checkn).lower() 49 | Restricted.append(get) 50 | 51 | def GetNum(self): 52 | for x in xrange(0, 1000): 53 | if x in RandNames: 54 | continue 55 | RandNames.append(x) 56 | return x 57 | 58 | def getIllegal(self): 59 | if not Plugin.IniExists("IllegalNames"): 60 | IllegalNames = Plugin.CreateIni("IllegalNames") 61 | IllegalNames.AddSetting("IllegalNames", "Name1", "Suck") 62 | IllegalNames.AddSetting("IllegalNames", "Name2", "Fuck") 63 | IllegalNames.AddSetting("IllegalNames", "Name3", "SHITSERVER") 64 | IllegalNames.Save() 65 | return Plugin.GetIni("IllegalNames") 66 | 67 | def IllegalNameConfig(self): 68 | if not Plugin.IniExists("IllegalNameConfig"): 69 | loc = Plugin.CreateIni("IllegalNameConfig") 70 | loc.Save() 71 | return Plugin.GetIni("IllegalNameConfig") 72 | 73 | def CutName(self, string): 74 | name = re.sub(r'[^\x00-\x7F]+', '', string) 75 | return name 76 | 77 | def Replace(self, Old, To, Text): 78 | return re.sub('(?i)'+re.escape(Old), lambda m: To, Text) 79 | 80 | def On_ClientAuth(self, AuthEvent): 81 | name = AuthEvent.Name 82 | compile = re.compile(r'\b(' + '|'.join(self.Words.keys()) + r')\b') 83 | name = compile.sub(lambda x: self.Words[x.group()], name) 84 | name = self.CutName(name) 85 | name = re.sub(' +', ' ', name) 86 | name = re.sub('[\t]+', '', name) 87 | starts = name.startswith(' ') 88 | ends = name.endswith(' ') 89 | if starts: 90 | name = name.replace(name[0], '') 91 | if ends: 92 | n = len(name) 93 | if n > 1: 94 | name = name.replace(name[n - 1], '') 95 | a = re.match('^[a-zA-Z0-9_!+?()<>/@#,. \[\]\\-]+$', name) 96 | if not a: 97 | name = re.sub('^[a-zA-Z0-9_!+?()<>/@#,. \[\]\\-]+$', "", name) 98 | n = len(name) 99 | if n > self.maxl: 100 | n = 1 101 | if name.lower() in str(Restricted): 102 | n = 1 103 | if name.lower() in str(Names).lower() and "stranger" not in name.lower(): 104 | n = 1 105 | if n <= 1: 106 | name = "Stranger" 107 | rand = self.GetNum() 108 | name = name + str(rand) 109 | Names.append(name) 110 | AuthEvent.Connection.username = name 111 | 112 | def On_PlayerDisconnected(self, Player): 113 | name = Player.Name 114 | if "Stranger" in name: 115 | ssw = [int(s) for s in name if s.isdigit()] 116 | ssw = int(''.join(str(e) for e in ssw)) 117 | if ssw in RandNames: 118 | RandNames.remove(ssw) 119 | if name in Names: 120 | Names.remove(name) 121 | -------------------------------------------------------------------------------- /PlutonPlugins/IllegalName/IllegalNameConfig.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | CheckForNonAscii=1 3 | CheckWithRegEx=1 4 | SameName=1 5 | NameLength=27 6 | 7 | [ReplaceCharactersTo] 8 | á=a 9 | é=e 10 | í=i 11 | ú=u 12 | ő=o 13 | ö=o 14 | ü=u 15 | ó=o 16 | -------------------------------------------------------------------------------- /PlutonPlugins/IllegalName/IllegalNames.ini: -------------------------------------------------------------------------------- 1 | [IllegalNames] 2 | Name1=Suck 3 | Name2=Fuck 4 | Name3=SHITSERVER 5 | 6 | -------------------------------------------------------------------------------- /PlutonPlugins/InstaBuild/InstaBuild.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Pluton") 7 | import Pluton 8 | 9 | """ 10 | Class 11 | """ 12 | 13 | 14 | class InstaBuild: 15 | def InstaBuild(self): 16 | if not Plugin.IniExists("InstaBuild"): 17 | ini = Plugin.CreateIni("InstaBuild") 18 | ini.AddSetting("Settings", "EnableforPublic", "0") 19 | ini.Save() 20 | return Plugin.GetIni("InstaBuild") 21 | 22 | def On_FrameDeployed(self, ev): 23 | ini = self.InstaBuild() 24 | Player = ev.Deployer 25 | get = int(ini.GetSetting("Settings", "EnableforPublic")) 26 | buildingblock = ev.BuildingPart.buildingBlock 27 | if get == 1: 28 | buildingblock.StopBeingAFrame() 29 | buildingblock.Health = buildingblock.MaxHealth() 30 | else: 31 | dsget = DataStore.ContainsKey("InstaBuild", Player.SteamID) 32 | if Player.Admin and dsget is True: 33 | buildingblock.health = buildingblock.MaxHealth() 34 | 35 | def On_Command(self, cmd): 36 | Player = cmd.User 37 | args = cmd.args 38 | if cmd.cmd == "instabuild": 39 | ini = self.InstaBuild() 40 | get = int(ini.GetSetting("Settings", "EnableforPublic")) 41 | if get == 1: 42 | Player.Message("InstaBuild is enabled for everyone.") 43 | else: 44 | if not Player.Admin: 45 | Player.Message("Its only for admins. Sorry") 46 | return 47 | dsget = DataStore.ContainsKey("InstaBuild", Player.SteamID) 48 | if dsget is True: 49 | DataStore.Remove("InstaBuild", Player.SteamID) 50 | Player.Message("You quit InstaBuild mode.") 51 | else: 52 | DataStore.Add("InstaBuild", Player.SteamID, "1") 53 | Player.Message("You enabled InstaBuild mode.") -------------------------------------------------------------------------------- /PlutonPlugins/InstaCraft/InstaCraft.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.3' 3 | 4 | import clr 5 | clr.AddReferenceByPartialName("Pluton") 6 | import Pluton 7 | 8 | class InstaCraft: 9 | 10 | InstaCraft = None 11 | 12 | def On_PluginInit(self): 13 | if not Plugin.IniExists("Items"): 14 | x = Find.BluePrints() 15 | ini = Plugin.CreateIni("Items") 16 | ini.AddSetting("Config", "InstaCraft", "False") 17 | for y in x: 18 | ini.AddSetting("Items", str(y.name), str(y.time)) 19 | ini.AddSetting("AllowCrafting", str(y.name), "True") 20 | ini.Save() 21 | ini = Plugin.GetIni("Items") 22 | self.InstaCraft = self.bool(ini.GetSetting("Config", "InstaCraft")) 23 | if self.InstaCraft is True: 24 | return 25 | for x in ini.EnumSection("Items"): 26 | v = ini.GetSetting("Items", x) 27 | setattr(self, x, float(v)) 28 | for x in ini.EnumSection("AllowCrafting"): 29 | v = ini.GetSetting("AllowCrafting", x) 30 | n = x + "Bool" 31 | setattr(self, n, self.bool(v)) 32 | 33 | def bool(self, s): 34 | if s.lower() == 'true': 35 | return True 36 | elif s.lower() == 'false': 37 | return False 38 | else: 39 | raise ValueError 40 | 41 | def On_PlayerStartCrafting(self, CraftEvent): 42 | if self.InstaCraft is True: 43 | CraftEvent.CraftTime = float(0) 44 | return 45 | name = str(CraftEvent.bluePrint.targetItem.name) 46 | b = name + "Bool" 47 | cb = getattr(self, b) 48 | if not cb: 49 | CraftEvent.Stop("This item is banned.") 50 | return 51 | t = getattr(self, name) 52 | CraftEvent.CraftTime = float(t) -------------------------------------------------------------------------------- /PlutonPlugins/MethodVarsGetter/MethodVarsGetter.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.0' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Pluton") 7 | import Pluton 8 | import Pluton.Events 9 | import sys 10 | arr = \ 11 | ['DataStore', 'Server', 'Util', 'World', 'BuildingPart', 'ChatCommands', 12 | 'ConsoleCommands', 'Entity', 'Inv', 'InvItem', 'LoadOut', 'LoadOutItem', 'NPC', 'OfflinePlayer', 13 | 'Player', 'Zone2D' 14 | ] 15 | 16 | event = \ 17 | [ 18 | 'AuthEvent', 'BuildingEvent', 'ChatEvent', 19 | 'ClientConsoleEvent', 'CombatEntityHurtEvent', 'CommandEvent', 'CommandPermissionEvent', 20 | 'CorpseHurtEvent', 'CorpseInitEvent', 'CraftEvent', 'DeathEvent', 'DoorCodeEvent', 21 | 'DoorUseEvent', 'EntityLootEvent', 'GatherEvent', 'HurtEvent', 'ItemLootEvent', 'LootEvent', 22 | 'NPCDeathEvent', 'NPCHurtEvent', 23 | 'PlayerDeathEvent', 'PlayerHurtEvent', 'PlayerLootEvent', 'PlayerTakeRadsEvent', 24 | 'PlayerTakedmgEvent', 'RespawnEvent', 'ServerConsoleEvent' 25 | 26 | ] 27 | 28 | class MethodVarsGetter: 29 | def On_PluginInit(self): 30 | for string in arr: 31 | globals()[string] = getattr(Pluton, string) 32 | for method in dir(globals()[string]): 33 | s = str(method) 34 | if s.startswith('__') and s.endswith('__'): 35 | continue 36 | Plugin.Log(string, str(method)) 37 | for string in event: 38 | globals()[string] = getattr(Pluton.Events, string) 39 | for method in dir(globals()[string]): 40 | s = str(method) 41 | if s.startswith('__') and s.endswith('__'): 42 | continue 43 | Plugin.Log(string, str(method)) -------------------------------------------------------------------------------- /PlutonPlugins/Report/Report.py: -------------------------------------------------------------------------------- 1 | __author__ = 'DreTaX' 2 | __version__ = '1.2' 3 | 4 | import clr 5 | 6 | clr.AddReferenceByPartialName("Pluton") 7 | import Pluton 8 | from time import gmtime, strftime 9 | 10 | """ 11 | Class 12 | """ 13 | 14 | def ColorText(color, part): 15 | return '' + part + '' 16 | 17 | 18 | 19 | class Report: 20 | 21 | def Reports(self): 22 | if not Plugin.IniExists("Reports"): 23 | ini = Plugin.CreateIni("Reports") 24 | ini.Save() 25 | return Plugin.GetIni("Reports") 26 | 27 | """ 28 | CheckV Assistants 29 | """ 30 | 31 | def GetPlayerName(self, name, Mode=1): 32 | if Mode == 1 or Mode == 3: 33 | for pl in Server.ActivePlayers: 34 | if pl.Name.lower() == name: 35 | return pl 36 | if Mode == 2 or Mode == 3: 37 | for pl in Server.OfflinePlayers.Values: 38 | if pl.Name.lower() == name: 39 | return pl 40 | return None 41 | 42 | """ 43 | CheckV method based on Spock's method. 44 | Upgraded by DreTaX 45 | Can Handle Single argument and Array args. 46 | Mode: Search mode (Default: 1) 47 | 1 = Search Online Players 48 | 2 = Search Offline Players 49 | 3 = Both 50 | V6.0 51 | """ 52 | 53 | def CheckV(self, Player, args, Mode=1): 54 | count = 0 55 | if hasattr(args, '__len__') and (not isinstance(args, str)): 56 | p = self.GetPlayerName(str.Join(" ", args).lower(), Mode) 57 | if p is not None: 58 | return p 59 | if Mode == 1 or Mode == 3: 60 | for pl in Server.ActivePlayers: 61 | for namePart in args: 62 | if namePart.lower() in pl.Name.lower(): 63 | p = pl 64 | count += 1 65 | if Mode == 2 or Mode == 3: 66 | for offlineplayer in Server.OfflinePlayers.Values: 67 | for namePart in args: 68 | if namePart.lower() in offlineplayer.Name.lower(): 69 | p = offlineplayer 70 | count += 1 71 | else: 72 | ag = str(args).lower() # just incase 73 | p = self.GetPlayerName(ag, Mode) 74 | if p is not None: 75 | return p 76 | if Mode == 1 or Mode == 3: 77 | for pl in Server.ActivePlayers: 78 | if ag in pl.Name.lower(): 79 | p = pl 80 | count += 1 81 | if Mode == 2 or Mode == 3: 82 | for offlineplayer in Server.OfflinePlayers.Values: 83 | if ag in offlineplayer.Name.lower(): 84 | p = offlineplayer 85 | count += 1 86 | if count == 0: 87 | Player.MessageFrom("Reports", "Couldn't Find " + str.Join(" ", args) + "!") 88 | return None 89 | elif count == 1 and p is not None: 90 | return p 91 | else: 92 | Player.MessageFrom("Reports", "Found " + str(count) + 93 | " player with similar name. Use more correct name!") 94 | return None 95 | 96 | def On_Chat(self, ChatEvent): 97 | if DataStore.ContainsKey("Reports", ChatEvent.User.SteamID): 98 | reason = ChatEvent.OriginalText 99 | systemname = "[Report System]" 100 | Player = ChatEvent.User 101 | # Avoid null players. 102 | bpl = str(DataStore.Get("Reports", Player.SteamID)).split(":") 103 | dt = strftime("%Y-%m-%d %H:%M:%S", gmtime()) 104 | ini = self.Reports() 105 | l = len(ini.EnumSection(bpl[0])) + 1 106 | ini.AddSetting(bpl[0], str(l), dt + " | Reported: " + bpl[1] + " | Report By: " + Player.Name) 107 | ini.AddSetting(bpl[0], str(l), dt + " | Reason: " + reason) 108 | ini.Save() 109 | Player.MessageFrom(systemname, ColorText("green", "Report Submitted!")) 110 | for admin in Server.ActivePlayers: 111 | if admin.Admin: 112 | admin.MessageFrom(systemname, ColorText("red", "Complaint From Player: " + Player.Name 113 | + " about " + bpl[1])) 114 | admin.MessageFrom(systemname, ColorText("red", "Reason: " + reason)) 115 | DataStore.Remove("Reports", Player.SteamID) 116 | ChatEvent.FinalText = "" 117 | 118 | def On_Command(self, cmd): 119 | Player = cmd.User 120 | args = cmd.args 121 | systemname = "[Report System]" 122 | if cmd.cmd == "report": 123 | if len(args) == 0: 124 | Player.MessageFrom(systemname, "Usage: /report username") 125 | elif len(args) > 0: 126 | if DataStore.ContainsKey("Reports", Player.SteamID): 127 | Player.MessageFrom(systemname, "You are already pending to submit a report atm.") 128 | Player.MessageFrom(systemname, "Type the reason in the chat without /") 129 | return 130 | else: 131 | pl = self.CheckV(Player, args) 132 | if pl is None: 133 | return 134 | DataStore.Add("Reports", Player.SteamID, pl.SteamID + ":" + pl.Name) 135 | Player.MessageFrom(systemname, "Type the reason in the chat to report the player.") 136 | -------------------------------------------------------------------------------- /PlutonPlugins/Test.py: -------------------------------------------------------------------------------- 1 | import clr 2 | import sys 3 | 4 | clr.AddReferenceByPartialName("UnityEngine") 5 | clr.AddReferenceByPartialName("Pluton") 6 | import UnityEngine 7 | import Pluton 8 | from Pluton import InvItem 9 | from System import * 10 | from UnityEngine import * 11 | 12 | 13 | class Test: 14 | def On_Respawn(self, re): 15 | re.GiveDefault = False 16 | loadout = None 17 | if re.Player.Admin: 18 | loadout = Server.LoadOuts["admin"] 19 | else: 20 | loadout = Server.LoadOuts["starter"] 21 | loadout.ToInv(re.Player.Inventory) 22 | 23 | def On_LoadingCommands(self): 24 | Commands.RegisterCommand("kit", " ", "Gives you the appropriate kit if you are eligible.") 25 | Commands.RegisterCommand("tpto", " \"\"", "Sends a teleport request to the selected player, use full name, if it qontains spaces then put the name in double quotes.") 26 | 27 | def On_PlayerConnected(self, player): 28 | for p in Server.ActivePlayers: 29 | if (p.Name != player.Name): 30 | p.Message(String.Format("{0} has joined the server!", player.Name)) 31 | 32 | def On_PlayerDisconnected(self, player): 33 | for p in Server.ActivePlayers: 34 | if (p.Name != player.Name): 35 | p.Message(String.Format("{0} has left the server!", player.Name)) 36 | 37 | def On_Command(self, cmd): 38 | Player = cmd.User 39 | args = cmd.args 40 | if cmd.cmd == "kit": 41 | if Player.Admin or Player.Moderator or Player.Owner: 42 | if len(args) == 0: 43 | Player.Message("Available kits: starter, admin") 44 | return 45 | if Server.LoadOuts.ContainsKey(args[0]): 46 | loadout = Server.LoadOuts[args[0]] 47 | loadout.ToInv(Player.Inventory) 48 | return 49 | else: 50 | Player.Message(String.Format("Kit {0} not found!", cmd.args[0])) 51 | return 52 | else: 53 | Player.Message("You get the default kit on every respawn soo..") 54 | Player.Message("You can use /tpa for now") 55 | 56 | elif cmd.cmd == "tpto": 57 | if not cmd.User.Moderator: 58 | Player.Message("You aren't an admin!") 59 | return 60 | pl = Server.FindPlayer(cmd.quotedArgs[0]) 61 | if pl is not None: 62 | cmd.User.Teleport(pl.Location) 63 | return 64 | else: 65 | cmd.User.Message(String.Format("Couldn't find player: {0}", cmd.quotedArgs[0])) 66 | return 67 | elif cmd.cmd == "tphere": 68 | if not cmd.User.Moderator: 69 | Player.Message("You aren't an admin!") 70 | return 71 | pl = Server.FindPlayer(cmd.quotedArgs[0]) 72 | if pl is not None: 73 | pl.Teleport(Player.Location) 74 | return 75 | else: 76 | cmd.User.Message(String.Format("Couldn't find player: {0}", cmd.quotedArgs[0])) 77 | return -------------------------------------------------------------------------------- /PlutonPlugins/TpFriend/TpFriendConfig.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | Maxuses=0 3 | cooldown=480000 4 | sysname=[Pluton-Tpa] 5 | timeoutr=35 6 | tpdelay=10 -------------------------------------------------------------------------------- /PlutonPlugins/iConomy/Resources.ini: -------------------------------------------------------------------------------- 1 | [Resources] 2 | autospawn/resource/beachside-arctic/tree-4=1.0 3 | autospawn/resource/beachside-arctic/tree-5=1.0 4 | autospawn/resource/beachside-arctic/tree-6=1.0 5 | autospawn/resource/beachside-arid/tree-10=1.0 6 | autospawn/resource/beachside-arid/tree-11=1.0 7 | autospawn/resource/beachside-arid/tree-12=1.0 8 | autospawn/resource/beachside-arid/tree-13=1.0 9 | autospawn/resource/beachside-arid/tree-9=1.0 10 | autospawn/resource/beachside-temperate/tree-3=1.0 11 | autospawn/resource/beachside-temperate/tree-4=1.0 12 | autospawn/resource/beachside-tundra/tree-4=1.0 13 | autospawn/resource/beachside-tundra/tree-5=1.0 14 | autospawn/resource/fields-arctic/tree-2=1.0 15 | autospawn/resource/fields-arid/tree-10=1.0 16 | autospawn/resource/fields-arid/tree-11=1.0 17 | autospawn/resource/fields-arid/tree-9=1.0 18 | autospawn/resource/fields-temperate/tree-10=1.0 19 | autospawn/resource/fields-temperate/tree-11=1.0 20 | autospawn/resource/fields-temperate/tree-12=1.0 21 | autospawn/resource/fields-temperate/tree-9=1.0 22 | autospawn/resource/fields-tundra/tree-10=1.0 23 | autospawn/resource/fields-tundra/tree-9=1.0 24 | autospawn/resource/forest-arctic/tree-2=1.0 25 | autospawn/resource/forest-arctic/tree-3=1.0 26 | autospawn/resource/forest-arid/tree-14=1.0 27 | autospawn/resource/forest-arid/tree-15=1.0 28 | autospawn/resource/forest-arid/tree-16=1.0 29 | autospawn/resource/forest-arid/tree-17=1.0 30 | autospawn/resource/forest-arid/tree-18=1.0 31 | autospawn/resource/forest-arid/tree-19=1.0 32 | autospawn/resource/forestside-arctic/tree-2=1.0 33 | autospawn/resource/forestside-arid/tree-10=1.0 34 | autospawn/resource/forestside-arid/tree-11=1.0 35 | autospawn/resource/forestside-arid/tree-12=1.0 36 | autospawn/resource/forestside-arid/tree-13=1.0 37 | autospawn/resource/forestside-arid/tree-9=1.0 38 | autospawn/resource/forestside-temperate/tree-10=1.0 39 | autospawn/resource/forestside-temperate/tree-11=1.0 40 | autospawn/resource/forestside-temperate/tree-12=1.0 41 | autospawn/resource/forestside-temperate/tree-9=1.0 42 | autospawn/resource/forestside-tundra/tree-10=1.0 43 | autospawn/resource/forestside-tundra/tree-11=1.0 44 | autospawn/resource/forestside-tundra/tree-9=1.0 45 | autospawn/resource/forest-temperate/tree-11=1.0 46 | autospawn/resource/forest-temperate/tree-12=1.0 47 | autospawn/resource/forest-temperate/tree-13=1.0 48 | autospawn/resource/forest-temperate/tree-14=1.0 49 | autospawn/resource/forest-temperate/tree-15=1.0 50 | autospawn/resource/forest-temperate/tree-16=1.0 51 | autospawn/resource/forest-tundra/tree-16=1.0 52 | autospawn/resource/forest-tundra/tree-17=1.0 53 | autospawn/resource/forest-tundra/tree-18=1.0 54 | autospawn/resource/forest-tundra/tree-19=1.0 55 | autospawn/resource/forest-tundra/tree-20=1.0 56 | autospawn/resource/forest-tundra/tree-21=1.0 57 | autospawn/resource/loot/loot-barrel-1=1.0 58 | autospawn/resource/loot/loot-barrel-2=1.0 59 | autospawn/resource/ores/metal-ore=1.0 60 | autospawn/resource/ores/stone-ore=1.0 61 | autospawn/resource/ores/sulfur-ore=1.0 62 | autospawn/resource/roadside/tree-4=1.0 63 | npc/animals/bear_corpse=1.0 64 | npc/animals/boar_corpse=1.0 65 | npc/animals/chicken_corpse=1.0 66 | npc/animals/stag_corpse=1.0 67 | npc/animals/wolf_corpse=1.0 68 | player/player_corpse=1.0 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Python-Plugins 2 | ============== 3 | 4 | 5 | 6 | Python Plugins for Fougerite or for Pluton. 7 | 8 | 9 | --------------------------------------------------------------------------------