Guest User

Untitled

a guest
Jun 13th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.39 KB | None | 0 0
  1. #cs
  2. features:
  3. energy management
  4. one button attack, excluding backstab and project
  5. auto steroids and taunt
  6. restealth after/between combat
  7. auto potion
  8. auto vanish, with conditional cc break and dot cleanse
  9. auto backstab for pve
  10. keep sprint on
  11. destealth on mount and meditate
  12. automatic interrupt selection, including proximity based knockback
  13. reticle for targeting by center screen
  14. resolve protection for cc
  15. slash doesnt open ticket
  16. #ce
  17.  
  18. global $x=0
  19. global $interrupt=0
  20. global $hotkeytoggle=1
  21. global $typing=0
  22. global $togglehotkeys=0
  23. global $executerange=0
  24. global $modetoggle=1
  25. global $windowchanged=0
  26. global $potency=0
  27. global $snapsafety=1001
  28. global $snapsafety2=1001
  29. global $vanishing=0
  30.  
  31. ;start client if it isnt open yet
  32. if not winexists("Star Wars: The Old Republic") Then
  33. run("C:\Program Files (x86)\Electronic Arts\BioWare\Star Wars-The Old Republic\launcher.exe","C:\Program Files (x86)\Electronic Arts\BioWare\Star Wars-The Old Republic",@SW_MAXIMIZE)
  34. winwait("Star Wars: The Old Republic")
  35. Else
  36. winactivate("Star Wars: The Old Republic")
  37. winwait("Star Wars: The Old Republic")
  38. endif
  39.  
  40. sethotkeys()
  41. hotkeyset("^!x","quit")
  42.  
  43. func mainattack();r button
  44. if $x==0 then
  45. $x=1
  46.  
  47. ;stealth if out of combat, stealth, and not in huttball
  48. $combat=pixelgetcolor(604,1028)
  49. if $combat==4244982 or $combat==5097466 then
  50.  
  51. $stealthgem=pixelgetcolor(1257,1123)
  52. if $stealthgem<>2198197 Then
  53. $huttball=pixelgetcolor(1777,881)
  54. if $huttball<>9756923 then
  55. send("7");stealth
  56. endif
  57. endif
  58.  
  59. Else
  60.  
  61. ;steroids and taunt if enemy hp higher than 30%, in combat, not stealthed, and pvp mode
  62. if $modetoggle==1 then
  63. $stealthgem=pixelgetcolor(1257,1123)
  64. if $stealthgem<>2198197 Then
  65. $executerange=pixelgetcolor(1211,981)
  66. if $executerange==12976128 Then
  67. send("h");battle readiness
  68. send("{F7}");relic
  69. send("{F8}");relic
  70. send("{F3}");adrenal
  71. send("{F1}");taunt
  72. endif
  73. endif
  74. endif
  75.  
  76. endif
  77.  
  78. ;if energy is below 30, blackout and saber strike
  79. $forcethresh30=pixelgetcolor(704,999)
  80. if $forcethresh30<>11825186 then
  81.  
  82. $blackout=pixelgetcolor(824,1066)
  83. if $blackout==6511962 Then
  84. send("y");blackout
  85. endif
  86.  
  87. send("v");saber strike
  88.  
  89. Else
  90. ;do attack chain
  91.  
  92. ;check if enemy hp is in execute range
  93. $executerange=pixelgetcolor(1211,981)
  94. if $executerange<>12976128 Then
  95. send("b");spinning strike
  96. endif
  97.  
  98. ;if pve mode, force breach
  99. if $modetoggle==2 Then
  100. clearhotkeys()
  101. send("g");force breach
  102. sethotkeys()
  103. Else
  104. $potency=pixelgetcolor(988,1064)
  105. if $potency<>16777215 then
  106. clearhotkeys()
  107. send("g");force breach
  108. sethotkeys()
  109. endif
  110. endif
  111.  
  112. ;check for backstab if pve mode
  113. if $modetoggle==2 then
  114. $backstabtext=pixelgetcolor(10,285)
  115. if $backstabtext==7395067 Then
  116. $forcethresh50=pixelgetcolor(750,999)
  117. if $forcethresh50<>11825186 then
  118. send("a");backstab
  119. Else
  120. clearhotkeys()
  121. send("r");clairvoyant strike
  122. sethotkeys()
  123. EndIf
  124. Else
  125. clearhotkeys()
  126. send("r");clairvoyant strike
  127. sethotkeys()
  128. endif
  129. else
  130. clearhotkeys()
  131. send("r");clairvoyant strike
  132. sethotkeys()
  133. endif
  134.  
  135. ;if pve mode, force breach
  136. if $modetoggle==2 Then
  137. clearhotkeys()
  138. send("g");force breach
  139. sethotkeys()
  140. Else
  141. if $potency<>16777215 then
  142. clearhotkeys()
  143. send("g");force breach
  144. sethotkeys()
  145. endif
  146. endif
  147.  
  148. ;check if enemy hp is in execute range
  149. if $executerange<>12976128 Then
  150. send("b");spinning strike
  151. endif
  152.  
  153. endif
  154.  
  155. $x=0
  156. endif
  157. endfunc
  158.  
  159. func project();t button
  160. if $x=0 Then
  161. $x=1
  162.  
  163. ;stealth if out of combat, stealth, and not in huttball. taunt if in combat and pvp mode
  164. $combat=pixelgetcolor(604,1028)
  165. if $combat==4244982 then
  166.  
  167. $stealthgem=pixelgetcolor(1257,1123)
  168. if $stealthgem<>2198197 Then
  169. $huttball=pixelgetcolor(1777,881)
  170. if $huttball<>9756923 then
  171. send("7");stealth
  172. endif
  173. endif
  174.  
  175. Else
  176.  
  177. if $modetoggle==1 then
  178. send("{F1}");taunt
  179. endif
  180.  
  181. endif
  182.  
  183. ;if energy is below 30, blackout and saber strike
  184. $forcethresh30=pixelgetcolor(704,999)
  185. if $forcethresh30<>11825186 then
  186.  
  187. $blackout=pixelgetcolor(824,1066)
  188. if $blackout==6511962 Then
  189. send("y");blackout
  190. endif
  191.  
  192. send("v");saber strike
  193.  
  194. else
  195.  
  196. ;check enemy hp for steroids, and do project
  197. if $modetoggle==1 then
  198. $executerange=pixelgetcolor(1211,981)
  199. if $executerange==12976128 Then
  200. send("h");battle readiness
  201. send("{F6}");force potency
  202. send("{F7}");relic
  203. send("{F8}");relic
  204. send("{F3}");adremal
  205. endif
  206. endif
  207.  
  208. clearhotkeys()
  209. send("t");project
  210. sethotkeys()
  211.  
  212. endif
  213.  
  214. $x=0
  215. endif
  216. EndFunc
  217.  
  218. ;if pvp, check for mind snap cooldown and range, if not, check enemy resolve and do a different one
  219. ;mind snap will not be activated within 1000ms of any of the other interrupts to avoid overlap due to mind snap being off global cooldown
  220. func interrupt();F10
  221. if $interrupt==0 Then
  222. $interrupt=1
  223. if $modetoggle==1 then
  224. $snapcd=pixelgetcolor(880,1123)
  225. if $snapcd==1050624 then
  226. $snapsafetydiff2=timerdiff($snapsafety2)
  227. if $snapsafetydiff2>1000 then
  228. $snapsafety=timerinit()
  229. clearhotkeys()
  230. send("{F2}");mind snap
  231. sethotkeys()
  232. endif
  233. Else
  234. $snapsafetydiff=timerdiff($snapsafety)
  235. if $snapsafetydiff>1000 then
  236. $resolve=pixelgetcolor(1425,1035)
  237. if $resolve<>14737145 Then
  238. $snapsafety2=timerinit()
  239. clearhotkeys()
  240. send("w");low slash
  241. $waverange=pixelgetcolor(863,1026)
  242. if $waverange<>458752 then
  243. send("{DOWN}");force wave
  244. endif
  245. send("q");force stun
  246. if $waverange<>458752 then
  247. send("{DOWN}");force wave
  248. endif
  249. send("w");low slash
  250. sethotkeys()
  251. endif
  252. endif
  253. EndIf
  254.  
  255. Else
  256.  
  257. clearhotkeys()
  258. send("{F2}");mindsnap
  259. sethotkeys()
  260.  
  261. endif
  262.  
  263. $interrupt=0
  264. endif
  265. endfunc
  266.  
  267. ;destealth and mount if out of combat
  268. func mount();shift t
  269. $combat=pixelgetcolor(604,1028)
  270. if $combat==4244982 or $combat==5097466 then
  271. $stealthgem=pixelgetcolor(1257,1123)
  272. if $stealthgem==2198197 Then
  273. send("7");stealth
  274. EndIf
  275. EndIf
  276. send("9");mount
  277. endfunc
  278.  
  279. ;destealth and mount if out of combat
  280. func meditate();shift t
  281. $combat=pixelgetcolor(604,1028)
  282. if $combat==4244982 or $combat==5097466 then
  283. $stealthgem=pixelgetcolor(1257,1123)
  284. if $stealthgem==2198197 Then
  285. send("7");stealth
  286. EndIf
  287. EndIf
  288. send("0");mount
  289. endfunc
  290.  
  291. ;resolve check for sap
  292. func sap()
  293. $resolve=pixelgetcolor(1425,1035)
  294. if $resolve<>14737145 Then
  295. clearhotkeys()
  296. send("3")
  297. sethotkeys()
  298. endif
  299. EndFunc
  300.  
  301. ;resolve check for stun
  302. func stun()
  303. $resolve=pixelgetcolor(1425,1035)
  304. if $resolve<>14737145 Then
  305. clearhotkeys()
  306. send("q")
  307. sethotkeys()
  308. endif
  309. EndFunc
  310.  
  311. ;resolve check for slash
  312. func slash()
  313. $resolve=pixelgetcolor(1425,1035)
  314. if $resolve<>14737145 Then
  315. clearhotkeys()
  316. send("w")
  317. sethotkeys()
  318. endif
  319. endfunc
  320.  
  321. func sethotkeys()
  322. hotkeyset("r","mainattack")
  323. hotkeyset("t","project")
  324. hotkeyset("{ENTER}","togglehotkeys")
  325. hotkeyset("+{ENTER}","togglehotkeys")
  326. hotkeyset("^r","typingtoggle")
  327. hotkeyset("^t","modetoggle")
  328. hotkeyset("+t","mount")
  329. hotkeyset("+c","meditate")
  330. hotkeyset("3","sap")
  331. hotkeyset("q","stun")
  332. hotkeyset("w","slash")
  333. hotkeyset("{F10}","interrupt")
  334. EndFunc
  335.  
  336. func clearhotkeys()
  337. hotkeyset("r")
  338. hotkeyset("t")
  339. hotkeyset("+t")
  340. hotkeyset("+c")
  341. hotkeyset("3")
  342. hotkeyset("q")
  343. hotkeyset("w")
  344. hotkeyset("{F10}")
  345. endfunc
  346.  
  347. ;toggles hotkeys off when typing or in a different window
  348. func togglehotkeys();enter or shift enter
  349. if $togglehotkeys==0 then
  350. $togglehotkeys=1
  351.  
  352. if winactive("Star Wars: The Old Republic") and $x==0 Then
  353. if $hotkeytoggle==1 Then
  354. $typing=1
  355. clearhotkeys()
  356. hotkeyset("{ENTER}")
  357. hotkeyset("+{ENTER}")
  358. send("{ENTER}")
  359. hotkeyset("{ENTER}","togglehotkeys")
  360. hotkeyset("+{ENTER}","togglehotkeys")
  361. $hotkeytoggle=0
  362. Else
  363. $typing=0
  364. hotkeyset("{ENTER}")
  365. hotkeyset("+{ENTER}")
  366. send("{ENTER}")
  367. sethotkeys()
  368. $hotkeytoggle=1
  369. endif
  370. endif
  371.  
  372. $togglehotkeys=0
  373. endif
  374. endfunc
  375.  
  376. ;manual hotkey toggle
  377. func typingtoggle();ctrl r
  378. if $typing==0 Then
  379. $typing=1
  380. clearhotkeys()
  381. $hotkeytoggle=0
  382. tooltip("hotkeys off")
  383. sleep(750)
  384. tooltip("")
  385. Else
  386. $typing=0
  387. sethotkeys()
  388. $hotkeytoggle=1
  389. tooltip("hotkeys on")
  390. sleep(750)
  391. tooltip("")
  392. endif
  393. endfunc
  394.  
  395. ;toggles taunt, steroids, and auto force breach for pve and pvp
  396. func modetoggle();ctrl t
  397. if $modetoggle==1 Then
  398. $modetoggle=2
  399. tooltip("pve mode")
  400. sleep(750)
  401. tooltip("")
  402. Else
  403. $modetoggle=1
  404. tooltip("pvp mode")
  405. sleep(750)
  406. tooltip("")
  407. endif
  408. endfunc
  409.  
  410. ;overwrite gm ticket hotkey
  411. func donothing();\ button
  412. ;don't open a ticket...
  413. endfunc
  414.  
  415. ;close script
  416. func quit();control alt x
  417. Exit
  418. endfunc
  419.  
  420. ;constant background loop
  421. while True
  422. if winactive("Star Wars: The Old Republic") Then
  423.  
  424. ;hotkeys on if window active and not typing
  425. if $windowchanged==0 then
  426. hotkeyset("{ENTER}","togglehotkeys")
  427. hotkeyset("+{ENTER}","togglehotkeys")
  428. hotkeyset("^r","typingtoggle")
  429. hotkeyset("^t","modetoggle")
  430. hotkeyset("\","donothing")
  431. if $typing==0 and $x==0 then
  432. sethotkeys()
  433. $hotkeytoggle=1
  434. endif
  435. ;target reticle
  436. SplashImageOn ( "", "E:\stuff from C drive\Misc Documents\AutoIt\Nodinator3000\reticle.bmp" , 30 , 6 , 945 , 500 , 1 )
  437. $windowchanged=1
  438. endif
  439.  
  440. ;auto potion if low hp, potion is ready, in combat, not stealthed, and alive
  441. $potthresh=pixelgetcolor(770,982);x value is thresh slider, 670 minimum
  442. if $potthresh<>12976128 then
  443. $potcd=pixelgetcolor(1151,1066)
  444. if $potcd==2176049 then
  445. $combat=pixelgetcolor(604,1028)
  446. if $combat<>4244982 and $combat<>5097466 Then
  447. $stealthgem=pixelgetcolor(1257,1126)
  448. if $stealthgem<>7075839 and $typing==0 Then
  449. $alivecheck=pixelgetcolor(633,991)
  450. if $alivecheck==11199997 or $alivecheck==9951991 then
  451. send("{F11}");medpac
  452. EndIf
  453. EndIf
  454. EndIf
  455. EndIf
  456. EndIf
  457.  
  458. sleep(100)
  459.  
  460. ;auto vanish
  461. $vanished=timerdiff($vanishing)
  462. if $vanished>1500 and $vanished<5000 Then
  463. $x=0
  464. tooltip("")
  465. endif
  466. $lowesthpthresh=pixelgetcolor(685,982);lowest is 665
  467. if $lowesthpthresh<>12976128 Then
  468. $combat=pixelgetcolor(604,1028)
  469. if $combat==12215661 and $combat<>5097466 Then
  470. $vanishcd=pixelgetcolor(662,1064)
  471. if $vanishcd==4346136 or $vanishcd==1251335 then
  472. $huttball=pixelgetcolor(1777,881)
  473. if $huttball<>9756923 then
  474. $alivecheck=pixelgetcolor(633,991)
  475. if $alivecheck==11199997 or $alivecheck==9951991 then
  476. if $typing==0 then
  477. if $vanishcd==4346136 then
  478. send("c");resilience
  479. send("z");cloak of shadows
  480. tooltip("OH SHIT")
  481. $x=1
  482. $vanishing=timerinit()
  483. Else
  484. if $vanishcd==1251335 then
  485. $stealthgem=pixelgetcolor(1257,1126)
  486. if $stealthgem<>7075839 Then
  487. send("u");force of will
  488. send("c");resilience
  489. send("z");cloak of shadows
  490. tooltip("OH SHIT")
  491. $x=1
  492. $vanishing=timerinit()
  493. endif
  494. endif
  495. endif
  496. endif
  497. EndIf
  498. EndIf
  499. EndIf
  500. EndIf
  501. EndIf
  502.  
  503. sleep(100)
  504.  
  505. ;keep sprint on
  506. $sprintgem=pixelgetcolor(51,890)
  507. if $sprintgem<>2198197 and $sprintgem<>7958605 and $sprintgem<>8287053 Then
  508. $alivecheck=pixelgetcolor(633,991)
  509. if $typing==0 and $alivecheck==11199997 or $alivecheck==9951991 then
  510. send("8");sprint
  511. endif
  512. endif
  513.  
  514. sleep(100)
  515.  
  516. else;window inactive
  517.  
  518. ;hotkeys off if window inactive
  519. if $windowchanged==1 then
  520. clearhotkeys()
  521. hotkeyset("{ENTER}")
  522. hotkeyset("+{ENTER}")
  523. hotkeyset("^r")
  524. hotkeyset("^t")
  525. hotkeyset("\")
  526. $hotkeytoggle=0
  527. splashoff()
  528. $windowchanged=0
  529. endif
  530.  
  531. EndIf
  532.  
  533. ;close script if swtor closes
  534. if not winexists("Star Wars: The Old Republic") Then
  535. Exit
  536. endif
  537.  
  538. wend
Add Comment
Please, Sign In to add comment