MacroKit.inc - A kit which allows you to build macros easily

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

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

MacroKit.inc - A kit which allows you to build macros easily

Post by L124RD » Sun Nov 10, 2002 7:18 pm

Salutations,
Current version is 1.5
For a long time, I have been discussing this idea, working on it in my free time... well here it is. It is a wonderful little kit that reduces the cheese macro to 16 lines of code... how cool is that :p ? anyway... Currently the Kit supports:
  • clean initiation/termination
    Banking
    Combining
    Fighting
    spells (no bard song twisting... i'm sure you can cast them since you just have to click the spell gems)
    pathing
right now the macro is not officially turboed... this is because there may be some turbo bugs... though #turbo is in the macro if you have any problems try removing this first...

http://shell.evilpumpkin.com/MacroKit

Included in the zip is a readme... read it... Here is the cheese macro that (in my testing) works.

Code: Select all

| MacroKit-Cheese.mac
|  by L124RD

#include MacroKit.inc

sub main
 /varset a(1,10) Granger
 /call initiate 1 10
 :loop
  /varset a(2,10) "sell $count("Mature Cheese") Mature Cheese"
  /varset a(2,11) "buy 16 Bottle of Milk"
  /varset a(2,12) "buy 8 Rennet"
  /call UseMerchant Granger 10
  /varset a(3,10) "2 Bottle of Milk"
  /varset a(3,11) "1 Rennet"
  /varset a(3,12) "1 Dairy Spoon"
  /call Combine Mixing 10 1
  /call logstats
 /goto :loop
 /call terminate "We got outside the loop 0_o"
/return
Last edited by L124RD on Thu Dec 05, 2002 10:28 pm, edited 3 times in total.

Macromancer
orc pawn
orc pawn
Posts: 11
Joined: Thu Oct 31, 2002 8:34 pm

Very impressive

Post by Macromancer » Sun Nov 10, 2002 11:09 pm

I'll have to include this in any macros I write. Kudos

Lurker_005
a lesser mummy
a lesser mummy
Posts: 51
Joined: Thu Oct 17, 2002 12:08 pm

Post by Lurker_005 » Mon Nov 11, 2002 2:29 am

Wow. just glanced at it so far. That looks very usefull, and like you spent a lot of time making nice code too.

Nice work!

Ooka_Chokka
a lesser mummy
a lesser mummy
Posts: 63
Joined: Fri Nov 08, 2002 12:27 am

Post by Ooka_Chokka » Mon Nov 11, 2002 6:12 am

very schweet! Kudos, salutations, and.....

you have been hit by a STAMPEDE OF BOARS for 7196 damage
LOADING PLEASE WAIT.....
plane of tactics = plane of massive overkill, hehe
/sigh
_____________________________
Ooka Chokka , lv 69 God of PoRN
_____________________________

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

Post by L124RD » Mon Nov 11, 2002 5:46 pm

Salutations,
Released MacroKit-1.1, moved some things around to make it more organized, put in #turbo (i think it works... not quite sure)

macrotoon
a ghoul
a ghoul
Posts: 106
Joined: Wed Sep 18, 2002 4:38 pm

Post by macrotoon » Mon Nov 11, 2002 10:49 pm

So it seems you have basically cam e up with your own code :)

Great work L124RD!

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Tue Nov 12, 2002 2:15 am

looks good mate.
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]

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

Post by L124RD » Tue Nov 12, 2002 7:38 pm

Salutations,
Updated. MacroKit v1.2. Added:
  • made it so the pathing to the .inc's is correct (Thanks to ALphaBeta for reporting that
    made pathing dynamic (added a #define version to the top of the main .inc)

Oid
a snow griffon
a snow griffon
Posts: 416
Joined: Thu Oct 17, 2002 3:26 am
Contact:

Post by Oid » Wed Nov 13, 2002 8:04 am

Nice

zertful
orc pawn
orc pawn
Posts: 18
Joined: Thu Oct 31, 2002 2:23 pm
Location: Greensboro, NC
Contact:

Post by zertful » Thu Nov 14, 2002 11:35 pm

First off, great set of tools L124RD! It's really cleaned up some of my hunting and bot macros.

I have a small update to fight.inc, I was having a few problems with it locking up EQW.

Changes:
- autoloot subroutine replaced, same functionality without lockups
- cleaned up /doability spam by checking ability readiness first
- turn on auto attack only when in melee range, less spam

Code: Select all

| -     Fight.inc     -  
|--------------------
|
| Useable in many macros, use
|  /call Melee
|    Fights the current target, using
|    methods to figure out what skills
|    the fighter has to use against it,
|    IE bash, kick, etc... WILL NOT
|    BACKSTAB OR USE DISCIPLINES!!!
|  /call AutoLoot <!> <@>
|    Loot's the target corpse for any-
|    thing that weighs less then ! and
|    has a value of over @cp.
|  /call BackStab [!]
|    Will backstab until hit, if ! is
|    set to 1 it will call 'melee' once
|    the player has been hit.
|
| Authors : L124RD
|---------------------
|
|***********************************************************|

sub Melee
 /varset a(8,0) "$target(name,clean)"
 /varset a(8,1) $target(level)
 /varset a(8,2) $target(name)
 /varset a(8,3) $target(id)
 /echo Fighting a level $a(8,1) $a(8,0)
 /face
 /sendkey down up
 :CloserAF
  /if "$target(id)"!="$a(8,3)" /goto :EndAF
  /if n $target(distance)>15 /sendkey down up
  /if n $target(distance)<6 /sendkey down down
  /if n $target(distance)<16 /sendkey up up
  /if n $target(distance)>5 /sendkey up down
  /if n $target(distance)<15 /attack on
  /if n $target(distance)>19 /attack off
  /face fast nopredict
  /if "$char(class)"=="Warrior" {
    /if n $char(ability,"Disarm")>0 /doability "Disarm"
    /if n $char(ability,"Bash")>0 /doability "Bash"
    /if n $char(ability,"Slam")>0 /doability "Slam"
    /if n $char(ability,"Kick")>0 /doability "Kick"
  } else /if "$char(class)"=="Monk" {
    /if n $char(ability,"Flying Kick")>0 /doability "Flying Kick"
    /if n $char(ability,"Dragon Punch")>0 /doability "Dragon Punch"
    /if n $char(ability,"Eagle Strike")>0 /doability "Eagle Strike"
    /if n $char(ability,"Instill Doubt")>0 /doability "Instill Doubt"
    /if n $char(ability,"Tiger Claw")>0 /doability "Tiger Claw"
    /if n $char(ability,"Round Kick")>0 /doability "Round Kick"
    /if n $char(ability,"Kick")>0 /doability "Kick"
    /if n $char(ability,"Mend")>0 /doability "Mend"
  } else /if "$char(class)"=="Shadow Knight" {
    /if n $char(ability,"Bash")>0 /doability "Bash"
    /if n $char(ability,"Harm Touch")>0 /doability "Harm Touch"
  } else /if "$char(class)"=="Ranger" {
    /if n $char(ability,"Kick")>0 /doability "Kick"
  } else /if "$char(class)"=="Beast Lord" {
    /if n $char(ability,"Bash")>0 /doability "Bash"
  }
  /goto :CloserAF

 :EndAF
  /echo The level $a(8,1) $a(8,0) is dead...
  /sendkey up up
  /sendkey up down
  /attack off
  /varset a(8,3) 0
  /target corpse radius 20
/return


Sub AutoLoot 
   /if n $target(distance)>75 /goto :continue 
   /stand 
   /echo Looting $target(name,clean) for anything that weighs less then $p0 and has value of more then $p1 copper...
   /face 
   /if n $target(distance)<15 /goto :CloseEnough 
   /call AutoRun 1 
   /varset t0 3m 
   :CloserAL 
   /face
   /delay 0
   /if n $target(distance)>14 /if n $t0>0 /goto :CloserAL 

   :CloseEnough 
   /call AutoRun 0 
   /loot 
   /Delay 10 
   /for v10 0 to 9 
      /Delay 5 
      /click left corpse $v10 
      /Delay 10 
      /if "$cursor(name)"=="NULL" /goto :continue 
      /if "$target(name)"~~$char(name) /click left auto 
      /if n $cursor(weight)>$p0 /click left destroy 
      /if n $cursor(value)<$p1 /click left destroy 
      /if "$cursor(name)"!="NULL" /echo looting "$cursor(name)". it has a value of "$cursor(value)"cp. 
      /if n $cursor(value)>9 /click left auto 
      /delay 4 
      /delay $rand(5) 
   /next v10 
   :continue 
   /delay 5 
   /delay $rand(5) 
   /press esc 
/return 

sub backstab
 /stand
 /varset a(8,0) $target(id)
 /varset a(8,1) 1
 :loop
  /varcalc a(8,2) $calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10)
  /if n $distance($a(8,2))>5 /call backstab_gotopoint $p0
  /face
  /if n $a(8,1)==1 {
   /varset a(8,1) 0
   /attack off
   /doability "Pick Pocket"
   /doability "Backstab"
   /attack on
   /varset t45 10s
  }
  /if n $t45==0 {
   /attack off
   /doability "Pick Pocket"
   /doability "Backstab"
   /attack on
   /varset t45 10s
  }
  /if $combat==FALSE {
   /if n $p0==1 /call melee
   /return
  }
  /if $target()==FALSE {
   /if n $p0==1 /call melee
   /return
  }
 /goto :loop
/return

sub backstab_gotopoint
 /sendkey down up
 :gotopointloop
  /if $combat==FALSE {
   /if n $p0==1 /call melee
   /return
  }
  /if $target()==FALSE {
   /if n $p0==1 /call melee
   /return
  }
  /varcalc a(8,2) $calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10)
  /face fast loc $a(8,2)
  /doevents
  /if n $distance($a(8,2))>5 /goto :gotopointloop
 /sendkey up up
/return

I haven't tested the rogue stuff yet.


Zertful
- those who sling mud, lose ground -

Snowblind
decaying skeleton
decaying skeleton
Posts: 6
Joined: Thu Oct 10, 2002 11:42 pm
Location: Canada

Merci

Post by Snowblind » Fri Nov 15, 2002 5:28 am

Excellent work, L124RD. I appreciate that you've released this kit after working to perfect it for so long. It's shortened up many of the macros I currently use. Thanks for the effort.
[img]http://www.mutedfaith.com/images/life.jpg[/img]

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

Post by L124RD » Fri Nov 15, 2002 10:58 am

Salutations,
MacroKit v1.3 released. Includes zertful's improved fight.inc and a few bug fixes. includes a changelog as well...
2002/11/15 7:54:28

Calen013
orc pawn
orc pawn
Posts: 27
Joined: Tue Oct 22, 2002 7:04 pm

Post by Calen013 » Tue Nov 19, 2002 2:23 am

getting the error could not open include c:\Macroquest\MacroKit-version\Config.inc

I checked and the config file is there and the line in the MacroKit.inc file does define the version right...anyone got any other clues?

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

Post by L124RD » Tue Nov 19, 2002 2:27 am

Salutations,
I'm guessing that Plazoo didn't let #defines to into #includes... (i just changed the folder name) I'll update it by hand and release a new version tomoorrow.. well... tomorrow my time... then again... its 30min till tomorrow so... meh...

macrotoon
a ghoul
a ghoul
Posts: 106
Joined: Wed Sep 18, 2002 4:38 pm

Post by macrotoon » Tue Nov 19, 2002 10:41 pm

HEY YA L123RD,
Your kit isnt the best unless the paladin has bash and the ability to LOH!

Would this work?

Added this to the end of the class check/doability part

else /if "$char(class)"=="Paladin" {
/if n $char(ability,"Bash")>0 /doability "Bash" }
/if "$char(class)"=="Paladin" /if n $char(ability,"Lay on hands")>0 /call Check_Group_HP

Added this sub to the end.

sub Check_Group_HP
| *** AutoLOH ***
/varcalc GroupMax $group(count)-1
/for GroupMember 0 to $GroupMax
/if n $spawn($group($GroupMember),hp,pct)<5 /doability "lay on hands"
:nextmember
}
/next GroupMember
/return

Not sure what variables you have open in your scripts, but "groupmax" and "groupmember"needs to be defined in the beginning of the script.