Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.61 KB | None | 0 0
  1. Filedelete, Trading.txt
  2. #SingleInstance, force
  3. ;#Include Itemstatsfixed.txt
  4. fileread,stringfromfile, %A_workingdir%\trade.trade
  5. /*
  6. Gui, Add, CheckBox, x2 y30 w140 h20 , Filter Items
  7. Gui, Add, CheckBox, x22 y50 w140 h20 , Display Variable Stats
  8. Gui, Add, Edit, x2 y70 w160 h50 , Edit
  9. Gui, Add, Edit, x332 y30 w80 h30 , Edit
  10. Gui, Add, Text, x412 y30 w100 h30 , Header Size
  11. Gui, Add, Edit, x332 y60 w80 h30 , Edit
  12. Gui, Add, Text, x412 y60 w100 h30 , Text
  13. Gui, Add, Text, x162 y70 w150 h40 , CSV list to filter our stats
  14. Gui, Add, Button, x472 y140 w100 h30 gstart, Start
  15. ; Generated using SmartGUI Creator for SciTE
  16. Gui, Show, w579 h177, Options
  17. return
  18. */
  19.  
  20. matchlist := "Horadric Cube,Key,Flawless,Topaz,Tome of Town Portal,Tome of Identify,Mephisto's Soulstone,chipped topaz,flawed topaz,flawless topaz,perfect topaz,chipped ruby,flawed ruby,ruby,flawless ruby,perfect ruby,chipped emerald,flawed emerald,emerald,flawless emerald,perfect emerald,chipped sapphire,flawed sapphire,sapphire,flawless sapphire,perfect sapphire,chipped skull,flawed skull,skull,flawless skull,perfect skull,chipped emerald,flawed emerald,emerald,flawless emerald,perfect emerald,chipped diamond,flawed diamond,diamond,flawless diamond,perfect diamond,rejuvenation potion,full rejuvenation potion"
  21.  
  22. matchlist2 := "Jewel, Charm, Facet"
  23.  
  24. matslist := "Azathoth's Brain,Azathoth's Eye,Azathoth's Heart,The Cow King's Eye,The Cow King's Brain,The Cow King's Horn "
  25.  
  26. charmlist := "small charm, large charm, grand charm"
  27.  
  28. JewelList := "Jewel, Facet"
  29.  
  30. VariableStats := []
  31.  
  32. CharmMatch := "Maximum Throw Damage,Poison Length,Poison Count,Cold Length"
  33.  
  34. VariableFilter := "Slower Stamina Drain,Strength,Dexterity,Vitality,Energy,Life after each Kill"
  35.  
  36. GameArray := { "Dol Rune":"", "Hel Rune":"", "Io Rune":"", "Lum Rune":"", "Ko Rune":"", "Fal Rune":"", "Lem Rune":""
  37. , "Pul Rune":"", "Um Rune":"", "Mal Rune":"", "Ist Rune":"", "Gul Rune":"", "Vex Rune":"", "Ohm Rune":""
  38. , "Lo Rune":"", "Sur Rune":"", "Ber Rune":"", "Jah Rune":"", "Cham Rune":"", "Zod Rune":"" }
  39.  
  40. loop, read, itemstatsfixed.txt
  41. {
  42. Stringleft, item, A_Loopreadline,1
  43. If item = `@
  44. {
  45. stringtrimleft, item2, A_Loopreadline, 1
  46. lastitem := Item2
  47. }
  48. else
  49. VariableStats[ item2 ] .= A_loopreadline ","
  50. }
  51.  
  52.  
  53. For key, val in GameArray
  54. {
  55. if ( RegExReplace( StringFromFile, "`%" key, "", Count ) != StringFromFile )
  56. {
  57. GameArray[ key ] := Count
  58. ArrayCount += 1
  59. DisplayString .= " " count " " key "s `n"
  60. }
  61. }
  62. MatArray := { "Azathoth's Brain":"", "Azathoth's Eye":"", "Azathoth's Heart":"", "The Cow King's Horn":"", "The Cow King's Brain":"", "The Cow King's Eye":"" }
  63.  
  64. For key, val in MatArray
  65. {
  66. if ( RegExReplace( StringFromFile, "`%" key, "", Count ) != StringFromFile )
  67. {
  68. MatArray[ key ] := Count
  69. MatsString .= " " count " " key "s `n"
  70. }
  71.  
  72. }
  73. If DisplayString <>
  74. {
  75. Fileappend, [Size=5]Runes:[/size]`n, trading.txt
  76. TotalF .= "[Size=5]Runes:[/size]`n"
  77. fileappend, %Displaystring%, trading.txt
  78. TotalF .= Displaystring
  79. fileappend, `n`n`n, trading.txt
  80. TotalF .= "`n`n`n"
  81. }
  82.  
  83. If MatsString <>
  84. {
  85. Fileappend, [Size=5]Materials:[/size]`n, trading.txt
  86. TotalF .= "[Size=5]Materials:[/size]`n"
  87. fileappend, %Matsstring%, trading.txt
  88. TotalF .= Matsstring
  89. fileappend, `n`n`n, trading.txt
  90. TotalF .= "`n`n`n"
  91. }
  92.  
  93. Loop, Read, Trade.Trade
  94. {
  95. stringleft, Check, A_LoopReadLine, 1
  96. If Check = `%
  97. {
  98. IF checknewline = 1
  99. {
  100. charms .= "`n"
  101. checknewline := 0
  102. }
  103. Stringtrimleft, CheckFull, A_LoopReadLine, 1
  104. If Checkfull contains %charmlist%
  105. charms .= "[b]" checkfull "[/b]"
  106. lastitem := A_loopreadline
  107. }
  108. else
  109. If lastitem contains %charmlist%
  110. {
  111. stringleft, Check, A_loopreadline, 3
  112. If Check = <m>
  113. {
  114. If A_loopreadline not contains %CharmMatch%
  115. {
  116. stringtrimleft, Checkfull, A_loopreadline, 3
  117. charms .= "\" checkfull
  118. checkNewline := 1
  119. }
  120. }
  121. }
  122. }
  123. If Charms <>
  124. {
  125. sort, charms
  126. Fileappend, [Size=5]Charms:[/size]`n, trading.txt
  127. TotalF .= "[Size=5]Charms:[/size]`n"
  128. fileappend, %charms%, trading.txt
  129. TotalF .= Charms
  130. fileappend, `n`n`n, trading.txt
  131. TotalF .= "`n`n`n"
  132. }
  133. Loop, Read, Trade.Trade
  134. {
  135. stringleft, Check, A_LoopReadLine, 1
  136. If Check = `%
  137. {
  138. IF checknewline = 1
  139. {
  140. Jewels .= "`n"
  141. checknewline := 0
  142. }
  143. Stringtrimleft, CheckFull, A_LoopReadLine, 1
  144. If Checkfull contains %Jewellist%
  145. Jewels .= "[b]" checkfull "[/b]"
  146. lastitem := A_loopreadline
  147. }
  148. else
  149. If lastitem contains %JewelList%
  150. {
  151. stringleft, Check, A_loopreadline, 3
  152. If Check = <m>
  153. {
  154. stringtrimleft, Checkfull, A_loopreadline, 3
  155. IfNotInstring, checkfull, Maximum Throw Damage
  156. {
  157. IfNotInString, checkfull, Chance to cast
  158. {
  159. Jewels .= "/" checkfull
  160. checknewline := 1
  161. }
  162. }
  163. }
  164. }
  165. }
  166. If Jewels <>
  167. {
  168. Fileappend, [Size=5]Jewels and Facets:[/size]`n, trading.txt
  169. TotalF .= "[Size=5]Jewels and Facets:[/size]`n"
  170. fileappend, %Jewels%, trading.txt
  171. sort, Jewels
  172. TotalF .= Jewels
  173. fileappend, `n`n`n, trading.txt
  174. TotalF .= "`n`n`n"
  175. }
  176.  
  177. Loop, Read, Trade.trade
  178. {
  179. Stringleft, Check3, A_loopreadline, 3
  180.  
  181. if A_loopfield in %Charmlist%
  182. Continue
  183. if A_loopfield in %matchlist%
  184. continue
  185. stringright, Check, A_loopreadline, 4
  186. If Check = Rune
  187. Continue
  188. stringleft, Check, A_LoopReadLine, 1
  189. If Check = `%
  190. {
  191.  
  192. Stringtrimleft, CheckFull, A_LoopReadLine, 1
  193.  
  194. if checkfull contains %matchlist2%
  195. continue
  196. else
  197. if checkfull in %matchlist%
  198. continue
  199. else
  200. if checkfull contains %matslist%
  201. continue
  202. else
  203. if Linechecker := 1
  204. {
  205. Items .= "`n"
  206. Linecheck := 0
  207. }
  208. lastitem := checkfull
  209. Items .= "[B]" checkfull "[/B]/"
  210. }
  211. else
  212. If Check3 = <m>
  213. {
  214. stringtrimleft, checkfull, A_loopreadline, 3
  215. variabletrue := Variablestats[lastitem]
  216. real := Regexreplace(checkfull, "[\[\]\d\+\-%]", "")
  217. stringleft, real1, real, 1
  218. if real1 := A_Space
  219. stringreplace, real, real, %A_space%
  220. if real in %Variabletrue%
  221. If VariableTrue not contains %VariableFilter%
  222. {
  223. Items .= Checkfull "/"
  224. linechecker := 1
  225. }
  226. }
  227. }
  228. loop, parse, items, `n
  229. {
  230. stringright, real, A_loopfield, 1
  231. if real = /
  232. stringtrimright, realer, A_loopfield, 1
  233. items2 .= realer "`n"
  234. }
  235.  
  236. sort, items2
  237.  
  238. Fileappend, [Size=5]Items:[/size]`n, trading.txt
  239. Fileappend,%Items2%, Trading.txt
  240.  
  241. ;Rune Information
  242.  
  243. For key, value in Gamearray
  244. {
  245. stringreplace, key, key, %A_space%Rune,,
  246. If Value =
  247. Value := 0
  248. %key% := value
  249.  
  250. }
  251. Hel := Hel + (dol/3)
  252. Hel := Floor(Hel)
  253. Io := Io + (Hel/3)
  254. Io := Floor(Io)
  255. Lum := Lum + (Io/3)
  256. Lum := Floor(Lum)
  257. Ko := Ko + (Lum/3)
  258. Ko := Floor(Ko)
  259. Fal := Fal + (Ko/3)
  260. Fal := Floor(Fal)
  261. Lem := Lem + (Fal/3)
  262. Lem := Floor(Lem)
  263. Pul := Pul + (Lem/3)
  264. Pul := Floor(Pul)
  265. Um := Um + (Pul/2)
  266. Um := Floor(Um)
  267. Mal := Mal + (Um/2)
  268. Mal := Floor(Mal)
  269. Ist := Ist + (Mal/2)
  270. Ist := Floor(Ist)
  271. Gul := Gul + (Ist/2)
  272. Gul := Floor(Gul)
  273. Vex := Vex + (Gul/2)
  274. Vex := Floor(Vex)
  275. Ohm := Ohm + (Vex/2)
  276. Ohm := Floor(Ohm)
  277. Lo := Lo + (Ohm/2)
  278. Lo := Floor(Lo)
  279. Sur := Sur + (Lo/2)
  280. Sur := Floor(Sur)
  281. Ber := Ber + (Sur/2)
  282. Ber := Floor(Ber)
  283. Jah := Jah + (Ber/2)
  284. Jah := Floor(Jah)
  285. Cham := Cham + (Jah/2)
  286. Cham := Floor(Cham)
  287. Zod := Zod + (Cham/2)
  288. Zod := Floor(Zod)
  289. /*
  290. fileappend, `n`n`n`n`n, Trading.txt
  291. fileappend,
  292. (
  293. %Hel% Hel Runes
  294. %Io% Io Runes
  295. %Lum% Lum Runes
  296. %Ko% Ko Runes
  297. %Fal% Fal Runes
  298. %Lem% Lem Runes
  299. %Pul% Pul Runes
  300. %Um% Um Runes
  301. %Mal% Mal Runes
  302. %Ist% Ist Runes
  303. %Gul% Gul Runes
  304. %Vex% Vex Runes
  305. %Ohm% Ohm Runes
  306. %Lo% Lo Runes
  307. %Sur% Sur Runes
  308. %Ber% Ber Runes
  309. %Jah% Jah Runes
  310. %Cham% Cham Runes
  311. %Zod% Zod Runes
  312. )
  313. , trading.txt
  314. */
  315.  
  316. TotalR .= Hel " Hel Runes `n" Io " Io Runes `n" Lum " Lum Runes`n" Ko " Ko Runes`n" Fal " Fal Runes`n" Lem " Lem Runes`n" Pul " Pul Runes`n" Um " Um runes`n" Mal " Mal Runes`n" Ist " Ist Runes`n" Gul " Gul Runes`n" Vex " Vex Runes`n" Ohm " Ohm Runes`n" Lo " Lo Runes`n" Sur " Sur Runes`n" Ber " Ber Runes`n" Jah " Jah Runes`n" Cham " Cham Runes`n" Zod " Zod Runes`n"
  317.  
  318. TotalF .= "[Size=5]Items:[/size]`n"
  319. Totalf .= Items2
  320. Gui, Add, Tab2, x2 y0 w870 h520 ,Forum Text|Rune Combiner
  321. Gui, Tab, Forum Text
  322. Gui, Add, Edit, x22 y30 w780 h440 vForum, %TotalF%
  323. Gui, Tab, Rune Combiner
  324. Gui, Add, Text, x32 y40 w800 h40 , Each rune listed here is the sum if you combined all runes to that point. For instance, Under Lum it calculates if you take all runes below Lum and combine up to Lum. This gives you the ability to see if you can craft a certain rune with what you currently own collectively.
  325. Gui, Add, Edit, x32 y80 w800 h400, %totalR%
  326. ; Generated using SmartGUI Creator for SciTE
  327. Gui, Show, w866 h523, Token Chest Assistant
  328. return
  329.  
  330. GuiClose:
  331. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement