Final Fantasy 3 (Steam) Job Leveling Script

Post gaming related scripts
jagurareklew
Posts: 1
Joined: 08 Jul 2020, 11:33

Final Fantasy 3 (Steam) Job Leveling Script

08 Jul 2020, 11:41

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
; All the above is default script from new

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Script by JaguraReklew
; Heavily modified script Based on Script by JippenFaddoul
; whose script was Based on scripts by Doubtful and Delta Omega
; This script assumes default keybindings.
; Change left, right, and confirm if you're not using the defaults
;
; To use: 
;   1. Level enough so that you can survive a long time AFK
;   2. Find a spot to run left and right with weak enemies. 
;       Inside the starting dungeon is a good choice
;       Setup battle choices for autobattle, like 3 guard, 1 attack	
;   3. Enter a battle, and press the button to turn on auto battle mode
;       or just let the script run and confirm choices in battle if menu memory enabled in game
;   4. Press 'p' to start the script, Press 'o' to toggle script notice windows
;   5. If you want to pause the script, press p, or just click outside the game window
;   6. To resume, press p
;   7. Pause and check every few hours to see where you are, leveling wise (also take time to save)
;   8. When everyone's at level 99 - change jobs and keep going.
;   9. Can also be use for General Leveling Grind, just watch out for your Party being KO'ed
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

global MyPauseToggle := 1 ;global Variable to track script active state
global MyNotice := 1 ; global Variable to decide to display script notices
global IsSplash := 0 ; global Variable to tell if a SplashWindow is on
global Part1 :="Press 'p' to toggle the Script"
global Part2 :="Press ESC to exit Script Mode"
global Part3 :="Press 'o' to toggle these Script Message boxes on/off"
global Part4 :="Must be running FF3 do do anything"

OnExit("ReleaseKeys") ;before exiting script return keys to their upright position

FF3Auto() ; run main script loop

;If FF3 is the active window watch for these hotkey presses
#IfWinActive ahk_exe FF3_Win32.exe
{
  ; Press Esc to force quit the application
  Esc::ExitApp

  ; Press p to toggle the action
  $p::
    if MyPauseToggle = 0
      {
        MyPauseToggle := 1
      }
    else
      {
        MyPauseToggle := 0
        IsSplash := 0
        SplashTextOff
      }
  return  ;end of hotkey p

  ; Press o to toggle the notices from SplashText
  $o::
    if MyNotice = 0
      {
        MyNotice := 1
      }
    else
      {
        MyNotice := 0
        IsSplash := 0
        SplashTextOff
      }
  return  ;end of hotkey o
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
FF3Auto() ;main script loop
{    
  global MyPauseToggle
  global MyNotice
  global IsSplash
  global TheNoticePart1
  global TheNoticePart2
  global TheNoticePart3
  global TheNoticePart4

  SplashTextOn, 400, 100, FF3JobLVing, Press 'p' to start the grind`n%Part2%`n%Part3%`n%Part4%
  IsSplash := 1
  Sleep 3000
  loop
    {
      if MyPauseToggle = 0
        {
          if WinActive("ahk_exe FF3_Win32.exe")
            {
              SplashTextOff ;remove any active script splash text
              IsSplash := 0
              ;Walk to the Right
              Send {Right down}
              Sleep 1000
              Send {Right up}
              Sleep 200

              ;Check to make sure FF3 is still active window or if the script still set to on
              if not WinActive("ahk_exe FF3_Win32.exe") or MyPauseToggle = 1
                continue ;if not the active window, skip the rest of loop
              ;Walk to the Left
              Send {Left down}
              Sleep 1000
              Send {Left up}
              Sleep 200

              ;only confirm after left to avoid targeting your own characters in autobattle mode
              ;this is done to acknowledge after battle messages (also can confirm fight commands)
              ;keep this loop short so as to not waste time while walking
              loop 2
                {
                  ;Check to make sure FF3 is still active window or if the script still set to on
                  if not WinActive("ahk_exe FF3_Win32.exe") or MyPauseToggle = 1
                    continue ;if not the active window, skip the rest of loop
                  Send {Enter down}
                  Sleep 60
                  Send {Enter up}
                  Sleep 200
                }
            }
          else  ;belongs to if WinActive statement aka if FF3 is not the active window
            {
              if MyNotice = 1
                {
                  SplashTextOn, 400, 100, FF3JobLVing, PAUSED by window change press 'p' to resume`n%Part2%`n%Part3%`n%Part4%
                  Sleep 3000
                  SplashTextOff
                  IsSplash := 0
                }
              MyPauseToggle := 1
            }
        } 
      else  ;part of the MyPauseToggle if statement
        {
          if WinActive("ahk_exe FF3_Win32.exe") and MyNotice = 1
            {
              if IsSplash = 0
                {
                  SplashTextOn, 400, 100, FF3JobLVing, %Part1%`n%Part2%`n%Part3%`n%Part4%
                  IsSplash := 1
                }
              Sleep 500
            }
          else
            {
              SplashTextOff
              IsSplash := 0
            }
        }  ;End of MyPauseToggle if bracket
    }  ;End of Loop bracket
  return
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ReleaseKeys()  ;Function to be executed on exit of script
{
  SplashTextOn, , 50, FF3JobLVing, Now Exiting Script Mode for FF3
  ;make sure all pressed keys are released first
  if GetKeyState("Right")
    send {Right up}
  if GetKeyState("Left")
    send {Left up}
  if GetKeyState("Enter")
    send {Enter up}
  Sleep 3000
  SplashTextOff
  return
}
[Mod edit: Codebox fixed.]

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 9 guests