Advertisement
serwitcher

Untitled

Nov 21st, 2019
1,950
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 14.37 KB | None | 0 0
  1. //--------------------------------------------------------------------------------------------------------
  2. // ---------- SCRIPT INITIALIZATION ----------------------------------------------------------------------
  3. //--------------------------------------------------------------------------------------------------------
  4. // 1 - [ScrollLockON Alt Ctrl Shift H] - initialize HKN window
  5. // 2 - [ScrollLockON Alt Ctrl Shift A] - initialize AWT window
  6. // 3 - [ScrollLockOn Alt Ctrl Shift S] - initialize AutoShoot window
  7. // 4 - [ScrollLockOn Alt Ctrl Shift M] - initialize MeleCombat window
  8. //
  9. // -------------------------------------------------------------------------------------------------------
  10. //--------------------------------------------------------------------------------------------------------
  11. <Command AutoExec>
  12.     <SetVar varMainChar "Talndaar">
  13.     <SetVar varAutoShootOn False>
  14.     <SetVar varMeleCombatOn False>
  15.     <DisplayVars>
  16.     <DoHotKey HotKey ScrollLockON Alt Ctrl Shift H>
  17.     <DoHotKey HotKey ScrollLockON Alt Ctrl Shift A>
  18.     <DoHotKey HotKey ScrollLockOn Alt Ctrl Shift S>
  19.     <DoHotKey HotKey ScrollLockOn Alt Ctrl Shift M>
  20.     <SetActiveWindowTracking Off>
  21.  
  22.  
  23. //--------------------------------------------------------------------------------------------------------
  24. // ---------- INITIALIZE HKN BTN -------------------------------------------------------------------------
  25. //--------------------------------------------------------------------------------------------------------
  26. //
  27. // -------------------------------------------------------------------------------------- Alt Ctrl Shift H
  28. //--------------------------------------------------------------------------------------------------------
  29. <HotKey ScrollLockOn Alt Ctrl Shift H>
  30.     <If WinDoesNotExist HKN>
  31.         <CreatePanel HKN 1850 0 70 70>
  32.         <TargetWin HKN>
  33.         <SetPanelDrag on>
  34.         <CreateColoredButton ON 0 0 70 70 0x00FF00 0x0F0F0F ???>
  35.         <AddButtonToPanel ON HKN>
  36.         <SetButtonText ON HKN>
  37.         <TargetWin HKN>      
  38.         <AlwaysOnTop on>
  39.         <RemoveWinFrame>
  40.         <UpdateWin>
  41.     <EndIf>
  42.     <SetButtonColors ON 0x00FF00 0x0F0F0F >
  43.     <SetButtonText ON HKN>
  44.  
  45. //--------------------------------------------------------------------------------------------------------
  46. // ---------- INITIALIZE AWT BTN -------------------------------------------------------------------------
  47. //--------------------------------------------------------------------------------------------------------
  48. //
  49. // -------------------------------------------------------------------------------------- Alt Ctrl Shift A
  50. //--------------------------------------------------------------------------------------------------------
  51. <HotKey ScrollLockOn Alt Ctrl Shift A>
  52.     <If WinDoesNotExist AWT>
  53.         <CreatePanel AWT 1920 0 70 70>
  54.         <TargetWin AWT>
  55.         <CreateColoredButton ACT 0 0 70 70 0x0000FF 0xFFFFFF ???>
  56.         <AddButtonToPanel ACT AWT>
  57.         <SetButtonText ACT AWT>
  58.         <TargetWin AWT>      
  59.         <AlwaysOnTop on>
  60.         <RemoveWinFrame>
  61.         <UpdateWin>
  62.     <endif>
  63.     <SetButtonColors ACT 0xfF0000 0xffFFff >
  64.     <SetButtonText ACT AWT>
  65.  
  66. //--------------------------------------------------------------------------------------------------------
  67. // ---------- INITIALIZE AutoShoot BTN -------------------------------------------------------------------
  68. //--------------------------------------------------------------------------------------------------------
  69. //
  70. // -------------------------------------------------------------------------------------- Alt Ctrl Shift S
  71. //--------------------------------------------------------------------------------------------------------
  72. <HotKey ScrollLockOn Alt Ctrl Shift S>  // creates autoshoot btn
  73.     <If WinDoesNotExist winAutoShoot>
  74.         <CreatePanel panAutoShoot 1780 0 70 70>
  75.         <TargetWin panAutoShoot>
  76.         <SetPanelDrag on>
  77.         <CreateColoredButton btnAutoShoot 0 0 70 70 0x00FF00 0x0F0F0F ???>
  78.         <AddButtonToPanel btnAutoShoot panAutoShoot>
  79.         <SetButtonText btnAutoShoot AutoShoot>
  80.         <TargetWin panAutoShoot>
  81.         <AlwaysOnTop on>
  82.         <RemoveWinFrame>
  83.         <UpdateWin>
  84.     <EndIf>
  85.  
  86. //--------------------------------------------------------------------------------------------------------
  87. // ---------- INITIALIZE MeleCombat BTN ------------------------------------------------------------------
  88. //--------------------------------------------------------------------------------------------------------
  89. //
  90. // -------------------------------------------------------------------------------------------------------
  91. //--------------------------------------------------------------------------------------------------------
  92. <HotKey ScrollLockOn Alt Ctrl Shift M>
  93.     <If WinDoesNotExist winMeleCombat>
  94.         <CreatePanel panMeleCombat 1700 0 70 70>
  95.         <TargetWin panMeleCombat>
  96.         <SetPanelDrag on>
  97.         <CreateColoredButton btnMeleCombat 0 0 70 70 0x00FF00 0x0F0F0F ???>
  98.         <AddButtonToPanel btnMeleCombat panMeleCombat>
  99.         <SetButtonText btnMeleCombat MeleCombat>
  100.         <TargetWin panMeleCombat>
  101.         <AlwaysOnTop on>
  102.         <RemoveWinFrame>
  103.         <UpdateWin>
  104.     <EndIf>
  105.  
  106.  
  107. //--------------------------------------------------------------------------------------------------------
  108. // ---------- varAutoShootON ON - OFF --------------------------------------------------------------------
  109. //--------------------------------------------------------------------------------------------------------
  110. //
  111. // -------------------------------------------------------------------------------------------------------
  112. //--------------------------------------------------------------------------------------------------------
  113. <Template SetvarAutoShootOn>
  114.     <SetVar varAutoShootOn True>
  115.     <SetButtonColors btnAutoShoot 0xfF0000 0xffFFff>
  116. <EndTemplate>
  117. <Template SetVarAutoShootOff>
  118.     <SetVar varAutoShootOn False>
  119.     <SetButtonColors btnAutoShoot 0x00FF00 0x0F0F0F>
  120. <EndTemplate>
  121.  
  122. //--------------------------------------------------------------------------------------------------------
  123. // ---------- varMeleCombatOn ON - OFF -------------------------------------------------------------------
  124. //--------------------------------------------------------------------------------------------------------
  125. //
  126. // --------------------------------------------------------------------------------------------- Button4 Q
  127. //--------------------------------------------------------------------------------------------------------
  128. <Template SetVarMeleCombatOn>
  129.     <SetVar varMeleCombatOn True>
  130.     <SetButtonColors btnMeleCombat 0x00FF00 0x0F0F0F>
  131. <EndTemplate>
  132. <Template SetVarMeleCombatOff>
  133.     <SetVar varMeleCombatOn False>
  134.     <SetButtonColors btnMeleCombat 0xfF0000 0xffFFff>
  135. <EndTemplate>
  136.  
  137. //---------------------------------------------------------------------------------------------------- ALL
  138. // ---------- ASSIST - AutoShoot ON 2 --------------------------------------------------------------------
  139. //--------------------------------------------------------------------------------------------------------
  140. // if varMeleCombatOn is True it will sent "Ctrl Shift 2" to use mele macro
  141. // if varMeleCombatOn is False it will sent "2" to use range macro
  142. //
  143. // -------------------------------------------------------------------------------------------------------
  144. //------------------------------------------------------------------------------------------------------ 2
  145. <HotKey ScrollLockOn 2>
  146.     <DoHotkey HotKey ScrollLockOn Comma>  // assist
  147.     <DoHotkey HotKey ScrollLockOn Button4 1>
  148.     <SendLabel w0,w1,w2,w3,w4>
  149.     <DisplayVars>
  150.     <If varMeleCombatOn is True>
  151.         <Key Ctrl Shift 2>
  152.     <Else>
  153.         <Key 2>
  154.     <EndIf>
  155.  
  156.  
  157. <HotKey ScrollLockOn Button4 1>    
  158.     <If varAutoShootOn is False>
  159.         <ApplyTemplate SetVarAutoShootOn>
  160.         <SendLabel w0,w1,w2,w3,w4>
  161.         <Key Ctrl F8>
  162.         <Key Ctrl Shift 1> // AutoShoot
  163.     <EndIf>
  164.  
  165. //--------------------------------------------------------------------------------------------------------
  166. // ---------- HotKey's for all follow actiwe window on Q and all stops on E ------------------------------
  167. //--------------------------------------------------------------------------------------------------------
  168. //
  169. // -------------------------------------------------------------------------------------------------------
  170. //--------------------------------------------------------------------------------------------------------
  171. <Hotkey ScrollLockOn Q>
  172.     <DoHotKey HotKey ScrollLockOn Period>
  173.    <SendLabel w0, w1, w2, w3, w4>
  174.     <Key Q>
  175.    <DisplayVars>
  176.    <ApplyTemplate SetVarAutoShootOff>
  177.  
  178. <MovementHotkey ScrollLockOn E>
  179.    <If MouseIsOverWindow WoW0>
  180.        <SendLabel w1, w2, w3, w4>
  181.         <Key Down>
  182.    <Else If MouseIsOverWindow WoW1>
  183.        <SendLabel w0, w2, w3, w4>
  184.         <Key Down>
  185.    <Else If MouseIsOverWindow WoW2>
  186.        <SendLabel w0, w1, w3, w4>
  187.         <Key Down>
  188.    <Else If MouseIsOverWindow WoW3>
  189.        <SendLabel w0, w1, w2, w4>
  190.         <Key Down>
  191.    <Else If MouseIsOverWindow WoW4>
  192.        <SendLabel w0, w1, w2, w3>
  193.         <Key Down>
  194.    <EndIf>
  195.  
  196.  
  197. //---------------------------------------------------------------------------------------------------- ALL
  198. // ---------- ASSIST TESTING -----------------------------------------------------------------------------
  199. //--------------------------------------------------------------------------------------------------------
  200. // %1%                      - Main window name.
  201. // w%2%, w%3%, w%4%, w%5%   - Slave windows names.
  202. // %6%                      - Key to be sent.
  203. //--------------------------------------------------------------------------------------------------------
  204. <Template AssistMainWindow>
  205.    <If MouseIsOverWindow %1%>
  206.        <SendPC Local>
  207.        <SendLabel w%2%, w%3%, w%4%, w%5%>
  208.        <Key Ctrl F%6%>
  209.    <EndIf>
  210. <EndTemplate>
  211. <HotKey ScrollLockOn Comma>
  212.    <ApplyTemplate AssistMainWindow WoW0 1 2 3 4 8>
  213.    <ApplyTemplate AssistMainWindow WoW1 2 3 4 0 9>
  214.    <ApplyTemplate AssistMainWindow WoW2 3 4 0 1 10>
  215.    <ApplyTemplate AssistMainWindow WoW3 4 0 1 2 11>
  216.    <ApplyTemplate AssistMainWindow WoW4 0 1 2 3 12>
  217.  
  218. //---------------------------------------------------------------------------------------------------- ALL
  219. // ---------- FOLLOW TESTING -----------------------------------------------------------------------------
  220. //--------------------------------------------------------------------------------------------------------
  221. //
  222. // ------------------------------------------------------------------------------------------------ Period
  223. //--------------------------------------------------------------------------------------------------------
  224. <Template FollowActiveWindow>
  225.    <If MouseIsOverWindow %1%>
  226.        <SendLabel w%2%, w%3%, w%4%, w%5%>
  227.        <Key Shift F%6%>
  228.    <EndIf>
  229. <EndTemplate>
  230. <HotKey ScrollLockOn Period>
  231.    <ApplyTemplate FollowActiveWindow WoW0 1 2 3 4 8>
  232.    <ApplyTemplate FollowActiveWindow WoW1 0 2 3 4 9>
  233.    <ApplyTemplate FollowActiveWindow WoW2 0 1 3 4 10>
  234.    <ApplyTemplate FollowActiveWindow WoW3 0 1 2 4 11>
  235.    <ApplyTemplate FollowActiveWindow WoW4 0 1 2 3 12>
  236.  
  237. //---------------------------------------------------------------------------------------------------- ALL
  238. // ---------- MAKE A LINE TESTING ------------------------------------------------------------------------
  239. //--------------------------------------------------------------------------------------------------------
  240. // %1%                  - Main window name.
  241. // w%2% w%4% w%6% w%8%  - Slave windows names.
  242. // F%3% F%5% F%7% F%9%  - Keys to be sent.
  243. //
  244. // --------------------------------------------------------------------------------------------------- F12
  245. //--------------------------------------------------------------------------------------------------------
  246. <Template MakeALine>
  247.    <if MouseIsOverWindow %1%>
  248.        <SendLabel w%2%>
  249.        <Key shift F%3%> // Follow 1
  250.        <SendLabel w%4%>
  251.        <Key shift F%5%> // Follow 2
  252.        <SendLabel w%6%>
  253.        <Key shift F%7%> // Follow 3
  254.        <SendLabel w%8%>
  255.        <Key shift F%9%> // Follow 4
  256.    <endif>
  257. <EndTemplate>
  258. <HotKey ScrollLockOn F12>
  259.    <ApplyTemplate MakeALine WoW0 1 8 2 9 3 10 4 11>  //1<2<3<4<5
  260.    <ApplyTemplate MakeALine WoW1 2 9 3 10 4 11 0 12> //2<3<4<5<1
  261.    <ApplyTemplate MakeALine WoW2 3 10 4 11 0 12 1 8> //3<4<5<1<2
  262.    <ApplyTemplate MakeALine WoW3 4 11 0 12 1 8 2 9>  //4<5<1<2<3
  263.    <ApplyTemplate MakeALine WoW4 0 12 1 8 2 9 3 10>  //5<1<2<3<4
  264.  
  265.  
  266.  
  267. //--------------------------------------------------------------------------------------------------------
  268. // ---------- Template - windows switching ---------------------------------------------------------------
  269. //--------------------------------------------------------------------------------------------------------
  270. // TESTING
  271. //
  272. // -------------------------------------------------------------------------------------------------------
  273. //--------------------------------------------------------------------------------------------------------
  274. <Template SwitchWindows>
  275.    <Hotkey ScrollLockON %1%>
  276.    <SaveMousePos>
  277.    <ResizeAndPosition %2% %3% %4% %5% %6%>
  278.    <TargetWin WoW%2%>
  279.        <SetActiveWin>
  280.        //<DoHotkey Hotkey ScrollLockON Period>
  281.        <SendLabel w0, w1, w2, w3, w4>
  282.        <Key End>
  283.        <Key End>
  284.    <RestoreMousePos>
  285.    <SetVar varMainChar %7%>
  286. <EndTemplate>
  287.  
  288. //--------------------------------------------------------------------------------------------------------
  289. // ---------- WINDOWS SWITCHING --------------------------------------------------------------------------
  290. //--------------------------------------------------------------------------------------------------------
  291. // Switching windows and setting varMainChar to given char name.
  292. // -------------------------------------------------------------------------------------------------------
  293. //--------------------------------------------------------------------------------------------------------
  294. <ApplyTemplate SwitchWindows NumpadEnd 0 1 2 3 4 "Talndaar">
  295. <ApplyTemplate SwitchWindows NumpadDown 1 0 2 3 4 "Enthaan">
  296. <ApplyTemplate SwitchWindows NumpadPgDn 2 1 0 3 4 "Dalhalan">
  297. <ApplyTemplate SwitchWindows NumpadLeft 3 1 2 0 4 "Endrannul">
  298. <ApplyTemplate SwitchWindows Clear 4 1 2 3 0 "Mythalleath">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement