added support for more minigames
you can now utilize all of ps-ui, bl_ui, and glow_minigames
This commit is contained in:
1 parent
6e7fd5441f
commit
2d3ca8a361
2 files changed
+69
-21
No files matched your search
+63
-19
@@ -53,19 +53,43 @@ function progressbar(text, time, anim)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function minigame(num1, num2)
|
function minigame(tier)
|
||||||
local game = Config.Minigames
|
local time = 0
|
||||||
if minigametype == 'ps' then
|
local game = Config.Minigames
|
||||||
|
if minigametype == 'ps_circle' then
|
||||||
local check
|
local check
|
||||||
exports['ps-ui']:Circle(function(success)
|
exports['ps-ui']:Circle(function(success)
|
||||||
check = success
|
check = success
|
||||||
end, game['ps'].amount, game['ps'].speed)
|
end, game['ps_circle'].amount, game['ps_circle'].speed)
|
||||||
return check
|
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
|
elseif minigametype == 'ox' then
|
||||||
|
|
||||||
local success = lib.skillCheck(game['ox'], {'1', '2', '3', '4'})
|
local success = lib.skillCheck(game['ox'], {'1', '2', '3', '4'})
|
||||||
return success
|
return success
|
||||||
elseif minigametype == 'blcirprog' then
|
elseif minigametype == 'blcirprog' then
|
||||||
local success = exports.bl_ui:CircleProgress(game['blcirprog'].amount, game['blcirprog'].speed)
|
local success = exports.bl_ui:CircleProgress(game['blcirprog'].amount, game['blcirprog'].speed)
|
||||||
return success
|
return success
|
||||||
elseif minigametype == 'blprog' then
|
elseif minigametype == 'blprog' then
|
||||||
@@ -87,23 +111,43 @@ function minigame(num1, num2)
|
|||||||
local success = exports.bl_ui:CircleShake(game['blcircleshake'].amount, game['blcircleshake'].difficulty, game['blcircleshake'].stages)
|
local success = exports.bl_ui:CircleShake(game['blcircleshake'].amount, game['blcircleshake'].difficulty, game['blcircleshake'].stages)
|
||||||
return success
|
return success
|
||||||
elseif minigametype == 'glpath' then
|
elseif minigametype == 'glpath' then
|
||||||
exports["glow_minigames"]:StartMinigame(function(success)
|
local settings = {gridSize = game['glpath'].gridSize, lives = game['glpath'].lives, timeLimit = game['glpath'].timelimit}
|
||||||
if success then return true else return false end
|
local successes = false
|
||||||
end, "path", game['glpath'])
|
exports["glow_minigames"]:StartMinigame(function(success)
|
||||||
|
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
|
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)
|
exports["glow_minigames"]:StartMinigame(function(success)
|
||||||
if success then return true else return false end
|
if success then successes = true else successes = false end
|
||||||
end, "spot", game['glspot'])
|
end, "spot", settings)
|
||||||
|
repeat
|
||||||
|
Wait(1000)
|
||||||
|
time = time + 1
|
||||||
|
until successes or time == 100
|
||||||
elseif minigametype == 'glmath' then
|
elseif minigametype == 'glmath' then
|
||||||
|
local settings = {timeLimit = game['glmath'].timeLimit}
|
||||||
|
local successes = false
|
||||||
exports["glow_minigames"]:StartMinigame(function(success)
|
exports["glow_minigames"]:StartMinigame(function(success)
|
||||||
if success then return true else return false end
|
if success then successes = true else successes = false end
|
||||||
end, "math", game['glmath'])
|
end, "math", settings)
|
||||||
|
repeat
|
||||||
|
Wait(1000)
|
||||||
|
time = time + 1
|
||||||
|
until successes or time == 100
|
||||||
elseif minigametype == 'none' then
|
elseif minigametype == 'none' then
|
||||||
return true
|
return true
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function Notify(text, type)
|
function Notify(text, type)
|
||||||
|
|||||||
+6
-2
@@ -18,7 +18,11 @@ Config.Phone = 'qb' -- either 'qb' or 'yflip' or 'qs'
|
|||||||
Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty'
|
Config.Dispatch = 'ps' -- either 'ps', 'cd', 'core', 'aty'
|
||||||
|
|
||||||
Config.Minigames = {
|
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
|
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
|
blcirprog = { amount = 2, speed = 50}, -- speed = 1-100
|
||||||
blprog = { amount = 1, 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},
|
blnumberslide = { amount = 1, difficulty = 50, keynumbers = 3},
|
||||||
blrapidlines = { amount = 1, difficulty = 50, numberofline = 3},
|
blrapidlines = { amount = 1, difficulty = 50, numberofline = 3},
|
||||||
blcircleshake = { amount = 1, difficulty = 50, stages = 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},
|
glspot = {gridSize = 6, timeLimit = 999999, charSet = "alphabet", required = 10},
|
||||||
glmath = {timeLimit = 300000},
|
glmath = {timeLimit = 300000},
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user