Crime, behaviour and logs

Shoplifting, forgery, prompt style, hooks, debug, test commands and logging.

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

Part of Configuration. Open /setupprescriptions to change these.

Crime

Shoplifting

On the Shoplifting page. The shelf spots themselves are added per shop under The shelves on Shops.

SettingPlain English
Shoplifting switchMaster switch for every shop
Shelf restocks afterHow long a shelf stays empty after a successful search. 2 hours by default
Same person can try again afterThe cooldown between attempts for one player
Must stand withinHow close the player has to be to the shelf
Rummage takesThe length of the progress bar
Chance they get somethingThe odds a search turns something up
Chance the cops get a callThe odds the dispatch jobs are pinged. This can happen even when the search finds nothing
Staff cannot lift from their own shelvesBlocks the pharmacy's own job from searching its shelves
What might come off the shelfThe loot list. Each entry has an item, a weight (higher comes up more) and a count. Aspirin, pseudoephedrine and a bandage by default

The dispatch jobs are set under Who gets the call on Who can do what.

Fake scripts

On the Fake scripts page. Players reach the underground desk through an entrance, do the work at a desk inside, and leave by the exit.

SettingPlain English
Fake-script deskTurns the desk on or off
They can change a real scriptAllows altering the name or drug on a real paper
They can invent one from blank paperAllows a blank fake. It needs a prescription pad and blank paper
Best a fake can lookHow convincing a fake can get, out of 100. 70 by default
Blank forge ruins the paperThe chance a blank forge fails, destroying the pad and the paper
A clerk fills an unverified fakeLets NPC counters fill an unverified fake. Off rejects it and pings dispatch
Alert staff and police when staff fill an unverified fakeStaff who fill one anyway are told, it is logged and flagged on the record, and a controlled medication alerts dispatch
Must be within, The forge takesHow close the player must be to the desk, and the length of the forge progress bar
Where it happensThe entrance, exit and desk spots
Spotting a fakeThe skill-check passes a forger does at the desk to make a fake more convincing. Each pass has a difficulty and a gain, and the total can never pass Best a fake can look. Staff then verify the paper at the register, rolling against how convincing it is
The roomThe room players are sent into, the world they come back to, the fade time, and the interior
Skill check keys, writing animationThe keys for the skill checks and the animation at the desk (Advanced settings)

Behaviour

These are on the Extras page.

SettingPlain English
Prompt styleHow players interact: eye target, 3D text, or help text
Other scripts can hook a doseRuns the stubs in resource/open/server/medication_hooks.lua. See Events and hooks
Debug modeTurn on Advanced settings to see it. Prints one-line console messages such as [MrNewbPrescriptions:server] area: text, with names, ids and numbers. It also draws the setup marks, adds the Debug page, and makes the prescription pad write the script to yourself instead of a nearby patient. It does not skip the clock-in check unless the server also has the mrnewbrx_debug_bypass convar set to 1. Leave it off on a live server
Test commandsTest: write a script, Test: doctor form and Test: bottling. All off for a live server. See Commands

The NPC clerk's behaviour and the pad command are on the Scripts page. See Paper, doctors and money.

Logs

Dispenses, bills, forged papers, shoplifting and overdose treatment are logged. We recommend ox_lib logging (Datadog, Fivemanage or Loki, set up in ox_lib itself). The script already sends every line to it, so there is nothing to switch on here, and the history stays searchable.

If you also want the lines in Discord, open the Extras page, find Logs, paste a Discord webhook link, and press Save webhook. Use Send a test message to check it.

  • The link is stored on the server only. It is never sent to a player, never shown again after you save it, and not part of the exported settings. The panel only tells you whether one is set
  • Paste a new link to replace it, or press Remove webhook to turn Discord logging off
  • Posts are queued and spaced out, so a burst of activity cannot hit Discord's rate limit
  • Only admins can change it

The file resource/open/server/utility.lua holds the log function if you want to send the lines somewhere else.

Separately from these logs, the pharmacy keeps its own audit log of dispenses, duty, billing, supply and compliance events. Staff read it in the tablet's Stock and Activity app, and Days the pharmacy log is kept on Extras sets how long it is kept.

On this page