need some help with #1# #2# #3#

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

mauroxx
orc pawn
orc pawn
Posts: 24
Joined: Mon Jan 31, 2005 5:23 am

need some help with #1# #2# #3#

Post by mauroxx » Fri Feb 18, 2005 5:55 am

need some help with #1#

Code: Select all

/if (${Fulltext.Equal[MGB #1#]}) { 
   /call cast "Mass Group Buff" alt 
   /call cast "${Parameter}" gem8 2s 
   /return 
 }
how are linked #number# and ${Parameter} name?
i mean... if i have

#1# #2# #3#

and i have to do somthing like

Code: Select all

/tell #1# Hey #2#! This is #3#'s bot! Plz tell him (just an example)
any help appreciated

Mauroxx

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Fri Feb 18, 2005 6:34 am

Use of a parameter is ${Param0} ${Param1}...${Param#}

Some examples can be found in the following threads:

Tribute Search

Pull Mac

PL Assist now with INI support

Search is your friend.
I searched for nothing more than Param0 to get those, and many many more.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

mauroxx
orc pawn
orc pawn
Posts: 24
Joined: Mon Jan 31, 2005 5:23 am

yes... ok but...

Post by mauroxx » Fri Feb 18, 2005 7:21 am

ok it is ${Param0} ${Param1}... but that is for /mac macroname.mac Param0 etc etc

wouldnt it collapse if u use same name in a subroutine for chat ceking if u use again Param0 Param1 Param2?

Mauroxx

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Fri Feb 18, 2005 7:39 am

Did you even bother to go to the freaking links I provided to start learning from the examples there?
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

mauroxx
orc pawn
orc pawn
Posts: 24
Joined: Mon Jan 31, 2005 5:23 am

yes

Post by mauroxx » Fri Feb 18, 2005 8:29 am

i can grant you that, and soon completed good macro... but still have doubt on that parameters

Zeus
a hill giant
a hill giant
Posts: 180
Joined: Wed Feb 19, 2003 10:03 am
Contact:

Post by Zeus » Fri Feb 18, 2005 9:17 am

Correct me if I'm wrong but Parameters are for the mac. Like if you type /mac mymacro a b c d, a is the first parameter and d the 4th. When dealing with events and the #1# etc those are the values the function that handles the event receives. So something like

Code: Select all

#event Blah hello #1# and #2#
Would have a corresponding event

Code: Select all

Sub event_Blah(string line, string first, string second)
Where line is the full line it receives first (which you can call whatever you want and can be whatever variable type) is what the parser gets inside the #1# and same for second and #2#.

Ps: This is explained pretty good in TFM.