Hand in

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Edgy
orc pawn
orc pawn
Posts: 14
Joined: Wed Aug 21, 2002 8:28 pm

Hand in

Post by Edgy » Tue Aug 27, 2002 3:07 am

Hey all. Trying to make a macro to hand in stuff and can't quite seem to get it. I'll use the example of the FP muffin quest for faction. I need to pick up a stack (or 16, but a stack is easier at this stage) onto my cursor then click on the npc and give.
I can target and spin to face the NPC OK, however can't quite work out how to get the muffins on my cursor and click on him....

Anyone know the lines for this??

User avatar
Ravena666
a ghoul
a ghoul
Posts: 101
Joined: Fri Aug 23, 2002 2:57 am

Post by Ravena666 » Tue Aug 27, 2002 4:06 am

I was thinking of making one myself to get my faction up in the darkelf city (red wine quest)

wish I could, but atm i cant help.
Its a good idea, and will save your wrist.

G`luck
Raven
~~ SPOON ~~
~~ SPORK ~~

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Tue Aug 27, 2002 5:08 am

Salutations,

Code: Select all

/finditem "itemname"
/target aMob
/click left target
this will give itemname to aMob. Hope this helps.

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Tue Aug 27, 2002 5:16 am

I think the difficult thing to get to work here would be to do 4 stacks of 4. I am guessing when Plazmic comes back that picking up a certain amount of items ie 4 instead either a full stack or a single item will be added. Until then any fadtion type macros will be pretty inefficient.

User avatar
Ravena666
a ghoul
a ghoul
Posts: 101
Joined: Fri Aug 23, 2002 2:57 am

Post by Ravena666 » Tue Aug 27, 2002 5:27 am

Imperfect wrote: I think the difficult thing to get to work here would be to do 4 stacks of 4. I am guessing when Plazmic comes back that picking up a certain amount of items ie 4 instead either a full stack or a single item will be added. Until then any fadtion type macros will be pretty inefficient.
Ack, didnt think of that.
that would make it a bit more troublesum.
~~ SPOON ~~
~~ SPORK ~~

Edgy
orc pawn
orc pawn
Posts: 14
Joined: Wed Aug 21, 2002 8:28 pm

Post by Edgy » Tue Aug 27, 2002 5:59 am

A single stack works except it only registers 16...so you lose 4 every hand in

Edgy
orc pawn
orc pawn
Posts: 14
Joined: Wed Aug 21, 2002 8:28 pm

Post by Edgy » Tue Aug 27, 2002 6:05 am

Ok this is for a whole stack....

Code: Select all

Sub Main
/sendkey down shift
/finditem "bat wing" 
/target aMob 
/click left target
/Return 0
And I guess that after this I just have to put

Code: Select all

/click left give

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

Post by DeathSpiral » Tue Aug 27, 2002 7:04 am

Howdy-
The following code is alot of supposition, based on assumptions. It is not tested. If someone would like to test it, feel free...

Code: Select all

| - handin.mac -
| This macro performs handins to a mob.
| It should be called like this:
| /mac handin "MobName" "ExactItemNameToHandIn" #ToHandInAtATime

sub Main
   /target $p0
   /if "$target()"!="TRUE" {
      /echo Unable to target $p0, ending...
      /goto :End
   }
   /face

   :GetCloser
   /if n $target(distance)>10 {
      /echo You are not close enough to do the handin...
      /echo Move closer and unpause...
      /mqpause
      /goto :GetCloser
   }

   :StartHandin
   /varset v2 0

   :PickItems
   /varset v1 $count("$p1")\$p2
   /if n $v1==0
      /if n $v2>0 {
         /goto :HandIn
      } else {
         /goto :End
      }

   /finditem "$p0"

   | The following code was created by Goge in this MQ thread:
   | http://macroquest2.com/phpBB2/viewtopic.php?t=311
   /mouseto + 23 +45
   /delay 20
   /for v62 1 to $v61
      /delay 0
      /click left
   /next v62
   /mouseto + 66 -22
   /delay 20
   /click left
   /delay 5

   /click left target

   /varadd v2 1
   /if n $v2<4 /goto :PickItems

   :HandIn
   | I'm going to use this, because it was listed above... no idea if this works
   | Based on MQ# syntax I've seen this far, it will either be 'Give' or 
   | 'Trade' assuming, of course, MQ supports this.
   /click left Give
 
   /goto :StandHandin

   :End
/return
Hope it works / helps.

On the chance it works, based on the info presented above, you'd want to use

Code: Select all

/mac handin MobName "Muffin" 4
, and it should/might hand in 4 stacks of 4...