Ok, saying the in my variables section I have "herbone" "on", "herbtwo" "on", "salveone" "on", "salvetwo" "off".
Now, In order to seperate Herb and Salve balance I need this Sub to cure one of the "herb" afflictions and one of the "salve" afflictions, but ONLY one of each. Seeing as how the variables are set I currently have 2 herb afflictions and one salve. After calling the Sub I should cure one of each elaving me with one herb affliction after.
With the way I have the sub now it only cures one of the herb afflictions and doesn't even seem to notice the salve afflictions. Here is the last Sub as I had it
Sub herbhealing (a, b, c)
Dim value, spell, anorexia, aeon
anorexia = world.getvariable ("affliction_anorexia")
aeon = world.getvariable ("affliction_aeon")
If aeon = "on" Then
Exit Sub
end if
If anorexia = "on" Then
exit sub
end if
For Each v In world.GetVariableList
value = world.GetVariable (v)
If Left (v, 11) = "affliction_" Then
spell = Mid (v, 12)
If value = "on" Then
Select Case spell
Case "herbone" world.sendpush "***TESTone***"
Case "herbtwo" world.sendpush "***TESTtwo***"
End Select
Exit Sub
End If
end if
next
routine1 a, b, c
end sub
Sub routine1 (a, b, c)
Dim value, spell, anorexia, aeon
anorexia = world.getvariable ("affliction_anorexia")
aeon = world.getvariable ("affliction_aeon")
If aeon = "on" Then
Exit Sub
end if
If anorexia = "on" Then
exit sub
end if
For Each v In world.GetVariableList
value = world.GetVariable (v)
If Left (v, 11) = "affliction_" Then
spell = Mid (v, 12)
If value = "on" Then
Select Case spell
Case "salveone" world.sendpush "***TESTthree***"
Case "salvetwo" world.sendpush "***TESTfour***"
End Select
Exit Sub
End If
end if
next
end sub
Again, I'm sorry for any irritation this may have caused |