Pharmacy job

Add the pharmacy job to QBCore, Qbox, ESX, or Kora and point each pharmacy at it.

In-development version. These docs cover the testing build of Prescriptions. The official release is still documented on the GitBook linked in its README.

A pharmacy with a job set is player-run. Its job name has to match a real job in your framework. The sample name is pharmacy. Never leave a placeholder like police in there.

Merge the file for your framework, restart the framework core, then restart this resource. The files live in [INSTALL]/jobs/.

FrameworkFileWhere it goes
Qboxqbx_core.txtMerge into qbx_core/shared/jobs.lua
QBCoreqb-core.txtMerge into qb-core/shared/jobs.lua
ESX Legacyesx.sqlRun once against your database
Korakora_core.txtMerge into the KoraCoreSeed.jobs table in kora_core/shared/jobs.lua

The sample job has four grades: Clerk, Pharmacist, Senior Pharmacist, and Manager. The manager grade is the boss, with bank access, so the boss menu works without extra setup.

Kora format

Kora jobs are records in a list, not a table keyed by job name. Each record carries its own name, and grades is an array where the first entry is grade 1. Add this record inside KoraCoreSeed.jobs in kora_core/shared/jobs.lua:

{
    name = 'pharmacy', label = 'Pharmacy', defaultDuty = true, offDutyPay = false, type = 'none',
    grades = {
        { name = 'Clerk',             payment = 50 },
        { name = 'Pharmacist',        payment = 75 },
        { name = 'Senior Pharmacist', payment = 100 },
        { name = 'Manager',           payment = 125, isboss = true },
    },
},
FieldMeaning
nameJob name. Must match the job name on the pharmacy
labelDisplay name
defaultDutyOn duty when the job is assigned. true means the clerk does not have to clock in first
offDutyPayA number pays that amount while off duty. false pays nothing
typeService grouping. 'none' for a normal job
gradesArray, lowest grade first. Each entry has name and payment; isboss = true marks the boss grade

Kora grades start at 1, the script's grades start at 0. The bridge converts, so Clerk stays grade 0 in /setupprescriptions and in every rank setting. Do not shift your numbers by one.

A kora_core update can overwrite shared/jobs.lua, so keep a copy of your addition. A resource can also register the job at runtime with exports.kora_core:registerShared('jobs', 'pharmacy', record), but Kora removes records a resource registered when that resource stops, so the seed file is the safer place.

Point the pharmacy at it

In /setupprescriptions, open Shops, pick the pharmacy, and set the job name.

If you rename the job, say to moreos, change it in your framework and on every pharmacy that uses it.

Who can do what

These live on the Who can do what page, and the pharmacy rank is also set per shop on Shops.

SettingWhat it gates
Who can write a scriptWhich jobs can use the prescription pad, and from what rank. Pick the job and its lowest rank
Lowest rank to fillClocking in, the register, bottling, the medical cabinet and supply runs
Lowest rank for the back officeThe pharmacy tablet: search, print, flag, revoke, supply orders and stock
Controlled medication minimum rankThe doctor rank needed to write a controlled medication. 0 turns it off
Controlled medication mixing rankThe pharmacy rank needed to make a controlled medication at the bench. 0 turns it off
Who gets the callThe jobs pinged for the panic button, forged scripts and shoplifting

Each rank is a minimum grade, with 0 as the lowest. Admin access to /setupprescriptions comes from the framework admin check in Newb_Bridge. Staff also have to be clocked in for the register, bottling, the cabinet, supply runs and the panic button, and the tablet's doctor-record actions.

No player pharmacy?

Leave the job empty on the Shops page. That pharmacy becomes an NPC pharmacist who fills scripts when patients bring the paper. Sales are split between the NPC payout jobs, equally.

On this page