Hey guys, I am remaking a mod I made some time ago, because the code was really messy.
I'm now trying to clean up my condition scripts to make it the most efficient and I am kind of stuck
I can't shake the idea that there is a better, more efficient and faster way to check for multiple conditions.
Here is my script:
Spoiler
Function MeleeCheck()
If Main.TurnOff == False
Int InCom = Main.PriorityListCurrent.Find("In combat")
Int Ooc = Main.PriorityListCurrent.Find("Out of combat")
Int HH = Main.PriorityListCurrent.Find("Health")
Int SS = Main.PriorityListCurrent.Find("Stamina")
Int MM = Main.PriorityListCurrent.Find("Magicka")
Int FF = Main.PriorityListCurrent.Find("Melee")
Bool HHB = Main.healthbool
Bool SSB = Main.Staminabool
Bool MMB = Main.Magickabool
If AEoverride.GetValue() == 0
If HHB == True && SSB == True && MMB == True
If FF < HH && FF < SS && FF < MM
If FF < InCom
Main.EquipSet(6)
ElseIf Main.A == 0
Main.EquipSet(6)
EndIf
EndIf
ElseIf HHB == False && SSB == False && MMB == False
If FF < InCom
Main.EquipSet(6)
ElseIf Main.a == 0
Main.EquipSet(6)
EndIf
ElseIf HHB == True && SSB == True && MMB == False
If FF < HH && FF < SS
If FF < InCom
Main.EquipSet(6)
ElseIf Main.a == 0
Main.EquipSet(6)
EndIf
EndIf
ElseIf HHB == True && SSB == False && MMB == False
If FF < HH
If FF < InCom
Main.EquipSet(6)
ElseIf Main.a == 0
Main.EquipSet(6)
EndIf
ElseIf HHB == False && SSB == True && MMB == False
If FF < SS
If FF < InCom
Main.EquipSet(6)
ElseIf Main.a == 0
Main.EquipSet(6)
EndIf
EndIf
ElseIf MMB == True && SSB == True && HHB == False
If FF < MM && FF < SS
If FF < InCom
Main.EquipSet(6)
ElseIf Main.a == 0
Main.EquipSet(6)
EndIf
EndIf
ElseIf MMB == True && SSB == False && HHB == False
If FF < MM
If FF < InCom
Main.EquipSet(6)
ElseIf Main.a == 0
Main.EquipSet(6)
EndIf
EndIf
ElseIf MMB == False && SSB == True && HHB == False
If FF < SS
If FF < InCom
Main.EquipSet(6)
ElseIf Main.a == 0
Main.EquipSet(6)
EndIf
EndIf
ElseIf HHB == True && MMB == True && SSB == False
If FF < HH && FF < MM
If FF < InCom
Main.EquipSet(6)
ElseIf Main.a == 0
Main.EquipSet(6)
EndIf
EndIf
ElseIf HHB == True && MMB == False && SSB == False
If FF < HH
If FF < InCom
Main.EquipSet(6)
ElseIf Main.a == 0
Main.EquipSet(6)
EndIf
EndIf
ElseIf HHB == False && MMB == True && SSB == False
If FF < MM
If FF < InCom
Main.EquipSet(6)
ElseIf Main.a == 0
Main.EquipSet(6)
EndIf
EndIf
EndIf
EndIf
EndIf
Endfunction
Any insights would be very appreciated, thanks! =D