Ok, I've got over 5k lines of code in my script and I'm looking to redo the entire thing so it will run smoother. I've been getting help and know a few things I need to change already and it was suggested to use Arrays, but those are just insanely confusing so far. Any tips on a smoother/faster way to write the script would be great. I use VBscript and below is an example of how I have my script.
******************************************************
Sub Diagpurgheal (a, b, c)
if getvariable ("affliction_aeonD") = "1" then
exit sub
end if
if getvariable ("affliction_slicknessD") = "1" then
exit sub
end if
if getvariable ("affliction_crotamineD") = "1" then
world.sendpush "drink antidote"
exit sub
end if
if getvariable ("affliction_asthmaD") = "1" then
world.sendpush "drink melancholic"
exit sub
end if
if getvariable ("affliction_vomitingD") = "1" then
world.sendpush "drink choleric"
exit sub
end if
end sub
**************************************************
Like Flannel pointed out that instead of "world.sendpush, I should have just "send". Anything like that is appreciated.
******************************************************
Sub Diagpurgheal (a, b, c)
if getvariable ("affliction_aeonD") = "1" then
exit sub
end if
if getvariable ("affliction_slicknessD") = "1" then
exit sub
end if
if getvariable ("affliction_crotamineD") = "1" then
world.sendpush "drink antidote"
exit sub
end if
if getvariable ("affliction_asthmaD") = "1" then
world.sendpush "drink melancholic"
exit sub
end if
if getvariable ("affliction_vomitingD") = "1" then
world.sendpush "drink choleric"
exit sub
end if
end sub
**************************************************
Like Flannel pointed out that instead of "world.sendpush, I should have just "send". Anything like that is appreciated.