
Ask>Use Potions?,PotChoice
Ask>Use Shield?,ShieldChoice
IF>{PotChoice=YES AND ShieldChoice=YES}
This is part of the code I'm currently working with. Whenever I run the script it gives me the error "Unknown Identifier POTCHOICE". When I run the script as IF>Potchoice=YES, there is no error. I read through the help file and couldn't figure out what the problem was, according to the examples I was writing the code correctly. Any help would be appreciated.
Here is the full code below if it's needed:
VBStart
Function GetPotInfo
GetPotInfo = InputBox("Number of fights before pot use: ")
End Function
Function GetShieldInfo
GetShieldInfo = InputBox("Number of fights before shield use: ")
End Function
VBEnd
Ask>Use Potions?,PotChoice
Ask>Use Shield?,ShieldChoice
IF>{PotChoice=YES AND ShieldChoice=YES}
VBEval>GetPotInfo,PotQuestion
VBEval>GetShieldInfo,ShieldQuestion
wait>2
//Sets the Pot use timer, and shield timer to 0
Let>HPTPTime=0
Let>ShieldTime=0
goto>Start
//This part is for shielding yourself...like Asura's. Put your shield key on 5
//and go to town. Not necessary, but very helpful in keeping you alive
//if things happen to spawn upon you
Label>Shield
Send Character/Text>5
wait>1
Let>ShieldTime=0
goto>Start
//The Part where you heal is listed here
//Change the Send># to the hotkey you have set for potions
Label>PotTime
Send Character/Text>4
wait>1
Let>HPTPTime=0
goto>Start
//The targeting/fighting part is here
//Change the Send>#'s you have set for your attack/target hotkeys
//and the second wait># is how long you fight the monster before
//moving on to the next target. You can add more Send>'s if you
//want to use skills while fighting. HPTPTime=# is how many fights
//before the macro goes to use a potion, same with Shield, which
//goes to press 5, which is your damage shield...or whatever skill
//you want.
Label>Start
Send Character/Text>3
wait>1
Send Character/Text>1
wait>10
Let>HPTPTime=HPTPTime+1
Let>ShieldTime=ShieldTime+1
if>HPTPTime=%PotQuestion%,PotTime
if>ShieldTime=%ShieldQuestion%,Shield
goto>Start
endif
if>{PotChoice=YES AND ShieldChoice=NO}
VBEval>GetPotInfo,PotQuestion
wait>2
//Sets the Pot use timer, and shield timer to 0
Let>HPTPTime=0
//Let>ShieldTime=0
goto>Start2
//This part is for shielding yourself...like Asura's. Put your shield key on 5
//and go to town. Not necessary, but very helpful in keeping you alive
//if things happen to spawn upon you
//Label>Shield
//Send Character/Text>5
//wait>1
//Let>ShieldTime=0
//goto>Start
//The Part where you heal is listed here
//Change the Send># to the hotkey you have set for potions
Label>PotTime
Send Character/Text>4
wait>1
Let>HPTPTime=0
goto>Start2
//The targeting/fighting part is here
//Change the Send>#'s you have set for your attack/target hotkeys
//and the second wait># is how long you fight the monster before
//moving on to the next target. You can add more Send>'s if you
//want to use skills while fighting. HPTPTime=# is how many fights
//before the macro goes to use a potion, same with Shield, which
//goes to press 5, which is your damage shield...or whatever skill
//you want.
Label>Start2
Send Character/Text>3
wait>1
Send Character/Text>1
wait>10
Let>HPTPTime=HPTPTime+1
//Let>ShieldTime=ShieldTime+1
if>HPTPTime=%PotQuestion%,PotTime
//if>ShieldTime=%ShieldQuestion%,Shield
goto>Start2
endif
if>{PotChoice=NO and ShieldChoice=YES}
VBEval>GetShieldInfo,ShieldQuestion
wait>2
//Sets the Pot use timer, and shield timer to 0
//Let>HPTPTime=0
Let>ShieldTime=0
goto>Start3
//This part is for shielding yourself...like Asura's. Put your shield key on 5
//and go to town. Not necessary, but very helpful in keeping you alive
//if things happen to spawn upon you
Label>Shield
Send Character/Text>5
wait>1
Let>ShieldTime=0
goto>Start3
//The Part where you heal is listed here
//Change the Send># to the hotkey you have set for potions
//Label>PotTime
//Send Character/Text>4
//wait>1
//Let>HPTPTime=0
//goto>Start
//The targeting/fighting part is here
//Change the Send>#'s you have set for your attack/target hotkeys
//and the second wait># is how long you fight the monster before
//moving on to the next target. You can add more Send>'s if you
//want to use skills while fighting. HPTPTime=# is how many fights
//before the macro goes to use a potion, same with Shield, which
//goes to press 5, which is your damage shield...or whatever skill
//you want.
Label>Start3
Send Character/Text>3
wait>1
Send Character/Text>1
wait>10
//Let>HPTPTime=HPTPTime+1
Let>ShieldTime=ShieldTime+1
//if>HPTPTime=%PotQuestion%,PotTime
if>ShieldTime=%ShieldQuestion%,Shield
goto>Start3
endif
if>{PotChoice=NO and ShieldChoice=NO}
//Sets the Pot use timer, and shield timer to 0
//Let>HPTPTime=0
//Let>ShieldTime=0
goto>Start4
//This part is for shielding yourself...like Asura's. Put your shield key on 5
//and go to town. Not necessary, but very helpful in keeping you alive
//if things happen to spawn upon you
//Label>Shield
//Send Character/Text>5
//wait>1
//Let>ShieldTime=0
//goto>Start
//The Part where you heal is listed here
//Change the Send># to the hotkey you have set for potions
//Label>PotTime
//Send Character/Text>4
//wait>1
//Let>HPTPTime=0
//goto>Start
//The targeting/fighting part is here
//Change the Send>#'s you have set for your attack/target hotkeys
//and the second wait># is how long you fight the monster before
//moving on to the next target. You can add more Send>'s if you
//want to use skills while fighting. HPTPTime=# is how many fights
//before the macro goes to use a potion, same with Shield, which
//goes to press 5, which is your damage shield...or whatever skill
//you want.
Label>Start4
Send Character/Text>3
wait>1
Send Character/Text>1
wait>10
//Let>HPTPTime=HPTPTime+1
//Let>ShieldTime=ShieldTime+1
//if>HPTPTime=%PotQuestion%,PotTime
//if>ShieldTime=%ShieldQuestion%,Shield
goto>Start4
endif