Macro to give items to NPC [Request Fulfilled]

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Ecchi_User
orc pawn
orc pawn
Posts: 18
Joined: Fri Aug 30, 2002 6:34 am

Macro to give items to NPC [Request Fulfilled]

Post by Ecchi_User » Fri Aug 30, 2002 6:42 am

I was hoping to be able to modify the pottery.mac to do what I wanted, but it's probably easier to just ask for sample code from scratch.

I'm looking for some code that will repeatly give an item (until you are out) to a NPC. Used for factions mainly.

Examples would be Muffin quest, Batwings, Bandages... even Bandit Sashes. Especially usefull would be giving 4 stacks of 4 to the NPC before hitting trade. Any help?

gingertips
a hill giant
a hill giant
Posts: 230
Joined: Wed Jun 26, 2002 3:47 am
Location: Tseu-Qorcam

Post by gingertips » Fri Aug 30, 2002 8:22 am

Theres a tremendous feature at the top of this forum called "SEARCH"...

http://macroquest2.com/phpBB2/viewtopic.php?t=540

:wink:

Ecchi_User
orc pawn
orc pawn
Posts: 18
Joined: Fri Aug 30, 2002 6:34 am

Tried

Post by Ecchi_User » Sat Aug 31, 2002 2:48 am

I have tried that macro, the way it stands as is, doesn't work. Or at least I couldn't figure it out.

I understand only the basic 'macro language', But with all those mouse movements, I can't figure that out.

I have tried to write my own, didn't work. I tried to modify the one listed at that above url, even removing most of the extras, so it would only hand in 4 items of 1 each... yes ineffienct, but I'm still tring. Didn't work.

I was hoping someone else could help modify that, or write up a simple one where I can add or modify. I don't mind if the items and NPC names are hard coded

Thanks for reading

User avatar
DeathSpiral
a ghoul
a ghoul
Posts: 95
Joined: Thu Aug 22, 2002 6:31 pm

Re: Tried

Post by DeathSpiral » Sat Aug 31, 2002 9:05 am

Ecchi_User wrote:I have tried that macro, the way it stands as is, doesn't work. Or at least I couldn't figure it out.
You're right, it doesn't work. That was something I wrote off the top of my head, making assumptions. You know what happens when we make assumptions.

Well, here goes. Again, off the top of my head, probably slower, but 'should' work....

Code: Select all

| - handin.mac -
| Performs a handin to a mob name
| Call like /mac handing "Mob Name" "Item Name" #ItemsInStack #Staks
|  Soo... 4 stacks of 4 muffins to RandomMob would be...
|      /mac handin "Some Mob" Muffin 4 4

sub Main
   /press CTRL
   /press ALT
   /press SHIFT
   /target $p0
   :GetCloser
   /if n $target(distance)>9 {
      /echo You need to get closer to $p0!  Move closer and unpause...
      /mqpause on
      /goto :GetCloser
   }

   /sendkey down ctrl

   :StartHandin

   /for v1 0 to $p3
      /varset v9 $count("$p1")\$p2
      /if n $v9==0 /if n $v1==0 /goto :End
      /if n $v9==0 /if n $v1>0 /goto :HandIn
      /for v2 0 to $p2
         /finditem "$p1"
         /click left npctrade $v1
      /next v2
   /next v1

   :HandIn
   /click left npctrade give

   /goto :StartHandin

   :End
   /sendkey up ctrl
/return
That should work a bit better, but its not optimized at all.... Still untested as well. Let me know....

Bio_War
a lesser mummy
a lesser mummy
Posts: 36
Joined: Sun Sep 29, 2002 1:03 pm

Still doesn't seem to work

Post by Bio_War » Wed Oct 09, 2002 10:10 am

All it does for me is target the mob, then end macro, I have tried to play with it a bit, but it keeps doin the same thing, any help here?

Thanks