NAME = "Rock5s Stanalone Multihacks" VERSION = "0.45b1" include("addresses.lua") include("settings.lua") include("functions.lua") include("objectlist.lua") local HackState = {} -- Will hold the state of the hacks function exitCallback() printf("\n") setupConsole("reset") end atExit(exitCallback) atError(exitCallback) function printoutupdate() if not isInGame() then return end local function namekey(name,value) local tp = type(value) if tp == "boolean" then if value == true then return string.format("|lightgreen|%s ",name) else return string.format("|lightred|%s ",name) end else return string.format("|yellow|%s: %-5s ",name,tostring(value)) end end local speed = getSpeed() if not speed then return end if HackState.Speed == true then speed = string.format("|lightgreen|%.1f", speed) else speed = string.format("|lightred|%.1f", speed) end cprintf_ex(namekey("MobStealth",HackState.Show_Stealthed).. namekey("Fly",HackState.Fly).. namekey("Wall",HackState.Wall).. namekey("NoFall",HackState.NoFall).. namekey("MountSize",HackState.MountSize).. namekey("Speed",speed).. "|lightgreen|("..getKeyName(hotkeys.HELP.key):sub(1,7)..") Help.\r") end local helpShowing = false function showhelp() if helpShowing then printf("\n") setupConsole(80,1) else setupConsole(80,14) cprintf(cli.lightgreen,"\n\n Rock5s Multihack v%s\n\n",VERSION) cprintf_ex("|yellow|Toggle mob stealth\t|white|%s\n",getKeyName(hotkeys.SEE_STEALTH_MOBS.key)) cprintf_ex("|yellow|Toggle fly\t\t|white|%s\n",getKeyName(hotkeys.FLY_TOGGLE.key)) cprintf_ex("|yellow|Toggle wall\t\t|white|%s\n",getKeyName(hotkeys.WALL_TOGGLE.key)) cprintf_ex("|yellow|Toggle nofall\t\t|white|%s\n",getKeyName(hotkeys.NOFALL_TOGGLE.key)) cprintf_ex("|yellow|Toggle mount size\t|white|%s\n",getKeyName(hotkeys.MOUNTSIZE_TOGGLE.key)) cprintf_ex("|yellow|Toggle speed\t\t|white|%s\n",getKeyName(hotkeys.SPEED_TOGGLE.key)) cprintf_ex("|yellow|Suicide\t\t\t|white|%s\n",getKeyName(hotkeys.SUICIDE.key)) cprintf_ex("|yellow|Teleport Left/Right\t|white|%s,%s\n",getKeyName(hotkeys.TELEPORT_LEFT.key),getKeyName(hotkeys.TELEPORT_RIGHT.key)) cprintf_ex("|yellow|Teleport Back/Forward\t|white|%s,%s\n",getKeyName(hotkeys.TELEPORT_BACK.key),getKeyName(hotkeys.TELEPORT_FORWARD.key)) cprintf_ex("|yellow|Teleport Up/Down\t|white|%s,%s\n",getKeyName(hotkeys.TELEPORT_UP.key),getKeyName(hotkeys.TELEPORT_DOWN.key)) print() end helpShowing = not helpShowing end local oldW, oldH, oldX, oldY if getConsoleAttributes then oldW, oldH, oldX, oldY = getConsoleAttributes() end function setupConsole(w,h) if setConsoleAttributes then if w == "reset" then setConsoleAttributes(oldW,oldH) else local tmpW,tmpH, tmpX,tmpY = getConsoleAttributes() if w > tmpX then setConsoleAttributes(tmpW,tmpH,w,tmpY) end yrest(100) setConsoleAttributes(w,h) end end end function main() attach(getWin()) if( not checkExecutableCompatible() ) then printf("Addresses seem off, trying to update.\n") include("update.lua") if( not checkExecutableCompatible() ) then error("The addresses didn't update, you will have to wait until there is an SVN update that updates the addresses.\n") else cprintf(cli.yellow,"update.lua seems to have worked, addresses.lua has been updated.\n") end end -- Get initial state of hacks HackState = { Fly = isFlying(), Wall = isWallHacked(), Speed = isSpeedFast(), Show_Stealthed = false, NoFall = isNoFallHacked(), MountSize = isMountSizeHacked(), } setWindowName(getHwnd(),NAME.." - " .. VERSION) if setWindowPos then local gameX,gameY = windowRect(getWin()) if gameX == -32000 then -- If minimized gameX,gameY = 0,0 end setWindowPos(getHwnd(), gameX+window_position_X, gameY+window_position_Y,nil, nil, true) end setupConsole(80,1) printoutupdate() -- Check edit box state and reset with Enter if necessary if memoryReadUInt(getProc(), addresses.editBoxHasFocus_address) == 0 then repeat keyboardPress(key.VK_ENTER) yrest(1000) until memoryReadUInt(getProc(), addresses.editBoxHasFocus_address) ~= 0 end local hf_key_pressed, hf_key while(true) do hf_key_pressed = false -- Ignore keypresses is edit box is open if memoryReadUInt(getProc(), addresses.editBoxHasFocus_address) ~= 0 then if keyComboPressed(hotkeys.HELP) then hf_key_pressed = true hf_key = "HELP" end if keyComboPressed(hotkeys.FLY_TOGGLE) then hf_key_pressed = true hf_key = "FLY_TOGGLE" end if keyComboPressed(hotkeys.WALL_TOGGLE) then hf_key_pressed = true hf_key = "WALL_TOGGLE" end if keyComboPressed(hotkeys.SPEED_TOGGLE) then hf_key_pressed = true hf_key = "SPEED_TOGGLE" end if keyComboPressed(hotkeys.SEE_STEALTH_MOBS) then hf_key_pressed = true hf_key = "STEALTH" end if keyComboPressed(hotkeys.NOFALL_TOGGLE) then hf_key_pressed = true hf_key = "NOFALL_TOGGLE" end if keyComboPressed(hotkeys.MOUNTSIZE_TOGGLE) then hf_key_pressed = true hf_key = "MOUNTSIZE" end if keyComboPressed(hotkeys.SUICIDE) then hf_key_pressed = true hf_key = "SUICIDE" end if keyComboPressed(hotkeys.TELEPORT_LEFT) then hf_key_pressed = true hf_key = "LEFT" end if keyComboPressed(hotkeys.TELEPORT_RIGHT) then hf_key_pressed = true hf_key = "RIGHT" end if keyComboPressed(hotkeys.TELEPORT_BACK) then hf_key_pressed = true hf_key = "BACK" end if keyComboPressed(hotkeys.TELEPORT_FORWARD) then hf_key_pressed = true hf_key = "FORWARD" end if keyComboPressed(hotkeys.TELEPORT_UP) then hf_key_pressed = true hf_key = "UP" end if keyComboPressed(hotkeys.TELEPORT_DOWN) then hf_key_pressed = true hf_key = "DOWN" end if( hf_key_pressed == false and -- key released, do the work hf_key ) then -- and key not empty if( hf_key == "HELP" ) then showhelp() end if( hf_key == "FLY_TOGGLE" ) then if not isMounted() then HackState.Fly = flyToggle() end end if( hf_key == "WALL_TOGGLE" ) then HackState.Wall = wallToggle() end if( hf_key == "SPEED_TOGGLE" ) then HackState.Speed = not HackState.Speed speed(HackState.Speed) end if( hf_key == "STEALTH" ) then HackState.Show_Stealthed = not HackState.Show_Stealthed end if( hf_key == "NOFALL_TOGGLE" ) then HackState.NoFall = noFallToggle() end if( hf_key == "MOUNTSIZE" ) then if not isMounted() then -- Do nothing if not mounted end HackState.MountSize = mountSizeToggle(HackState.MountSize) end if( hf_key == "SUICIDE" ) then -- Turn on 'nofall' if not isNoFallHacked() then noFallToggle() HackState.NoFall = true end -- Turn off flying if isFlying() then flyToggle() HackState.Fly = false end printoutupdate() suicide() -- Restore 'nofall' state. noFallToggle() HackState.NoFall = false end hf_key = nil -- clear last pressed key printoutupdate() else if hf_key == "UP" then -- Turn on fly or nofall if isMounted() then if not isNoFallHacked() then HackState.NoFall = true noFallToggle() end else -- not mounted if not isNoFallHacked() and not isFlying() then HackState.Fly = true flyToggle() end end end if hf_key == "LEFT" or hf_key == "RIGHT" or hf_key == "BACK" or hf_key == "FORWARD" or hf_key == "UP" or hf_key == "DOWN" then teleport(hf_key) end end end yrest(100) if maintain_speed and HackState.Speed then speed() end if isMounted() and isFlying() then HackState.Fly = flyToggle() end if HackState.Show_Stealthed == true then showStealthedMobs() end if HackState.MountSize == true and isMounted() and not isMountSizeHacked() then setMountSize(mount_size) end printoutupdate() end end startMacro(main,true)