Advertisement
Guest User

Untitled

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