Description
HC Contract: No Petri
A self-contained Hardcore challenge addon for WoW Classic Era that lets you sign a public, verifiable contract to never use Flask of Petrification — and then enforces it, broadcasts it, and shames you if you break it.
The pitch
Flask of Petrification (item 13511) is the classic "get out of jail free" card on Hardcore — turn to stone, drop aggro, survive anything. This addon lets you publicly opt out of using it, proves to other players that you really did, and makes it socially painful to cheat.
What it does
Blocks the flask
- Wraps
UseContainerItem,UseItemByName,CastSpellByID,CastSpellByNameand hooksUseAction - Catches every path you could use to drink Petrification (item 13511, spells 17626 / 17624)
- Pops a loud on-screen warning on each blocked attempt
- Throttled chat announce ("X just tried to sip Petri but the contract holds")
Detects violations (in case the block fails)
- Listens to
UNIT_SPELLCAST_SUCCEEDED,COMBAT_LOG_EVENT_UNFILTERED(SPELL_CAST_SUCCESS/SPELL_AURA_APPLIED),UNIT_AURA - A violation is permanent — no rollback, no /reload reset
Verifiable contract
- Sign with a typed "I SWEAR" confirmation
- Generates an 8-char verification token from
playerGUID + signedAtvia FNV-1a hash - Token, sign timestamp, character level at signing — all stored and shareable
- Other players running the addon can verify you over addon comms
Public confession
On violation, fires a random fun message from a 7-template pool to:
/say- Guild
- Party / raid
- Every joined custom channel
Plus 4 throttled "blocked attempt" templates (guild + group only).
Peer verification
HCNOPETRIaddon channel comm protocol (STATUS|v1|...andREQ|v1)- Auto-replies to
!nopetri/!petri/!hcnopetriwhispers - Online peer cache (90s window)
- "Verify Players" scrollable list — click any peer to whisper-check them
- Manual whisper-by-name field
Visual touchpoints
- Status chip under your PlayerFrame (green ✓ CLEAN / red ✗ VIOLATED / grey ? UNSIGNED)
- Optional chip under TargetFrame (off by default)
- Tooltip line on any player you mouseover —
NO PETRI Contract: CLEAN/VIOLATED/UNSIGNED+ token - Chat name icons — tiny check / cross next to known players in chat
- Standalone minimap button with status-colored pulse ring
- Themed contract dialog with wax-seal decoration
Options panel
Checkboxes for every toggle:
| Visual | Broadcasts |
|---|---|
| Player frame chip | Announce on sign |
| Target frame chip | Public violation confession |
| Tooltip line | Blocked-attempt announces |
| Chat name icons | Loud screen warnings |
| Auto-reply to whispers |
Slash commands
/nopetri open the contract window
/nopetri sign sign the contract
/nopetri status print current status
/nopetri verify <name> ask another player for their status
/nopetri options open the options panel
/nopetri minimap toggle minimap button
Architecture
| Layer | Files |
|---|---|
| Core | init, state, block, detect, contract, comm, announce, slash, boot |
| UI | theme, window, contract_dialog, minimap, badges, options |
- Pure Lua, no Ace3, no LibDBIcon — fully self-contained
- SavedVariables:
HC_NoPetriDB(account, peer cache + minimap state) andHC_NoPetriCharDB(per-character contract + status + settings) - TOC:
Interface 11500–11507(all current Classic Era patch levels) - Tooltip integration uses both legacy
OnTooltipSetUnitand modernTooltipDataProcessorfor forward compatibility - Visual style: class-colored hairline borders, dark backdrops, ReadyCheck texture icons, gradient title bars