Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Filedelete, Trading.txt
- #SingleInstance, force
- ;#Include Itemstatsfixed.txt
- fileread,stringfromfile, %A_workingdir%\trade.trade
- /*
- Gui, Add, CheckBox, x2 y30 w140 h20 , Filter Items
- Gui, Add, CheckBox, x22 y50 w140 h20 , Display Variable Stats
- Gui, Add, Edit, x2 y70 w160 h50 , Edit
- Gui, Add, Edit, x332 y30 w80 h30 , Edit
- Gui, Add, Text, x412 y30 w100 h30 , Header Size
- Gui, Add, Edit, x332 y60 w80 h30 , Edit
- Gui, Add, Text, x412 y60 w100 h30 , Text
- Gui, Add, Text, x162 y70 w150 h40 , CSV list to filter our stats
- Gui, Add, Button, x472 y140 w100 h30 gstart, Start
- ; Generated using SmartGUI Creator for SciTE
- Gui, Show, w579 h177, Options
- return
- */
- 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"
- matchlist2 := "Jewel, Charm, Facet"
- 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 "
- charmlist := "small charm, large charm, grand charm"
- JewelList := "Jewel, Facet"
- VariableStats := []
- CharmMatch := "Maximum Throw Damage,Poison Length,Poison Count,Cold Length"
- VariableFilter := "Slower Stamina Drain,Strength,Dexterity,Vitality,Energy,Life after each Kill"
- GameArray := { "Dol Rune":"", "Hel Rune":"", "Io Rune":"", "Lum Rune":"", "Ko Rune":"", "Fal Rune":"", "Lem Rune":""
- , "Pul Rune":"", "Um Rune":"", "Mal Rune":"", "Ist Rune":"", "Gul Rune":"", "Vex Rune":"", "Ohm Rune":""
- , "Lo Rune":"", "Sur Rune":"", "Ber Rune":"", "Jah Rune":"", "Cham Rune":"", "Zod Rune":"" }
- loop, read, itemstatsfixed.txt
- {
- Stringleft, item, A_Loopreadline,1
- If item = `@
- {
- stringtrimleft, item2, A_Loopreadline, 1
- lastitem := Item2
- }
- else
- VariableStats[ item2 ] .= A_loopreadline ","
- }
- For key, val in GameArray
- {
- if ( RegExReplace( StringFromFile, "`%" key, "", Count ) != StringFromFile )
- {
- GameArray[ key ] := Count
- ArrayCount += 1
- DisplayString .= " " count " " key "s `n"
- }
- }
- 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":"" }
- For key, val in MatArray
- {
- if ( RegExReplace( StringFromFile, "`%" key, "", Count ) != StringFromFile )
- {
- MatArray[ key ] := Count
- MatsString .= " " count " " key "s `n"
- }
- }
- If DisplayString <>
- {
- Fileappend, [Size=5]Runes:[/size]`n, trading.txt
- TotalF .= "[Size=5]Runes:[/size]`n"
- fileappend, %Displaystring%, trading.txt
- TotalF .= Displaystring
- fileappend, `n`n`n, trading.txt
- TotalF .= "`n`n`n"
- }
- If MatsString <>
- {
- Fileappend, [Size=5]Materials:[/size]`n, trading.txt
- TotalF .= "[Size=5]Materials:[/size]`n"
- fileappend, %Matsstring%, trading.txt
- TotalF .= Matsstring
- fileappend, `n`n`n, trading.txt
- TotalF .= "`n`n`n"
- }
- Loop, Read, Trade.Trade
- {
- stringleft, Check, A_LoopReadLine, 1
- If Check = `%
- {
- IF checknewline = 1
- {
- charms .= "`n"
- checknewline := 0
- }
- Stringtrimleft, CheckFull, A_LoopReadLine, 1
- If Checkfull contains %charmlist%
- charms .= "[b]" checkfull "[/b]"
- lastitem := A_loopreadline
- }
- else
- If lastitem contains %charmlist%
- {
- stringleft, Check, A_loopreadline, 3
- If Check = <m>
- {
- If A_loopreadline not contains %CharmMatch%
- {
- stringtrimleft, Checkfull, A_loopreadline, 3
- charms .= "\" checkfull
- checkNewline := 1
- }
- }
- }
- }
- If Charms <>
- {
- sort, charms
- Fileappend, [Size=5]Charms:[/size]`n, trading.txt
- TotalF .= "[Size=5]Charms:[/size]`n"
- fileappend, %charms%, trading.txt
- TotalF .= Charms
- fileappend, `n`n`n, trading.txt
- TotalF .= "`n`n`n"
- }
- Loop, Read, Trade.Trade
- {
- stringleft, Check, A_LoopReadLine, 1
- If Check = `%
- {
- IF checknewline = 1
- {
- Jewels .= "`n"
- checknewline := 0
- }
- Stringtrimleft, CheckFull, A_LoopReadLine, 1
- If Checkfull contains %Jewellist%
- Jewels .= "[b]" checkfull "[/b]"
- lastitem := A_loopreadline
- }
- else
- If lastitem contains %JewelList%
- {
- stringleft, Check, A_loopreadline, 3
- If Check = <m>
- {
- stringtrimleft, Checkfull, A_loopreadline, 3
- IfNotInstring, checkfull, Maximum Throw Damage
- {
- IfNotInString, checkfull, Chance to cast
- {
- Jewels .= "/" checkfull
- checknewline := 1
- }
- }
- }
- }
- }
- If Jewels <>
- {
- Fileappend, [Size=5]Jewels and Facets:[/size]`n, trading.txt
- TotalF .= "[Size=5]Jewels and Facets:[/size]`n"
- fileappend, %Jewels%, trading.txt
- sort, Jewels
- TotalF .= Jewels
- fileappend, `n`n`n, trading.txt
- TotalF .= "`n`n`n"
- }
- Loop, Read, Trade.trade
- {
- Stringleft, Check3, A_loopreadline, 3
- if A_loopfield in %Charmlist%
- Continue
- if A_loopfield in %matchlist%
- continue
- stringright, Check, A_loopreadline, 4
- If Check = Rune
- Continue
- stringleft, Check, A_LoopReadLine, 1
- If Check = `%
- {
- Stringtrimleft, CheckFull, A_LoopReadLine, 1
- if checkfull contains %matchlist2%
- continue
- else
- if checkfull in %matchlist%
- continue
- else
- if checkfull contains %matslist%
- continue
- else
- if Linechecker := 1
- {
- Items .= "`n"
- Linecheck := 0
- }
- lastitem := checkfull
- Items .= "[B]" checkfull "[/B]/"
- }
- else
- If Check3 = <m>
- {
- stringtrimleft, checkfull, A_loopreadline, 3
- variabletrue := Variablestats[lastitem]
- real := Regexreplace(checkfull, "[\[\]\d\+\-%]", "")
- stringleft, real1, real, 1
- if real1 := A_Space
- stringreplace, real, real, %A_space%
- if real in %Variabletrue%
- If VariableTrue not contains %VariableFilter%
- {
- Items .= Checkfull "/"
- linechecker := 1
- }
- }
- }
- loop, parse, items, `n
- {
- stringright, real, A_loopfield, 1
- if real = /
- stringtrimright, realer, A_loopfield, 1
- items2 .= realer "`n"
- }
- sort, items2
- Fileappend, [Size=5]Items:[/size]`n, trading.txt
- Fileappend,%Items2%, Trading.txt
- ;Rune Information
- For key, value in Gamearray
- {
- stringreplace, key, key, %A_space%Rune,,
- If Value =
- Value := 0
- %key% := value
- }
- Hel := Hel + (dol/3)
- Hel := Floor(Hel)
- Io := Io + (Hel/3)
- Io := Floor(Io)
- Lum := Lum + (Io/3)
- Lum := Floor(Lum)
- Ko := Ko + (Lum/3)
- Ko := Floor(Ko)
- Fal := Fal + (Ko/3)
- Fal := Floor(Fal)
- Lem := Lem + (Fal/3)
- Lem := Floor(Lem)
- Pul := Pul + (Lem/3)
- Pul := Floor(Pul)
- Um := Um + (Pul/2)
- Um := Floor(Um)
- Mal := Mal + (Um/2)
- Mal := Floor(Mal)
- Ist := Ist + (Mal/2)
- Ist := Floor(Ist)
- Gul := Gul + (Ist/2)
- Gul := Floor(Gul)
- Vex := Vex + (Gul/2)
- Vex := Floor(Vex)
- Ohm := Ohm + (Vex/2)
- Ohm := Floor(Ohm)
- Lo := Lo + (Ohm/2)
- Lo := Floor(Lo)
- Sur := Sur + (Lo/2)
- Sur := Floor(Sur)
- Ber := Ber + (Sur/2)
- Ber := Floor(Ber)
- Jah := Jah + (Ber/2)
- Jah := Floor(Jah)
- Cham := Cham + (Jah/2)
- Cham := Floor(Cham)
- Zod := Zod + (Cham/2)
- Zod := Floor(Zod)
- /*
- fileappend, `n`n`n`n`n, Trading.txt
- fileappend,
- (
- %Hel% Hel Runes
- %Io% Io Runes
- %Lum% Lum Runes
- %Ko% Ko Runes
- %Fal% Fal Runes
- %Lem% Lem Runes
- %Pul% Pul Runes
- %Um% Um Runes
- %Mal% Mal Runes
- %Ist% Ist Runes
- %Gul% Gul Runes
- %Vex% Vex Runes
- %Ohm% Ohm Runes
- %Lo% Lo Runes
- %Sur% Sur Runes
- %Ber% Ber Runes
- %Jah% Jah Runes
- %Cham% Cham Runes
- %Zod% Zod Runes
- )
- , trading.txt
- */
- 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"
- TotalF .= "[Size=5]Items:[/size]`n"
- Totalf .= Items2
- Gui, Add, Tab2, x2 y0 w870 h520 ,Forum Text|Rune Combiner
- Gui, Tab, Forum Text
- Gui, Add, Edit, x22 y30 w780 h440 vForum, %TotalF%
- Gui, Tab, Rune Combiner
- 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.
- Gui, Add, Edit, x32 y80 w800 h400, %totalR%
- ; Generated using SmartGUI Creator for SciTE
- Gui, Show, w866 h523, Token Chest Assistant
- return
- GuiClose:
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement