MQ2 Condition list/collection

Third party software discussion goes here.
eggybob
Posts: 18

Re: MQ2 Condition list/collection

Post#11 » Fri Aug 22, 2014 7:06 pm

thanks i will try those

User avatar
Nilbus
Posts: 1258

Re: MQ2 Condition list/collection

Post#12 » Fri Aug 22, 2014 8:18 pm

if you use Dreos's hotbutton, spell attack correctly, the lizard can't.
Nodyin-Nilbus-Pockit-Tiah-Rakas- Funeral
Likeatruck-Khaltos-Nilbie-Ziknaf-Prathun-Missus
Elidor
Youme-Yumme-Blazingtide-Sublin-Lissanda-Darmok
Djarik-Ikat-Nerys-Ometi-Tarana-Biln

I know way too much random stuff.

User avatar
Alulien
Posts: 283

Re: MQ2 Condition list/collection

Post#13 » Fri Aug 22, 2014 9:38 pm

I second that if you make sure that NetBots send and grab are set to ON the ${NetBots[pc CHARACTERNAME].Attacking} will work. This is a command I use in conjunction with a few others to maintain combat buffs or check if my group is engaged so another routine can fire.
Malistari (SHD) | Daggar (ROG) | Sarda (BST) | Gurneyman (BRD) | Glamd (SHM) | Wrunken (CLR)

<Muffins>

Letow (PAL) | Feydakin (MAG) | Corpselight (NEC) | Mallyal (ENC) | Thomel (BRD) | Araer (DRU)

Noren
Posts: 1053

Re: MQ2 Condition list/collection

Post#14 » Sat Aug 23, 2014 5:37 am

eggybob wrote:rather than start a new post ill put it here. below is my first ever macro. of course its not working.

|Attack.mac

#turbo

Sub Main

/echo ~~ATTACK MACRO LOADED~~
:main loop

/if (${Me.Attacking}){
/bca //target Sritz
/bca //assist

/else
/bca //target Sritz
/stick 25}

/goto :main loop
/return

any advice. (it is suppose to make my group target me and assist if i have attack on, if i am not attacking they are to stick to me at 25.


Slight modification to your script:
[1] Introduce more checks (and fix Me.Attacking). You do not want to tell your team to assist if you don't have a target if you, for instance, accidentally press attack.
[2] With the current implementation, the macro would spam your team with /target and /assist commands 20 times per second until you turn attack off. It doesn't know when to stop. Let's tell it when to stop by toggling an ON/OFF switch in the form of Attacking TRUE/FALSE.
[3] Fix your /if statement. It should go:
/if (something is true) {
..do stuff
} else {
..do stuff
}
[4] I added a few more checks that you may not wish to be there. The one that checks for parry skill is a round-about way of seeing if it's a melee type character. If they are a melee type then turn attack on.

This won't work all alone, but if you implement it correctly I believe it will do some of what you are looking for.

Code: Select all

  /if (!${Defined[Attacking]}) /declare Attacking bool outer FALSE

  /if (!${Attacking} && ${Me.Combat} && ${Target.ID} && ${Target.Type.Equal[NPC]}) {
    /bca //tar ID ${Target.ID}
    /delay 2
    /noparse /bca //if (${Me.Skill[Parry]}>0 && !${Me.Combat}) /attack on
    /varset Attacking TRUE
  } else /if (${Attacking} && !${Me.Combat}) {
    /noparse /bca //if (${Spawn[=Sritz].ID} && !${Stick.Active}) /stick ID ${Spawn[=Sritz].ID} 25
    /varset Attacking FALSE
  }

eggybob
Posts: 18

Re: MQ2 Condition list/collection

Post#15 » Sat Aug 23, 2014 8:27 am

Thanks Noren I will try this later on if I can and see if it works for me. Sure it will. I tried some things last night again but like you said it just kept spamming the mq2 window :/ so hopefully this will stop that. Also be great for me to dissect and learn from thankyou!

eggybob
Posts: 18

Re: MQ2 Condition list/collection

Post#16 » Sat Aug 23, 2014 12:22 pm

What does the very start of that macro do the /if with a /define? Only time I've seen define it had #define

Noren
Posts: 1053

Re: MQ2 Condition list/collection

Post#17 » Sat Aug 23, 2014 4:48 pm

eggybob wrote:What does the very start of that macro do the /if with a /define? Only time I've seen define it had #define

Defined is the way to check if a variable has been declared.

You don't necessarily have to check, but I do more often than not. It's useful if you find yourself including other files into this macro and want to be careful of not declaring (again) variables that have already been declared, thus throwing an error.

Ydiss
Posts: 1193

Re: MQ2 Condition list/collection

Post#18 » Sat Aug 23, 2014 9:43 pm

eggybob wrote:Failed to parse /if command. Could not find command to execute.

The parse fails because you must add a space after closing the if condition:

) {

Return to “Third party software”

Who is online

Users browsing this forum: No registered users and 2 guests

cron