--[[ -- Author: Tim Plate -- Project: Advanced Roleplay Environment -- Copyright (c) 2022 Tim Plate Solutions --]] INFUSIONS = { ["blood"] = { availableVolumes = { 100, 250, 500, 750, 1000 }, -- In ml cooldown = 3, -- Duration of action in s ivChangePerSecond = 4.1667, -- 250ml should be done in 60s. 250ml / 60s ~ 4.1667 ml/s. onTick = function(clientData, healthBuffer, bodyPart, ivChange) -- Will be executed every second -- Custom on tick logic healthBuffer.bloodVolume = healthBuffer.bloodVolume + ivChange end, onFinish = function(clientData, healthBuffer, bodyPart, totalVolume, givenVolume) -- Will be executed when the action is finished -- Custom on finish logic -- Example: Give the player a notification end, }, ["fenystil"] = { availableVolumes = { 100, 250, 500, 750, 1000 }, -- In ml cooldown = 3, -- Duration of action in s ivChangePerSecond = 4.1667, -- 250ml should be done in 60s. 250ml / 60s ~ 4.1667 ml/s. onTick = function(clientData, healthBuffer, bodyPart, ivChange) -- Will be executed every second -- Custom on tick logic healthBuffer.bloodVolume = healthBuffer.bloodVolume + ivChange end, onFinish = function(clientData, healthBuffer, bodyPart, totalVolume, givenVolume) -- Will be executed when the action is finished -- Custom on finish logic -- Example: Give the player a notification end, }, ["propofol"] = { availableVolumes = { 100, 250, 500, 750, 1000 }, -- In ml cooldown = 3, -- Duration of action in s ivChangePerSecond = 1, -- 100ml should be done in 60s. 100ml / 60s ~ 1 ml/s. onTick = function(clientData, healthBuffer, bodyPart, ivChange, givenVolume) -- Will be executed every second if not healthBuffer.anesthesia and givenVolume >= 50 then healthBuffer.anesthesia = true end end, onFinish = function(clientData, healthBuffer, bodyPart, totalVolume) -- Will be executed when the action is finished if healthBuffer.anesthesia then healthBuffer.anesthesia = false if not healthBuffer.unconscious then ClearPedTasks(ClientData.ped) end end end, }, ["etilefrin"] = { availableVolumes = { 1000 }, -- In ml cooldown = 5, -- Duration of action in s ivChangePerSecond = 4.1667, -- 250ml should be done in 60s. 250ml / 60s ~ 4.1667 ml/s. onTick = function(clientData, healthBuffer, bodyPart, ivChange) -- Will be executed every second -- Custom on tick logic healthBuffer.bloodVolume = healthBuffer.bloodVolume + ivChange end, onFinish = function(clientData, healthBuffer, bodyPart, totalVolume, givenVolume) -- Will be executed when the action is finished -- Custom on finish logic -- Example: Give the player a notification end, }, ["midazolam"] = { availableVolumes = { 100, 250 }, -- In ml cooldown = 3, -- Duration of action in s ivChangePerSecond = 1, -- 100ml should be done in 60s. 100ml / 60s ~ 1 ml/s. onTick = function(clientData, healthBuffer, bodyPart, ivChange, givenVolume) -- Will be executed every second if not healthBuffer.anesthesia and givenVolume >= 25 then healthBuffer.anesthesia = true end end, onFinish = function(clientData, healthBuffer, bodyPart, totalVolume) -- Will be executed when the action is finished if healthBuffer.anesthesia then healthBuffer.anesthesia = false if not healthBuffer.unconscious then ClearPedTasks(ClientData.ped) end end end, }, ["narketan"] = { availableVolumes = { 250, 500, 1000}, -- In ml cooldown = 3, -- Duration of action in s ivChangePerSecond = 1, -- 100ml should be done in 60s. 100ml / 60s ~ 1 ml/s. onTick = function(clientData, healthBuffer, bodyPart, ivChange, givenVolume) -- Will be executed every second if not healthBuffer.anesthesia and givenVolume >= 50 then healthBuffer.anesthesia = true end end, onFinish = function(clientData, healthBuffer, bodyPart, totalVolume) -- Will be executed when the action is finished if healthBuffer.anesthesia then healthBuffer.anesthesia = false if not healthBuffer.unconscious then ClearPedTasks(ClientData.ped) end end end, }, ["thiopental"] = { availableVolumes = { 100, 250, 500 }, -- In ml cooldown = 3, -- Duration of action in s ivChangePerSecond = 1, -- 100ml should be done in 60s. 100ml / 60s ~ 1 ml/s. onTick = function(clientData, healthBuffer, bodyPart, ivChange, givenVolume) -- Will be executed every second if not healthBuffer.anesthesia and givenVolume >= 25 then healthBuffer.anesthesia = true end end, onFinish = function(clientData, healthBuffer, bodyPart, totalVolume) -- Will be executed when the action is finished if healthBuffer.anesthesia then healthBuffer.anesthesia = false if not healthBuffer.unconscious then ClearPedTasks(ClientData.ped) end end end, }, ["sauerstoff"] = { availableVolumes = { 20, 50, 100, 150 }, -- In ml cooldown = 3, -- Duration of action in s ivChangePerSecond = 1.0, -- 250ml should be done in 60s. 250ml / 60s ~ 4.1667 ml/s. onTick = function() -- Will be executed every second -- Custom on tick logic end, onFinish = function() -- Will be executed when the action is finished -- Custom on finish logic -- Example: Give the player a notification end, }, ["nacl"] = { availableVolumes = { 100, 250, 500, 750, 1000 }, -- In ml cooldown = 3, -- Duration of action in s ivChangePerSecond = 4.1667, -- 250ml should be done in 60s. 250ml / 60s ~ 4.1667 ml/s. onTick = function(clientData, healthBuffer, bodyPart, ivChange) -- Will be executed every second -- Custom on tick logic healthBuffer.bloodVolume = healthBuffer.bloodVolume + ivChange end, onFinish = function(clientData, healthBuffer, bodyPart, totalVolume, givenVolume) -- Will be executed when the action is finished -- Custom on finish logic -- Example: Give the player a notification end, }, ["vitaminloesung"] = { availableVolumes = { 100, 250, 500, 750, 1000 }, -- In ml cooldown = 3, -- Duration of action in s ivChangePerSecond = 4.1667, -- 250ml should be done in 60s. 250ml / 60s ~ 4.1667 ml/s. onTick = function(clientData, healthBuffer, bodyPart, ivChange) -- Will be executed every second -- Custom on tick logic healthBuffer.bloodVolume = healthBuffer.bloodVolume + ivChange end, onFinish = function(clientData, healthBuffer, bodyPart, totalVolume, givenVolume) -- Will be executed when the action is finished -- Custom on finish logic -- Example: Give the player a notification end, } }