Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.38 KB | None | 0 0
  1. SetTitleMatchMode,2
  2. DetectHiddenWindows, On
  3. #include Gdip_All.ahk
  4. SetWorkingDir %A_ScriptDir%
  5. CoordMode, Mouse, Screen
  6. ;Menu, Tray, Icon, Lookup.ico
  7. #Persistent ; Stay open in background
  8. counter:=0
  9. ; --- Global variables
  10. global chatlogkey, start, exit, configkey,config, title,gui3_x,gui3_y, newpos, charName,vText, charRace,targetwindowx, targetwindowy
  11. toggle:=1
  12. State:=1
  13. title:=Dark Age of Camelot
  14. PH:="<h1>Phoenix Herald</h1>"
  15. config:="config.ini"
  16. file2=\Electronic Arts\Dark Age of Camelot\
  17. file=chat.log
  18. ;--- Check for configini and creates if not one
  19. ifnotexist,%config%
  20. {
  21. msgbox Could not find config file generating new one
  22. IniWrite, F2, %config% ,Keys, start
  23. IniWrite,Escape, %config% ,Keys, exit
  24. IniWrite, F3, %config% ,Keys, configkey
  25. IniWrite, F4, %config% ,Keys, chatlogkey
  26. iniwrite, x0 y0,%config%,window position,main
  27. iniwrite, 1,%config%,window position,targetwindowx
  28. iniwrite, 1,%config%,window position,targetwindowy
  29. IniWrite, %A_MyDocuments%%file2%%file%,%config%, chatlog, file
  30. IniWrite, 1, %config%, options, relative
  31. IniWrite, 1, %config%, options, Resist1
  32. IniWrite, 0, %config%, options, Resist2
  33. IniRead, start, %config%, Keys, start
  34. IniRead, exit, %config%, Keys, exit
  35. IniRead, configkey, %config%, Keys, configkey
  36. IniRead, chatlogkey, %config%, Keys, chatlogkey
  37. IniRead, chatLog, %config%, chatlog, file
  38. IniRead, main, %config%, window position, main
  39. IniRead, targetwindowx, %config%, window position, targetwindowx
  40. IniRead, targetwindowy, %config%, window position, targetwindowy
  41. IniRead, relative, %config%, options, relative , 0
  42. IniRead, Resist1, %config%, options, Resist1
  43. IniRead, Resist2, %config%, options, Resist2
  44. if (Resist1= 0)
  45. AllResist:=2
  46. If (Resist2=0)
  47. AllResist:=1
  48.  
  49. While ! FileExist( config )
  50. Sleep 250
  51. gosub config
  52. }
  53.  
  54. ;--- Read ini file and assign keys
  55. IniRead, start, %config%, Keys, start
  56. IniRead, exit, %config%, Keys, exit
  57. IniRead, configkey, %config%, Keys, configkey
  58. IniRead, chatlogkey, %config%, Keys, chatlogkey
  59. IniRead, chatLog, %config%, chatlog, file
  60. IniRead, main, %config%, window position, main
  61. IniRead, targetwindowx, %config%, window position, targetwindowx
  62. IniRead, targetwindowy, %config%, window position, targetwindowy
  63. IniRead, relative, %config%, options, relative , 0
  64. IniRead, Resist1, %config%, options,Resist1 , 0
  65. IniRead, Resist2, %config%, options,Resist2 , 0
  66. if (Resist1=0)
  67. AllResist:=2
  68. If (Resist2=0)
  69. AllResist:=1
  70. hotkey, ~LButton, daoc, off
  71. Hotkey, %start%, start, on
  72. Hotkey, %exit%, escape, on
  73. Hotkey, %configkey%, config, on
  74. OnMessage(0x03, "MsgMonitor")
  75. OnMessage(0x201, "WM_LBUTTONDOWN")
  76.  
  77. If !pToken := Gdip_Startup()
  78. ExitApp
  79.  
  80.  
  81.  
  82.  
  83. width:=200, height:=400
  84. Gui, 3: -Caption +E0x80000 +LastFound +AlwaysOnTop +ToolWindow +OwnDialogs
  85. Gui, 3: Show, NA
  86. hwnd1 := WinExist()
  87. hbm := CreateDIBSection(Width, Height)
  88. hdc := CreateCompatibleDC()
  89. obm := SelectObject(hdc, hbm)
  90. G := Gdip_GraphicsFromHDC(hdc)
  91. Gdip_SetSmoothingMode(G, 4)
  92. pBrush := Gdip_BrushCreateSolid(0x590000)
  93. Gdip_FillRectangle(G, pBrush, 0, 0, Width, Height)
  94. Gdip_DeleteBrush(pBrush)
  95. Font = Arial
  96. If !Gdip_FontFamilyCreate(Font)
  97. ExitApp
  98. Options = x1p y11p w80p Centre r4 s15 Italic
  99.  
  100.  
  101. ;--- Gui 1 (First GUI)
  102. Gui,1: +e0x20 +AlwaysOnTop +LastFound -SysMenu
  103. Gui,1: Color, ffffff, ffffff
  104. Gui,1: Font, Normal c1e91bb
  105. Gui,1: Add, Groupbox, x7 y7 h65 w160, [Lookup] Quickstart
  106. Gui,1: Font, Normal s8 c000000, Verdana
  107. Gui 1: Add,Text, x15 y24 BackgroundTrans vtext4 GuiMove w200,%start% - Start Script`n%configkey% - Configurations/FAQ`n%exit% - Exit
  108. Gui,1: show, %main% w173 h78 , DAoC Lookup
  109. return
  110.  
  111. ;--- Start key pushed
  112. start:
  113. gui,3:show
  114. Hotkey, ~LButton, toggle
  115. State:=!State
  116. if (!State)
  117. {
  118. gui,1: hide
  119. IniRead, chatlogkey, %config%, Keys, chatlogkey
  120. Iniread, targetwindowx, %config%, window position, targetwindowx
  121. Iniread, targetwindowy, %config%, window position, targetwindowy
  122. ifwinexist,ahk_exe game.dll
  123. {
  124. winactivate
  125. winwaitactive, %title%
  126. }
  127. else
  128. winwaitactive, %title%
  129. }
  130. else
  131. {
  132. gui,1: Show
  133. }
  134. return
  135.  
  136. daoc:
  137. if winactive("ahk_exe game.dll")
  138. {
  139. counter++
  140. if (x!=1)
  141. send {%chatlogkey%}
  142. sleep 300
  143. send {%chatlogkey%}
  144. lastChar := FileReadLineFromBottom(chatLog, 6)
  145.  
  146. ; --- Parse Herald
  147. document:= ComObjCreate("HTMLfile")
  148. page1:=get("https://herald.playphoenix.online/c/"+lastChar)
  149.  
  150. lines := StrSplit(page1, "`n")
  151. columns := []
  152. for index, value in lines
  153. columns.Insert(StrSplit(value, "`t"))
  154.  
  155. unfName := columns[49][1]
  156. unfGuild := columns[51][1]
  157. unfClass := columns[53][1]
  158. unfLevel := columns[57][1]
  159. unfRankLevel := columns[61][1]
  160. unfRace := columns[65][1]
  161. unfRankName := columns[67][1]
  162.  
  163. charName := RegExReplace(unfName,"\x20{2,}"," ")""
  164. unfGuild1 := RegExReplace(unfGuild,"<.*?>")
  165. unfGuild2 := RegExReplace(unfGuild1,"(&lt)")
  166. unfGuild3 := RegExReplace(unfGuild2,"(&gt)")
  167. charGuild := RegExReplace(unfGuild3,"\x20{2,}"," ")""
  168. charClass := RegExReplace(unfClass,"\x20{2,}"," ")""
  169. charLevel := RegExReplace(unfLevel,"\x20{2,}"," ")""
  170. unfRankLevel1 := RegExReplace(unfRankLevel,"\x20{2,}"," ")""
  171. charRankLevel := RegExReplace(unfRankLevel1,"ealm Rank ","")
  172. charRace := RegExReplace(unfRace,"\x20{2,}"," ")""
  173. charRankName := RegExReplace(unfRankName,"\x20{2,}"," ")""
  174.  
  175. StringTrimLeft, charName, charName, 1
  176. StringTrimLeft, charClass, charClass, 1
  177. StringTrimLeft, charLevel, charLevel, 1
  178. StringTrimLeft, charRankLevel, charRankLevel, 1
  179. StringTrimLeft, charRace, charRace, 1
  180. StringTrimLeft, charRankName, charRankName, 1
  181. StringTrimRight, charGuild, charGuild, 1
  182.  
  183. if (relative=1)
  184. gosub GetColor
  185.  
  186. else
  187. targetColor:=c80FFFFF
  188.  
  189. nameLength := StrLen(charName)
  190. guildLength:=StrLen(charGuild)
  191. IfnotInString, page1, %PH%
  192. {
  193. G := Gdip_GraphicsFromHDC(hdc)
  194. Gdip_SetCompositingMode(G, 1)
  195. pBrush := Gdip_BrushCreateSolid(0x00000000) ; fully transparent brush 'eraser'
  196. Gdip_FillRectangle(G, pBrush, 0, 0, Width, Height)
  197. Gdip_DeleteBrush(pBrush)
  198. Gdip_SetCompositingMode(G, 0)
  199. Gdip_SetSmoothingMode(G, 4)
  200. pBrush := Gdip_BrushCreateSolid(0x00000000)
  201. Gdip_FillRectangle(G, pBrush, 0, 0, Width, Height)
  202. Gdip_DeleteBrush(pBrush)
  203. Gdip_TextToGraphics(G, charName "`n`n <" charGuild ">" "`n`n" charLevel charRankLevel "`n`n" charRace charClass charRank , Options targetColor, Font, Width, Height)
  204. gosub getresist
  205. if (AllResist=1)
  206. {
  207. Gdip_TextToGraphics(G, "`n`n`n`n`n`n`n`n Thrust", Options resistances.Thrust.2, Font, Width, Height)
  208. Gdip_TextToGraphics(G, "`n`n`n`n`n`n`n`n`n`n Crush", Options resistances.Crush.2, Font, Width, Height)
  209. Gdip_TextToGraphics(G, "`n`n`n`n`n`n`n`n`n`n`n`n Slash", Options resistances.Slash.2, Font, Width, Height)
  210. }
  211. if (AllResist=2)
  212. {
  213. ;these need to be fixed visually
  214. Gdip_TextToGraphics(G, "`n`n`n`n`n`n`n`n Cold", Options resistances.Cold.2, Font, Width, Height)
  215. Gdip_TextToGraphics(G, "`n`n`n`n`n`n`n`n`n`n Heat", Options resistances.Heat.2, Font, Width, Height)
  216. Gdip_TextToGraphics(G, "`n`n`n`n`n`n`n`n`n`n`n`n`n`n Energy", Options resistances.Energy.2, Font, Width, Height)
  217. Gdip_TextToGraphics(G, "`n`n`n`n`n`n`n`n Spirit", Options resistances.Spirit.2, Font, Width, Height)
  218. Gdip_TextToGraphics(G, "`n`n`n`n`n`n`n`n`n`n Matter", Options resistances.Matter.2, Font, Width, Height)
  219. Gdip_TextToGraphics(G, "`n`n`n`n`n`n`n`n`n`n`n`n Body", Options resistances.Body.2, Font, Width, Height)
  220. }
  221. UpdateLayeredWindow(hwnd1, hdc, targetwindowx,targetwindowy, Width, Height)
  222. }
  223. else
  224. {
  225. G := Gdip_GraphicsFromHDC(hdc)
  226. Gdip_SetCompositingMode(G, 1)
  227. pBrush := Gdip_BrushCreateSolid(0x00000000) ; fully transparent brush 'eraser'
  228. Gdip_FillRectangle(G, pBrush, 0, 0, Width, Height)
  229. Gdip_DeleteBrush(pBrush)
  230. Gdip_SetCompositingMode(G, 0)
  231. Gdip_SetSmoothingMode(G, 4)
  232. pBrush := Gdip_BrushCreateSolid(0x0000000)
  233. Gdip_FillRectangle(G, pBrush, 0, 0, Width, Height)
  234. Gdip_DeleteBrush(pBrush)
  235. Gdip_TextToGraphics(G, "error", Options targetColor, Font, Width, Height)
  236. UpdateLayeredWindow(hwnd1, hdc, targetwindowx,targetwindowy, Width, Height)
  237. }
  238.  
  239. return
  240. }
  241.  
  242. return
  243.  
  244. ;--------------------------------------------
  245.  
  246.  
  247. ;--------------------------------------config gui 2
  248. config:
  249. Hotkey, ~LButton,
  250. Hotkey, %start%, start, off
  251. Hotkey, %exit%, escape, off
  252. Hotkey, %configkey%, config, off
  253. IniRead, start, %config%, Keys, start
  254. IniRead, exit, %config%, Keys, exit
  255. IniRead, configkey, %config%, Keys, configkey
  256. IniRead, chatlogkey, %config%, Keys, chatlogkey
  257. IniRead, relative, %config%, options, relative
  258. IniRead, Resist1, %config%, options, Resist1
  259. IniRead, Resist2, %config%, options, Resist2
  260. gui,3:hide
  261. gui,1: hide
  262. Gui,2: +e0x20 +LastFound
  263. Gui,2: Add, Tab3, x0 y5 w619 h341 -wrap, Configuration| FAQ
  264. Gui,2: Font, Normal c1e91bb
  265. Gui,2: Add, Groupbox, x7 y32 w606 h95, [Lookup] Instructions
  266. Gui,2: Font,
  267. Gui,2: Add, Text, x16 y51, 1) Select a hotkey to each of the variables. Note: Chatlog have to be an function key (F1-F12).
  268. Gui,2: Add, Text, x16 y+5, 2) Select the directory where your chat.log file is located. Typically this would be in:
  269. Gui,2: Add, Text, x30 y+5, C:\Users\USERNAME\Documents\Electronic Arts\Dark Age of Camelot
  270. Gui,2: Add, Text, x16 y+5, 3) Ingame, do /macro chatlog /chatlog, then do /qbind <bank> <slot> <qbar> and assign it to your selected Chatlog keybind.
  271. Gui,2: Font, Normal c1e91bb
  272. Gui,2: Add, Groupbox, x7 y+13 w143 h120, [Lookup] Keybinds
  273. Gui,2: Font,
  274. Gui,2: Add, Text, x61 y155, Start Script
  275. Gui,2: Add, Text, x61 y+10, Chatlog (F1-F12)
  276. Gui,2: Add, Text, x61 y+10, Configurations
  277. Gui,2: Add, Text, x61 y+10, Exit
  278. Gui,2: Font, Normal c1e91bb
  279. Gui,2: Add, Groupbox, x159 y131 w164 h120, [Lookup] Options
  280. Gui,2: Font,
  281. Gui,2: Add, Checkbox, x165 y155 Checked%relative%, Use relative realm colors
  282. Gui,2: Font, Normal c1e91bb
  283. Gui,2: Add, Text, x311 y155, ?
  284. Gui,2: Font,
  285. Gui,2: Add, Radio, x165 y+10 gCheck vResist1, Show melee resistances
  286. Gui,2: Add, Radio, x165 y+10 gCheck vResist2,Show melee+casted res.
  287. Gui,2: Font, Normal c1e91bb
  288. Gui,2: Add, Text, x311 y178,?
  289. Gui,2: Font,
  290. Gui,2: Font, Normal c1e91bb
  291. Gui,2: Add, Text, x311 y201,?
  292. Gui,2: Font, Strike c000000
  293. Gui,2: Add, Checkbox, x165 y+10, Font with dropshadow
  294. Gui,2: Font, Normal c1e91bb
  295. Gui,2: Add, Text, x311 y224,?
  296. Gui,2: Font,
  297. Gui,2: Add, Text, x307 y156 h14 w1 0x11
  298. Gui,2: Add, Text, x307 y179 h14 w1 0x11
  299. Gui,2: Add, Text, x307 y202 h14 w1 0x11
  300. Gui,2: Add, Text, x307 y225 h14 w1 0x11
  301. Gui,2: Add, Hotkey, x16 y152 w40 h19 vstart, %start%
  302. Gui,2: Add, Hotkey, x16 y+4 w40 h19 vchatlogkey gchatlogged, %chatlogkey%
  303. Gui,2: Add, Hotkey, x16 y+4 w40 h19 vconfigkey, %configkey%
  304. Gui,2: Add, Hotkey, x16 y+4 w40 h19 vexit, %exit%
  305. Gui,2: Font, Normal c1e91bb
  306. Gui,2: Add, Groupbox, x332 y131 w281 h120, [Lookup] Fontstyle
  307. Gui,2: Font
  308. Gui,2: Add, DropDownList, x338 y151 w100 vFontstyleFont, Arial|Trebuchet MS|Verdana|Overpass|Noto Sans UI|Segoe UI
  309. Gui,2: Add, DropDownList, x338 y+2 w100 vFontstyleSize, 12|13|14|15|16|17|18|19|20|21|22|23|24
  310. Gui,2: Font, Strike c000000
  311. Gui,2: Add, Text, x442 y155, Fontname
  312. Gui,2: Add, Text, x442 y+10, Fontsize
  313. Gui,2: Font, Normal c1e91bb
  314. Gui,2: Add, Groupbox, x7 y255 w606 h56, [Lookup] Chatlog Directory
  315. Gui,2: Font,
  316. Gui,2: Add, Edit, x14 y276 w400 h19 +ReadOnly vChatlogLoc,%Chatlog%
  317. Gui,2: Add, Button, x416 y275 w20 h21 gchatlog, ...
  318. Gui,2: Add, Button, x7 y+22 w64 h19 gbuttonsave, Save
  319. Gui,2: Show, w619 h342 Center, DAoC TargetInfo - Configuration
  320. Gui,2: Tab, 2
  321. Gui,2: Font, Normal c1e91bb
  322. Gui,2: Add, Groupbox, x7 y32 w606 h85, [Lookup] About
  323. Gui,2: Font,
  324. Gui,2: Add, Text, x16 y51, The script uses the chat.log-file to determine your last target and looks the target up using the Phoenix Herald. It does not`nread or modify any game files, and is only using files everyone has access to. Use at your own risk as the script has yet to be`napproved (or disapproved).
  325. Gui,2: Add, Text, x16 y+5, The script is programmed in Autohotkey by Bysan and Teehehe with inspiration from Lerox.
  326. Gui,2: Font, Normal c1e91bb
  327. Gui,2: Add, Groupbox, x7 y122 w606 h59, [Lookup] Contact
  328. Gui,2: Font,
  329. Gui,2: Add, Text, x16 y141, Errors and questions can be reported at:
  330. Gui,2: Add, Link, x25 y+5 cBlue BackgroundTrans, <a href="https://discord.gg/TqX3b3G">- Discord</a>
  331. SetTimer, ToolTip
  332. var_Static9 = Target info color based on realm color. ; Put this at the top along with any others you want to try.
  333. var_Static10 = Shows Crush/Thrust/Slash resistances.
  334. var_Static11 = Shows Crush/Thrust/Slash in addition to caster type vulnerabilities.
  335. var_Static12 = Toggle dropshadow on overlay font. Checkbox off = no shadow, checkbox on = shadow.`nAvailable in the next update!
  336. GuiControl,2: , Button5, %Resist1%
  337. GuiControl,2:,Button6,%Resist2%
  338. ToolTip:
  339. MouseGetPos,,,,control
  340. tmpVar := var_%control%
  341. ToolTip, %tmpVar%
  342. Return
  343.  
  344. ;-------------------------------------web function
  345.  
  346. get(URL){
  347. ComObjError(false)
  348. r:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
  349. r.Open("GET", URL, true),r.Send(),r.WaitForResponse()
  350. return r.ResponseText
  351. }
  352. ;----------------------------------------------
  353.  
  354. ;--------------------------------------------readchatlog for target line
  355. FileReadLineFromBottom(chatLog, Offset)
  356. {
  357. FileRead f1, % chatLog
  358. StringReplace f1, f1, `n, `n, UseErrorLevel
  359. FileReadLine Line, % chatLog, ErrorLevel + 1 - Offset
  360. Filedelete, % chatLog
  361. if RegExMatch(Line, "You target \[(.*)\]\.", Output)
  362. Return Output1
  363. }
  364. ;---------------------------------------------
  365. Check:
  366. gui, submit, nohide
  367. if (Resist1= 0)
  368. AllResist:=2
  369. If (Resist2=0)
  370. AllResist:=1
  371. Return
  372.  
  373. ;---------------------------------------gui stuff
  374. uiMove:
  375. PostMessage, 0xA1, 2,,, A
  376. Return
  377.  
  378. ;----------------------------------exit
  379. escape:
  380. exitapp
  381. return
  382.  
  383.  
  384. ;--------------------------close config window
  385. 2GuiClose:
  386. gui, 2:destroy
  387. GuiControl,1: , text4,%start% - Start Script`n%configkey% - Configurations/FAQ`n%exit% - Exit
  388. gui, 1:show
  389. Hotkey, %start%, start, on
  390. Hotkey, %exit%, escape, on
  391. Hotkey, %configkey%, config, on
  392. return
  393.  
  394. ;-------------------------folder select
  395. chatlog:
  396. Gui,2: +OwnDialogs
  397. fileselectfolder, folder
  398. folder:= RegExReplace(Folder, "\\$")
  399. chatlog = %folder%\%file%
  400. Iniwrite, %chatlog%, %config%, chatlog, file
  401. GuiControl, , ChatlogLoc, %chatLog%
  402. return
  403.  
  404.  
  405. ;--------------------------------------save button
  406. buttonsave:
  407. GuiControlGet, start, 2:
  408. GuiControlGet, exit, 2:
  409. GuiControlGet, configkey, 2:
  410. GuiControlGet, chatlogkey, 2:
  411. GuiControlGet, relative, 2:
  412. GuiControlGet, Resist1, 2:
  413. GuiControlGet, Resist2, 2:
  414. ;saves keys from gui to ini
  415.  
  416. ;--------------------------checks for duplicate hotkey
  417.  
  418. Keylist := [start, exit, configkey, chatlogkey]
  419. Keys :={}
  420.  
  421. For each, key in keylist
  422. {
  423. If !(keys.haskey(key))
  424. Keys[key] := 1
  425. Else
  426. {
  427. Msgbox Error! Make sure the keys are unique!
  428. Return
  429. }
  430. }
  431.  
  432. ;-----------------------------------------
  433. Iniwrite, %start%, %config%, Keys, start
  434. Iniwrite, %exit%, %config%, Keys, exit
  435. Iniwrite, %configkey%, %config%, Keys, configkey
  436. Iniwrite, %chatlogkey%, %config%, Keys, chatlogkey
  437. IniWrite, %relative%, %config%, options, relative
  438. IniWrite, %Resist1%, %config%, options, Resist1
  439. IniWrite, %Resist2%, %config%, options, Resist2
  440. gui, 2:destroy
  441. ;------------------------------------------read ini file and assign keys
  442. IniRead, start, %config%, Keys, start
  443. IniRead, exit, %config%, Keys, exit
  444. IniRead, configkey, %config%, Keys, configkey
  445. IniRead, chatlogkey, %config%, Keys, chatlogkey
  446. IniRead, relative, %config%, options, relative
  447. IniRead, Resist1, %config%, options, Resist1
  448. IniRead, Resist2, %config%, options, Resist2
  449. ;-----------------------------------------------
  450. GuiControl,1: , text4,%start% - Start Script`n%configkey% - Configurations/FAQ`n%exit% - Exit
  451. gui, 1:show
  452. Hotkey, %start%, start, on
  453. Hotkey, %exit%, escape, on
  454. Hotkey, %configkey%, config, on
  455. return
  456.  
  457. ;------------------------chatlog key must be a function key possible other keys add to list must be wrapped in to work {F1}
  458. ;{ins}{del} etc... https://www.autohotkey.com/docs/commands/Send.htm
  459. chatlogged:
  460.  
  461. GuiControlGet chatlogkey, 2:
  462. keylist2:=["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"]
  463. if !Contains(keylist2, chatlogkey)
  464. msgbox Please enter a function key F1-F12.
  465.  
  466. Contains(obj, chatlogkey) {
  467. for i, val in obj {
  468. if(val = chatlogkey) {
  469. return true
  470. }
  471. }
  472. }
  473. return
  474.  
  475. GetColor:
  476. alblist:=["Briton","Highlander","Avalonian","Saracen","Inconnu","Half Ogre"]
  477. hiblist:=["Lurikeen","Celt","Sylvan","Firbolg","Elf","Shar"]
  478. midlist:=["Troll","Dwarf","Kobold","Norseman","Valkyn","Frostalf"]
  479. Error:=["Error"]
  480. if Contains(alblist, charRace)
  481. targetColor = cFFd60000
  482. else if Contains(hiblist, charRace)
  483. targetColor = cFF37d600
  484. else if Contains(midlist, charRace)
  485. targetColor = cFF0056d6
  486. else
  487. targetColor=cFFb80af2
  488. Return
  489.  
  490.  
  491. WM_LBUTTONDOWN()
  492. {
  493. PostMessage, 0xA1, 2
  494. }
  495.  
  496.  
  497.  
  498. MsgMonitor(wParam, lParam)
  499. {
  500. X := lParam & 0xFFFF
  501. Y := lParam >> 16
  502. if (oX!=X)||(oY!=Y)
  503. {
  504. if (A_Gui=1)
  505. iniwrite, x%X% y%Y%,%config%,window position,main
  506. if (A_Gui=2)
  507. iniwrite, x%X% y%Y%,%config%,window position,config
  508. if (A_Gui=3)
  509. {
  510. if (x!=32768)
  511. {
  512. iniwrite, %X%,%config%,window position,targetwindowx
  513. iniwrite, %Y%,%config%,window position,targetwindowy
  514. }
  515. }
  516. oX:=%X%
  517. oY:=%Y%
  518. }
  519. IniRead, targetwindowx, %config%, window position, targetwindowx
  520. IniRead, targetwindowy, %config%, window position, targetwindowy
  521. }
  522.  
  523. GetResist:
  524. class:=["Armsman","Paladin","Cleric","Mercenary","Minstrel","Scout","Friar","Infiltrator","Theurgist","Wizard","Cabalist","Sorcerer","Necromancer","Reaver","Champion","Druid","Hero","Warden","Bard","Blademaster","Ranger","Nightshade","Animist","Enchanter","Healer","Shaman","Skald","Thane","Warrior","Berserker","Hunter","Shadowblade","Savage","Bonedancer","Runemaster","Spiritmaster"]
  525. ;alb
  526. if (charClass="Armsman")||(charClass="Paladin")||(charClass="Armswoman")
  527. resistances:={Thrust:["Resistant","cfffa1500"],Crush:["Vulnerable","cFF00fa60"],Slash:[Neutral,cffffffff],Cold:["Vulnerable","cFF00fa60"],Energy:["Neutral","cffffffff"],Heat:["Resistant","cfffa1500"],Matter:["Resistant","cfffa1500"],Spirit:["Neutral","cffffffff"],Body:["Vulnerable","cFF00fa60"]}
  528. if (charClass="Cleric")||(charClass="Mercenary")||(charClass="Minstrel")||(charClass="Reaver")
  529. resistances:={Thrust:["Vulnerable","cFF00fa60"],Crush:["Resistant","cfffa1500"],Slash:["Neutral","cffffffff"],Cold:["Neutral","cffffffff"],Energy:["Vulnerable","cFF00fa60"],Heat:[" Resistant","cfffa1500"],Matter:["Neutral","cffffffff"],Spirit:["Neutral","cffffffff"],Body:["Neutral","cffffffff"]}
  530. if (charClass="Scout")
  531. resistances:={Thrust:["Vulnerable","cFF00fa60"],Crush:["Resistant","cfffa1500"],Slash:["Neutral","cffffffff"],Cold:["Vulnerable","cFF00fa60"],Energy:["Resistant","cfffa1500"],Heat:["Resistant","cfffa1500"],Matter:["Vulnerable","cFF00fa60"],Spirit:["Neutral","cffffffff"],Body:["Resistant","cfffa1500"]}
  532. if (charClass="Friar")||(charClass="Infiltrator")
  533. resistances:={Thrust:["Resistant","cfffa1500"],Crush:["Vulnerable","cFF00fa60"],Slash:["Neutral","cffffffff"],Cold:["Resistant","cfffa1500"],Energy:["Neutral","cffffffff"],Heat:[" Vulnerable","cFF00fa60"],Matter:["Neutral","cffffffff"],Spirit:["Neutral","cffffffff"],Body:["Resistant","cfffa1500"]}
  534. if (charClass="Theurgist")||(charClass="Wizard")||(charClass="Cabalist")||(charClass="Sorcerer")||(charClass="Necromancer")
  535. resistances:={Thrust:["Neutral","cffffffff"],Crush:["Neutral","cffffffff"],Slash:["Neutral","cffffffff"],Cold:["Neutral","cffffffff"],Energy:["Resistant","cfffa1500"],Heat:[" Neutral","cffffffff"],Matter:["Neutral","cffffffff"],Spirit:["Neutral","cffffffff"],Body:["Resistant","cfffa1500"]}
  536. ;hib
  537. if (charClass="Champion")||(charClass="Druid")||(charClass="Hero")||(charClass="Warden")
  538. resistances:={Thrust:["Neutral","cffffffff"],Crush:["Resistant","cfffa1500"],Slash:["Vulnerable","cFF00fa60"],Cold:["Vulnerable","cFF00fa60"],Energy:["Vulnerable","cFF00fa60"],Heat:[" Resistant","cfffa1500"],Matter:["Resistant","cfffa1500"],Spirit:["Neutral","cffffffff"],Body:["Neutral","cffffffff"]}
  539. if (charClass="Bard")||(charClass="Blademaster")||(charClass="Ranger")
  540. resistances:={Thrust:["Neutral","cffffffff"],Crush:["Vulnerable","cFF00fa60"],Slash:["Resistant","cfffa1500"],Cold:["Vulnerable","cFF00fa60"],Energy:["Resistant","cfffa1500"], Heat:["Resistant","cfffa1500"],Matter:["Vulnerable","cFF00fa60"],Spirit:["Neutral","cffffffff"],Body:["Resistant","cfffa1500"]}
  541. if (charClass="Nightshade")
  542. resistances:={Thrust:["Neutral","cffffffff"],Crush:["Vulnerable","cFF00fa60"],Slash:["Resistant","cfffa1500"],Cold:["Resistant","cfffa1500"],Energy:["Neutral","cffffffff"],Heat:[ "Vulnerable","cFF00fa60"],Matter:["Neutral","cffffffff"],Spirit:["Neutral","cffffffff"],Body:["Resistant","cfffa1500"]}
  543. if (charClass="Animist")||(charClass="Enchanter")||(charClass="Mentalist")||(charClass="Eldritch")||(charClass="Valewalker")
  544. resistances:={Thrust:["Neutral","cffffffff"],Crush:["Neutral","cffffffff"],Slash:["Neutral","cffffffff"],Cold:["Neutral","cffffffff"],Energy:["Resistant","cfffa1500"],Heat:[" Neutral","cffffffff"],Matter:["Neutral","cffffffff"],Spirit:["Neutral","cffffffff"],Body:["Resistant","cfffa1500"]}
  545. ;mid
  546. if(charClass="Healer")||(charClass="Shaman")||(charClass="Skald")||(charClass="Thane")||(charClass="Warrior")
  547. resistances:={Thrust:["Vulnerable","cFF00fa60"],Crush:["Neutral","cffffffff"],Slash:["Resistant","cfffa1500"],Cold:["Neutral","cffffffff"],Energy:["Vulnerable","cFF00fa60"],Heat:["Resistant","cfffa1500"],Matter:["Neutral","cffffffff"],Spirit:["Neutral","cffffffff"],Body:["Neutral","cffffffff"]}
  548. if (charClass="Berserker")||(charClass="Hunter")||(charClass="Savage")
  549. resistances:={Thrust:["Resistant","cfffa1500"],Crush:["Neutral","cffffffff"],Slash:["Vulnerable","cFF00fa60"],Cold:["Vulnerable","cFF00fa60"],Energy:["Resistant","cfffa1500"],Heat:[" Resistant","cfffa1500"],Matter:["Vulnerable","cFF00fa60"],Spirit:["Neutral","cffffffff"],Body:["Resistant","cfffa1500"]}
  550. if (charClass="Shadowblade")
  551. resistances:={Thrust:["Resistant","cfffa1500"],Crush:["Neutral","cffffffff"], Slash:["Vulnerable","cFF00fa60"],Cold:["Resistant","cfffa1500"],Energy:["Neutral","cffffffff"],Heat:["Vulnerable","cFF00fa60"],Matter:["Neutral","cffffffff"],Spirit:["Neutral","cffffffff"],Body:["Resistant","cfffa1500"]}
  552. if (charClass="Bonedancer")||(charClass="Runemaster")||(charClass="Spiritmaster")
  553. resistances:={Thrust:["Neutral","cffffffff"],Crush:["Neutral","cffffffff"],Slash:["Neutral","cffffffff"], Cold:["Neutral","cffffffff"],Energy:["Resistant","cfffa1500"],Heat:["Neutral","cffffffff"],Matter:["Neutral","cffffffff"],Spirit:["Neutral","cffffffff"],Body:["Resistant","cfffa1500"]}
  554.  
  555.  
  556. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement