Clicky Buff Code

Maskoi

New member
Joined
Mar 28, 2009
Messages
410
Reaction score
0
Points
0
Location
Dalls, TX
I have been playing with a lot of old macros lately and they all seem lack clicky buff code. I isolated the clicky item buff code I use in shambot so I could quickly add it to these other macro's just thought I would share it. It is pretty straight forward will kill your familiar after you cast it and won't cast if any mobs are within radius 25

Uses MQ2Exchange

Code:
#include spell_routines.inc

Code:
|----------------------------------------------------------------------------
| SUB: Clicky Declares
|----------------------------------------------------------------------------

	/declare ClickyItemUse 		int outer 1
	/declare ClickyItem[8]  	string outer
	/varset ClickyItem[1]		Corundus Band
	/varset ClickyItem[2]		Oracle's Barb
	/varset ClickyItem[3]		Band of Subterfuge
	/varset ClickyItem[4]		Witherskin Cloak
	/varset ClickyItem[5]		Mask of the Mighty Minotaur
	/varset ClickyItem[6]		Familiar of the Emerald Jungle
	/varset ClickyItem[7]		NULL
	/varset ClickyItem[8]		NULL

Code:
	/call Check_Clicky

Code:
|----------------------------------------------------------------------------
| SUB: Check_Clicky
|----------------------------------------------------------------------------
Sub Check_Clicky
/if (!${ClickyItemUse}) /return
/if (${Me.Pet.CleanName.Equal[${Me.Name}`s familiar]}) /pet get lost
/for i 1 to ${ClickyItem.Size}
		/if (${FindItemCount[${ClickyItem[${i}]}]}<=0) /next i
		/if (${FindItem[${ClickyItem[${i}]}].Spell.Stacks} && !${Me.Buff[${FindItem[${ClickyItem[${i}]}].Spell}].ID} && ${NearestSpawn[NPC].Distance}>=25) {
                /if (${Me.Class.ShortName.Equal[BRD]}) /twist off
		/target myself
		/delay 3
		/call Cast "${ClickyItem[${i}]}" item
		}
   /next i
 /if (${Me.Class.ShortName.Equal[BRD]}) /twist
/return
 
Last edited:
I have been playing with a lot of old macros lately and they all seem lack clicky buff code. I isolated the clicky item buff code I use in shambot so I could quickly add it to these other macro's just thought I would share it. It is pretty straight forward will kill your familiar after you cast it and won't cast if any mobs are within radius 25

Uses MQ2Exchange

Code:
#include spell_routines.inc
Hmm, is this typically included in macro's where spells are being casted? If so I suppose something like this would be included in MQ2Melee to use the /casting "itemname" effects?

|----------------------------------------------------------------------------
| SUB: Clicky Declares
|----------------------------------------------------------------------------

/declare ClickyItemUse int outer 1
/declare ClickyItem[8] string outer **OoOoO learn something new every day, so you can /declare randomthing[#] to /declare several items at once simply numbered from 1to 8?? That is if I am reading it correctly.**
/varset ClickyItem[1] Corundus Band
/varset ClickyItem[2] Oracle's Barb
/varset ClickyItem[3] Band of Subterfuge
/varset ClickyItem[4] Witherskin Cloak
/varset ClickyItem[5] Mask of the Mighty Minotaur
/varset ClickyItem[6] Familiar of the Emerald Jungle
/varset ClickyItem[7] NULL
/varset ClickyItem[8] NULL
Hmm, itdentify each individual numbered item from the Declare [8] from earlier it gives you 8, is there a limit on the amount you can declare at once?
/call Check_Clicky

|----------------------------------------------------------------------------
| SUB: Check_Clicky
|----------------------------------------------------------------------------
Sub Check_Clicky
/if (!${ClickyItemUse}) /return At least I understand that
/declare ClickyItemUse int outer 1 makes this a non [NULL] value meaning to fire off code below, but what is the purpose of the check if the varible is clearly defined as 1 in the code....for this to be useful wouldn't you need to have a parameter or an INI for it to reference for the check instead of an already declared value?

/if (${Me.Pet.CleanName.Equal[${Me.Name}`s familiar]}) /pet get lost
I like the pet get lost snippet, will be using that piece I'm pretty sure :-D

/for i 1 to ${ClickyItem.Size} It has been a long time since I have seen /for i 1 to # statement :-D nearly forgot about them. Is this called an "array" or am I mistaken?
/if (${FindItemCount[${ClickyItem[${i}]}]}<=0) /next i
/if (${FindItem[${ClickyItem[${i}]}].Spell.Stacks} && !${Me.Buff[${FindItem[${ClickyItem[${i}]}].Spell}].ID} && ${NearestSpawn[NPC].Distance}>=25) {
/if (${Me.Class.ShortName.Equal[BRD]}) /twist off
/target myself is "myself" actually going to target you? I've been using /keypress F1 lol.
/delay 3
/call Cast "${ClickyItem[${i}]}" item
}
/next i Does this repeat for each item listed in the Varset? until it has checked all 8 lines, using
Code:
/if (${FindItemCount[${ClickyItem[${i}]}]}<=0) /next i
to check to see if the value is NULL?

/if (${Me.Class.ShortName.Equal[BRD]}) /twist
/return[/code]
 
Yes the portion were he was declaring the items[x] is declaring an array of variables. Then he set each variable in the array and identified it with the [1],[2].... and so down the line.

and i stands for iteration iirc so it will check it for each value in the array.
 
Hmmm I really like the way you set this to manage the clickies but the way its writen it seems like its going to run through this far more often than you need it to which could slow down the macro it is writen into as it runs through your portion then back tot he rest of the main macro. What if you instead set a timer and made an if statement in your main macro to go off once that timers is over which calls your sub were it checks if you are in combat then set a the timer to 1min but if your state is not in combat then to run your checks.

This way it will only run after you have been out of combat for at least 1 min.

Also on your code you have
/declare ClickyItemUse int outer 1
Then your check is
/if (!${ClickyItemUse}) /return
Which will never be be true with the code you have so I assume you had some part of it in your shambot program to change that value.
 
Just so you know. The original poster has been banned for probably a year and half.
 
LOL doh I didnt check the date on the post.