Well, I've gotten some help on it through the past few months and I'm putting it all together so any of you can us it easy..
I still dont know quite how it works but I'm fine with that..
You might say "you cant change macros from script" but in my targetting system you can..
Commands:
C2 * Changes the macro for F2 to "* @target" (2 isnt only macro you can change)
SetA Sets the first target you want to fight
SetB Sets the other target you want to fight
Swap Swaps who you're aiming at, "@target"
Prey Shows both of the targets you've set
Setting it up:
- Make macros F2-F9 send "Macro_F2+++" to "Macro_F9+++"
- Paste the following into your VBS script (Only down to the dashed line!)
sub On_Set_A (aliasname, full_line, wildcards)
dim target
target = wildcards (1)
world.setvariable "A", target
world.note "Target A set to " & target
world.setvariable "target", target
world.note "Current target now " & target
end sub
sub On_Set_B (aliasname, full_line, wildcards)
dim target
target = wildcards (1)
world.setvariable "B", target
world.note "Target B set to " & target
end sub
sub On_List_Targets (aliasname, full_line, wildcards)
world.note "Target A = " & world.getvariable ("A")
world.note "Target B = " & world.getvariable ("B")
world.note "CURRENT target = " & world.getvariable ("target")
end sub
sub On_Swap (aliasname, full_line, wildcards)
dim A, B
A = world.getvariable ("A")
B = world.getvariable ("B")
if world.getvariable ("target") = A then
world.setvariable "target", B
else
world.setvariable "target", A
end if
world.note "Current target now " & world.getvariable ("target")
end sub
sub AliasChange2 (sName, sLine, wildcards)
world.deletealias "F2"
world.addalias "F2", "Macro_F2+++", wildcards (1) + " @Target", 512 + 1, ""
world.note "Changed F2"
end sub
sub AliasChange3 (sName, sLine, wildcards)
world.deletealias "F3"
world.addalias "F3", "Macro_F3+++", wildcards (1) + " @Target", 512 + 1, ""
world.note "Changed F3"
end sub
sub AliasChange4 (sName, sLine, wildcards)
world.deletealias "F4"
world.addalias "F4", "Macro_F4+++", wildcards (1) + " @Target", 512 + 1, ""
world.note "Changed F4"
end sub
sub AliasChange5 (sName, sLine, wildcards)
world.deletealias "F5"
world.addalias "F5", "Macro_F5+++", wildcards (1) + " @Target", 512 + 1, ""
world.note "Changed F5"
end sub
sub AliasChange6 (sName, sLine, wildcards)
world.deletealias "F6"
world.addalias "F6", "Macro_F6+++", wildcards (1) + " @Target", 512 + 1, ""
world.note "Changed F6"
end sub
sub AliasChange7 (sName, sLine, wildcards)
world.deletealias "F7"
world.addalias "F7", "Macro_F7+++", wildcards (1) + " @Target", 512 + 1, ""
world.note "Changed F7"
end sub
sub AliasChange8 (sName, sLine, wildcards)
world.deletealias "F8"
world.addalias "F8", "Macro_F8+++", wildcards (1) + " @Target", 512 + 1, ""
world.note "Changed F8"
end sub
sub AliasChange9 (sName, sLine, wildcards)
world.deletealias "F9"
world.addalias "F9", "Macro_F9+++", wildcards (1) + " @Target", 512 + 1, ""
world.note "Changed F9"
end sub
-------------------------------THEN-------------------------------
Copy the following and go to File and Import and click the Clipboard box for "Import From"...
<aliases>
<alias
name="change_f2"
script="aliaschange2"
match="c2 *"
enabled="y"
expand_variables="y"
>
</alias>
<alias
name="change_f3"
script="aliaschange3"
match="c3 *"
enabled="y"
expand_variables="y"
>
</alias>
<alias
name="change_f4"
script="aliaschange4"
match="c4 *"
enabled="y"
expand_variables="y"
>
</alias>
<alias
name="change_f5"
script="aliaschange5"
match="c5 *"
enabled="y"
expand_variables="y"
>
</alias>
<alias
name="change_f6"
script="aliaschange6"
match="c6 *"
enabled="y"
expand_variables="y"
>
</alias>
<alias
name="change_f7"
script="aliaschange7"
match="c7 *"
enabled="y"
expand_variables="y"
>
</alias>
<alias
name="change_f8"
script="aliaschange8"
match="c8 *"
enabled="y"
expand_variables="y"
>
</alias>
<alias
name="change_f9"
script="aliaschange9"
match="c9 *"
enabled="y"
expand_variables="y"
>
</alias>
<alias
name="F2"
match="Macro_F2+++"
enabled="y"
expand_variables="y"
>
<send>rem shield
wear scroll</send>
</alias>
<alias
name="F3"
match="Macro_F3+++"
enabled="y"
expand_variables="y"
>
<send>rem scroll
wear shield</send>
</alias>
<alias
name="F4"
match="Macro_F4+++"
enabled="y"
expand_variables="y"
>
<send>murder @Target</send>
</alias>
<alias
name="F5"
match="Macro_F5+++"
enabled="y"
expand_variables="y"
>
<send>c summon @Target</send>
</alias>
<alias
name="F6"
match="Macro_F6+++"
enabled="y"
>
<send>@Target</send>
</alias>
<alias
name="F7"
match="Macro_F7+++"
enabled="y"
expand_variables="y"
>
<send>ch blood @Target</send>
</alias>
<alias
name="F8"
match="Macro_F8+++"
enabled="y"
expand_variables="y"
>
<send>dirt @Target</send>
</alias>
<alias
name="F9"
match="Macro_F9+++"
enabled="y"
expand_variables="y"
>
<send>trip @Target</send>
</alias>
<alias
script="On_List_Targets"
match="prey"
enabled="y"
>
</alias>
<alias
script="On_Set_A"
match="seta *"
enabled="y"
>
</alias>
<alias
script="On_Set_B"
match="setb *"
enabled="y"
>
</alias>
<alias
script="On_Swap"
match="swap"
enabled="y"
>
</alias>
</aliases>
|