Skip to content
Mahtra edited this page Nov 27, 2026 · 1 revision

Festival Raffles

Two Lich triggers that play a festival raffle for you (the idea comes from Bombcat's raffle script). The first tears a ticket off the counter when the attendant puts out a new roll. The second hands the ticket in when the drawing ends: a winning ticket is swapped for the prize, and a losing one goes in the trash (the bucket of gloop). The game takes winning tickets at the counter after "Congratulations to all our winners!", so the triggers don't need to watch the result board.

lich_triggers:
  # A new roll of tickets is out: tear one off.
  raffle_ticket:
    triggers:
      - ^(?:Raffle )?Attendant \w+ places a roll of raffle tickets out on a small counter
    responses:
      - get ticket on counter
  # The drawing is over: hand the ticket in. A winning ticket is swapped for
  # the prize; a losing one goes in the trash (the bucket of gloop).
  raffle_finished:
    triggers:
      - '^(?:Raffle )?Attendant \w+ exclaims, "Congratulations to all our winners!'
    responses:
      - '=eval {if DRCI.in_hands?("raffle ticket") && DRC.bput("put my raffle ticket on counter", /isn.t a winning ticket/, /takes the ticket and hands you/, /What were you referring to/) =~ /winning ticket/; DRCI.dispose_trash("raffle ticket"); end}'

A few details worth copying into your own triggers:

  • Both trigger patterns start with ^, so another player's speech, whisper or ESP repeating the attendant's words can't set them off.
  • The responses say raffle ticket, not just ticket, so a repair ticket in your hands is never handed in or thrown away.
  • The roll going back in ("places a roll of raffle tickets in a small counter") closes picks; the trigger only matches "out on".

If you'd rather not set up triggers, the raffle script (dr-scripts #8159) does the same, warns you when both hands are full, and stops after the last raffle of the evening.

Clone this wiki locally