Sorry, I noticed a typo that might have made it unclear.
This macro will turn a predetermined number of items into a NPC (not NOC) but from what I can tell the syntax does this by clicking on the npc, which ends up putting all 4 items in the first slot as opposed to 1 per open slot.
I am using the code Kagonis posted here
http://macroquest2.com/phpBB2/viewtopic.php?t=3592
Thinking through this, it would seem the correct way would to be click on the npc with the item to bring up the quest turnin window for the first tiem, but then specify the 2nd,3rd,and 4th slot for the subsiquent turnins.
Is there a specific name for quest turn in window slots? That might be enough info for me to modify the code.
Thanks!
Here is the macro itself......
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