A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.
Moderator: MacroQuest Developers
-
grimjack
- Macro Author

- Posts: 525
- Joined: Thu Nov 07, 2002 6:51 am
-
Contact:
Post
by grimjack » Fri Oct 03, 2003 1:57 am
Code: Select all
|drag.mac
|Can take up to 7 names to drag.
|Usage /macro drag.mac name name name... ect ect
|Version 2.0
Sub Main
/declare LoopNum global
/declare ArrayCount global
/declare NameArray array2
/if $defined(Param0)==FALSE {
/echo Usage /macro drag.mac corpse1 corpse2 corpse3 ect.
/echo Can do up to 7
/end
}
/varset NameArray(1,0) "@Param0"
/varset ArrayCount 1
/if $defined(Param1)==TRUE {
/varset NameArray(1,1) "@Param1"
/varset ArrayCount 2
}
/if $defined(Param2)==TRUE {
/varset NameArray(1,2) "@Param2"
/varset ArrayCount 3
}
/if $defined(Param3)==TRUE {
/varset NameArray(1,3) "@Param3"
/varset ArrayCount 4
}
/if $defined(Param4)==TRUE {
/varset NameArray(1,4) "@Param4"
/varset ArrayCount 5
}
/if $defined(Param5)==TRUE {
/varset NameArray(1,5) "@Param5"
/varset ArrayCount 6
}
/if $defined(Param6)==TRUE {
/varset NameArray(1,6) "@Param6"
/varset ArrayCount 7
}
/varset LoopNum 0
:DragLoop
/target corpse @NameArray(1,@LoopNum)
/delay 3
/corpse
/delay 3
/varadd LoopNum 1
/if n @LoopNum>=@ArrayCount /varset LoopNum 0
/goto :DragLoop
/return
Last edited by
grimjack on Fri Oct 03, 2003 10:40 pm, edited 4 times in total.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.
Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.
My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack
-
Plazmic
- The One

- Posts: 800
- Joined: Fri Jun 14, 2002 12:31 am
-
Contact:
Post
by Plazmic » Fri Oct 03, 2003 1:59 am
Not sure, but I don't think this will work anymore:
Use this instead:
-
ap50
- a snow griffon

- Posts: 425
- Joined: Sun Aug 18, 2002 2:29 pm
Post
by ap50 » Fri Oct 03, 2003 3:34 am
You're also using @Param and @$Param references.
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]
-
grimjack
- Macro Author

- Posts: 525
- Joined: Thu Nov 07, 2002 6:51 am
-
Contact:
Post
by grimjack » Fri Oct 03, 2003 3:46 am
ap50 wrote:You're also using @Param and @$Param references.
Thanks
Should be fixed now
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.
Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.
My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack
-
Guest
Post
by Guest » Fri Oct 03, 2003 6:50 pm
Just another typo I think...
@Param3, 4 and 5 are missing the quotation marks at the start.
-
FlashG
- Contributing Member

- Posts: 104
- Joined: Thu Jul 11, 2002 6:38 pm
Post
by FlashG » Fri Oct 10, 2003 4:05 pm
NM. Plaz 'stole' my idea before I even had it.
-
blakbelt
- a lesser mummy

- Posts: 70
- Joined: Wed Aug 27, 2003 12:40 pm
- Location: Scotland UK
Post
by blakbelt » Sat Oct 11, 2003 2:53 am
In usage do you supply the just the name of the player or player01's corpse??
-
Spectre
- orc pawn

- Posts: 21
- Joined: Tue Sep 02, 2003 10:31 am
Post
by Spectre » Sat Oct 11, 2003 5:05 pm
Plazmic wrote:Not sure, but I don't think this will work anymore:
Use this instead:
This may not be the correct thread for this, but neither of the above two examples work. Code such as:
Code: Select all
| sptest.mac
#turbo
#include spells.mac
Sub Main
/if $defined(Param0)==FALSE {
/echo Usage: /macro sptest <Name of Spell (in quotes if more than one word)>
/endmacro
}
/call Cast "@Param0"
/return
...always falls through. Typing:
/macro sptest
never gets the Usage message. Using strlen doesn't work either.