batwing.mac (Batwing quest macro)

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

batwing.mac (Batwing quest macro)

Post by kagonis » Fri Oct 24, 2003 7:51 pm

Have you ever done the batwing quest for faction? If so you will know how much stress that endless turning in has on your shoulders and wrists.

Here is a (not fully tested) macro that makes this much easier.

Open all bags, target the NPC in question and run the macro.

If you find errors or anything, then feel free to post the fix here thanks :)

Code: Select all

#turbo
Sub Main
	/declare l0 local
	:Loop
		/sendkey down ctrl
		/for l0 1 to 4
			/finditem "Bat Wing"
			/delay 5
			/if n @l0==1 /lclicktarget
			/if n @l0>1 /click left npctrade $int($calc(@l0-1))
			/delay 5
			/if "$cursor(name)"=="Spell: Flare" {
				/click left destroy
			} else {
				/click left auto
			}
		/next l0
		/sendkey up ctrl
		/click left npctrade give
		/delay 5
	/goto :Loop
/return

TheColonel
of what?
of what?
Posts: 164
Joined: Thu Oct 10, 2002 6:34 pm
Location: Golden, CO
Contact:

Post by TheColonel » Wed Nov 05, 2003 6:41 am

If you don't mind me asking what faction does this fix? =)
Hell hath no fury like a woman's scorn for EQ.
-==(UDIC)==-

bob_the_builder
a hill giant
a hill giant
Posts: 275
Joined: Tue Jul 22, 2003 1:22 pm

Post by bob_the_builder » Wed Nov 05, 2003 9:36 am

Code: Select all

| questitem.mac 
| Useage: /macro QuestItem "bandages" 
| Bob the Builder 
| 11/1/03 
|#turbo 

Sub Main 
   /declare QuestItem local 
   :GiveItem 
      /if n $count("@Param0")==0 /goto :Done 
      /sendkey down ctrl 
      /for QuestItem 0 to 3 
         /finditem "@Param0" 
         :WaitForItem 
         /if "$cursor()"=="FALSE" { 
            /delay 0 
            /goto :WaitForItem 
         } 
         /click left target 
         :Wait 
         /if $cursor()==TRUE { 
            /delay 0 
            /goto :Wait 
         } 
      /next QuestItem 
      /sendkey up ctrl 
      /click left npctrade give 
      /delay 5 
   /goto :GiveItem 
  :Done 
      /sendkey up shift 
      /endmacro 
/return 
This will work for any quest items, not just bandages

fulast

Wowza

Post by fulast » Sat Nov 08, 2003 11:12 am

It is a wonderful world.

After having manually handed in 500 bat wings to Niola Impholder in Felwithe for better faction with Kepers of the Art, Faydark Champions and some others (negative faction with The Dead (in Neriak)) I thought "I wonder if there is a macro at the forum that does this.

And voila, so there is.

I hope this works as intended now. I need that faction =)

Help Me

GP

Post by Help Me » Sat Dec 06, 2003 10:02 am

Could someone change this to give NPC 2 gold peices, until no more gold? For facation, could help much! =)

Lazyman21
decaying skeleton
decaying skeleton
Posts: 9
Joined: Sat Jan 24, 2004 10:16 am

Post by Lazyman21 » Sun Jan 25, 2004 9:26 am

Have a Quest similar to this to raise faction with the Temple of Solosek Ro.
Coul someone change this to hand a target 30 gold at a time then delete the scroll i get back? I have about 3k plat in gold to give and that could take a while.
BTW, does it mater what the name of the npc is? (newb to MQ).


O ya, the spell i recieve from handing in 30 gold is randome, and sometimes not a spell...but a somethin liek a tattered parchment (not sure on name).

Thanks in advance.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Tue Jan 27, 2004 7:11 pm

This is untested, but it should work..

Code: Select all

| questitem.mac
| Useage: /macro QuestItem "bandages"
| Bob the Builder
| 11/1/03
|#turbo

| /mouseto plat|gold|silver|copper

Sub Main
   /declare QuestItem local
   /declare Timeout timer
   :GiveItem
      /if "$defined("Param1")"=="TRUE" /call Syntax
      /sendkey down ctrl
      /for QuestItem 1 to @Param1
         /if "@Param0"=="pp" {
            /mouseto plat
            /click left
         } else /if "@Param0"=="gp" {
            /mouseto gold
            /click left
         } else /if "@Param0"=="sp" {
            /mouseto silver
            /click left
         } else /if "@Param0"=="cp" {
            /mouseto copper
            /click left
         } else {
            /finditem "@Param0"
         }
         :WaitForItem
         /varset Timeout 5s
         /if "$cursor()"=="FALSE" {
            /if n @Timeout==0 /goto :Done
            /delay 0
            /goto :WaitForItem
         }
         /click left target
         :Wait
         /varset Timeout 10s
         /if $cursor()==TRUE {
            /if n @Timeout==0 /goto :Done
            /delay 0
            /goto :Wait
         }
      /next QuestItem
      /sendkey up ctrl
      /click left npctrade give
      /delay 5
      :ClearCursor
      /if $cursor()==TRUE {
         /if "$defined(@Param2)"=="TRUE" /if "@Param2"=="destroy" {
            /click left destroy
         } else {
            /click left auto
         }
         /delay 0
         /goto :ClearCursor
      }
   /goto :GiveItem
   :Done
      /sendkey up shift
      /endmacro
/return 

Sub Syntax
   /echo Syntax: /macro handin <pp|gp|sp|cp|"Item Name"> <#> [destroy]
   /echo ..
   /echo Example: /macro handin gp 2 destroy
   /echo Will hand in 2 pieces of gold to the targeted NPC and then click give, and will destroy anything you get back on your cursor.
   /echo ..
   /echo Example: /macro handin "Batwing" 4
   /echo Will hand in 4 batwings to the targeted NPC and then click give, and will keep anything you get back on your cursor.
   /endmacro
/return

bheathrow
orc pawn
orc pawn
Posts: 14
Joined: Sun Dec 21, 2003 9:27 am

Post by bheathrow » Sun Feb 29, 2004 11:43 pm

nice macro. Doesn't work at all though. Whole lotta screen clicking on the third item slot of the give, and it doesn't initiate a trade it will however try to complete a trade.

bheathrow
orc pawn
orc pawn
Posts: 14
Joined: Sun Dec 21, 2003 9:27 am

Post by bheathrow » Sun Feb 29, 2004 11:58 pm

I had to hard code this in:

Code: Select all

|      /click left npctrade give
/mouseto 51 494
/delay 5
/click left
since that's the loc of my give button. mayeb something is screwy in my files, but it always clicks the third NPCTRADE slot instead of the give button otherwise.

Castin
decaying skeleton
decaying skeleton
Posts: 2
Joined: Mon Mar 01, 2004 3:25 pm

Post by Castin » Tue Mar 02, 2004 2:54 pm

kagonis your script works beautifully, except for two things..

when i select the GP for the GP turnin, it places the selected gold back in the gold pile.

and the destroy function doesn't work for some reason.

castin

topgun
a lesser mummy
a lesser mummy
Posts: 43
Joined: Thu Jan 09, 2003 8:27 am

Post by topgun » Wed Mar 03, 2004 3:02 am

Have a Quest similar to this to raise faction with the Temple of Solosek Ro.
Where, who, what, how ???

MikeDVB
decaying skeleton
decaying skeleton
Posts: 5
Joined: Tue Apr 13, 2004 1:32 pm

Post by MikeDVB » Tue Apr 13, 2004 1:33 pm

I made this code a little bit more failsafe and a bit faster... At least it worked for me =) Without a delay hard coded in for the NPC trader window to show up sometimes it misses the first item. But very rare when you are the only one in the zone like Felwithe.

Code: Select all

#turbo 
Sub Main 
   /declare l0 local 
   :Loop 
      /sendkey down ctrl 
      /for l0 1 to 5
         /finditem "Bat Wing" 
         :WaitForItem 
         /if "$cursor()"=="FALSE" { 
            /delay 1
            /goto :WaitForItem 
         }          
         /if n @l0==1 /click left target | delay here if you feel necessary
         /if n @l0>1 /click left npctrade $int($calc(@l0-2)) 
         :WaitForItem1 
         /if "$cursor()"=="FALSE" { 
            /delay 1
            /goto :WaitForItem1
         }          
         /if "$cursor(name)"=="Spell: Flare" { 
            /click left destroy 
         } else { 
            /autoinventory
         } 
      /next l0 
      /sendkey up ctrl 
      /click left npctrade give 
      /delay 5 
   /goto :Loop 
/return
This will clear all of your bags of the spell "Flare" afterwards.

Code: Select all

#turbo 
Sub Main 
   /declare l0 local 
   :Loop 
         /finditem "Spell: Flare" 
         :WaitForItem 
         /if "$cursor()"=="FALSE" { 
            /delay 1
            /goto :WaitForItem 
         }          
         /if "$cursor(name)"=="Spell: Flare" { 
            /click left destroy 
         } else { 
            /autoinventory
         } 
      /delay 5 
   /goto :Loop 
/return