Skip to content

Instantly share code, notes, and snippets.

@JoneKone
Last active May 5, 2025 01:25
Show Gist options
  • Select an option

  • Save JoneKone/4a87f357cf770659193d014fadcb09a5 to your computer and use it in GitHub Desktop.

Select an option

Save JoneKone/4a87f357cf770659193d014fadcb09a5 to your computer and use it in GitHub Desktop.
Lua_Improved_Logs_Mod.lua
LuaUserData.MakeFieldAccessible(Descriptors["Barotrauma.StatusEffect"], "user")
local discordWebHook = "https://discord.com/api/webhooks/980161887704580120/mb2lJ7i0CmccQvwpgTQdwY_6uoaptMOPzj1gSnSWWhFk_1pDhyQdIOA7S1899Z3MW9DL"
local explosives = {"frag grenade", "incendium grenade", "emp grenade", "stun grenade", "Oxygenite Shard"}
local poisons = {"Velonaceps Calyx Eggs", "Cyanide", "Deliriumine", "Morbusine", "Sufforin", "Radiotoxin", "Raptor Bane Extract", "Chloral Hydrate", "Paralysis"}
local medicalItems = {"Fentanyl", "Morphine", "opium", "Liquid Oxygenite", "Pomegrenade Extract", "Deusizine", "Broad-spectrum Antibiotics", "Ethanol"}
local fuelRods = {"Fuel Rod", "Thorium Fuel Rod", "Fulgurium Fuel Rod", "Volatile Fulgurium Fuel Rod"}
local otherStuff = {"Oxygen Tank", "Oxygenite Tank", "Welding Fuel Tank", "Incendium Fuel Tank"}
--|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||--
local explosivesTimer = 5 -- changeble timer for explosives (used x (item) in less than (timer) seconds)
local detectTraitorExplosives = true -- if true then message says if a traitor used the item ------ if false then message doesen't say that a traitor used the item
local detectMutineerExplosives = true -- if true then message says if a mutineer used the item ------ if false then message doesen't say that a mutineer used the item
local detectClownExplosives = true -- if true then message says if a clown used the item ------ if false then message doesen't say that a clown used the item
local fragGrenadeUsers = {}
local incendiumGrenadeUsers = {}
local empGrenadeUsers = {}
local stunGrenadeUsers = {}
local oxygeniteUsers = {}
--|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||--
local poisonTimer = 5 -- changeble timer for poison (used x (item) in less than (timer) seconds)
local detectTraitorPoison = true -- if true then message says if a traitor used the item ------ if false then message doesen't say that a traitor used the item
local detectMutineerPoison = true -- if true then message says if a mutineer used the item ------ if false then message doesen't say that a mutineer used the item
local detectClownPoison = true -- if true then message says if a clown used the item ------ if false then message doesen't say that a clown used the item
local velonacepsCalyxEggsUsers = {}
local cyanideUsers = {}
local deliriumineUsers = {}
local morbusineUsers = {}
local sufforinUsers = {}
local radiotoxinUsers = {}
local raptorBaneExtractUsers = {}
local chloralHydrateUsers = {}
local paralyzantUsers = {}
--|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||--
local medicalItemsTimer = 5 -- changeble timer for medical items (used x (item) in less than (timer) seconds)
local detectTraitorMedicalItems = true -- if true then message says if a traitor used the item ------ if false then message doesen't say that a traitor used the item
local detectMutineerMedicalItems = true -- if true then message says if a mutineer used the item ------ if false then message doesen't say that a mutineer used the item
local detectClownMedicalItems = true -- if true then message says if a clown used the item ------ if false then message doesen't say that a clown used the item
local fentalyUsers = {}
local amountFentaly = 2 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
local morphineUsers = {}
local amountMorphine = 3 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
local opiumusers = {}
local amountOpium = 8 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
local liquidOxygeniteUsers = {}
local amountLiquidOxygenite = 1 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
local pomegrenadeExtractUsers = {}
local amountPomegrenadeExtract = 4 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
local deusizineUsers = {}
local amountDeusizine = 4 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
local broadspectrumAntibioticsUsers = {}
local amountBroadspectrumAntibiotics = 4 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
local ethanolUsers = {}
local amountEthanol = 3 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
--|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||--
local fuelRodTimer = 5 -- changeble timer for fuel rods (used x (item) in less than (timer) seconds)
local detectTraitorFuelRod = true-- if true then message says if a traitor used the item ------ if false then message doesen't say that a traitor used the item
local detectMutineerFuelRod = true -- if true then message says if a mutineer used the item ------ if false then message doesen't say that a mutineer used the item
local detectClownFuelRod = true -- if true then message says if a clown used the item ------ if false then message doesen't say that a clown used the item
local fuelRod = {}
local thoriumFuelRod = {}
local fulguriumFuelRod = {}
local volatileFulguriumFuelRod = {}
--|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||--
local otherStuffTimer = 5 -- changeble timer for other stuff (used x (item) in less than (timer) seconds)
local detectTraitorOtherStuff = true-- if true then message says if a traitor used the item ------ if false then message doesen't say that a traitor used the item
local detectMutineerOtherStuff = true -- if true then message says if a mutineer used the item ------ if false then message doesen't say that a mutineer used the item
local detectClownOtherStuff = true -- if true then message says if a clown used the item ------ if false then message doesen't say that a clown used the item
local oxygenTank = {}
local amountOxygenTank = 8 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
local oxygeniteTank = {}
local amountOxygeniteTank = 8 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
local weldingFuelTank = {}
local amountWeldingFuelTank = 8 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
local incendiumFuelTank = {}
local amountIncendiumFuelTank = 8 -- if used more than x (amount) then a message will show up ------ if not more than x (amount) then nothing will show up
--|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||--
local function ClientCharacter(character)
for key, value in pairs(Client.ClientList) do
if value.Character == character then
return value
end
end
end
Hook.Add("think", "sendMessageAfterPeriod", function ()
for _, client in pairs(Client.ClientList) do
for _, character in pairs(Character.CharacterList) do
if client.Character.IsCaptain then local isCaptain = true end
if client.Character.IsSecurity then local isSecurity = true end
if client.Character.IsMedic then local IsMedic = true end
if client.Character.IsEngineer then local isEngineer = true end
if client.Character.IsMechanic then local isMechanic = true end
if client.Character.IsAssistant then local isAssistant = true end
for key, value in pairs(fragGrenadeUsers) do
if Timer.GetTime() - value.Time > explosivesTimer then
local appendedMessage = string.format("**%s**`(%s)%s` threw **%s Frag Grenade**(s) in less than **" .. explosivesTimer .. " seconds** `(Server #1)`", key.Name, client.SteamID, value.Amount, key.Job)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
fragGrenadeUsers[key] = nil
end
end
for key, value in pairs(incendiumGrenadeUsers) do
if Timer.GetTime() - value.Time > explosivesTimer then
local appendedMessage = string.format("**%s**`(%s)` threw **%s Incendium Grenade**(s) in less than **" .. explosivesTimer .. " seconds** `(Server #1)`", key.Name, client.SteamID, value.Amount)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
incendiumGrenadeUsers[key] = nil
end
end
for key, value in pairs(empGrenadeUsers) do
if Timer.GetTime() - value.Time > explosivesTimer then
local appendedMessage = string.format("**%s**`(%s)` threw **%s Emp Grenade**(s) in less than **" .. explosivesTimer .. " seconds** `(Server #1)`", key.Name, client.SteamID, value.Amount)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
empGrenadeUsers[key] = nil
end
end
for key, value in pairs(stunGrenadeUsers) do
if Timer.GetTime() - value.Time > explosivesTimer then
local appendedMessage = string.format("**%s**`(%s)` threw **%s Stun Grenade**(s) in less than **" .. explosivesTimer .. " seconds** `(Server #1)`", key.Name, client.SteamID, value.Amount)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
stunGrenadeUsers[key] = nil
end
end
for key, value in pairs(oxygeniteUsers) do
if Timer.GetTime() - value.Time > explosivesTimer then
local appendedMessage = string.format("**%s**`(%s)` threw **%s Oxygenite Shard**(s) in less than **" .. explosivesTimer .. " seconds** `(Server #1)`", key.Name, client.SteamID, value.Amount)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
oxygeniteUsers[key] = nil
end
end
-- poison
for key, value in pairs(velonacepsCalyxEggsUsers) do
if Timer.GetTime() - value.Time > poisonTimer then
local appendedMessage = string.format("**%s**`(%s)` used **%s Velonaceps Calyx Eggs on %s** in less than **" .. poisonTimer .." seconds** `(Server #1)`", client.Name, client.SteamID, value.Amount, targets[1].Name)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
velonacepsCalyxEggsUsers[key] = nil
end
end
for key, value in pairs(cyanideUsers) do
if Timer.GetTime() - value.Time > poisonTimer then
local appendedMessage = string.format("**%s**`(%s)` used **%s Cyanide on %s** in less than **" .. poisonTimer .. " seconds** (Server #1)", key.Name, client.SteamID, value.Amount, targets[1].key.Name)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
cyanideUsers[key] = nil
end
end
for key, value in pairs(deliriumineUsers) do
if Timer.GetTime() - value.Time > poisonTimer then
local appendedMessage = string.format("%s(%s) used %s Deliriumine on %s in less than " .. poisonTimer .. " seconds (Server #1)", client.Name, client.SteamID, value.Amount, targets[1].Name)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
deliriumineUsers[key] = nil
end
end
for key, value in pairs(morbusineUsers) do
if Timer.GetTime() - value.Time > poisonTimer then
local appendedMessage = string.format("%s(%s) used %s Morbusine on %s in less than " .. poisonTimer .. " seconds (Server #1)", client.Name, client.SteamID, value.Amount, targets[1].Name)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
morbusineUsers[key] = nil
end
end
for key, value in pairs(sufforinUsers) do
if Timer.GetTime() - value.Time > poisonTimer then
local appendedMessage = string.format("%s(%s) used %s Sufforin on %s in less than " .. poisonTimer .. " seconds (Server #1)", client.Name, client.SteamID, value.Amount, targets[1].Name)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
sufforinUsers[key] = nil
end
end
for key, value in pairs(radiotoxinUsers) do
if Timer.GetTime() - value.Time > poisonTimer then
local appendedMessage = string.format("%s(%s) used %s Radiotoxin on %s in less than " .. poisonTimer .. " seconds (Server #1)", client.Name, client.SteamID, value.Amount, targets[1].Name)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
radiotoxinUsers[key] = nil
end
end
for key, value in pairs(raptorBaneExtractUsers) do
if Timer.GetTime() - value.Time > poisonTimer then
local appendedMessage = string.format("%s(%s) used %s Raptor Bane Extract on %s in less than " .. poisonTimer .. " seconds (Server #1)", client.Name, client.SteamID, value.Amount, targets[1].Name)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
raptorBaneExtractUsers[key] = nil
end
end
for key, value in pairs(chloralHydrateUsers) do
if Timer.GetTime() - value.Time > poisonTimer then
local appendedMessage = string.format("%s(%s) used %s Chloral Hydrate on %s in less than " .. poisonTimer .. " seconds (Server #1)", client.Name, client.SteamID, value.Amount, targets[1].Name)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
chloralHydrateUsers[key] = nil
end
end
for key, value in pairs(paralyzantUsers) do
if Timer.GetTime() - value.Time > poisonTimer then
local appendedMessage = string.format("%s(%s) used %s Paralyzant on %s in less than " .. poisonTimer .. " seconds (Server #1)", client.Name, client.SteamID, value.Amount, targets[1].Name)
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
paralyzantUsers[key] = nil
end
end
-- fuelrods
for key, value in pairs(fuelRod) do
if Timer.GetTime() - value.Time > fuelRodTimer then
local appendedMessage = string.format("%s(%s) dropped %s Fuel Rod(s) outside the submarine", owner.Name, client.SteamID, value.Amount), ServerLogMessageType.ItemInteraction
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
fuelRod[key] = nil
end
end
for key, value in pairs(thoriumFuelRod) do
if Timer.GetTime() - value.Time > fuelRodTimer then
local appendedMessage = string.format("%s(%s) dropped %s Fuel Rod(s) outside the submarine", owner.Name, client.SteamID, value.Amount), ServerLogMessageType.ItemInteraction
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
thoriumFuelRod[key] = nil
end
end
for key, value in pairs(fulguriumFuelRod) do
if Timer.GetTime() - value.Time > fuelRodTimer then
local appendedMessage = string.format("%s(%s) dropped %s Fulgurium Fuel Rod(s) outside the submarine", owner.Name, client.SteamID, value.Amount), ServerLogMessageType.ItemInteraction
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
fulguriumFuelRod[key] = nil
end
end
for key, value in pairs(volatileFulguriumFuelRod) do
if Timer.GetTime() - value.Time > fuelRodTimer then
local appendedMessage = string.format("%s(%s) dropped %s Volatile Fulgurium Fuel Rod(s) outside the submarine", owner.Name, client.SteamID, value.Amount), ServerLogMessageType.ItemInteraction
Networking.HttpPost(discordWebHook, function(result) end, '{\"content\": \"' .. appendedMessage .. '\"}')
volatileFulguriumFuelRod[key] = nil
end
end
end end
end)
-- explosives
Hook.Add("statusEffect.apply.fraggrenade", "fragGrenade", function(effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnDeath then
if fragGrenadeUsers[effect.user] == nil then
fragGrenadeUsers[effect.user] = {}
fragGrenadeUsers[effect.user].Amount = 0
end
fragGrenadeUsers[effect.user].Time = Timer.GetTime()
fragGrenadeUsers[effect.user].Amount = fragGrenadeUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.incendiumgrenade", "incendiumGrenade", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnDeath then
if incendiumGrenadeUsers[effect.user] == nil then
incendiumGrenadeUsers[effect.user] = {}
incendiumGrenadeUsers[effect.user].Amount = 0
end
incendiumGrenadeUsers[effect.user].Time = Timer.GetTime()
incendiumGrenadeUsers[effect.user].Amount = incendiumGrenadeUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.empgrenade", "empGrenade", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnDeath then
if empGrenadeUsers[effect.user] == nil then
empGrenadeUsers[effect.user] = {}
empGrenadeUsers[effect.user].Amount = 0
end
empGrenadeUsers[effect.user].Time = Timer.GetTime()
empGrenadeUsers[effect.user].Amount = empGrenadeUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.stungrenade", "stunGrenade", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnDeath then
if stunGrenadeUsers[effect.user] == nil then
stunGrenadeUsers[effect.user] = {}
stunGrenadeUsers[effect.user].Amount = 0
end
stunGrenadeUsers[effect.user].Time = Timer.GetTime()
stunGrenadeUsers[effect.user].Amount = stunGrenadeUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.oxygeniteshard", "oxygeniteShard", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnDeath then
if oxygeniteUsers[effect.user] == nil then
oxygeniteUsers[effect.user] = {}
oxygeniteUsers[effect.user].Amount = 0
end
oxygeniteUsers[effect.user].Time = Timer.GetTime()
oxygeniteUsers[effect.user].Amount = oxygeniteUsers[effect.user].Amount + 1
end
end)
-- allPoisons
Hook.Add("statusEffect.apply.calyxanide", "velonacepsCalyxEggs", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse and effect.Tags == "poison" then
if velonacepsCalyxEggsUsers[effect.user] == nil then
velonacepsCalyxEggsUsers[effect.user] = {}
velonacepsCalyxEggsUsers[effect.user].Amount = 0
end
velonacepsCalyxEggsUsers[effect.user].Time = Timer.GetTime()
velonacepsCalyxEggsUsers[effect.user].Amount = velonacepsCalyxEggsUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.cyanide", "cyanide", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse and effect.Tags == "poison" then
if cyanideUsers[effect.user] == nil then
cyanideUsers[effect.user] = {}
cyanideUsers[effect.user].Amount = 0
targets[effect.user] = {}
end
cyanideUsers[effect.user].Time = Timer.GetTime()
cyanideUsers[effect.user].Amount = cyanideUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.deliriumine", "deliriumine", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse and effect.Tags == "poison" then
if deliriumineUsers[effect.user] == nil then
deliriumineUsers[effect.user] = {}
deliriumineUsers[effect.user].Amount = 0
end
deliriumineUsers[effect.user].Time = Timer.GetTime()
deliriumineUsers[effect.user].Amount = deliriumineUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.morbusine", "morbusine", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse and effect.Tags == "poison" then
if morbusineUsers[effect.user] == nil then
morbusineUsers[effect.user] = {}
morbusineUsers[effect.user].Amount = 0
end
morbusineUsers[effect.user].Time = Timer.GetTime()
morbusineUsers[effect.user].Amount = morbusineUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.sufforin", "sufforin", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse and effect.Tags == "poison" then
if sufforinUsers[effect.user] == nil then
sufforinUsers[effect.user] = {}
sufforinUsers[effect.user].Amount = 0
end
sufforinUsers[effect.user].Time = Timer.GetTime()
sufforinUsers[effect.user].Amount = sufforinUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.radiotoxin", "radiotoxin", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse and effect.Tags == "poison" then
if radiotoxinUsers[effect.user] == nil then
radiotoxinUsers[effect.user] = {}
radiotoxinUsers[effect.user].Amount = 0
end
radiotoxinUsers[effect.user].Time = Timer.GetTime()
radiotoxinUsers[effect.user].Amount = radiotoxinUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.raptorbaneextract", "raptorBaneExtract", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse and effect.Tags == "poison" then
if raptorBaneExtractUsers[effect.user] == nil then
raptorBaneExtractUsers[effect.user] = {}
raptorBaneExtractUsers[effect.user].Amount = 0
end
raptorBaneExtractUsers[effect.user].Time = Timer.GetTime()
raptorBaneExtractUsers[effect.user].Amount = raptorBaneExtractUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.chloralhydrate", "chloralHydrate", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse and effect.Tags == "poison" then
if chloralHydrateUsers[effect.user] == nil then
chloralHydrateUsers[effect.user] = {}
chloralHydrateUsers[effect.user].Amount = 0
end
chloralHydrateUsers[effect.user].Time = Timer.GetTime()
chloralHydrateUsers[effect.user].Amount = chloralHydrateUsers[effect.user].Amount + 1
end
end)
Hook.Add("statusEffect.apply.paralyzant", "paralyzant", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse and effect.Tags == "poison" then
if paralyzantUsers[effect.user] == nil then
paralyzantUsers[effect.user] = {}
paralyzantUsers[effect.user].Amount = 0
end
paralyzantUsers[effect.user].Time = Timer.GetTime()
paralyzantUsers[effect.user].Amount = paralyzantUsers[effect.user].Amount + 1
end
end)
--medicalItems
Hook.Add("statusEffect.apply.fentanyl", "fentanyl", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse then
local appendedMessage = string.format("%s used fentanyl on %s", targets[3].character.Name, item.ParentInventory.Owner.Name)
Networking.RequestPostHTTP(discordWebHook, function(result)
end, '{\"content\": \"' .. appendedMessage .. '\"}')
end
end)
Hook.Add("statusEffect.apply.morphine", "morphine", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse then
local appendedMessage = string.format("%s used morphine on %s", targets[3].character.Name, item.ParentInventory.Owner.Name)
Networking.RequestPostHTTP(discordWebHook, function(result)
end, '{\"content\": \"' .. appendedMessage .. '\"}')
end
end)
Hook.Add("statusEffect.apply.opium", "opium", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse then
local appendedMessage = string.format("%s used opium on %s", targets[3].character.Name, item.ParentInventory.Owner.Name)
Networking.RequestPostHTTP(discordWebHook, function(result)
end, '{\"content\": \"' .. appendedMessage .. '\"}')
end
end)
Hook.Add("statusEffect.apply.liquidoxygenite", "liquidoxygenite", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse then
local appendedMessage = string.format("%s used liquidoxygenite on %s", targets[3].character.Name, item.ParentInventory.Owner.Name)
Networking.RequestPostHTTP(discordWebHook, function(result)
end, '{\"content\": \"' .. appendedMessage .. '\"}')
end
end)
Hook.Add("statusEffect.apply.pomegrenadeextract", "pomegrenadeextract", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse then
local appendedMessage = string.format("%s used Pome Grenade Extract on %s", targets[3].character.Name, item.ParentInventory.Owner.Name)
Networking.RequestPostHTTP(discordWebHook, function(result)
end, '{\"content\": \"' .. appendedMessage .. '\"}')
end
end)
Hook.Add("statusEffect.apply.deusizine", "deusizine", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse then
local appendedMessage = string.format("%s used Deusizine on %s", targets[3].character.Name, item.ParentInventory.Owner.Name)
Networking.RequestPostHTTP(discordWebHook, function(result)
end, '{\"content\": \"' .. appendedMessage .. '\"}')
end
end)
Hook.Add("statusEffect.apply.broadspectrumantibiotics", "broadspectrumantibiotics", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse then
local appendedMessage = string.format("%s used Broad-spectrum Antibiotics on %s", targets[3].character.Name, item.ParentInventory.Owner.Name)
Networking.RequestPostHTTP(discordWebHook, function(result)
end, '{\"content\": \"' .. appendedMessage .. '\"}')
end
end)
Hook.Add("statusEffect.apply.ethanol", "ethanol", function (effect, deltaTime, item, targets, worldPosition)
if effect.type == ActionType.OnUse then
local appendedMessage = string.format("%s used Ethanol on %s", targets[3].character.Name, item.ParentInventory.Owner.Name)
Networking.RequestPostHTTP(discordWebHook, function(result)
end, '{\"content\": \"' .. appendedMessage .. '\"}')
end
end)
--fuel
Hook.Add("item.drop", "fuelrodoutsidesubmarine", function (item, character)
if item.Prefab.Identifier == "fuelrod" then
if item.Submarine == nil then
if item.ParentInventory == nil or item.ParentInventory.Owner == nil then return end
local owner = item.ParentInventory.Owner
if fuelRod[effect.user] == nil then
fuelRod[effect.user] = {}
fuelRod[effect.user].Amount = 0
end
fuelRod[effect.user].Time = Timer.GetTime()
fuelRod[effect.user].Amount = chloralHydrateUsers[effect.user].Amount + 1
end
end
if item.Prefab.Identifier == "fulguriumfuelrod" then
if item.Submarine == nil then
if item.ParentInventory == nil or item.ParentInventory.Owner == nil then return end
local owner = item.ParentInventory.Owner
if thoriumFuelRod == nil then
thoriumFuelRod[effect.user] = {}
thoriumFuelRod[effect.user].Amount = 0
end
thoriumFuelRod[effect.user].Time = Timer.GetTime()
thoriumFuelRod[effect.user].Amount = chloralHydrateUsers[effect.user].Amount + 1
end
end
if item.Prefab.Identifier == "fulguriumfuelrod" then
if item.Submarine == nil then
if item.ParentInventory == nil or item.ParentInventory.Owner == nil then return end
local owner = item.ParentInventory.Owner
if fulguriumFuelRod == nil then
fulguriumFuelRod[effect.user] = {}
fulguriumFuelRod[effect.user].Amount = 0
end
fulguriumFuelRod[effect.user].Time = Timer.GetTime()
fulguriumFuelRod[effect.user].Amount = chloralHydrateUsers[effect.user].Amount + 1
end
end
if item.Prefab.Identifier == "volatilefulguriumfuelrod" then
if item.Submarine == nil then
if item.ParentInventory == nil or item.ParentInventory.Owner == nil then return end
local owner = item.ParentInventory.Owner
if volatileFulguriumFuelRod == nil then
volatileFulguriumFuelRod[effect.user] = {}
volatileFulguriumFuelRod[effect.user].Amount = 0
end
volatileFulguriumFuelRod[effect.user].Time = Timer.GetTime()
volatileFulguriumFuelRod[effect.user].Amount = chloralHydrateUsers[effect.user].Amount + 1
end
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment