added support for more minigames

you can now utilize all of ps-ui, bl_ui, and glow_minigames
This commit is contained in:
Mustache Dom committed 2024-10-02 01:00:46 -07:00
1 parent 6e7fd5441f
commit 2d3ca8a361
2 files changed
+61 -13

No files matched your search

+55 -11
View File
@@ -53,16 +53,40 @@ function progressbar(text, time, anim)
end
end
function minigame(num1, num2)
function minigame(tier)
local time = 0
local game = Config.Minigames
if minigametype == 'ps' then
if minigametype == 'ps_circle' then
local check
exports['ps-ui']:Circle(function(success)
check = success
end, game['ps'].amount, game['ps'].speed)
end, game['ps_circle'].amount, game['ps_circle'].speed)
return check
elseif minigametype == 'ps_maze' then
local check
exports['ps-ui']:Maze(function(success)
check = success
end, game['ps_maze'].timelimit)
return check
elseif minigametype == 'ps_scrambler' then
local check
exports['ps-ui']:Scrambler(function(success)
check = success
end, game['ps_scrambler'].type, game['ps_scrambler'].time, game['ps_scrambler'].mirrored)
return check
elseif minigametype == 'ps_var' then
local check
exports['ps-ui']:VarHack(function(success)
check = success
end, game['ps_var'].numBlocks, game['ps_var'].time)
return check
elseif minigametype == 'ps_thermite' then
local check
exports['ps-ui']:Thermite(function(success)
check = success
end, game['ps_thermite'].time, game['ps_thermite'].gridsize, game['ps_thermite'].incorrect)
return check
elseif minigametype == 'ox' then
local success = lib.skillCheck(game['ox'], {'1', '2', '3', '4'})
return success
elseif minigametype == 'blcirprog' then
@@ -87,25 +111,45 @@ function minigame(num1, num2)
local success = exports.bl_ui:CircleShake(game['blcircleshake'].amount, game['blcircleshake'].difficulty, game['blcircleshake'].stages)
return success
elseif minigametype == 'glpath' then
local settings = {gridSize = game['glpath'].gridSize, lives = game['glpath'].lives, timeLimit = game['glpath'].timelimit}
local successes = false
exports["glow_minigames"]:StartMinigame(function(success)
if success then return true else return false end
end, "path", game['glpath'])
if success then successes = true else successes = false end
end, "path", settings)
repeat
Wait(1000)
time = time + 1
until successes or time == 100
if successes then return true end
elseif minigametype == 'glspot' then
local settings = {gridSize = game['glspot'].gridSize, timeLimit = game['glspot'].gridSize, charSet = game['glspot'].charSet, required = game['glspot'].required}
local successes = false
exports["glow_minigames"]:StartMinigame(function(success)
if success then return true else return false end
end, "spot", game['glspot'])
if success then successes = true else successes = false end
end, "spot", settings)
repeat
Wait(1000)
time = time + 1
until successes or time == 100
elseif minigametype == 'glmath' then
local settings = {timeLimit = game['glmath'].timeLimit}
local successes = false
exports["glow_minigames"]:StartMinigame(function(success)
if success then return true else return false end
end, "math", game['glmath'])
if success then successes = true else successes = false end
end, "math", settings)
repeat
Wait(1000)
time = time + 1
until successes or time == 100
elseif minigametype == 'none' then
return true
else
print"^1 SCRIPT ERROR: Md-DRUGS set your minigame with one of the options!"
print"^1 SCRIPT ERROR: Md-Drugs set your minigame with one of the options!"
end
end
function Notify(text, type)
if notifytype =='ox' then
lib.notify({title = text, type = type})
+6 -2
View File
@@ -18,7 +18,11 @@ Config.Phone = 'qb' -- either 'qb' or 'yflip' or 'qs'
Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty'
Config.Minigames = {
ps = { amount = 2, speed = 8,},
ps_circle = { amount = 2, speed = 8,},
ps_maze = { timelimit = 15},
ps_scrambler = { type = 'numeric', time = 15, mirrored = 0},
ps_var = { numBlocks = 5, time = 10},
ps_thermite = { time = 10, gridsize = 5, incorrect = 3},
ox = { 'easy', 'easy'}, --easy medium or hard each one corresponds to how many skillchecks and the difficulty
blcirprog = { amount = 2, speed = 50}, -- speed = 1-100
blprog = { amount = 1, speed = 50}, -- speed = 1-100
@@ -27,7 +31,7 @@ Config.Minigames = {
blnumberslide = { amount = 1, difficulty = 50, keynumbers = 3},
blrapidlines = { amount = 1, difficulty = 50, numberofline = 3},
blcircleshake = { amount = 1, difficulty = 50, stages = 3},
glpath = { gridsize = 10, lives = 3, timelimit = 999999},
glpath = { gridSize = 19, lives = 3, timelimit = 10000},
glspot = {gridSize = 6, timeLimit = 999999, charSet = "alphabet", required = 10},
glmath = {timeLimit = 300000},