Modules
Minigames

Client Exports

Start Lockpick Minigame

-- return: table - result of the minigame
-- options: table? - configuration options { zones, speed, zoneSize }
-- callback: function? - optional callback, receives result table
 
exports["bablo-pettycrimes"]:startLockPick(options, callback)
 
-- Result table:
-- {
--   success   = bool, -- true if all zones were hit
--   cancelled = bool  -- true if player cancelled
-- }
 
-- Example:
exports["bablo-pettycrimes"]:startLockPick({
  zones    = 4,    -- number of zones to hit (default: 4)
  speed    = 0.35, -- sweep bar speed (default: 0.35)
  zoneSize = 0.08  -- size of each zone (default: 0.08)
}, function(result)
  if result.success then
    -- lockpick succeeded
  end
end)

Start Match Pairs Minigame

-- return: table - result of the minigame
-- options: table? - configuration options { pairs, timeLimit, gridCols, gridRows, tilesPerPair }
-- callback: function? - optional callback, receives result table
 
exports["bablo-pettycrimes"]:startMatchPairs(options, callback)
 
-- Result table:
-- {
--   success    = bool,   -- true if all pairs found in time
--   pairsFound = number, -- number of pairs successfully matched
--   cancelled  = bool    -- true if player cancelled
-- }
 
-- Example:
exports["bablo-pettycrimes"]:startMatchPairs({
  pairs        = 5,  -- number of pairs to find (default: 5)
  timeLimit    = 30, -- time limit in seconds (default: 30)
  gridCols     = 10, -- grid columns (default: 10)
  gridRows     = 10, -- grid rows (default: 10)
  tilesPerPair = 4   -- tiles per pair (default: 4)
}, function(result)
  if result.success then
    -- all pairs matched
  end
end)