Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.99 KB | None | 0 0
  1. SetTitleMatchMode,2
  2. DetectHiddenWindows, On
  3. #include Gdip_All.ahk
  4. #include Gdip_Ext.ahk
  5. SetWorkingDir %A_ScriptDir%
  6. CoordMode, Mouse, Screen
  7. ;Menu, Tray, Icon, Lookup.ico
  8. #Persistent ; Stay open in background
  9. counter:=0
  10. ; --- Global variables
  11. global chatlogkey, start, exit, configkey,config, title,gui3_x,gui3_y, newpos, charName,vText, charRace,targetwindowx, targetwindowy
  12. toggle:=1
  13. State:=1
  14. title:=Dark Age of Camelot
  15. PH:="<h1>Phoenix Herald</h1>"
  16. config:="config.ini"
  17. file2=\Electronic Arts\Dark Age of Camelot\
  18. file=chat.log
  19. ;--- Check for configini and creates if not one
  20. ifnotexist,%config%
  21. {
  22. msgbox Could not find config file generating new one
  23. IniWrite, F2, %config% ,Keys, start
  24. IniWrite,Escape, %config% ,Keys, exit
  25. IniWrite, F3, %config% ,Keys, configkey
  26. IniWrite, F4, %config% ,Keys, chatlogkey
  27. iniwrite, x0 y0,%config%,window position,main
  28. iniwrite, 1,%config%,window position,targetwindowx
  29. iniwrite, 1,%config%,window position,targetwindowy
  30. IniWrite, %A_MyDocuments%%file2%%file%,%config%, chatlog, file
  31. IniWrite, 1, %config%, options, relative
  32. IniWrite, 1, %config%, options, Resist1
  33. IniWrite, 0, %config%, options, Resist2
  34. IniWrite, 0, %config%, options, dropshadow
  35. IniWrite, Arial, %config%, options, Fontstylefont
  36. IniWrite, 16, %config%, options, Fontstylesize
  37. While ! FileExist( config )
  38. {
  39. Sleep 250
  40. }
  41. gosub config
  42. }
  43.  
  44. if (Resist1= 0)
  45. AllResist:=2
  46. If (Resist2=0)
  47. AllResist:=1
  48. ;--- Read ini file and assign keys
  49. IniRead, start, %config%, Keys, start
  50. IniRead, exit, %config%, Keys, exit
  51. IniRead, configkey, %config%, Keys, configkey
  52. IniRead, chatlogkey, %config%, Keys, chatlogkey
  53. IniRead, chatLog, %config%, chatlog, file
  54. IniRead, main, %config%, window position, main
  55. IniRead, targetwindowx, %config%, window position, targetwindowx
  56. IniRead, targetwindowy, %config%, window position, targetwindowy
  57. IniRead, relative, %config%, options, relative , 0
  58. IniRead, Resist1, %config%, options,Resist1 , 0
  59. IniRead, Resist2, %config%, options,Resist2 , 0
  60. Iniread, dropshadow, %config%,options,dropshadow
  61. Iniread, Fontstylefont, %config%, options, Fontstylefont
  62. Iniread, Fontstylesize, %config%, options, Fontstylesize
  63. options3=s%Fontstylesize%
  64. if (Resist1=0)
  65. AllResist:=2
  66. If (Resist2=0)
  67. AllResist:=1
  68. Hotkey, ~LButton, daoc, off
  69. Hotkey, %start%, start, on
  70. Hotkey, %exit%, escape, on
  71. Hotkey, %configkey%, config, on
  72. OnMessage(0x03, "MsgMonitor")
  73. OnMessage(0x201, "WM_LBUTTONDOWN")
  74. If !pToken := Gdip_Startup()
  75. ExitApp
  76.  
  77. Width:=400, height:=200
  78. Gui, 3: -Caption +E0x80000 +LastFound +AlwaysOnTop +ToolWindow +OwnDialogs
  79. Gui, 3: Show, NA
  80. hwnd1 := WinExist()
  81. hbm := CreateDIBSection(Width, Height)
  82. hdc := CreateCompatibleDC()
  83. obm := SelectObject(hdc, hbm)
  84. G := Gdip_GraphicsFromHDC(hdc)
  85. Gdip_SetSmoothingMode(G, 4)
  86. pBrush := Gdip_BrushCreateSolid(0x590000)
  87. Gdip_FillRectangle(G, pBrush, 0, 0, Width, Height)
  88. Gdip_DeleteBrush(pBrush)
  89. Font = %Fontstylefont%
  90. If !Gdip_FontFamilyCreate(Font)
  91. {
  92. msgbox Font not installed setting to Arial
  93. IniWrite, Arial, %config%, options, Fontstylefont
  94. Iniread, Fontstylefont, %config%, options, Fontstylefont
  95. Font = %Fontstylefont%
  96. Gdip_FontFamilyCreate(Font)
  97. }
  98. Gui,1: +e0x20 +AlwaysOnTop +LastFound -SysMenu
  99. Gui,1: Color, ffffff, ffffff
  100. Gui,1: Font, Normal c1e91bb
  101. Gui,1: Add, Groupbox, x7 y7 h65 w160, [Lookup] Quickstart
  102. Gui,1: Font, Normal s8 c000000, Verdana
  103. Gui 1: Add,Text, x15 y24 BackgroundTrans vtext4 GuiMove w200,%start% - Start Script`n%configkey% - Configurations/FAQ`n%exit% - Exit
  104. Gui,1: show, %main% w173 h78 , DAoC Lookup
  105. return
  106.  
  107. ;--- Start key pushed
  108. start:
  109. gui,1: hide
  110. ;gui,3:show
  111. Hotkey, ~LButton, toggle
  112.  
  113. IniRead, chatlogkey, %config%, Keys, chatlogkey
  114. Iniread, targetwindowx, %config%, window position, targetwindowx
  115. Iniread, targetwindowy, %config%, window position, targetwindowy
  116. options3=s%Fontstylesize%
  117. ifwinexist,ahk_exe game.dll
  118. {
  119. winactivate
  120. winwaitactive, %title%
  121. }
  122. else
  123. winwaitactive, %title%
  124.  
  125. return
  126.  
  127. daoc:
  128. if winactive("ahk_exe game.dll")
  129. {
  130. gui,3:show, NA
  131. counter++
  132. if (x!=1)
  133. send {%chatlogkey%}
  134. sleep 300
  135. send {%chatlogkey%}
  136. lastChar := FileReadLineFromBottom(chatLog, 6)
  137.  
  138. ; --- Parse Herald
  139. document:= ComObjCreate("HTMLfile")
  140. page1:=get("https://herald.playphoenix.online/c/"+lastChar)
  141.  
  142. lines := StrSplit(page1, "`n")
  143. columns := []
  144. for index, value in lines
  145. columns.Insert(StrSplit(value, "`t"))
  146.  
  147. unfName := columns[49][1]
  148. unfGuild := columns[51][1]
  149. unfClass := columns[53][1]
  150. unfLevel := columns[57][1]
  151. unfRankLevel := columns[61][1]
  152. unfRace := columns[65][1]
  153. unfRankName := columns[67][1]
  154.  
  155. charName := RegExReplace(unfName,"\x20{2,}"," ")""
  156. unfGuild1 := RegExReplace(unfGuild,"<.*?>")
  157. unfGuild2 := RegExReplace(unfGuild1,"(&lt)")
  158. unfGuild3 := RegExReplace(unfGuild2,"(&gt)")
  159. charGuild := RegExReplace(unfGuild3,"\x20{2,}"," ")""
  160. charClass := RegExReplace(unfClass,"\x20{2,}"," ")""
  161. charLevel := RegExReplace(unfLevel,"\x20{2,}"," ")""
  162. unfRankLevel1 := RegExReplace(unfRankLevel,"\x20{2,}"," ")""
  163. charRankLevel := RegExReplace(unfRankLevel1,"ealm Rank ","")
  164. charRace := RegExReplace(unfRace,"\x20{2,}"," ")""
  165. charRankName := RegExReplace(unfRankName,"\x20{2,}"," ")""
  166.  
  167. StringTrimLeft, charName, charName, 1
  168. StringTrimLeft, charClass, charClass, 1
  169. StringTrimLeft, charLevel, charLevel, 1
  170. StringTrimLeft, charRankLevel, charRankLevel, 1
  171. StringTrimLeft, charRace, charRace, 1
  172. StringTrimLeft, charRankName, charRankName, 1
  173. StringTrimRight, charGuild, charGuild, 1
  174.  
  175. if (relative=1)
  176. gosub GetColor
  177.  
  178. else
  179. targetColor:=c80FFFFF
  180.  
  181. If (dropshadow=0)
  182. {
  183. TTG:="Gdip_TextToGraphics"
  184. options2:=
  185. }
  186. else
  187. {
  188. TTG:="Gdip_TextToGraphics2"
  189. options2:="ow4"
  190. }
  191.  
  192. nameLength := StrLen(charName)
  193. guildLength:=StrLen(charGuild)
  194. IfnotInString, page1, %PH%
  195. {
  196. G := Gdip_GraphicsFromHDC(hdc)
  197. Gdip_SetCompositingMode(G, 1)
  198. pBrush := Gdip_BrushCreateSolid(0x00000000) ; fully transparent brush 'eraser'
  199. Gdip_FillRectangle(G, pBrush, 0, 0, Width, Height)
  200. Gdip_DeleteBrush(pBrush)
  201. Gdip_SetCompositingMode(G, 0)
  202. Gdip_SetSmoothingMode(G, 4)
  203. pBrush := Gdip_BrushCreateSolid(0x00000000)
  204. Gdip_FillRectangle(G, pBrush, 0, 0, Width, Height)
  205. Gdip_DeleteBrush(pBrush)
  206. Options = x0p y0p Centre r4 Bold
  207. %TTG%(G, charName "`n <" charGuild ">" "`n" charLevel " " charRankLevel "`n" charRace " " charClass charRank , Options options2 options3 targetColor, Font, Width, Height)
  208. gosub getresist
  209. if (AllResist=1)
  210. {
  211. Options = x50p y19 w80p Center r4 Bold
  212. %TTG%(G, "Thrust", Options options2 options3 resistances.Thrust.2, Font, Width, Height)
  213. Options = x50p y37 w80p Center r4 Bold
  214. %TTG%(G, "Crush", Options options2 options3 resistances.Crush.2, Font, Width, Height)
  215. Options = x50p y56 w80p Center r4 Bold
  216. %TTG%(G, "Slash", Options options2 options3 resistances.Slash.2, Font, Width, Height)
  217. }
  218. if (AllResist=2)
  219. {
  220. ;these need to be fixed visually
  221. %TTG%(G, "Cold", Options options2 options3 resistances.Cold.2, Font, Width, Height)
  222. %TTG%(G, "Heat", Options options2 options3 resistances.Heat.2, Font, Width, Height)
  223. %TTG%(G, "Energy", Options options2 options3 resistances.Energy.2, Font, Width, Height)
  224. %TTG%(G, "Spirit", Options options2 options3 resistances.Spirit.2, Font, Width, Height)
  225. %TTG%(G, "Matter", Options options2 options3 resistances.Matter.2, Font, Width, Height)
  226. %TTG%(G, "Body", Options options2 options3 resistances.Body.2, Font, Width, Height)
  227. }
  228. UpdateLayeredWindow(hwnd1, hdc, targetwindowx,targetwindowy, Width, Height)
  229. }
  230. else
  231. {
  232.  
  233.  
  234. UpdateLayeredWindow(hwnd1, hdc, targetwindowx,targetwindowy, Width, Height)
  235. }
  236.  
  237. return
  238. }
  239.  
  240. return
  241.  
  242. ;--------------------------------------------
  243.  
  244.  
  245. ;--------------------------------------config gui 2
  246. config:
  247. IniRead, start, %config%, Keys, start
  248. IniRead, exit, %config%, Keys, exit
  249. IniRead, configkey, %config%, Keys, configkey
  250. IniRead, chatlogkey, %config%, Keys, chatlogkey
  251. IniRead, chatLog, %config%, chatlog, file
  252. IniRead, main, %config%, window position, main
  253. IniRead, relative, %config%, options, relative , 0
  254. IniRead, Resist1, %config%, options, Resist1
  255. IniRead, Resist2, %config%, options, Resist2
  256. Iniread, dropshadow, %config%,options,dropshadow
  257. Iniread, Fontstylefont, %config%, options, Fontstylefont
  258. Iniread, Fontstylesize, %config%, options, Fontstylesize
  259. Hotkey, ~LButton, daoc, off
  260. Hotkey, %start%, start, off
  261. Hotkey, %exit%, escape, off
  262. Hotkey, %configkey%, config, off
  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 vdropshadow, 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. GuiControl,2: , Button7, %dropshadow%
  342. GuiControl,2: ChooseString, Fontstylefont, %Fontstylefont%
  343. GuiControl,2: ChooseString, Fontstylesize, %Fontstylesize%
  344. options3=s%Fontstylesize%
  345. ToolTip:
  346. MouseGetPos, , , id, control
  347. WinGetTitle, title, ahk_id %id%
  348. if title = DAoC TargetInfo - Configuration
  349. {
  350. tmpVar := var_%control%
  351. ToolTip, %tmpVar%
  352. }
  353. return
  354. Return
  355.  
  356. ;-------------------------------------web function
  357.  
  358. get(URL){
  359. ComObjError(false)
  360. r:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
  361. r.Open("GET", URL, true),r.Send(),r.WaitForResponse()
  362. return r.ResponseText
  363. }
  364. ;----------------------------------------------
  365.  
  366. ;--------------------------------------------readchatlog for target line
  367. FileReadLineFromBottom(chatLog, Offset)
  368. {
  369. FileRead f1, % chatLog
  370. StringReplace f1, f1, `n, `n, UseErrorLevel
  371. FileReadLine Line, % chatLog, ErrorLevel + 1 - Offset
  372. Filedelete, % chatLog
  373. if RegExMatch(Line, "You target \[(.*)\]\.", Output)
  374. Return Output1
  375. }
  376. ;---------------------------------------------
  377.  
  378. Check:
  379. gui, submit, nohide
  380. if (Resist1= 0)
  381. AllResist:=2
  382. If (Resist2=0)
  383. AllResist:=1
  384. Return
  385.  
  386. ;---------------------------------------gui stuff
  387. uiMove:
  388. PostMessage, 0xA1, 2,,, A
  389. Return
  390.  
  391. ;----------------------------------exit
  392. escape:
  393. exitapp
  394. return
  395.  
  396.  
  397. ;--------------------------close config window
  398. 2GuiClose:
  399. gui, 2:destroy
  400. GuiControl,1: , text4,%start% - Start Script`n%configkey% - Configurations/FAQ`n%exit% - Exit
  401. gui, 1:show
  402. Hotkey, %start%, start, on
  403. Hotkey, %exit%, escape, on
  404. Hotkey, %configkey%, config, on
  405. return
  406.  
  407. ;-------------------------folder select
  408. chatlog:
  409. Gui,2: +OwnDialogs
  410. fileselectfolder, folder
  411. folder:= RegExReplace(Folder, "\\$")
  412. chatlog = %folder%\%file%
  413. Iniwrite, %chatlog%, %config%, chatlog, file
  414. GuiControl, , ChatlogLoc, %chatLog%
  415. return
  416.  
  417.  
  418. ;--------------------------------------save button
  419. buttonsave:
  420. GuiControlGet, start, 2:
  421. GuiControlGet, exit, 2:
  422. GuiControlGet, configkey, 2:
  423. GuiControlGet, chatlogkey, 2:
  424. GuiControlGet, relative, 2:
  425. GuiControlGet, Resist1, 2:
  426. GuiControlGet, Resist2, 2:
  427. GuiControlGet, dropshadow, 2:
  428. GuiControlget, Fontstylefont, 2:
  429. GuiControlget, Fontstylesize, 2:
  430. ;saves keys from gui to ini
  431.  
  432. ;--------------------------checks for duplicate hotkey
  433. Keylist := [start, exit, configkey, chatlogkey]
  434. Keys :={}
  435.  
  436. For each, key in keylist
  437. {
  438. If !(keys.haskey(key))
  439. Keys[key] := 1
  440. Else
  441. {
  442. Msgbox Error! Make sure the keys are unique!
  443. Return
  444. }
  445. }
  446.  
  447. ;-----------------------------------------
  448. Iniwrite, %start%, %config%, Keys, start
  449. Iniwrite, %exit%, %config%, Keys, exit
  450. Iniwrite, %configkey%, %config%, Keys, configkey
  451. Iniwrite, %chatlogkey%, %config%, Keys, chatlogkey
  452. IniWrite, %relative%, %config%, options, relative
  453. IniWrite, %Resist1%, %config%, options, Resist1
  454. IniWrite, %Resist2%, %config%, options, Resist2
  455. IniWrite, %dropshadow%, %config%, options, dropshadow
  456. IniWrite, %Fontstylefont%, %config%, options, Fontstylefont
  457. Iniwrite, %Fontstylesize%, %config%, options, Fontstylesize
  458.  
  459. gui, 2:destroy
  460. ;------------------------------------------read ini file and assign keys
  461. IniRead, start, %config%, Keys, start
  462. IniRead, exit, %config%, Keys, exit
  463. IniRead, configkey, %config%, Keys, configkey
  464. IniRead, chatlogkey, %config%, Keys, chatlogkey
  465. IniRead, relative, %config%, options, relative
  466. IniRead, Resist1, %config%, options, Resist1
  467. IniRead, Resist2, %config%, options, Resist2
  468. iniread, dropshadow, %config%,options, dropshadow
  469. Iniread, Fontstylefont, %config%, options, Fontstylefont
  470. Iniread, Fontstylesize, %config%, options, Fontstylesize
  471. options3=s%Fontstylesize%
  472. ;-----------------------------------------------
  473. GuiControl,1: , text4,%start% - Start Script`n%configkey% - Configurations/FAQ`n%exit% - Exit
  474. gui,1:show
  475. Hotkey, %start%, start, on
  476. Hotkey, %exit%, escape, on
  477. Hotkey, %configkey%, config, on
  478. return
  479.  
  480. ;------------------------chatlog key must be a function key possible other keys add to list must be wrapped in to work {F1}
  481. ;{ins}{del} etc... https://www.autohotkey.com/docs/commands/Send.htm
  482. chatlogged:
  483.  
  484. GuiControlGet chatlogkey, 2:
  485. keylist2:=["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"]
  486. if !Contains(keylist2, chatlogkey)
  487. msgbox Please enter a function key F1-F12.
  488.  
  489. Contains(obj, chatlogkey) {
  490. for i, val in obj {
  491. if(val = chatlogkey) {
  492. return true
  493. }
  494. }
  495. }
  496. return
  497.  
  498. GetColor:
  499. alblist:=["Briton","Highlander","Avalonian","Saracen","Inconnu","Half Ogre"]
  500. hiblist:=["Lurikeen","Celt","Sylvan","Firbolg","Elf","Shar"]
  501. midlist:=["Troll","Dwarf","Kobold","Norseman","Valkyn","Frostalf"]
  502. Error:=["Error"]
  503. if Contains(alblist, charRace)
  504. targetColor = cFFd60000
  505. else if Contains(hiblist, charRace)
  506. targetColor = cFF37d600
  507. else if Contains(midlist, charRace)
  508. targetColor = cFF0056d6
  509. else
  510. targetColor=cFFb80af2
  511. Return
  512.  
  513.  
  514. WM_LBUTTONDOWN()
  515. {
  516. PostMessage, 0xA1, 2
  517. }
  518.  
  519.  
  520.  
  521. MsgMonitor(wParam, lParam)
  522. {
  523. X := lParam & 0xFFFF
  524. Y := lParam >> 16
  525. if (oX!=X)||(oY!=Y)
  526. {
  527. if (A_Gui=1)
  528. iniwrite, x%X% y%Y%,%config%,window position,main
  529. if (A_Gui=2)
  530. iniwrite, x%X% y%Y%,%config%,window position,config
  531. if (A_Gui=3)
  532. {
  533. if (x!=32768)
  534. {
  535. iniwrite, %X%,%config%,window position,targetwindowx
  536. iniwrite, %Y%,%config%,window position,targetwindowy
  537. }
  538. }
  539. oX:=%X%
  540. oY:=%Y%
  541. }
  542. IniRead, targetwindowx, %config%, window position, targetwindowx
  543. IniRead, targetwindowy, %config%, window position, targetwindowy
  544. }
  545.  
  546. GetResist:
  547. 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"]
  548. ;alb
  549. if (charClass="Armsman")||(charClass="Paladin")||(charClass="Armswoman")
  550. 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"]}
  551. if (charClass="Cleric")||(charClass="Mercenary")||(charClass="Minstrel")||(charClass="Reaver")
  552. 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"]}
  553. if (charClass="Scout")
  554. 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"]}
  555. if (charClass="Friar")||(charClass="Infiltrator")
  556. 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"]}
  557. if (charClass="Theurgist")||(charClass="Wizard")||(charClass="Cabalist")||(charClass="Sorcerer")||(charClass="Necromancer")
  558. 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"]}
  559. ;hib
  560. if (charClass="Champion")||(charClass="Druid")||(charClass="Hero")||(charClass="Warden")
  561. 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"]}
  562. if (charClass="Bard")||(charClass="Blademaster")||(charClass="Ranger")
  563. 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"]}
  564. if (charClass="Nightshade")
  565. 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"]}
  566. if (charClass="Animist")||(charClass="Enchanter")||(charClass="Mentalist")||(charClass="Eldritch")||(charClass="Valewalker")
  567. 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"]}
  568. ;mid
  569. if(charClass="Healer")||(charClass="Shaman")||(charClass="Skald")||(charClass="Thane")||(charClass="Warrior")
  570. 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"]}
  571. if (charClass="Berserker")||(charClass="Hunter")||(charClass="Savage")
  572. 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"]}
  573. if (charClass="Shadowblade")
  574. 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"]}
  575. if (charClass="Bonedancer")||(charClass="Runemaster")||(charClass="Spiritmaster")
  576. 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"]}
  577.  
  578.  
  579. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement