Return values

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

Moderator: MacroQuest Developers

Nueder
decaying skeleton
decaying skeleton
Posts: 7
Joined: Tue Aug 31, 2004 2:11 pm

Return values

Post by Nueder » Thu Sep 02, 2004 7:23 pm

I am using spell_routines.inc to cast my spells and items and want to make use of the return values however i can't find the syntax for it. Someon told me:

Code: Select all

			/call Cast "Ultor's Greaves of Faith" item
			/if (${Macro.Return.Equal["CAST_RESISTED"]}){
				/if (${announce}==1) {
					/g %T RESISTED ${morspell}
				} else {
					/chat #${mychannel} %T RESISTED ${morspell}
				}
			}
but this does not work. Any help would be appreciated.

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Thu Sep 02, 2004 7:27 pm

Well I use spellcast.inc but Rusty~ said it was the same in spell_routines.inc:

Code: Select all

 /if (${String[${Macro.Return}].Equal[CAST_RESISTED]}) /varset NeedSlow 1
That's what I use and it works.

Nueder
decaying skeleton
decaying skeleton
Posts: 7
Joined: Tue Aug 31, 2004 2:11 pm

Post by Nueder » Thu Sep 02, 2004 8:02 pm

Ok String[] was what i was missing...the only thing i needed to change from what you posted was

Code: Select all

/if (${String[${Macro.Return}].Equal["CAST_RESISTED"]}) /varset NeedSlow 1
Thx for the help.

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Thu Sep 02, 2004 8:13 pm

heh first few looks at your code i couldnt find anything wrong. so i tried it and yeah it doesnt work. the problem is this line:

Code: Select all

/if (${Macro.Return.Equal["CAST_RESISTED"]}){ 
you need a space before the open brace at the end.. like this:

Code: Select all

/if (${Macro.Return.Equal["CAST_RESISTED"]}) { 

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Thu Sep 02, 2004 8:18 pm

Nueder wrote:Ok String[] was what i was missing...the only thing i needed to change from what you posted was

Code: Select all

/if (${String[${Macro.Return}].Equal["CAST_RESISTED"]}) /varset NeedSlow 1
Thx for the help.
Ummm... no.

macro string.Return

So this should be

Code: Select all

/if (${Macro.Return.Equal[CAST_RESISTED]}) /varset NeedSlow 1