Macro depository for macros written before the user variable changes that broke all of them.
Moderator: MacroQuest Developers
-
driftinsupra
- Official loudmouth

- Posts: 212
- Joined: Tue Jan 28, 2003 9:25 pm
Post
by driftinsupra » Fri Aug 15, 2003 9:04 pm
Okthis is my first real script and I have been working on the script for some time but I have some issues that I really dont know what to do with. What this script is supposed to do is essentially sit and wait till either the lizzt in ocean of tears pops or his placeholder pops. If the placeholder pops it will go and kill it really quick and then go back to a designated spot and wait till lizzy pops. When lizzy does pop, my pet is buffed then it goes to the lizzy and does a fun and time tested combo of fear kiting. The it loots the lizzy and goes back to the resting spot and ends. First the script seems to go physco when I run into a tree while chasing the lizzy yet I cant seem to think of something that would determine if I had stopped moving forward and could sidestep the tree in the middle of moving forward. Next I have determined what to do if he resists and I have set up so I really cant be interupted in my casting but the problem remains of what to do if I fizzle. The text output when I fizzle doesnt really let me know what spell I have fizzled at. Anyway if anyone could send me some pointers I would appreciate it. realize it isnt the prettiest code but so far it does do what I want it to. I am still learning and playing with stuff so give me a break for now. Thanks ahead of time guys.
Code: Select all
#include routines.mac
#Event NoLizzy "There are no 'allizewsaur' around here."
#Event NoFear "Your fear spell has worn off."
#Event ResistDark "Your target resisted the Dooming Darkness spell."
#Event ResistFear "Your target resisted the Invoke Fear spell."
Sub Main
/stand
/pet follow
/call gotoloc -2845,-1642
/call autorun 0
/sit
/delay 20
/call Target
/return
Sub Target
/target allizewsaur
/doevent NoLizzy
/call Attack
/return
Sub Attack
/stand
/press F1
/target id #132
/cast 6
/delay 60
/pet follow
/target allizewsaur
:runloop
/if n $target(distance)>=150 {
/face nopredict
/call autorun 1
/goto :runloop
}
/call autorun 0
/pet attack
/delay 15
/cast 7
/delay 40
/doevent ResistFear
:darkloop
/if n $target(distance)>=20 {
/face nopredict
/call autorun 1
/goto :darkloop
}
/call autorun 0
/delay 15
/cast 2
/delay 50
/doevent ResistDark
:deadloop
/if n $target(hp,pct)!=0 {
/face nopredict
/doevent NoFear
:catchloop
/if n $target(distance)>=100 {
/face nopredict
/call autorun 1
/goto :catchloop
}
/call autorun 0
/goto :deadloop
}
:lootloop
/target allizewsaur
/if n $target(distance)>=20 {
/face
/call autorun 1
/goto :lootloop
}
/call autorun 0
/loot
/call gotoloc -2845,-1642
/return
Sub Loot
:runloop
/if n $target(distance)>=10 {
/face nopredict
/call autorun 1
/goto :runloop
}
/call autorun 0
/loot
/delay 20
/mouseto corpse 0
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto auto
/click left
/delay 10
}
/mouseto corpse 1
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto auto
/click left
/delay 10
}
/mouseto corpse 2
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto auto
/click left
/delay 10
}
/mouseto corpse 3
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto auto
/click left
/delay 10
}
/mouseto corpse done
/click left
/delay 10
/return
/return
Sub Lootdestroy
:runloop
/if n $target(distance)>=10 {
/face nopredict
/call autorun 1
/goto :runloop
}
/call autorun 0
/loot
/delay 20
/mouseto corpse 0
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto destroy
/click left
/delay 10
}
/mouseto corpse 1
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto destroy
/click left
/delay 10
}
/mouseto corpse 2
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto destroy
/click left
/delay 10
}
/mouseto corpse 3
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto destroy
/click left
/delay 10
}
/mouseto corpse done
/click left
/delay 10
/return
/return
Sub Event_NoLizzy
/target "aqua goblin sacrifice
/if n $target(id)!=0 {
/stand
:runloop
/if n $target(distance)>=50 {
/face nopredict
/call autorun 1
/goto :runloop
}
/call autorun 0
/pet attack
:deadloop
/if n $target(hp,pct)!=0 {
/goto :deadloop
}
/target "aqua goblin sacrifice"
/call Lootdestroy
/call gotoloc -2845,-1642
/sit
}
/delay 300
/target allizewsaur
/doevents NoLizzy
/return
Sub Event_NoFear
/face away
:runloop
/if n $target(distance)<=150 {
/call autorun 1
/goto :runloop
}
/call autorun 0
/face nopredict
/delay 10
/cast 7
/delay 40
/do event ResistFear
:darkloop
/if n $target(distance)>=20 {
/face nopredict
/call autorun 1
/goto :darkloop
}
/call autorun 0
/delay 15
/cast 2
/delay 50
/doevent ResistDark
/return
Sub Event_ResistDark
:runloop
/if n $target(distance)>=20 {
/face nopredict
/call autorun 1
/goto :runloop
}
/call autorun 0
/delay 10
/cast 2
/delay 50
/doevent ResistDark
/cast 7
/delay 40
/doevent ResistFear
/return
Sub Event_ResistFear
/face away
:runloop
/if n $target(distance)<=200 {
/call autorun 1
/goto :runloop
}
/call autorun 0
/delay 10
/face nopredict
/cast 7
/delay 40
/doevent ResistFear
:catchloop
if n $target(distance)>=20 {
/face nopredict
/call autorun 1
/goto :catchloop
/call autorun 0
/delay 10
/cast 2
/delay 50
/doevent ResistDark
/return
I
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Fri Aug 15, 2003 9:52 pm
There is definitley a shorter way to loot a corpse than what you have. You also appear to have the loot corpse code in the macro twice under Sub Loot and Sub Lootdestroy.
Try looking in hunter.mac for some cleaner looting code.
Also, you can just use /click left auto or /click left destroy to clean up the macro a bit.
-
driftinsupra
- Official loudmouth

- Posts: 212
- Joined: Tue Jan 28, 2003 9:25 pm
Post
by driftinsupra » Fri Aug 15, 2003 10:40 pm
Yea I am sure there is some much easier ways to do several things I have done but what I got works so I dont think I will mess with it too much. If it aint broke dont fix it. Anyway any ideas with my other problems?
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Sat Aug 16, 2003 12:05 pm
Sometimes it helps to clean up a script (aka making it more elegant), so that other problems are easier to see.
I look at your script and don't even want to read through it because of the extremely long looting code.
Your choice... if it's not broken then no idea why you are asking for help with it.
-
Doodman
- a ghoul

- Posts: 124
- Joined: Thu Jan 02, 2003 12:07 pm
Post
by Doodman » Sat Aug 16, 2003 12:58 pm
driftinsupra wrote: but the problem remains of what to do if I fizzle. The text output when I fizzle doesnt really let me know what spell I have fizzled at.
Try something like the following.. You might need to tune the delay amount
Code: Select all
#Event fizzle "Your spell fizzles."
...
...
/varset v1 0
:loop
/cast 7
/delay 3
/doevents fizzle
/if n $v1==1 /goto :loop
...
...
Sub Event_fizzle
/varset v1 1
/return
-
Doodman
- a ghoul

- Posts: 124
- Joined: Thu Jan 02, 2003 12:07 pm
Post
by Doodman » Sat Aug 16, 2003 1:35 pm
An easier solution, which I use on my hotkeys in EQ is something like this:
The odds of your fizzling two times is a row is slim, it's possible, but slim. Works great unless, like me, your a bard. Then the second /cast stops your song.
To be even safer do it three times. Your odds will be even slimmer on three fizzles.
The above MQ solution would support any number of fizzles and is the "safest" solution, tho.
-
driftinsupra
- Official loudmouth

- Posts: 212
- Joined: Tue Jan 28, 2003 9:25 pm
Post
by driftinsupra » Sat Aug 16, 2003 5:10 pm
Thats an awesome idea. I never would have thought of that. Thanks
-
YKW-28983
- a hill giant

- Posts: 252
- Joined: Sun Dec 01, 2002 11:37 pm
Post
by YKW-28983 » Sat Aug 16, 2003 9:58 pm
Why not #include spellcast.mac
to cast a spell you do /call cast "SpellName"
it does fizzle, failures, and resists..
Code: Select all
Plazmic + 1 line change by Imperfect
|** SpellCast.mac
** This will cast a spell reliably for you...
** Usage:
** /call Cast "spellname"
** It will return the following values:
** CAST_SUCCESS
** CAST_UNKNOWNSPELL
** CAST_OUTOFMANA
** CAST_OUTOFRANGE
** CAST_CANNOTSEE
** CAST_STUNNED
** CAST_RESISTED
**|
#event Fizzle "Your spell fizzles!"
#event Interrupt "Your casting has been interrupted!"
#event Interrupt "Your spell is interrupted."
#event Recover "You haven't recovered yet..."
#event Recover "Spell recovery time not yet met."
#event Resisted "You target resisted the "
#event OutOfMana "Insufficient Mana to cast this spell!"
#event OutOfRange "Your target is out of range, get closer!"
#event NoLOS "You cannot see your target."
#event Stunned "You cannot cast while stunned"
#event Standing "You must be standing to cast a spell"
#event Collapse "Your gate is too unstable, and collapses."
#define CastStatus v59
#define CastTimer t7
#define CAST_SUCCESS 0
#define CAST_UNKNOWNSPELL 1
#define CAST_RESTART 2
#define CAST_OUTOFMANA 3
#define CAST_OUTOFRANGE 4
#define CAST_CANNOTSEE 5
#define CAST_STUNNED 6
#define CAST_RESISTED 7
Sub Cast
/if n $char(gem,"$p0")==0 /return CAST_UNKNOWNSPELL
:StartCast
/if n $char(gem,"$p0")<0 /call WaitForRefresh "$p0"
/cast "$p0"
/varset CastTimer $int($spell("$p0",casttime)*10+$spell("$p0",recoverytime)*10)
/varset CastStatus CAST_SUCCESS
:WaitCast
/doevents Fizzle
/doevents Interrupt
/doevents Recover
/doevents Standing
/doevents OutOfRange
/doevents OutOfMana
/doevents NoLOS
/doevents Resisted
/if n $CastStatus==CAST_RESTART /goto :StartCast
/if n $CastStatus>=CAST_RESTART /return $CastStatus
/if n $CastTimer>0 /goto :WaitCast
/varset CastTimer 0
/return CAST_SUCCESS
Sub WaitForRefresh
:LoopWaitForRefresh
/delay 0
/if n $char(gem,"$p0")<0 /goto :LoopWaitForRefresh
/return
Sub Event_Fizzle
/varset CastStatus CAST_RESTART
/return
Sub Event_Interrupt
/varset CastStatus CAST_RESTART
/return
Sub Event_Recover
/varset CastStatus CAST_RESTART
/delay 5
/return
Sub Event_Standing
/varset CastStatus CAST_RESTART
/stand
/return
Sub Event_Collapse
/varset CastStatus CAST_RESTART
/return
Sub Event_OutOfMana
/varset CastStatus CAST_OUTOFMANA
/return
Sub Event_OutOfRange
/varset CastStatus CAST_OUTOFRANGE
/return
Sub Event_NoLOS
/varset CastStatus CAST_CANNOTSEE
/return
Sub Event_Stunned
/varset CastStatus CAST_STUNNED
/return
Sub Event_Resisted
/varset CastStatus CAST_RESISTED
/return
-
Kint
- a hill giant

- Posts: 208
- Joined: Thu Mar 13, 2003 3:36 am
Post
by Kint » Sun Aug 17, 2003 4:36 am
to see if you've stopped moving, try assigning your x and y location, and then say 1 second later test if the locations are the same, or maybe off by 5 or so, if that returns true, then have it back up and sidestep maybe.
-
driftinsupra
- Official loudmouth

- Posts: 212
- Joined: Tue Jan 28, 2003 9:25 pm
Post
by driftinsupra » Sun Aug 17, 2003 1:29 pm
Wow thats kinda confusing but I think I am beginning to understand it. The only thing I can see where that wouldnt work in my script is the interrupt part. From what I can see if I get interupted then I try to cast the spell again. I have worked my script out so I never get interupts from drifting after stoping to cast so the only way I would be interupted is if I got hit and if I get hit I owuld really not like to continue trying to cast. I am gonna work on putting that into my script though since it looks like it would be perfect for my script.
-
driftinsupra
- Official loudmouth

- Posts: 212
- Joined: Tue Jan 28, 2003 9:25 pm
Post
by driftinsupra » Sun Aug 17, 2003 2:18 pm
Also I did a little test to see if I move when I colide in a tree and I do...I just move very very slowly up the tree (almost completely climbed one today). I was wondering if it would be possible to modify the autorun routine so it will strafe while running forward. I tried this too and it works as long as I have the right mouse button pressed so it is in mouse look mode. Anyone know how I could implement this?
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Sun Aug 17, 2003 2:42 pm
Told you to go take a look at hunter.mac.
It pretty much does everything you are trying to do as far as looting and moving to a mob goes.
Might pop a little light bulb over your head.
-
driftinsupra
- Official loudmouth

- Posts: 212
- Joined: Tue Jan 28, 2003 9:25 pm
Post
by driftinsupra » Sun Aug 17, 2003 3:06 pm
Yea I looked hunter.mac over a bit but I found myself pretty confused. It uses alot variables and parameters that I am really unsure of so far. Maybe I will give it a look at again.
Anyway I tried to pu the spell cast into my script. I got the include part and everything but everyime I try to call I spell it says something lie subroutine cast was not found ending script. Here is my new script:
Code: Select all
#include spellcast.mac
#include routines.mac
#Event NoLizzy "There are no 'allizewsaur' around here."
#Event NoFear "Your fear spell has worn off."
#Event NoSplurt "Your Splurt spell has worn off."
Sub Main
/stand
/pet follow
/call gotoloc -2845,-1642
/call autorun 0
/sit
/delay 20
/call Target
/return
Sub Target
/target allizewsaur
/doevent NoLizzy
/call Attack
/return
Sub Attack
/stand
/press F1
/target id #132
/call cast "Augment Death"
/pet follow
/target allizewsaur
:runloop
/if n $target(distance)>=150 {
/face nopredict
/call autorun 1
/goto :runloop
}
/call autorun 0
/pet attack
/delay 15
/call Cast "Invoke Fear"
:darkloop
/if n $target(distance)>=20 {
/face nopredict
/call autorun 1
/goto :darkloop
}
/call autorun 0
/delay 15
/call Cast "Dooming Darkness"
:splurtloop
/if n $target(distance)>=20 {
/face nopredict
/call autorun 1
/goto :splurtloop
}
/call autorun 0
/delay 15
/call Cast "Splurt"
:deadloop
/if n $target(hp,pct)!=0 {
/face nopredict
/doevent NoFear
/doevent NoSplurt
:catchloop
/if n $target(distance)>=100 {
/face nopredict
/call autorun 1
/goto :catchloop
}
/call autorun 0
/goto :deadloop
}
:lootloop
/target allizewsaur
/if n $target(distance)>=20 {
/face
/call autorun 1
/goto :lootloop
}
/call autorun 0
/loot
/call gotoloc -2845,-1642
/return
Sub Loot
:runloop
/if n $target(distance)>=10 {
/face nopredict
/call autorun 1
/goto :runloop
}
/call autorun 0
/loot
/delay 20
/mouseto corpse 0
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto auto
/click left
/delay 10
}
/mouseto corpse 1
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto auto
/click left
/delay 10
}
/mouseto corpse 2
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto auto
/click left
/delay 10
}
/mouseto corpse 3
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto auto
/click left
/delay 10
}
/mouseto corpse done
/click left
/delay 10
/return
/return
Sub Lootdestroy
:runloop
/if n $target(distance)>=10 {
/face nopredict
/call autorun 1
/goto :runloop
}
/call autorun 0
/loot
/delay 20
/mouseto corpse 0
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto destroy
/click left
/delay 10
}
/mouseto corpse 1
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto destroy
/click left
/delay 10
}
/mouseto corpse 2
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto destroy
/click left
/delay 10
}
/mouseto corpse 3
/click left
/delay 10
/if n $cursor(value)==4500 {
/mouseto destroy
/click left
/delay 10
} else {
/mouseto destroy
/click left
/delay 10
}
/mouseto corpse done
/click left
/delay 10
/return
/return
Sub Event_NoLizzy
/target "aqua goblin sacrifice
/if n $target(id)!=0 {
/stand
:runloop
/if n $target(distance)>=50 {
/face nopredict
/call autorun 1
/goto :runloop
}
/call autorun 0
/pet attack
:deadloop
/if n $target(hp,pct)!=0 {
/goto :deadloop
}
/target "aqua goblin sacrifice"
/call Lootdestroy
/call gotoloc -2845,-1642
/sit
}
/delay 300
/target allizewsaur
/doevents NoLizzy
/return
Sub Event_NoFear
/face away
:runloop
/if n $target(distance)<=150 {
/call autorun 1
/goto :runloop
}
/call autorun 0
/face nopredict
/delay 15
/call Cast "Invoke Fear"
:darkloop
/if n $target(distance)>=20 {
/face nopredict
/call autorun 1
/goto :darkloop
}
/call autorun 0
/delay 15
/call Cast "Dooming Darkness"
/return
Sub Event_Splurt
/call autorun 0
/delay 15
/call Cast "Splurt"
/return