Addiction
Frameworks: VORP
Introducing the twh_addiction script, an advanced and customizable Drug Addiction System designed for use with the VORP framework. This script offers a comprehensive solution to simulate drug addiction and its effects within your game world. Unlock a wide array of features that can be tailored to your specific requirements.
Key Features:
Full API Integration: Seamlessly integrate the twh_addiction script with other scripts to create a cohesive experience.
Admin Commands: Easily manage the script using the built-in admin commands.
Customizable Addiction-Types: Create your own addiction-types to cater to various in-game scenarios.
Custom Drug Items and Animations: Customize drug items and their associated animations for an immersive experience.
Separated Addictions and Drugs: Maintain flexibility and freedom by separating addictions and drugs from one another.
Time-Modifier Configuration: Adjust time-modifiers for each addiction type, allowing for potential reduced work times in future twh scripts.
Effect Duration and Usage Settings: Configure the duration of effects and the number of usages needed before an effect triggers for each addiction.
Addiction Reset Upon Death: Addictions will automatically reset after a player's character dies, offering a fresh start.
With the twh_addiction script, you can provide your players with a realistic and engaging drug addiction experience. Create the perfect environment with custom items, addictions, and effects to suit your unique game world.
Initialization
local AddictAPI = exports['twh_addiction'].AddictionAPI()Usage
local addictCounter = AddictAPI.getCounter(addiction)
local allAddictCounter = AddictAPI.getAllCounter()
local onAddiction = AddictAPI.getOnAddiction(addiction)
local isOnDrug = AddictAPI.getIsOnDrug() -- returns the current drugAddictAPI.setAddiction(addiction) -- set counter to config amount needed
AddictAPI.removeAddiction(addiction) -- set counter to 0
AddictAPI.removeIsOnDrug(addiction) -- remove drug effect
AddictAPI.setIsOnDrug(addiction) -- trigger drug effect
AddictAPI.increaseAddictionCounter(addiction,amount) -- increase consumed counter with specific amount
AddictAPI.itemUsed(addiction,amount) -- if you config other items you can use this to define what addiction should be increasedAdmin Commands
setAddiction [id][addiction]
removeAddiciton [id][addiction]
removeOnDrug [id][addiction]
setOnDrug [id][addiction]
Instruction manual
Installation
First execute the sql file which is in the zip folder (Will be changed in the future)
Add following line to your server.cfg or ressource.cfg:
ensure twh_addiction
Usage
The twh_addiction script is designed primarily as a powerful resource for developers. To fully harness the potential of the twh_addiction script, simply refer to the API documentation provided above. The API enables you to access various functionalities, customize addiction types, drug items, animations, and effects, and configure time-modifiers, effect durations, and other parameters as needed. By leveraging the twh_addiction API, you can create unique and engaging gameplay scenarios that cater to your specific requirements and the needs of your players.
Last updated