Have a macro idea but not sure where to start? Ask here.
Moderator: MacroQuest Developers
-
3djoker
- a hill giant

- Posts: 167
- Joined: Thu Jun 24, 2004 11:19 pm
Post
by 3djoker » Fri Jul 02, 2004 8:00 pm
just curious if there is a way to have a lvl 57 mage cast the long duration invis every 9-10 minutes?
im not going to pretend i know the first thing bout coding, becuase i don't. i'm just looking for something to cast invis every 10 minutes to refresh it while i wait for a spawn, so i don't need to do it. or when im 2 boxing, so i can just sit the mage in for some exp.
thanx a ton in advance......
*flame my ass= on*
-
Space-Boy
- a hill giant

- Posts: 242
- Joined: Wed Dec 04, 2002 12:53 pm
-
Contact:
Post
by Space-Boy » Fri Jul 02, 2004 9:03 pm
Code: Select all
#include spellcast.inc
#event attacked "#*#hits you#*#"
#event tell "#*#tells you#*#"
#event tell "#*#told you#*#"
Sub Main
:loop
/doevents
/if (${Me.Buff[Gather Shadows].Duration}<3) {
/call cast "Gather Shadows"
}
/goto :loop
/return
Sub Event_tell
/beep
/return
Sub Event_attacked
/beep
/beep
/pause 3
/beep
/beep
/return
usage would be /mac invis
Last edited by
Space-Boy on Fri Jul 02, 2004 10:26 pm, edited 2 times in total.
You have gotten better at Carpal Tunnel! (247)
-
3djoker
- a hill giant

- Posts: 167
- Joined: Thu Jun 24, 2004 11:19 pm
Post
by 3djoker » Fri Jul 02, 2004 9:44 pm
actually for mage it would be...
Code: Select all
#include spellcast.inc
#event appear "#*#You appear#*#"
#event attacked "#*#hits you#*#"
#event tell "#*#tells you#*#"
#event tell "#*#told you#*#"
Sub Main
:loop
/doevents
/if (!${Me.Buff["Veil of Elements"]}) {
/call cast "Veil of Elements"
}
/goto :loop
/return
Sub Event_tell
/tell ${Param0} got a tell
/return
Sub Event_appear
/tell ${Param0} appeared, recasting
/beep
/return
Sub Event_attacked
/tell ${Param0} Im being attacked help!
/beep
/beep
/pause 3
/beep
/beep
/return
but did try it, got some error though....
i started it with no invis. it casted invis like it should but right after invis was cast, i got this error......
Code: Select all
Failed to parse /if condition '(veil of elements)', non-numeric encountered
invis.mac@12 (main):if (!${Me.Buff["Improved Invisibility"]}) {
the current macro has ended
iny idea what happened?
-
Space-Boy
- a hill giant

- Posts: 242
- Joined: Wed Dec 04, 2002 12:53 pm
-
Contact:
Post
by Space-Boy » Fri Jul 02, 2004 9:58 pm
gonna log my enchanter in with random duration invis to figure it out =) will edit the original post with working version gimme a few
You have gotten better at Carpal Tunnel! (247)
-
3djoker
- a hill giant

- Posts: 167
- Joined: Thu Jun 24, 2004 11:19 pm
Post
by 3djoker » Fri Jul 02, 2004 10:08 pm
thanx a ton man.
-
Space-Boy
- a hill giant

- Posts: 242
- Joined: Wed Dec 04, 2002 12:53 pm
-
Contact:
Post
by Space-Boy » Fri Jul 02, 2004 10:23 pm
edited for use w/ necro or sk, change spell names, and i couldnt get tells working for some reason but at least the beeps work!! =) will re invis when tehre are 12 seconds left on spell, (when its flashing)
good enough right?
editted out some of the events, no need for them
You have gotten better at Carpal Tunnel! (247)
-
s16z
- a ghoul

- Posts: 97
- Joined: Thu Apr 01, 2004 12:03 pm
Post
by s16z » Fri Jul 02, 2004 10:29 pm
Tells don't work because Param0 doesn't exist in the subs, it's a parameter to the Main routine. You need to save it somewhere in another variable and use that.
-
3djoker
- a hill giant

- Posts: 167
- Joined: Thu Jun 24, 2004 11:19 pm
Post
by 3djoker » Sat Jul 03, 2004 6:12 am
works like a charm :)
now can i have permission to add a lil stuff to it to enhance it and give me some hands on at coding?
-
fearless
- Not a Psychic
- Posts: 2684
- Joined: Wed Mar 10, 2004 3:52 pm
Post
by fearless » Sat Jul 03, 2004 11:10 am
You can only edit your own posts unless you are an admin.
-
3djoker
- a hill giant

- Posts: 167
- Joined: Thu Jun 24, 2004 11:19 pm
Post
by 3djoker » Sat Jul 03, 2004 12:46 pm
thats not what i meant.
i just wanted permission to use his base code and alter it for my own personal benefits.
-
aChallenged1
- a grimling bloodguard

- Posts: 1804
- Joined: Mon Jun 28, 2004 10:12 pm
Post
by aChallenged1 » Sat Jul 03, 2004 1:17 pm
Isn't posting your code here pretty much permission to use as you see fit?
-
blueninja
- a grimling bloodguard

- Posts: 541
- Joined: Thu Aug 28, 2003 7:03 am
- Location: Göteborg, Sweden
Post
by blueninja » Sun Jul 04, 2004 3:02 pm
3djoker wrote:
i started it with no invis. it casted invis like it should but right after invis was cast, i got this error......
Code: Select all
Failed to parse /if condition '(veil of elements)', non-numeric encountered
invis.mac@12 (main):if (!${Me.Buff["Improved Invisibility"]}) {
the current macro has ended
iny idea what happened?
Me.Buff returns a "buff" type object. The default type cast is string, Use ${Me.Buff["Improved Invisibility"].ID} instead.
-
Chill
- Contributing Member

- Posts: 435
- Joined: Fri May 07, 2004 5:06 pm
- Location: Erie, PA
Post
by Chill » Mon Jul 05, 2004 2:31 am
while you could use ID as a boolean to see if its there or not, it would be better to use duration, like in the top post:
Code: Select all
/if (${Me.Buff[Gather Shadows].Duration}<3)
For a mage that would be:
Code: Select all
/if (${Me.Buff[veil of elements].Duration}<3)
This will allow you to re-invis just before invis fades, rather than after you become visable.
Note that .Duration is in 6-second tics.
-
blueninja
- a grimling bloodguard

- Posts: 541
- Joined: Thu Aug 28, 2003 7:03 am
- Location: Göteborg, Sweden
Post
by blueninja » Mon Jul 05, 2004 6:38 pm
That will bork when you don't have the buff on you though since you can't compare NULL to 3. Best way is to first test ID then Duration.[/code]