#include

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

Moderator: MacroQuest Developers

I R monk
orc pawn
orc pawn
Posts: 28
Joined: Tue Dec 10, 2002 4:29 pm

#include

Post by I R monk » Thu Dec 12, 2002 3:14 pm

/bow

After trying a few hunting scripts on the boards I found that none of them meet my needs, So I set out to make one that did.

I have it so when started it will set its own home point, scan all char info and store in a(1,#).. scan the buff names he has on store them in a(2,#)
and the duration in a(3,#) he will then call for buffs or a heal as needed.

next he will search for a target in the following manner, checks his class
and level for range he can hunt, then adds that max and min to his level
IE War level 20, search for mobs that are level 16 to 23 can be any class.

once he finds a target he will store all mob info in a(4,#) then head to it, and begin a small attack phaze to make sure he has argo, at this point he will pull the mob back to camp.

when he gets back to camp he starts the combat round and calls for slow, mok and mor from shammy and cleric bots.

fights till the mobs dead, checking for adds, health and buffs as he goes then starts over. skipping the home point set and buff name set.

I want to start adding in spell casting features but the script is getting way to large. I'm thinking about breaking it in to .inc scripts for each section. but I lack any understanding of this function.

I've looked over macrokit nice work might I add, but It didnt anser all my questions. and the doc that comes with macroquest doesnt reall go much in to what you can and can not do with #includes.

Are vars shared from script to script? does the #define have to be made in both scripts? will array info in an #inc script be useable in the main script? can a #inc script make a call to another #inc script or can that only be done in the main script.

Thanks for any help in advance.

Vendor001
Cheezily Banned
Cheezily Banned
Posts: 78
Joined: Wed Nov 13, 2002 1:37 pm

Post by Vendor001 » Thu Dec 12, 2002 3:26 pm

All a #include does is paste the text from the file into the current file in memory when it's processed(or pre-processed, as the case may be).

So it really doesn't matter if you break it into 500 million bits, or leave it all as one big script, it still will "be" one big script when it's executing.

With that being said, it's probably a good idea to make sure your variables from an #include don't conflict with a variable from your "main" script.

I R monk
orc pawn
orc pawn
Posts: 28
Joined: Tue Dec 10, 2002 4:29 pm

Post by I R monk » Thu Dec 12, 2002 5:02 pm

Thanks Vendor001,
Was not sure excatly how that worked.
So that being the case, you dont need to #define the same information in the main and the #inc, just make sure its not conflicting.

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

Post by L124RD » Thu Dec 12, 2002 10:49 pm

Salutations,
#includes just organize stuff... the macro will act as if you pasted the include instead of that include line...