The Wiki for Tale 5 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

Difference between revisions of "User:Anka/Macros/Multi-Tool"

From ATITD5
Jump to navigationJump to search
 
Line 3: Line 3:
 
// v.5
 
// v.5
 
//
 
//
//  This macro does Digs, Limestone, Dirt, Loom, Hackling Rake.
+
//  This macro does Digs, Limestone, Dirt, Loom, Hackling Rake. You MUST have
//  This macro also does not work on timers and will watch your End, Str and Con
+
// your skills tab activated and make sure stats are visable. This macro also
//  timers.  I have not fully tested it in all resolutions but I dont think that
+
//  does not work on timers and will watch your End, Str and Con timers.  I
 +
//  have not fully tested it in all resolutions but I dont think that
 
//  resolution will be an issue at all.  Chat me if you have problems.
 
//  resolution will be an issue at all.  Chat me if you have problems.
 
//
 
//

Latest revision as of 18:28, 20 February 2011

//  Multi Tool updated from Tale 3
// v.5
//
//  This macro does Digs, Limestone, Dirt, Loom, Hackling Rake.  You MUST have
//  your skills tab activated and make sure stats are visable.  This macro also
//  does not work on timers and will watch your End, Str and Con timers.  I
//  have not fully tested it in all resolutions but I dont think that
//  resolution will be an issue at all.  Chat me if you have problems.
//
//INSTRUCTIONS
//
//
//  Coconuts - Have coconuts in inventory.  Pin the kitchen window in the
//             top left corner.  Place mouse pointer over Seperate coconut
//             meat and coconut water.  Alt tab to ACTool(Don't move the
//             mouse) and press F2.
//
//  Dig  -   Pin the "Dig Deeper" window where ever you want it.
//           Put the mouse pointer over the "Dig Deeper" button.
//           Alt tab to ACTool(Don't move the mouse) and press F2
//           It will then dig whenever the END timer expires.
//
// Dirt -    Have a shovel in inventory and stand over dirt.
//           Put the mouse pointer over the dirt icon.  Alt tab
//           to ACTool(Don't move the mouse) and press F2.
//
// Hackling Rake - Have rotten flax on hand
//                 Make sure rake is on step 1
//                 Pin Rake window to top left corner.
//                 Put mouse pointer over step 1 option.
//                 Alt tab to ACTool (Don't touch mouse) Press F2
//
// Hookah - Simple macro that will smoke the hookah for you.  Put the 
//          window any place you want it.  Place pointer over the smoke
//          option.  Alt tab to ACTool(Don't move the mouse) and press F2.
//          It will keep trying to smoke even when the hookah is empty.
//          This one is good for those stubborn herbs.  I'll add some
//          changes to this one at a later time.
//
// Limestone - Have tools needed for collecting limestone in inventory
//             and stand over limestone.  Put the mouse pointer over the
//             limestone icon.  Alt tab to ACTool(Don't move the mouse)
//             and press F2.
//
// Loom - Load the loom
//        Pin Loom window to top left corner.
//        Put the mouse pointer over the item you want to create.
//        Alt tab to windows (Dont touch mouse) Press F2
//
// Anka

Constants
  Rounds = 0
  XOrig = 0
  YOrig = 0
  MouseX = 0
  MouseY = 0
  Button = 0
  TimerX = 0
  TimerY = 0
  Timer = 0
  FTimer = 0
  Job = 0
  Num = 0
  Done = 0
  SDelay = 100
  MDelay = 250
End

Object End
  0=0,0|0=1,0|0=2,0|0=3,0|0=4,0|
  0=0,1|0=0,2|0=0,3|
  0=0,4|0=1,4|0=2,4|0=3,4|0=4,4|
  0=0,5|0=0,6|0=0,7|
  0=0,8|0=1,8|0=2,8|0=3,8|0=4,8|
End Object

Object Focus
  0=0,0|0=1,0|0=2,0|0=3,0|0=4,0|
  0=0,1|0=0,2|0=0,3|
  0=0,4|0=1,4|0=2,4|0=3,4|0=4,4|
  0=0,5|0=0,6|0=0,7|0=0,8|
End Object

Object Con
  0=3,0|0=4,0|0=1,1|0=0,3|0=0,4|
  0=0,5|0=1,7|0=3,8|0=4,8|
End Object

Object Str
  0=2,0|0=3,0|0=4,0|0=9,0|
  0=9,1|
  0=0,2|0=8,2|0=9,2|0=10,2|
  0=9,3|
  0=2,4|0=3,4|0=4,4|0=9,4|
  0=9,5|0=6,6|0=9,6|0=9,7|
  0=2,8|0=3,8|0=4,8|0=10,8|
End Object

SetConst MouseX = {MouseX}
SetConst MouseY = {MouseY}

Form MultiTool, Choose your Job
  ed1=EditBox:Rounds:1
  ed2=Combobox:Which Job?:Coconuts,Dig,Dirt,Hackling,Hookah,Limestone,Loom
end

FormLoad MultiTool, MultiTool.frm

if ShowForm MultiTool
  Set Rounds = MultiTool[ed1]
  Case MultiTool[ed2]
  When Hookah
    SetConst Timer = Con
  When Coconuts
    setconst Timer = Str
  Else
    Setconst Timer = End
  End
else
  Stop
end
FormSave MultiTool, MultiTool.frm

Keydown @{Tab} 100
Delay 2000

Call FindTimer
Loop $Rounds
  Case MultiTool[ed2]
    timestamp MultiTool[ed2]
  When Hackling
    Call Hackling
  Else
    Call Job
  End
  Call Checkforlostfocus
End

Procedure Job
  SetConst Button = 0
  While $Button = 0
    LoadRGB $TimerX, $TimerY
    if {rgbred} < 255
      SetConst XOrig = {mousex}
      SetConst YOrig = {mousey}
      MousePos $MouseX, $MouseY
      Delay $MDelay
      Rightclick
      Delay $MDelay
      Mousepos $XOrig, $YOrig
      SetConst Button = 1
    End
  End
End

Procedure Hackling
  Loop Num = 1 to 4
    SetConst Button = 0
    While $Button = 0
      LoadRGB $TimerX, $TimerY
      if {rgbred} < 255
        SetConst XOrig = {mousex}
        SetConst YOrig = {mousey}
        If $Num < 2 or $Num > 3
          MousePos $MouseX, $MouseY
          Delay $MDelay
          Rightclick
          Delay $MDelay
          Mousepos $XOrig, $YOrig
          SetConst Button = 1
        Else
          Compute MouseY = $MouseY + 15
          MousePos $MouseX, $MouseY
          Delay $MDelay
          Rightclick
          Delay $MDelay
          Mousepos $XOrig, $YOrig
          Compute MouseY = $MouseY - 15
          SetConst Button = 1
        End  
      End  
    End
  End
End

Procedure FindTimer
  Compute TimerX = 14
  Compute TimerY = {screenheight} - 10
  SetConst Done = 0
  While $Done = 0
    IsObject $Timer at $TimerX, $TimerY
      SetConst TimerX = $TimerX
      SetConst TimerY = $TimerY
      if $FTimer = 0
        Case $Timer
        when Str
          Compute TimerY = $TimerY + 2
        When Con
          Compute TimerY = $TimerY + 4
        end
      End
      SetConst FTimer = 1
      SetConst Done = 1
    Else
      Compute $TimerY = $TimerY - 1
    End
  End
End

Procedure CheckforLostFocus
  if {activewindow} contains eGenesis
    Exit
  Else
    Stop
  End
End

Bell Asterisk
//Written with ACTool 5.3.0 by Anka