Few quick questions, need some help please.

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

aposle

Few quick questions, need some help please.

Post by aposle » Sun Dec 07, 2003 4:25 pm

Hey all, I'm new to MacroQuest but not to programming so I am beginning by making a bit of an elaborate macro.

Basically what I am doing is making a macro to get my smith through some of those tiresome levels of clicking to make bits and such. Before deciding to take this route, I was a bit afraid I would be banned, but since I will be monitoring the computer at all times I figure it wont be too much of a problem. This is more to save my wrist than it is easy street. I picked up a macro script for that and it worked well, but like any other programmer I was unsatisfied because it worked and was simple :)

I decided to implement the ability to go to vendors to buy/sell materials using a walking macro and a sell/buy macro. Now the fun begins.

Problem #1:

Is it possible to call a macro inside of another macro, or do I have to extract from one macro and make it into a sub? After using the combine macro, I want to be able to walk to a merchant using another macro, and then sell using yet another macro. Independantly all these macros are working perfectly, but I do not know how to execute a macro from within a macro.

Problem #2:

I have been using the BlueSky/Jalapeno walking macro http://macroquest2.com/phpBB2/viewtopic.php?t=4385 It works wonders, except after walkpath.mac is executed, my character is looking directly up, leaving him unable to view a merchant since the line of sight is wrong. I have fiddled around with Page Down, but it leaves him looking at the ground. How do I center the line of sight to the center, or better yet, directly at a NPC?

Problem #3:

Doors, my arch rival. Simple enough, how do I go about opening one? Once again, the line of sight problem comes into play as my character is always looking directly up after walkpath.mac is executed. After the character is looking at the door, how can I make him click the door? This one is not too much of a problem as I am about to figure it out, but any help is appreciated.

Thanks guys, as soon as I get this to my liking I will post it. So far I am very happy with it, and I believe once things are through I will be able to make a smithing from 0-250 macro. I think eventually I will implement a bank feature where the character takes out money from the bank to fund his smithing. If I can implement this and there are enough funds in the bank I believe I will be able to make the mastering smithing macro.

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Re: Few quick questions, need some help please.

Post by blueninja » Sun Dec 07, 2003 5:52 pm

aposle wrote: Problem #1:

Is it possible to call a macro inside of another macro, or do I have to extract from one macro and make it into a sub?

Problem #2:

How do I center the line of sight to the center, or better yet, directly at a NPC?
1: You can call a macro by executing /macro but it won't return to your previous macro. From your description it sounds like you'll have to extract. You can use "#include filename" to include an external file.

2: /face look

Don't remember how to do the doors, "/face door", "/press u" might work.

aposle

#include

Post by aposle » Sun Dec 07, 2003 6:17 pm

I am a bit confused how I would integrate an external file using #include. Would it just be #include othermacro.mac in the header then /call othermacro.mac ? Basically I am at a total loss as to what I should do. I've searched a bit for something like this and have come up with nothing.

aposle

.

Post by aposle » Sun Dec 07, 2003 11:29 pm

Anyone?

aposle

/face look

Post by aposle » Sun Dec 07, 2003 11:37 pm

I forgot to add, I am having trouble implementing /face look into the walkpath.mac macro, where would I put it? Every place I tried does not result in centering the line of sight on said door/NPC.

gnome001
a ghoul
a ghoul
Posts: 109
Joined: Fri Jan 24, 2003 1:01 am

Post by gnome001 » Mon Dec 08, 2003 12:00 am

for structural questions, the easiest way to see how it is done is to go look in the macro depot and look at some of the popular macros there.. like genbot.. or one of the tradeskill macros.

Drunkensloth
a lesser mummy
a lesser mummy
Posts: 67
Joined: Sat Oct 18, 2003 2:54 am

Post by Drunkensloth » Mon Dec 08, 2003 3:34 am

to include a macro


#include MACRONAME.inc


make sure its an inc file
oh and i will save you the trouble before you come back here
change Sub Main in your inc file to something NOT sub main




and the stories that people make up about saving their wrists hahahaahaha

ITS A PLAT MACRO OMG JUST SAY IT
And here I was clicking like a sucker!

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Mon Dec 08, 2003 3:42 am

Problem #2

why exactly do you need to see the merchant you are gonna open?

to use /press u ?

then my question is why?

Code: Select all

/target "themerchantnamehere"

/click right target
works without you looking at them, as its a "direct" click, no mouse movement needed...
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.