• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Help with /declare multiple strings

Status
Not open for further replies.

macroingitup

Member
Joined
Jul 5, 2015
RedCents
102¢
Hi, I am making a targeting macro which looks for specific name types to target only those. I am having issues when I do the following:

/declare Targets string outer plains lion cat

it is only looking for targets with 'plains' in the name instead of any mobs which contains either 'plains' 'lion' or 'cat.' If I change the order and put cat first, it would look for that. How can I make it look for any of the defined strings?

What am I doing wrong? Thanks!
 
I believe you need a declare for each.

/declare Targets string outer plains
/declare Targets string outer lion
/declare Targets string outer cat
 
You can't have a variable declared more than once unless you use local (and it is still only once per Sub).

You can declare an array tho and populate the array with plains, lion and cat and do a target via that. Or just do targets1, targets2, targets3
 
Very helpful thanks both. I am currently using the declaring targets1, targets2, targets3, etc. The array sounds like a better option though. I will play with it once new compile is out. Assuming the syntax is as follows?

/declare Targets array outer plains lion cat
 
Something like this would work (minus any syntax errors that you might have to fix).

Rich (BB code):
/declare Targets[3] string outer //creates an array with 3 variables
/declare i int outer

/varset Targets[1] plains
/varset Targets[2] lion
/varset Targets[3] cat
/varset i 1 

:loop
/if (!${Target.ID}) /target ${Spawn[${Targets[${i}]}]}
/varset i ${Math.Calc[${i}+1]}
/if (!${Target.ID}) {
/delay 2s //to keep from spamming
/goto :loop
}
 
Question - Help with /declare multiple strings
Status
Not open for further replies.

Users who are viewing this thread

Back
Top
Cart