Page 2 of 4
Posted: Fri Oct 07, 2005 1:40 pm
by horseshoecrabs
http://www.macroquest2.com/phpBB2/viewt ... 69&start=0
The link above is to my mana robe macro, which isn't relevant to your question. However, starting at the bottom of the first page, the conversation morphs into a dialog about when and when not to use quotation marks and it helped me a lot. Make sure you read the thread into page two as there are some fantastic explanations in there about quotations, delimiters, etc.
Bottom line: don't use quotes in /declare statements and instead use them only when they are necessary such as calling a spell. To my knowledge, they are never used for integers. The only exception I could imagine is if you were looking at (or for) a string that looked like an int. in which case the string handling rules still apply.
Posted: Fri Oct 07, 2005 1:51 pm
by ultimateq
Thanks Horse. Was not sure how that worked. This has all been very informative.
Thankyou all for helping this noob find his way. My macro just went from unworkable to slightly more workable
Edit: Thankyou Again. I understand much better on how everything works.
Posted: Wed Feb 01, 2006 6:25 am
by larry1024
ok i'm a newb at this macoing but was wondering what is so wrong witht he bellow?
#event Yaulp "Your surge of strength fades."
sub event_makemypetgoaway(string line,string zone)
/if (${Me.Class.Name.Equal["cleric"]}) {
| Refreshing Yaulp
/echo #Refreshing Yaulp
/cast cast 8
just trying to refresh yalp every 30 seconds
Posted: Wed Feb 01, 2006 6:56 am
by gimp
larry1024 wrote:ok i'm a newb at this macoing but was wondering what is so wrong witht he bellow?
#event Yaulp "Your surge of strength fades."
sub event_makemypetgoaway(string line,string zone)
/if (${Me.Class.Name.Equal["cleric"]}) {
| Refreshing Yaulp
/echo #Refreshing Yaulp
/cast cast 8
just trying to refresh yalp every 30 seconds
you should make a new thread if you have a new question :)
your bug is that your event routine is incorrectly named.
rename event_makemypetgoaway to event_Yaulp. also remove string zone parameter
Posted: Wed Feb 01, 2006 2:08 pm
by Harden
larry1024 wrote:ok i'm a newb at this macoing but was wondering what is so wrong witht he bellow?
#event Yaulp "Your surge of strength fades."
sub event_makemypetgoaway(string line,string zone)
/if (${Me.Class.Name.Equal["cleric"]}) {
| Refreshing Yaulp
/echo #Refreshing Yaulp
/cast cast 8
just trying to refresh yalp every 30 seconds
If you have spell routines inc try this: (Only need to add
#include spell_routines.inc if it's not already included in the macro your writing this for.
Code: Select all
#include spell_routines.inc
#event Yaulp "Your surge of strength fades."
sub event_Yaulp
/if (${Me.Class.Name.Equal["cleric"]}) {
|Refreshing Yaulp
/echo #Refreshing Yaulp
/call cast "Yaulp VII" gem8
}
/return
Just a point of interist. After the first time you cast Yaulp VII, this will refresh it indefinatly, every time your chat see's "
Your surge of strength fades."
Posted: Wed Feb 01, 2006 3:04 pm
by fearless
well if that isn't the hard way to do it.
Posted: Mon Feb 20, 2006 1:49 pm
by rapierguy
nils wrote:
Code: Select all
| chat.mac
#Chat Chat
Sub Main
/declare channel string outer mychannel
/join ${channel}
:Main_Loop
/delay 1
/doevents
/goto :Main_Loop
/return
Sub SomeSub
/chat #${channel} If this is working you should see this First
/return
Sub event_Chat(string ChatType,string Sender,string ChatText)
/if (${ChatType.Equal[${channel}]}) {
/if (${ChatText.Equal[bla]} || ${ChatText.Equal[bla bla]} || ${ChatText.Equal[blah]} || ${ChatText.Equal[blah blah]}) /call SomeSub
/chat #${channel} You should see this Second
/tell ${Sender} it worked!
}
/return
Just out of curiosity could the above code be converted into an .inc file so multiple macros could make use of it? Example would be a shammy macro, chanter macro, cleric macro and war macro could access the same channel what have you and add
to the macros
Posted: Mon Feb 20, 2006 5:18 pm
by A_Druid_00
Very easily. Look at feedme.inc and feedme.mac for an example
Re: **solved** proper /if syntax
Posted: Wed Jun 18, 2025 7:31 pm
by xyilla
Re: **solved** proper /if syntax
Posted: Wed Jun 18, 2025 7:32 pm
by xyilla
Re: **solved** proper /if syntax
Posted: Wed Jun 18, 2025 7:33 pm
by xyilla
Re: **solved** proper /if syntax
Posted: Wed Jun 18, 2025 7:34 pm
by xyilla
Re: **solved** proper /if syntax
Posted: Wed Jun 18, 2025 7:36 pm
by xyilla
Re: **solved** proper /if syntax
Posted: Wed Jun 18, 2025 7:37 pm
by xyilla
Re: **solved** proper /if syntax
Posted: Wed Jun 18, 2025 7:38 pm
by xyilla