Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- CHEAT LIST MENU SCRIPT (v.1.1)
- -- MENU SETUP
- if not SimpleMenu then
- SimpleMenu = class()
- function SimpleMenu:init(title, message, options)
- self.dialog_data = { title = title, text = message, button_list = {},
- id = tostring(math.random(0,0xFFFFFFFF)) }
- self.visible = false
- for _,opt in ipairs(options) do
- local elem = {}
- elem.text = opt.text
- opt.data = opt.data or nil
- opt.callback = opt.callback or nil
- elem.callback_func = callback(self, self, "_do_callback",
- { data = opt.data,
- callback = opt.callback})
- elem.cancel_button = opt.is_cancel_button or false
- if opt.is_focused_button then
- self.dialog_data.focus_button = #self.dialog_data.button_list+1
- end
- table.insert(self.dialog_data.button_list, elem)
- end
- return self
- end
- function SimpleMenu:_do_callback(info)
- if info.callback then
- if info.data then
- info.callback(info.data)
- else
- info.callback()
- end
- end
- self.visible = false
- end
- function SimpleMenu:show()
- if self.visible then
- return
- end
- self.visible = true
- managers.system_menu:show(self.dialog_data)
- end
- function SimpleMenu:hide()
- if self.visible then
- managers.system_menu:close(self.dialog_data.id)
- self.visible = false
- return
- end
- end
- end
- patched_update_input = patched_update_input or function (self, t, dt )
- if self._data.no_buttons then
- return
- end
- local dir, move_time
- local move = self._controller:get_input_axis( "menu_move" )
- if( self._controller:get_input_bool( "menu_down" )) then
- dir = 1
- elseif( self._controller:get_input_bool( "menu_up" )) then
- dir = -1
- end
- if dir == nil then
- if move.y > self.MOVE_AXIS_LIMIT then
- dir = 1
- elseif move.y < -self.MOVE_AXIS_LIMIT then
- dir = -1
- end
- end
- if dir ~= nil then
- if( ( self._move_button_dir == dir ) and self._move_button_time and ( t < self._move_button_time + self.MOVE_AXIS_DELAY ) ) then
- move_time = self._move_button_time or t
- else
- self._panel_script:change_focus_button( dir )
- move_time = t
- end
- end
- self._move_button_dir = dir
- self._move_button_time = move_time
- local scroll = self._controller:get_input_axis( "menu_scroll" )
- -- local sdir
- if( scroll.y > self.MOVE_AXIS_LIMIT ) then
- self._panel_script:scroll_up()
- -- sdir = 1
- elseif( scroll.y < -self.MOVE_AXIS_LIMIT ) then
- self._panel_script:scroll_down()
- -- sdir = -1
- end
- end
- managers.system_menu.DIALOG_CLASS.update_input = patched_update_input
- managers.system_menu.GENERIC_DIALOG_CLASS.update_input = patched_update_input
- ---------------------
- -- GLOBAL SETTINGS --
- ---------------------
- -- CALL MENU
- function openmenu(menu)
- menu:show()
- end
- ----------------------
- -- OUTGAME SETTINGS --
- ----------------------
- ---------------------
- -- INGAME SETTINGS --
- ---------------------
- ------------------
- -- MENU CONTENT --
- ------------------
- showkbmenu = function()
- openmenu(kbmenu)
- end
- showkbmenu2 = function()
- openmenu(kbmenutwo)
- end
- showkbmenu3 = function()
- openmenu(kbmenuthree)
- end
- showkbmenu4 = function()
- openmenu(kbmenufour)
- end
- shownpmenu = function()
- openmenu(npmenu)
- end
- shownpmenu2 = function()
- openmenu(npmenu2)
- end
- showmousemenu = function()
- openmenu(mousemenu)
- end
- returnhome = function()
- openmenu(clistrootmenu)
- end
- evacgtfo = function()
- SimpleMenu:hide()
- end
- ppt4pd2so = ppt4pd2so or function()
- Steam:overlay_activate( "url", "http://ppt4pd2.tumblr.com/" )
- end
- -- KEYBOARD MENU 1 - F Keys
- kbopt = {
- { text = "Main menu", callback = returnhome },
- { text = "", is_cancel_button = true },
- { text = "Previous", callback = showmousemenu },
- { text = "Next", callback = showkbmenu2 },
- }
- kbmenu = kbmenu or SimpleMenu:new("\[Cheat List - Keyboard 1 - F Keys\]", "F1 - Cheat List\nF2 - Godmode Toggle\nF3 - Weapon Menu\nF4 - Dexterity Menu\nF5 - Infinite All\nF6 - Evil Mastermind\nF7 - Ghost Recon\nF8 - Money Menu\nF9 - Skill Menu\nF10 - Level Menu\nF11 - Inventory Menu\nF12 - AS", kbopt)
- -- KEYBOARD MENU 2 - Letter Keys
- kbopt2 = {
- { text = "Main menu", callback = returnhome },
- { text = "", is_cancel_button = true },
- { text = "Previous", callback = showkbmenu },
- { text = "Next", callback = showkbmenu3 },
- }
- kbmenutwo = kbmenutwo or SimpleMenu:new("\[Cheat List - Keyboard 2 - Letter Keys\]", "X - X-Ray Vision Toggle\nY - Ammo and Health Refill\nQ - FOV Enhancer in Ghost Recon\nP - Setup Deathmatch", kbopt2)
- -- KEYBOARD MENU 3 - Number Keys
- kbopt3 = {
- { text = "Main menu", callback = returnhome },
- { text = "", is_cancel_button = true },
- { text = "Previous", callback = showkbmenu2 },
- { text = "Next", callback = showkbmenu4 },
- }
- kbmenuthree = kbmenuthree or SimpleMenu:new("\[Cheat List - Keyboard 3 - Number Keys\]", "4 - Ammo Bag\n5 - Medikit\n6 - Sentry Gun\n7 - Ecm\n8 - Tripmine\n9 - Smoke Grenade\n0 - Flash Grenade\nß - Holy Grenade", kbopt3)
- -- KEYBOARD MENU 4 - Extra Keys
- kbopt4 = {
- { text = "Main menu", callback = returnhome },
- { text = "", is_cancel_button = true },
- { text = "Previous", callback = showkbmenu3 },
- { text = "Next", callback = shownpmenu },
- }
- kbmenufour = kbmenufour or SimpleMenu:new("\[Cheat List - Keyboard 4 - Extra Keys\]", "Insert - Overkill\nDelete - Normalizer\nHome - Spawn Menu\nEnd - Hover\nPageup - Instant Win\nPagedown - Instant Lose\nEnter - Dlc.lua\n'-' - Remove Lego\n'+' - Add Lego\n',' - Ascend\n'.' - Descend", kbopt4)
- -- Numeric keypad Keys
- npopt = {
- { text = "Main menu", callback = returnhome },
- { text = "", is_cancel_button = true },
- { text = "Previous", callback = showkbmenu2 },
- { text = "Next", callback = shownpmenu2 },
- }
- npmenu = npmenu or SimpleMenu:new("\[Cheat List - Numeric keypad Keys\]", "Numpad 1 - Troll\nNumpad 2 - Goofy Goober\nNumpad 3 - Bender\nNumpad 4 - Bouncing Betty\nNumpad 5 - Stairway to Heaven\nNumpad 6 - Lego Menu\nNumpad 7 - Terminator\nNumpad 8 - Gifthunter\nNumpad 9 - Driv3r\nNumpad 0 - Job Menu\nNumpad '/' - Media Module\nNumpad '*' - Pvp\nNumpad '-' - Character Menu\nNumpad '+' - Mod Menu\nNumpad ',' - Costum Script", npopt)
- -- Arrow Keys
- npopt2 = {
- { text = "Main menu", callback = returnhome },
- { text = "", is_cancel_button = true },
- { text = "Previous", callback = shownpmenu },
- { text = "Next", callback = showmousemenu },
- }
- npmenu2 = npmenu2 or SimpleMenu:new("\[Cheat List - Arrow Keys\]", "UPArrow - Drive Vehicle forward\nDownArrow - Drive Vehicle backwards\nLeftArrow - Turn Vehicle left\nRightArrow - Turn Vehicle Right", npopt2)
- -- MOUSE MENU
- mouseopt = {
- { text = "Main menu", callback = returnhome },
- { text = "", is_cancel_button = true },
- { text = "Previous", callback = shownpmenu2 },
- { text = "Next", callback = showkbmenu },
- }
- mousemenu = mousemenu or SimpleMenu:new("\[Cheat List - Mouse Keys\]", "MiddleMouseButton - Slow Mo\nMouseButton4 - Teleport", mouseopt)
- --ROOT MENU
- clistroot = {
- { text = "F Keys", callback = showkbmenu },
- { text = "Letter Keys", callback = showkbmenu2 },
- { text = "Number Keys", callback = showkbmenu3 },
- { text = "Extra Keys", callback = showkbmenu4 },
- { text = "Numeric keypad Keys", callback = shownpmenu },
- { text = "Arrow Keys", callback = shownpmenu2 },
- { text = "Mouse Keys", callback = showmousemenu },
- {},
- { text = "Pirate Perfection - Tumblr", callback = ppt4pd2so },
- { text = "", is_cancel_button = true },
- { text = "Exit", callback = evacgtfo },
- }
- if not clistrootmenu then
- clistrootmenu = SimpleMenu:new("CHEAT LIST", "Dementia friendly.", clistroot)
- end
- clistrootmenu:show()
- io.stdout:write("PLAY trainer/wav/effects/captainslog.wav\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement