a macro to camp Dyllin Starsine [Request Fulfilled]

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

Moderator: MacroQuest Developers

Meh
a lesser mummy
a lesser mummy
Posts: 32
Joined: Wed Sep 04, 2002 8:55 pm

a macro to camp Dyllin Starsine [Request Fulfilled]

Post by Meh » Fri Sep 20, 2002 3:23 am

well its a damn 8 hour spawn..... dont really wanna wait that long soo i would like a macro to attack him when he appears and loot evreything he has (its all no drop) thanks 8)

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Fri Sep 20, 2002 4:14 am

Macroquest
EverQuest enhancement + macroing utility
Stable Release 09-05-2002
http://macroquest2.com


Installing and Running Macroquest and version specific info

Gameplay Enhancements

MQ# Language Documenation
Macro fundamentals
Macro commands
Macro variables

How to help & Credits

Macro Tutorial

Appendices
Sendkeys list
Skill list


--------------------------------------------------------------------------------

Installation and running of Macroquest

Install
1) Unzip MacroQuest somewhere, preserving directory structure for Macro subfolder

Running:
1) Run MacroQuest (it will appear as a SysTray icon)
2) Start EverQuest.

Client version:
After patch update! eqgame.exe

Macroquest is currently partially broken on NewUI.
/click functions are known to be broken in the New UI.
If you are using a macro that requires click, use the old ui.
Fix is expected, but not for a while.

If Everquest is patched, go to http://macroquest2.com to find the new offsets.
Macroquest no longer checks the "seconds" number when it checks the exe... no more needin to use client override!

If you ARE having problems:
If you are having client version issues and are sure your INI is current, you can set ClientOverride=1 in eqgame.ini

Known Issues:
/unload blows up on 9x
NewUI support isn't 100% yet, /click does not work with panels

FYI, # of timers has be increased to 40.
--------------------------------------------------------------------------------

Code: Select all

 Gameplay Enhancements

/who [pc|npc|corpse|any] [range <min> <max>] [radius <radius>] [guild] [lfg] [name]
Returns level, class, race, distance, direction and pet information of any found mobs.

pc, npc, corpse, any limits matching to specific type of spawn (default pc) 
range <min> <max> limits matching to level range 
radius <radius> limits matching to a radius around yourself 
guild limits matching to members of your guild 
lfg limits matching to people looking for a group 
name limits matching to spawn/pcs that contain "name" 

/whotarget
Use our /who format on current target, displays con color and Z distance as well

/location
Displays your current location and direction

/target [pc|npc|corpse|pet] [class <class>] [race <race>] [range <min> <max>] [noalert #] [zradius <zheight>] [nopcnear <radius>] [notid|id <spawnid>] [spawnname|myself|mycorpse|alert #]
Targets nearest mob meeting all requirements

pc, npc, corpse, pet limits matching to specific type of spawn (default all) 
class <class> limits matching to a particular class 
race <race> limits matching to a particular race 
range <min> <max> limits matching to level range 
zradius <zheight> limits matching to a Z height 
noalert # limits matching to spawns that do not have an alert that would be active at their location 
nopcnear <radius> limits matching to spawns that do not have a PC within radius of it 
id <spawnid> limits matching to a specific spawn via id 
notid <spawnid> limits matching to anything BUT a specific spawn via id 
spawnname, myself, mycorpse, alert # limits matching to those that contain "name" or are "yourself", "your corpse" or a particular alert 

/charinfo
Displays loc of bind, and original bind point (place of birth)

/help
Adds "Macro" section listing for our commands

/doability [# | name | list]
Same doability command if you do /doability 4, but if you add switches...

name Do ability based on name (see appendix) 
list List abilities you have on your buttons 

/doability [# | name | list]
Same cast  command if you do /cast  4, but if you add switches...

name Cast a spell based on name 
list List spells you have memorized 

/face [nopredict] [fast] [away] [alert #] [loc <y>,<x>] [heading <ang>] [item] [name]
Turns to faces the current target (with no switches) or...
If you target yourself, faces true north or..

nopredict Face your target's current location, otherwise we face an interception point 
range <min> <max> Snap to the heading right away, otherwise we rotate there 
alert # Faces the closest true alert on list # 
loc <y> , <x> Faces the location (y,x) 
heading <ang> Faces a heading (0: north, 90: west, 180: south, 270: east) 
item Faces the last /itemtarget 
door Faces the last /doortarget 
name limits matching to those that contain "name"  


/filter [macros (all, enchanced,none)] [skills (all,increase,none)] [target money food encumber (on,off)] [name (add, remove) <text>] [zrange <zrange>]

macros 
(all, enhanced,none) Determines which macroquest output is shown 
skills
(all, increased,none) Determines which skill notices is shown 
target, money, food, encumber
(on,off) Determines if current target, money from buy and sell, encumbrance messages and "you are hungry" notices are shown 
name (add,remove)
<text> Filters any line starting with <name>
/filter name remove all will clear the list 
zrange <zrange> Filters /target, /where, /face, /itemtarget, and alerts to a specific +/-Z height
Not saved, default is off, values 10000 or higher turn it off. 

/spewfile [on,off]
Controls logging of DebugSpew to a file <LogPath>\DebugSpew.log
--------------------------------------------------------------------------------

Macroquest Macro Fundamentals

Code: Select all

Macros first start out with the # commands.

#turbo
Runs macro commands as fast as possible. (Loops must be specially written for #turbo, see below)

#define short replacement
Replaces all occurances of 'short' with 'replacement' throughout the macro

#include filename
Includes another macro file 

#event name string
Creates a custom event (Sub Event_name) that occurs whenever string is sent to the chat box.

#chat channel
Declares what Event_Chat channels you want to handle
channel can be: say, ooc, shout, tell, guild, group, auc, chat

Every macro then has a Sub Main that defines the start and end of code.

Additional Subs can be defined in the code

Special Event Subs:

Sub Event_Chat: Event callback for messages
$p0 - Channel of message (ooc etc., chat channels will callback with the name of the channel)
                                                (ie. /join port ... callback will have $p0==port)
$p1 - Name of the person who sent the message
$p2 - Text they sent

Sub Event_Timer: Event callback for when a timer hits 0
$p0 - Timer that fired
$p1 - Value timer was originally set to

Sub Event_name: Custom event callback defined by #event
$p0 - Line that triggered event
 
--------------------------------------------------------------------------------

Macroquest Macro Commands

Code: Select all

Commands added by MacroQuest:
/finditem [similar] [item name]
Finds an item in your inventory by name.
similar Searches for substrings in name... 
Opens pack if needed, clicks it, and closes pack again if it was closed

/identify
Cross between the Identify spell and right-clicking an item for info

/items <filter>
Lists all ground spawns in the zone
<filter> is a text substring filter

/itemtarget <filter>
"Targets" a ground spawn for use with /face item and $distance(item)
<filter> is a text substring filter

/where <filter>
Lists where the closest spawn is
<filter> is a text substring filter

/doors <filter>
Lists all doors in the zone

/doortarget <id number> <filter>
"Targets" a door for use with /face door and $door(xxx)

Aliases are shorter versions of a command. For instance, /mana in a build in alias.
/alias list
Lists all aliases
/alias <name> <command>
Adds an alias
/alias <name> delete
Deletes an alias

/alert add # [pc|npc|corpse|any] [radius radius] [range min max] spawn
Adds an alert to watch for a spawn
Options are similar to those on /who and /where
/alert clear #
Clears alert list #
/alert list #
Lists all alerts on list #

/mouseto [+,-] <x> <y>
Moves the mouse to a position (+|- make it relative)
/mouseto bank <inv> <slot>
Moves the mouse to a main inventory (or bank) slot.
/mouseto npctrade <0,1,2,3,give>
Moves the mouse to an npc trade slot.
/mouseto hotkey <0-9|previous|next>
Moves the mouse to a hotkey slot.
/mouseto merchant <slot,up,down,buy,sell>
Moves the mouse to a merchant slot.
/mouseto corpse <slot|up|down>
Moves the mouse to a corpse slot.
/mouseto <bank> pack <number> <slot,combine,done>
Moves the mouse to a pack slot/button.
/mouseto item
Moves the mouse to the currently /itemtarget'd item if it is on the screen.
WARNING: Good chance this will not work with the old 640x480 bordered mode.
/mouseto target
Moves the mouse to the current target if it is on the screen.
WARNING: Good chance this will not work with the old 640x480 bordered mode.
/mouseto equip <position>
Moves the mouse to an equipment position.
position can be: ear1, ear2, neck, face, head, finger1, finger2, wrist1, wrist2, 
arms, hands, shoulder, chest, back, waist, legs, feet, 
primary, secondary, ranged, ammo
/mouseto auto
Moves the mouse to the autoequip spot.
/mouseto <bank> <plat,gold,silver,copper>
Moves the mouse to money spots.
/mouseto destroy
Moves the mouse to the destroy button.
/mouseto enviro <slot,combine,done>
Moves the mouse to enviromental pack slot/button.
This is 100% faked based on default position.
No checks can be made if it is actually open.
Contents cannot be viewed unless picked up.

/cleanup
Cleans up open windows and then reopens inventory
Sends ESC, ESC, ESC, ESC, ESC, I

/sendkey <up, down> <key>
Sends a key up or down
alt, ctrl, shift are valid keys

/press <key>
Sends a keystroke (up and down)
alt, ctrl, shift are valid keys

/click <left|right> <mouseloc>
Clicks the left/right mouse button
mouseloc is the same format as /mouseto

/mqpause [on|off]
Pauses/resumes a macro to aid in debugging or chatting.
No parameter will toggle on/off, useful for hotkeys

/commands
Lists all commands available to the client

/skills [filter]
Lists all your skills

/macro <filename> [param [param...]]
Starts running a macro

/endmacro
Stops a macro

/listmacros <filter>
Lists macro files in the 'macro directory' (listed alphabetically)

/mqlog <text, clear>
Logs text to Logs subdirectory or Clears log file

/if <n> <condition> <command>
Runs a command if the condition is true. (n makes the compare numeric)
Condition understands comparison operators

== Equal to 
!= Not Equal to 
> < Greater than; less than 
>= <= Greater than or equal to; Lesser than or equal to 
~~ contains operator (string only) 

Command can be { which will run everything up to the next }
} can be followed by else and a command.
WARNING: Nested {}s are not handled as of yet
/if $v1==0 {
/echo Zero
} else /if $v1==1 {
/echo One
} else {
/echo Something else
}
You cannot use a(#,#) yet.

/for v# <val1><to,downto> <val2>
... commands ...

/next v#
For/Next loop... runs commands while changing v# from val1 to val2 in steps of 1 or -1
You can only use v# and p# variables, no a(#,#) yet.


/goto <label>
Moves macro execution to a label

:<label name>
A label for /goto

/zapvars
Clears all variables and timers

/seterror errormsg
Sets $getlasterror

/seterror clear
Clears $getlasterror

/msgbox <text>
Pops up a message box with an ok button.

/varset <v#,p#,t#,a(#,#)> <value>
/varadd <v#,p#,t#,a(#,#)> <value>
/varsub <v#,p#,t#,a(#,#)> <value>
v,p: Set, add, or subtract variables
a: Set, add, or subraact array variables
t: Set, add, or subtract time from a timer (in 10ths of a second, suffix s for seconds, m for minutes)

/varcalc <v#,p#,a(#,#)> <equation> 
Handles +, -, /, *,\ (integer divide), % (mod), and ^ (power)

/delay <time> <s, m>
Fully pauses macro for a set amount of time
time: Time in 10ths of a second (or suffixes s/m)

/call <subroutine> [param [param...]]
Calls a subroutine (defined by Sub <name>)

/return [value]
Returns from a subroutine, returning a value if specified

/doevents [flush]
Runs any events that have queued up or flush queued events

/merchant [similar] "item name"
When with a merchant, will select that item if the merchant is selling it.

/unload
Unloads MacroQuest

/breakin
__asm int 3 (You must have a debugger attached)




--------------------------------------------------------------------------------


Macroquest Macro Variables

Code: Select all

$pack([bank,]#,xxx)
Returns pack information
xxx can be: name, open, size, slots, weight, space, empty

$cursor(xxx)
Returns cursor item information
xxx can be: name, value, size, stack, weight, lore, nodrop, norent, magic

$item([bank,]inv/pack,slot,xxx)
$equip(position,xxx)
Returns inventory item information
xxx can be: name, value, size, stack, weight, lore, nodrop, norent, magic
position can be: ear1, ear2, neck, face, head, finger1, finger2, wrist1, wrist2, 
arms, hands, shoulder, chest, back, waist, legs, feet, 
primary, secondary, ranged, ammo
Samples:
$item(3,5,value): value of item in slot 5 of pack in slot 3.
$item(inv,7,name): name of item in inventory slot 7.
$item(bank,0,4,weight): weight of item in slot 0 of bank pack 4.
$item(bank,inv,2): is there an item in bank slot 2.
$equip(primary): do you have something equiped in your primary hand.
$equip(arms,name): name of item equiped in arm slot.

$count(itemname)
Returns the total count of itemname in your inventory

$freeinv(xxx)
Returns information about free pack space
xxx can be: space, size

$find(xxx)
Returns status of the last /finditem command
xxx can be: pack

$mouse(xxx)
Returns mouse coords. 
xxx can be: x, y

$distance(y,x)
Returns the distance to a location
$distance(item)
Returns the distance to last /itemtarget
$distance(door)
Returns the distance to last /doortarget

$id(n)
Returns the ID for the N'th spawn.

$alert(#)
Returns TRUE if any alert on list # is true

$zone(bound|birth)
Returns your current zone without switches.
Else returns the zone you are bound/born in.

$lasttell
Returns the name of the last person to send you a tell

$target(xxx)
Returns information on the current target
xxx can be: name[clean], surname, id, x, y, z, heading, headingto, speed, distance[,nopredict], type, level, gm, class, race, gender, pet, master
$target(hp,xxx) returns the targets hp: cur, max, pct
$target(next/prev) returns the id of the next/previous spawn.

$door(xxx)
Returns information on the last /doortarget
xxx can be: name, id, x, y, z, heading, defaultx, defaulty, defaultz, defaultheading, headingto, distance, open

$ground(xxx)
Returns information on the last /itemtarget
xxx can be: name, id, x, y, z

$char(xxx)
Returns information on the current target
xxx can be: name, surname, id, x, y, z, heading, speed, type, level, class, race, gender, pet, cash (total cash in copper), plat, gold, silver, copper
$char(xxx,bank) returns your bank values for cash, plat, gold, silver, or copper
$char(skill,xxx) returns skill level
$char(hp,xxx) returns your hp: cur, max, pct
$char(mana,xxx) returns your mana: cur, max, pct
$char(stamina,xxx) returns 0 -- will be your stamina: cur, max, pct
$char(ability,xxx) returns what /doability you have a skill set to
        Also can return:
        0: Skill not on an ability button
        -1: You do not have that skill
        -2: The ability is on a button but unusable right now
$char(ability,#) returns the ability name for a /doability slot
$char(gem,xxx) returns the casting gem for a spell
$char(gem,#) returns the spell name for a casting gem
$char(book,xxx) returns the spell book slot for a spell
$char(book,#) returns the spell name for a spell book slot


$combat
Returns TRUE if you are in atack mode.

$invpanel
Returns TRUE if your inventory is open.

$merchant
Returns TRUE if a merchant window is open.

$merchant(has,"item name")
Returns TRUE if merchant has an item.

$return
Returns the return value from the last /call

$rand(max)
Returns a random number between 0 and max

$getlasterror
Returns the last error if any

$gm
Returns TRUE if a GM or Guide is in the zone

$arg(num,string)
Returns a space delimited substring.
ie. $arg(2,"This is a test") will return "is"

$calc(formula)
Returns value of formula, same parsing as /varcalc

$abs(value)
Returns the absolute value of value

$int(value)
Truncates value to an integer

$lastcommand
Returns the last command run

$sin(formula), $cos(formula), $tan(formula), $asin(formula), $acos(formula), $atan(formula)
Return the value of the corresponding trigonometric function, same parsing as /varcalc

$v#
Returns a user variable, set by /varset, /varadd, or /varsub

$p#
Returns a subroutine parameter

$a(#,#)
Returns an array variable

$t#
Returns a timer value (there are 40 timers now, up to t39)

$running
Returns the number of seconds the macro has been running

$time(xxx)
Returns the time.
xxx can be: h, m, s

$date(xxx)
Returns the date.
xxx can be: y, m, d

$spell("spell name",xxx)
Returns information on a spell
xxx can be: id, level, mana, range, casttime, recoverytime, recasttime, duration
casttime, recoverytime, recasttime, and duration are in seconds
duration can also return INSTANT, PERMANENT or UNKNOWN
 
--------------------------------------------------------------------------------

How to help & Credits

Data collection:
1) Combine types: pick up every pack you can and /identify them.
If Combine=*UnknownXX please post the container's name and combine value.

2) Ground spawns: Do a /item in any zone you can.
If you see a "DropXXX", go pick it up.
If you see a "*SomethingXXX", go pick it up.
If you see a generic name, go pick it up.
Afterwards, do a /charinfo. This will update itemdb.txt
The new items should be at the top of the file. Post them

Contributions:
L124RD for bug hunting
Syn for disassembly work
Domosan for finding detours on MS's site
ShowEQ's source for some ideas on how things might be stored in memory (similar to the packet structure).
Decal's source for 9x compatible DLL injection.
Rizwank's prettying up the manual and adding macro walkthroughs.
Sparr's excellent job at finding offsets for 7/24 and other cool feats.
m0nk for many crazy ideas
Xaanin for finding all the memory addresses while I was gone
Dohpaz for the first patch submission!

Donations:
Any donations can be sent via PayPal to: plazmic98@yahoo.com


--------------------------------------------------------------------------------

Code: Select all

Macro Example One
skillbuild.mac
Orignally written by Plazmic
Bastardized by Rizwank
Please note : This script doesnt use real items. There is no Pizza combine in Everquest. Sorry.

#turbo
    Turns on turbo mode.
#event CombineFail "You lacked the skills to fashion the items together."
#event CombineSuceed "You have fashioned the items together to create something new!"
#chat say
#chat tell
    Creates Events for Combine Failure and Success and generic events for say and tells.
#define StartingPlat v50
#define CombinedOK v30
#define CombinedTotal v31
#define MERCHANT Pizzawoman
    Basic variable definition.
Sub Main 
    Defines main subroutine
/stand 
    You can use everquest commands in macros too!  
/press CTRL 
/press shift 
/press alt
    Make sure that ctrl, alt and shift are not stuck down from a previous macro 

/varcalc StartingPlat $char(plat)+$char(gold)/10
/mqlog Starting Money is approximately $StartingPlatpp 
    Sets variable starting plat and saves it in the logfile
/varset t0 5m 
/varset CombinedTotal 0
/varset CombinedOK 0
    More basic variable definition

/call FindCombiner Baking
     Calls a routine at the end of the script to specify which container will be used for combines.
/if $return==99 /endmacro
    If an appropriate container is not found, end the macro 
/varset v80 $return
    Otherwise, set variable 80 to point to the bag # of the combine container 

:Loopsub 
/varset v37 1 
/call Loopsub 
/goto :Loopsub 
/return 
    make sure loop is running right 

sub Loopsub 
:LOOPSTART 
/cleanup
    Clears out any variables from previous iterations

:PackOpen
/if $invpanel==FALSE /press i
    Open inventory if needed.
/if $invpanel==TRUE /if $cursor()==TRUE /click left auto 
    If inventory is open and there is an item in the cursor, drop it into the autoequip box
/if $invpanel==TRUE /if $pack($v80,open)!=TRUE /click right inv $v80
    If the target container is not open, open it.
     
/delay 0
    Needed for #turbo macros, /delay or /doevents is needed in every loop

/if $invpanel==FALSE /goto :PackOpen
/if $cursor()==TRUE /goto :PackOpen
/if $pack($v80,open)!=TRUE /goto :PackOpen
    If the inventory or bag are not open, or if the cursor is still full repeat
    This helps compensate for lag or short client side errors.

/if $pack($v80,empty)==FALSE /call CleanPack 
    If our target pack already has items inside it, Call "Clean Pack"


/finditem "Pizza Bread"
/click left auto
    Finds the EXACT item "Pizza Bread" (to verify that it is in inventory)
/finditem similar "Tomato"
/click left auto
/finditem similar "Cheese" 
/click left auto
    Finds an item with "Tomato" and "Cheese" in the name (to verify that it is in inventory)

/call MakePizza
    Goes to :Make Pizza

Sub MakePizza
:MakePizza
/finditem similar "Tomato"
/click left pack $v80 0 
/if $find()==FALSE /goto :OutOfComponents
/finditem similar "Cheese"
/click left pack $v80 1
/if $find()==FALSE /goto :OutOfComponents 
/finditem "Pizza Bread"
/click left pack $v80 2 
/if $find()==FALSE /goto :OutOfComponents
    Places items into slots 0,1,2 of the appropriate container

/goto :DoCombine 
/return 

:DoCombine 
/varadd CombinedTotal 1
    Add one to the "attempted combines" variable
/varset v61 0 
/doevents flush
/varset t9 30s
/click left pack $v80 combine
    Click on combine 
/goto :DropPizza 

:DropPizza
/doevents
    Check for combine event
/if n $v61==0 /if n $t9>0 /goto :DropPizza 
    If the combine was done but hasnt resulted in a fail or success yet, wait up to 30 seconds
/doevents flush
    Remove all queued message
/if $cursor()!=TRUE /if n $v61<2 /goto :MakePizza
    If the cursor is empty and the combine was a failure or timed out, return to make pizza
/varadd CombinedOK 1
    Else add one to success variable
:WaitCursor
/delay 0
/if $cursor()!=TRUE /goto :WaitCursor
    Since combine was successful wait for item to appear in cursor
/click left auto 
    Drop item into inventory
/goto :MakePizza
    And repeat 
/return 

Sub Event_CombineFail 
/varset v61 1
    Use v61 as a flag if the combine failed.
/return 

Sub Event_CombineSuceed 
/varset v61 2 
        Use v61 as a flag if the combine succeeded.
/return 

sub Event_Chat 
/if "$p1"~~"MERCHANT" {
/if "$p0"~~"say" /if "$p2"~~"$char(name)" /varset v65 1
/return
    If a merchant says something to you, set v65 to 1. (This will prove useful in a minute)
}
/if "$p0"~~"tell" {
/mqlog $p0 from $p1: $p2
/msgbox $p0 from $p1: $p2
}
    Otherwise, if you get a tell, place in a message box.
/return 


Sub SellBuy 
:StartSellBuy 
/press CTRL 
/press shift 
/press alt 

/if n $v37!=0 /call Loopsub 
/click left auto 
    make sure nothing is in hand

/if $cursor(value)!=NULL /goto :ITEMINHAND 
    If the cursor has something in it, go to iteminhand

/target MERCHANT
    Target the merchant named above
| /face fast
/delay 0
/doevents flush 
/click right target
    Open the vendor
/varset t2 30s
:mousedelay
/varset v65 0 
/doevents
 

/if n $v65==0 /if n $t2>0 /goto :mousedelay 
    If the vendor responds "merchant tells you , something" then, continue on.
    Else if less than 30s have elapsed, loop

/if n $t2==0 /goto :StartSellBuy
    If 30 seconds have elapsed, try again
/varset t2 0
/doevents flush 

/goto :SellPizza

:ITEMINHAND 
/cleanup 
/delay 0
/click left auto 
/mqlog Had item in hand breaking sale to clear issue. 
/goto :StartSellBuy 


:SellPizza
/varset v99 $char(plat) 
/varset v98 $char(gold) 
/varset v55 $char(silver) 
/varset v56 $char(copper) 
/finditem similar "Pizza" 
    Calculate total money before selling, and select it.
/if $find()==FALSE /goto :SellParts
/click left merchant buy
    Sell the item 
:WaitSale 
/doevents
/if n $v99!=$char(plat) /goto :SellPizza
/if n $v98!=$char(gold) /goto :SellPizza
/if n $v55!=$char(silver) /goto :SellPizza
/if n $v56!=$char(copper) /goto :SellPizza
    If the money on you has changed at all, loop (sale was completed)
    Else loop
/goto :WaitSale 

:SellParts
/varset v99 $char(plat) 
/varset v98 $char(gold) 
/varset v55 $char(silver) 
/varset v56 $char(copper) 
/finditem similar "Tomatos" 
/if $find()==FALSE /goto :DoneSelling 
/click left merchant buy 
:WaitSale
/doevents
/if n $v99!=$char(plat) /goto :SellNocks 
/if n $v98!=$char(gold) /goto :SellNocks 
/if n $v55!=$char(silver) /goto :SellNocks 
/if n $v56!=$char(copper) /goto :SellNocks 
/goto :WaitSale 
Same as before, sells extra tomatoes, if they were bought my mistake.

:DoneSelling 
/if $t0==0 /call LogStats 
If 5 minutes have elapsed ($t0==5m was in the initialization code.)
/click left merchant 4 
/call BuyItem 
/call BuyItem 
Select the 5th item in the merchants list and buy two.
/click left merchant down
/click left merchant 8
/call BuyItem 
/call BuyItem 
/click left merchant 9
/call BuyItem 
/call BuyItem 
Clicks down once then selects 9th and 10th item in the vendor list and buys 2 of each
/key down ctrl could have been used to purchase a stack as well..

/press esc 
/press esc 
/mouseto auto 
/varset v37 1 
    Exit vendor
/return 

Sub LogStats 

/varcalc v51 $char(plat)+$char(gold)/10-$StartingPlat
    Calc loss in gold 
 /varcalc v52 $v51*3600/$running 
    calc plat loss /hr 
/varcalc v55 100*$CombinedOK/$CombinedTotal
    Calc percent combine success

/mqlog Run time: $running sec, Loss: $v51, Average = $v52pp/hr, $CombinedOK/$CombinedTotal = $v55%%

/varset t0 1500 
/return 

Sub BuyItem 
/varset v99 $char(plat) 
/varset v98 $char(gold) 
/varset v55 $char(silver) 
/varset v56 $char(copper) 
/click left merchant buy 
/varset t9 15s
:WaitBuy
/doevents
/if n $v99!=$char(plat) /goto :Waitend 
/if n $v98!=$char(gold) /goto :Waitend 
/if n $v55!=$char(silver) /goto :Waitend 
/if n $v56!=$char(copper) /goto :Waitend 
/if $t9>0 /goto :WaitBuy 
:Waitend
/varset t9 0
/return
Just like before with sell item


Sub CleanPack 
/varcalc v2 $pack($v80,slots)-1 

/for v1 0 to $v2 
/click left pack $v80 $v1 
/click left auto 
/next v1 

/return 

/call CleanPack
/cleanup 
    Cleans out target pack by moving everything into autoequip

/goto :PackOpen

:OutOfcomponents
/cleanup 

:InvPanelClose
/if $invpanel==TRUE /press i
/delay 0
/if $invpanel==TRUE /goto :InvPanelClose
    Close inventory panel to prepare for sellbuy

/varset v37 0 
/call SellBuy 
    Goes to SellBuy
/goto :LOOPSTART 
/endmacro 
/return 



Sub FindCombiner 
/varset p2 99 
/for v99 0 to 7 
/if "$pack($v99,combine)"=="$p0" /varset p2 $v99 
/next v99 
/return $p2 
    Finds the correct type of combiner, i.e. Baking, Jewelcrafting, Brewing, etc.

--------------------------------------------------------------------------------
  • Appendix : Sendkeys list

    {"1", 2}, {"2", 3}, {"3", 4}, {"4", 5}, {"5", 6}, {"6", 7}, {"7", 8}, {"8", 9}, {"9", 10}, {"0", 11}, {"-", 12}, {"=", 13}, {"Q", 16}, {"W", 17}, {"E", 18}, {"R", 19}, {"T", 20}, {"Y", 21}, {"U", 22}, {"I", 23}, {"O", 24}, {"P", 25}, {"[", 26}, {"]", 27}, {"A", 30}, {"S", 31}, {"D", 32}, {"F", 33}, {"G", 34}, {"H", 35}, {"J", 36}, {"K", 37}, {"L", 38}, {";", 39}, {"'", 40}, {"`", 41}, {"\\", 43}, {"Z", 44}, {"X", 45}, {"C", 46}, {"V", 47}, {"B", 48}, {"N", 49}, {"M", 50}, {",", 51}, {".", 52}, {"/", 53}, {"*", 55}, {"F1", 59}, {"F2", 60}, {"F3", 61}, {"F4", 62}, {"F5", 63}, {"F6", 64}, {"F7", 65}, {"F8", 66}, {"F9", 67}, {"F10", 68}, {"F11", 87}, {"F12", 88}, {"F15", 126}, {"Num_0", 82}, {"Num_1", 79}, {"Num_2", 80}, {"Num_3", 81}, {"Num_4", 75}, {"Num_5", 76}, {"Num_6", 77}, {"Num_7", 71}, {"Num_8", 72}, {"Num_9", 73}, {"Num_Enter", 156}, {"Num_Del", 83}, {"Num_/", 181}, {"Num_-", 74}, {"Num_+", 78}, {"Up", 200}, {"Left", 203}, {"Right", 205}, {"Down", 208}, {"Home", 199}, {"End", 207}, {"Page_Up", 201}, {"Page_Down", 209}, {"Insert", 210}, {"Delete", 211}, {"Esc", 1}, {"Enter", 28}, {"Backspace", 14}, {"Tab", 15}, {"Space", 57}, {"Ctrl", 29}, {"Right_Ctrl", 157}, {"Shift", 42}, {"Right_Shift", 54}, {"Alt", 56}, {"Right_Alt", 184}, {"Num_Lock", 69}, {"Scroll_Lock", 70}, {"Caps_Lock", 58}, {"Prnt_Scrn", 183}, /* {"Left_Windows", 219}, {"Right_Windows", 220}, {"Application", 221}, {"Prev_Track", 144}, {"Next_Track", 153}, {"Mute", 160}, {"Calculator", 161}, {"Play/Pause", 162}, {"Media_Stop", 164}, {"Volume_-", 174}, {"Volume_+", 176}, {"Web/Home", 178}, {"Pause", 197}, {"Power", 222}, {"Sleep", 223}, {"Wake", 227}, {"Search", 229}, {"Favorites", 230}, {"Refresh", 231}, {"Web_Stop", 232}, {"Forward", 233}, {"Back", 234}, {"My_Computer", 235}, {"Mail", 236}, {"Media", 237}, */
--------------------------------------------------------------------------------

Appendix : Skills list
  • /*
    * skills.h
    *
    * ShowEQ Distributed under GPL
    * http://seq.sourceforge.net/
    */
    "1H Blunt", // 0
    "1H Slashing", // 1
    "2H Blunt", // 2
    "2H Slashing", // 3
    "Abjuration", // 4
    "Alteration", // 5
    "Apply Poison", // 6
    "Archery", // 7
    "Backstab", // 8
    "Bind Wound", // 9
    "Bash", // 10
    "Block", // 11
    "Brass Instruments", // 12
    "Channeling", // 13
    "Conjuration", // 14
    "Defense", // 15
    "Disarm", // 16
    "Disarm Traps", // 17
    "Divination", // 18
    "Dodge", // 19
    "Double Attack", // 20
    "Dragon Punch", // 21
    "Duel Wield", // 22
    "Eagle Strike", // 23
    "Evocation", // 24
    "Feign Death", // 25
    "Flying Kick", // 26
    "Forage", // 27
    "Hand To Hand", // 28
    "Hide", // 29
    "Kick", // 30
    "Meditate", // 31
    "Mend", // 32
    "Offense", // 33
    "Parry", // 34
    "Pick Lock", // 35
    "Piercing", // 36
    "Riposte", // 37
    "Round Kick", // 38
    "Safe Fall", // 39
    "Sense Heading", // 40
    "Sing", // 41
    "Sneak", // 42
    "Specialize Abjure", // 43
    "Specialize Alteration", // 44
    "Specialize Conjuration", // 45
    "Specialize Divinatation", // 46
    "Specialize Evocation", // 47
    "Pick Pockets", // 48
    "Stringed Instruments", // 49
    "Swimming", // 50
    "Throwing", // 51
    "Tiger Claw", // 52
    "Tracking", // 53
    "Wind Instruments", // 54
    "Fishing", // 55
    "Make Poison", // 56
    "Tinkering", // 57
    "Research", // 58
    "Alchemy", // 59
    "Baking", // 60
    "Tailoring", // 61
    "Sense Traps", // 62
    "Blacksmithing", // 63
    "Fletching", // 64
    "Brewing", // 65
    "Alcohol Tolerance", // 66
    "Begging", // 67
    "Jewelry Making", // 68
    "Pottery", // 69
    "Percussion Instruments", // 70
    "Intimidation", // 71
    "Berserking", // 72
    "Taunt", // 73

--------------------------------------------------------------------------------





Magnus

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

Post by L124RD » Fri Sep 20, 2002 8:36 am

Salutatations,
was that a mis-post Maggy?

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Fri Sep 20, 2002 9:46 am

I think that was a long way of saying RTFM.

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Fri Sep 20, 2002 12:38 pm

Sorry Liz..got carried away with all those nice little code and list tags...and yeah..what Fipp said.

What? That wasn't subtle? :roll:


Mag

Meh
a lesser mummy
a lesser mummy
Posts: 32
Joined: Wed Sep 04, 2002 8:55 pm

Post by Meh » Fri Sep 20, 2002 2:52 pm

hey uh mag if your gonna show that to me show that to evreyone else on this forum... after all it is the MACRO REQUESTS forum
Last edited by Meh on Fri Sep 20, 2002 3:09 pm, edited 1 time in total.

Meh
a lesser mummy
a lesser mummy
Posts: 32
Joined: Wed Sep 04, 2002 8:55 pm

Post by Meh » Fri Sep 20, 2002 3:04 pm

oh well it doesint work figures

edit: Im just a code machine...

Code: Select all

|Dyllin.mac 
#include Routines.mac 

Sub Main 
/target Dyllin 
/varset v90 $target(id) 
/face 
/cast 4 6s
/cast 2 7s
/cast 2 7s
/cast 2 7s
/varset t0 5m 
   :CloserAF 
/if "$target(id)"!="$v90" /goto :EndAF 
/if n $target(distance)>14 /call AutoRun 1 
/if n $target(distance)<7 /call AutoRun 0 
/if n $t0==0 /press esc 
/if n $char(hp,pct)<30 /press esc 
/face 
/doevents 
/goto :CloserAF 

   :EndAF 
     /call AutoRun 0 
     /attack off 
/delay 2s 
     /goto :AutoLoot 

:AutoLoot 

     /attack off 
     /target corpse 
     /face 
     /click right auto 
     /delay 3s 
     /mouseto corpse 0 
     /delay 1s 
     /click right 
     /mouseto corpse 1 
     /delay 1s 
     /click right 
     /mouseto corpse 2 
     /delay 1s 
     /click right 
     /delay 1s 
     /press esc esc esc 

/call Main 

Sub AutoRun 
   /if $p0==$v80 /return 
   /varset v80 $p0 
   /if $p0==1 /sendkey down up 
   /if $p0==0 /sendkey up up 

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Fri Sep 20, 2002 4:11 pm

you will need to put a loop in to wait until dylin pops before you go and hit him.

Something like

Code: Select all


:Wait
  /Target Dylin
  /delay1
  /if n $target(id)=0 /goto :Wait

and maybe test this on a more frequent spawning mob first.

Meh
a lesser mummy
a lesser mummy
Posts: 32
Joined: Wed Sep 04, 2002 8:55 pm

Post by Meh » Fri Sep 20, 2002 4:29 pm

ok now to figure out how to get casting spells to work right 8)

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Fri Sep 20, 2002 4:44 pm

same way you would do it in game..

/cast 1-8

with appropriate delays or message events referenced properly in your macro.


Mag

Grakun
Bucket of water? Thats for sissies!
Posts: 29
Joined: Fri Jun 28, 2002 1:07 pm

Post by Grakun » Fri Sep 20, 2002 5:44 pm

Meh wrote:oh well it doesint work figures

|Dyllin.mac
#include Routines.mac

Sub Main
/target Dyllin
/varset v90 $target(id)
/face
/cast 4 6s
/cast 2 7s
/cast 2 7s
/cast 2 7s
/varset t0 5m
:CloserAF
/if "$target(id)"!="$v90" /goto :EndAF
/if n $target(distance)>14 /call AutoRun 1
/if n $target(distance)<7 /call AutoRun 0
/if n $t0==0 /press esc
/if n $char(hp,pct)<30 /press esc
/face
/doevents
/goto :CloserAF

:EndAF
/call AutoRun 0
/attack off
/delay 2s
/goto :AutoLoot

:AutoLoot

/attack off
/target corpse
/face
/click right auto
/delay 3s
/mouseto corpse 0
/delay 1s
/click right
/mouseto corpse 1
/delay 1s
/click right
/mouseto corpse 2
/delay 1s
/click right
/delay 1s
/press esc esc esc

/call Main

Sub AutoRun
/if $p0==$v80 /return
/varset v80 $p0
/if $p0==1 /sendkey down up
/if $p0==0 /sendkey up up
/return


Works fine... Does exactly what you told it to do... Sounds like you expect it to read your mind or something...

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

Post by rizwank » Fri Sep 20, 2002 6:15 pm

YAY! SOMEONE READ MY MANUAL! ::dances::

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

Post by rizwank » Fri Sep 20, 2002 6:15 pm

yaaaaaaaaaay.. someone read my manual

boldor
a ghoul
a ghoul
Posts: 94
Joined: Tue Sep 10, 2002 11:46 am

Post by boldor » Fri Sep 20, 2002 7:25 pm

hmm dbl post was that a star farm Riz?

Meh
a lesser mummy
a lesser mummy
Posts: 32
Joined: Wed Sep 04, 2002 8:55 pm

Post by Meh » Sat Sep 21, 2002 3:02 am

i dont think it will loot no drop stuff

heres my revised edition 8)
[["mmm... code-liscious" - L124RD]]

Code: Select all

|Dyllin.mac 
#include Routines.mac 

Sub Main 
/target Dyllin 
/varset v90 $target(id) 
/face 
/cast 4
/delay 8s
/cast 2
/delay 8s
/cast 2
/delay 8s
/cast 2
/delay 8s
/cast 2
/delay 7s
/attack on
/varset t0 5m 
   :CloserAF 
/if "$target(id)"!="$v90" /goto :EndAF 
/if n $target(distance)>14 /call AutoRun 1 
/if n $target(distance)<7 /call AutoRun 0 
/if n $t0==0 /press esc 
/if n $char(hp,pct)<30 /press esc 
/face 
/doevents 
/goto :CloserAF 

   :EndAF 
     /call AutoRun 0 
     /attack off 
/delay 2s 
     /goto :AutoLoot 

:AutoLoot 

     /attack off 
     /target corpse 
     /face 
     /click right auto 
     /delay 3s 
     /mouseto corpse 0 
     /delay 1s 
     /click right 
     /mouseto corpse 1 
     /delay 1s 
     /click right 
     /mouseto corpse 2 
     /delay 1s 
     /click right 
     /delay 1s 
     /press esc esc esc 

/call Main 

Sub AutoRun 
   /if $p0==$v80 /return 
   /varset v80 $p0 
   /if $p0==1 /sendkey down up 
   /if $p0==0 /sendkey up up 
/return