A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.
Moderator: MacroQuest Developers
-
Hades0721
- a lesser mummy

- Posts: 31
- Joined: Sun Apr 11, 2004 4:57 pm
-
Contact:
Post
by Hades0721 » Thu Apr 15, 2004 11:54 am
Alright he is a working tradeskill macro that uses the GoD tradeskill quests to help you get you skill up to 54. Macro should be self-explanitory. If you have any questions just post and I'll try to get back to you ASAP.
Code: Select all
| ts.mac (Coded by Kaitain Edited by Hades0721)
| General purpose macro for automating tradeskills with the new TS interface.
| Usage: /macro ts [action on success] [action on failure] [end on trivial] [combines to attempt]
| Specified actions can be 0 (to destroy) and 1 {to keep) created items.
| If end on trivial is 1, the macro will end when the items trivial. (Defaults to 0)
| This macro will /autoinventory by default, if no switches are provided.
| Example usage:
| /macro ts 1 0 1
| This would keep successful combines, destroy unsuccessful combines, and stop
| running when the items trivial.
| Also change #event TURNINDONE to whatever npc says when you turn in the item
| Change MerchantName to the corresponding merchant
| Change MadeItem to the corresponding item you are making
| Change StoryScript to whatever you have to say to get the npc to give you more items
| Whenever the npc changes the item you are making you will have to change the MadeItem var again.
| Haven't implemented changes in recipe or name of item yet. Might get to it someday.
| Be sure to have selected your recipe and put the mouse over the combine button
| before running the macro!
#event NOITEM "Sorry, but you don't have everything you need for this recipe in your general inventory."
#event SUCC "You have fashioned the items together to create something new!"
#event FAIL "You lacked the skills to fashion the items together."
#event TRIV "You can no longer advance your skill from making this item."
#event SKILLUP "You have become better at"
#event TURNINDONE "Tonlyei Lyhin says 'Very well done."
Sub Main
/mouseto 325 600
/declare SKILLUP global
/declare COMBINEATTM global
/declare COMBINESUCC global
/declare COMBINETRIV global
/declare COMBINESKIL global
/declare COMBINETRY global
/declare COMBINEDONE global
/declare SUCCACTION global
/declare FAILACTION global
/declare ENDONTRIV global
/declare MOUSECOORD array
/declare MerchantName global
/declare MadeItem global
/declare StoryScript global
/declare NoHaveItem global
/varset MerchantName "Tonlyei"
/varset MadeItem "Simple Socks"
/varset StoryScript "chores"
/varset MOUSECOORD(0) $mouse(x)
/varset MOUSECOORD(1) $mouse(y)
/varset NoHaveItem 0
/varset COMBINEATTM 0
/varset COMBINESUCC 0
/varset COMBINESKIL 0
/varset COMBINETRY 0
/varset COMBINEDONE 0
|** /if n @Param0=="" {
/varset SUCCACTION 1
/varset FAILACTION 1
/varset ENDONTRIV 0
/varset COMBINETRY -5
/echo /macro ts [action on success] [action on failure] [end on trivial] [combines to attempt](optional)
/echo Example usage:
/echo /macro ts 1 0 1
/echo This would keep successful combines, destroy unsuccessful combines, and stop running when the items trivial.
/delay 30
/echo For skillups: /macro ts 1 0 1
/echo For mass production: /macro ts 1 1 0
/echo For 20 combines: /macro ts 1 1 0 20
/delay 5
/echo waiting for 260, stop me now or I mass produce
/delay 260
} else { **|
/varset SUCCACTION @Param0
/varset FAILACTION @Param1
/varset ENDONTRIV @Param2
/if n @Param3=="" {
/varset COMBINETRY -5
} else {
/varset COMBINETRY @Param3
}
| }
/echo
/echo --------------------------------------------------------------------------------------
/echo TradeSkill Macro activated
/if n @Param0=="" /echo I will Keep all and not stop
/if n @Param0==1 /echo I will keep combines
/if n @Param1==1 /echo I will keep failures
/if n @Param2==1 /echo I will stop at trivial
/if n @Param3!="" /echo I will attempt @Param3 combines
/echo --------------------------------------------------------------------------------------
/echo
/echo WARNING: Containter needs to be open, item
/echo selected and cursor on the combine button
/call Combine
| /call EndMacro
/return
Sub Combine
:doloop
/if n @COMBINETRY!=0 {
/mouseto 325 600
/click left
/delay 15
/doevents
/varset COMBINETRY $int($calc(@COMBINETRY-1))
/goto :doloop
}
/return
Sub Event_NOITEM
| /varadd COMBINEDONE 1
| /if n @COMBINEDONE==3 {
| /echo
| /echo
| /echo Missing one of the required items for this recipe; aborting.
| /call EndMacro
| }
/call GiveItems
/return
Sub Event_FAIL
/varadd COMBINEATTM 1
/call SortItems @FAILACTION
/return
Sub Event_SUCC
/varadd COMBINEATTM 1
/varadd COMBINESUCC 1
/call SortItems @SUCCACTION
/return
Sub Event_SKILLUP
/varadd COMBINESKIL 1
/return
Sub Event_TRIV
/if @ENDONTRIV==1 {
/echo
/echo
/echo Item is now trivial: Congratulations!
/call EndMacro
}
/return
Sub GiveItems
/target "@MerchantName"
:giveloop
/if n $count("@MadeItem")==0 /goto :Done
/sendkey down ctrl
/finditem "@MadeItem"
/click left target
/delay 1s
| /mouseto target
| /click left
:nextitem
/if n $count("@MadeItem")==0 /goto :give
/finditem "@MadeItem"
/mouseto npctrade 1
/click left
/delay 1s
/if n $count("@MadeItem")==0 /goto :give
/finditem "@MadeItem"
/mouseto npctrade 2
/click left
/delay 1s
/if n $count("@MadeItem")==0 /goto :give
/finditem "@MadeItem"
/mouseto npctrade 3
/click left
/delay 1s
:give
/mouseto npctrade give
/click left
/delay 1s
/goto :giveloop
:Done
/sendkey up ctrl
/doevents TURNINDONE
/call GetItems
/return
Sub Event_TURNINDONE
/varset NoHaveItem 1
/return
Sub GetItems
/if n @NoHaveItem==1 {
/say "@StoryScript"
/delay 1s
/autoinventory
/autoinventory
/autoinventory
/autoinventory
/varset NoHaveItem 0
/call Combine
} else {
/call EndMacro
}
/return
Sub SortItems
:itemloop
/if $cursor()!="NULL" {
/if n @Param0==1 {
/autoinventory
} else {
/destroy
}
/delay 5
/goto :itemloop
}
/return
Sub EndMacro
/echo
/echo
/echo
/echo
/echo --------------------------------------------------------------------------------------
/echo Total time running: $running
/echo Combines Attempted: @COMBINEATTM
/echo Combines Successfull: @COMBINESUCC
/echo Success rate: $int($calc(@COMBINESUCC/@COMBINEATTM*100))%
/if n @COMBINESKIL>0 /echo Combines per skillup: $int($calc(@COMBINEATTM/@COMBINESKIL))
/echo --------------------------------------------------------------------------------------
/endmacro
/return
-
Imperfect
- Macro Author

- Posts: 319
- Joined: Fri Jun 14, 2002 1:52 am
Post
by Imperfect » Fri Apr 16, 2004 12:25 am
Code: Select all
#event TURNINDONE "Tonlyei Lyhin says 'Very well done."
Why not just add all 7 of the different npcs text to this event? You can have 7 different phrases that all trigger the TURNINDONE event.
-
inthrall
- orc pawn

- Posts: 13
- Joined: Sun Mar 14, 2004 3:57 pm
Post
by inthrall » Fri Apr 16, 2004 11:01 pm
| ts.mac (Coded by Kaitain Edited by Hades0721)
Using "my" version of his code and I dont even get credit for it

-
Hades0721
- a lesser mummy

- Posts: 31
- Joined: Sun Apr 11, 2004 4:57 pm
-
Contact:
Post
by Hades0721 » Fri Apr 16, 2004 11:42 pm
Sorry Int. Got this off a post by Kaitain. Didn't know. Proper credit should go to Int also. Thanks for the code. Works great.
"I'm Goin' to Hell. Who's comin' with me?" - Eminem
-
Hades0721
- a lesser mummy

- Posts: 31
- Joined: Sun Apr 11, 2004 4:57 pm
-
Contact:
Post
by Hades0721 » Wed Apr 21, 2004 6:49 pm
should have updated by tonight
"I'm Goin' to Hell. Who's comin' with me?" - Eminem
-
loadingpleasewait
- a snow griffon

- Posts: 332
- Joined: Sat Sep 14, 2002 8:46 am
Post
by loadingpleasewait » Thu Apr 22, 2004 11:12 am
Havnt tested it because I'm to lazy to travel to abysmal and I dont know the phases for the tradeskill I need yet, BUT, this might work.. hehe..
Code: Select all
| ts.mac (Coded by Kaitain Edited by Hades0721)
| General purpose macro for automating tradeskills with the new TS interface.
| Usage: /macro ts [action on success] [action on failure] [end on trivial] [combines to attempt]
| Specified actions can be 0 (to destroy) and 1 {to keep) created items.
| If end on trivial is 1, the macro will end when the items trivial. (Defaults to 0)
| This macro will /autoinventory by default, if no switches are provided.
| Example usage:
| /macro ts 1 0 1
| This would keep successful combines, destroy unsuccessful combines, and stop
| running when the items trivial.
| Also change #event TURNINDONE to whatever npc says when you turn in the item
| Change MerchantName to the corresponding merchant
| Change MadeItem to the corresponding item you are making
| Change StoryScript to whatever you have to say to get the npc to give you more items
| Whenever the npc changes the item you are making you will have to change the MadeItem var again.
| Haven't implemented changes in recipe or name of item yet. Might get to it someday.
| Be sure to have selected your recipe and put the mouse over the combine button
| before running the macro!
#event NOITEM "Sorry, but you don't have everything you need for this recipe in your general inventory."
#event SUCC "You have fashioned the items together to create something new!"
#event FAIL "You lacked the skills to fashion the items together."
#event TRIV "You can no longer advance your skill from making this item."
#event SKILLUP "You have become better at"
#event TURNINDONE "Tonlyei Lyhin says 'Very well done."
Sub Main
| /mouseto 325 600
/declare SKILLUP global
/declare COMBINEATTM global
/declare COMBINESUCC global
/declare COMBINETRIV global
/declare COMBINESKIL global
/declare COMBINETRY global
/declare COMBINEDONE global
/declare SUCCACTION global
/declare FAILACTION global
/declare ENDONTRIV global
/declare MOUSECOORD array
/declare MerchantName global
/declare MadeItem global
/declare StoryScript global
/declare NoHaveItem global
/varset MerchantName "Tonlyei"
/varset MadeItem "Simple Socks"
/varset StoryScript "Chores"
/varset MOUSECOORD(0) ${Mouse[X]}
/varset MOUSECOORD(1) ${Mouse[Y]}
/varset NoHaveItem 0
/varset COMBINEATTM 0
/varset COMBINESUCC 0
/varset COMBINESKIL 0
/varset COMBINETRY 0
/varset COMBINEDONE 0
|** /if n @Param0=="" {
/varset SUCCACTION 1
/varset FAILACTION 1
/varset ENDONTRIV 0
/varset COMBINETRY -5
/echo /macro ts [action on success] [action on failure] [end on trivial] [combines to attempt](optional)
/echo Example usage:
/echo /macro ts 1 0 1
/echo This would keep successful combines, destroy unsuccessful combines, and stop running when the items trivial.
/delay 30
/echo For skillups: /macro ts 1 0 1
/echo For mass production: /macro ts 1 1 0
/echo For 20 combines: /macro ts 1 1 0 20
/delay 5
/echo waiting for 260, stop me now or I mass produce
/delay 260
} else { **|
/varset SUCCACTION @Param0
/varset FAILACTION @Param1
/varset ENDONTRIV @Param2
/if (${String[@Param3].Equal[]}) {
/varset COMBINETRY -5
} else {
/varset COMBINETRY @Param3
}
| }
/echo
/echo --------------------------------------------------------------------------------------
/echo TradeSkill Macro activated
/if (${String[@Param0].Equal[]}) /echo I will Keep all and not stop
/if (${String[@Param0].Equal[1]}) /echo I will keep combines
/if (${String[@Param1].Equal[1]}) /echo I will keep failures
/if (${String[@Param2].Equal[1]}) /echo I will stop at trivial
/if (!${String[@Param3].Equal[]}) /echo I will attempt @Param3 combines
/echo --------------------------------------------------------------------------------------
/echo
/echo WARNING: Containter needs to be open, item
/echo selected and cursor on the combine button
/call Combine
| /call EndMacro
/return
Sub Combine
:doloop
/if (@COMBINETRY!=0) {
/mouseto 325 600
/click left
/delay 15
/doevents
/varset COMBINETRY ${Int[${Calc[@COMBINETRY-1]}]}
/goto :doloop
}
/return
Sub Event_NOITEM
| /varadd COMBINEDONE 1
| /if (@COMBINEDONE==3) {
| /echo
| /echo
| /echo Missing one of the required items for this recipe; aborting.
| /call EndMacro
| }
/call GiveItems
/return
Sub Event_FAIL
/varadd COMBINEATTM 1
/call SortItems @FAILACTION
/return
Sub Event_SUCC
/varadd COMBINEATTM 1
/varadd COMBINESUCC 1
/call SortItems @SUCCACTION
/return
Sub Event_SKILLUP
/varadd COMBINESKIL 1
/return
Sub Event_TRIV
/if (@ENDONTRIV==1) {
/echo
/echo
/echo Item is now trivial: Congratulations!
/call EndMacro
}
/return
Sub GiveItems
/target "@MerchantName"
:giveloop
/if (${FindItemCount[@MadeItem]}==0) /goto :Done
/sendkey down ctrl
/finditem "@MadeItem"
/click left target
/delay 1s
| /mouseto target
| /click left
:nextitem
/if (${FindItemCount[@MadeItem]}==0) /goto :give
/finditem "@MadeItem"
/mouseto npctrade 1
/click left
/delay 1s
/if (${FindItemCount[@MadeItem]}==0) /goto :give
/finditem "@MadeItem"
/mouseto npctrade 2
/click left
/delay 1s
/if (${FindItemCount[@MadeItem]}==0) /goto :give
/finditem "@MadeItem"
/mouseto npctrade 3
/click left
/delay 1s
:give
/mouseto npctrade give
/click left
/delay 1s
/goto :giveloop
:Done
/sendkey up ctrl
/doevents TURNINDONE
/call GetItems
/return
Sub Event_TURNINDONE
/varset NoHaveItem 1
/return
Sub GetItems
/if @NoHaveItem==1 {
/say "@StoryScript"
/delay 1s
/autoinventory
/autoinventory
/autoinventory
/autoinventory
/varset NoHaveItem 0
/call Combine
} else {
/call EndMacro
}
/return
Sub SortItems
:itemloop
/if (${Cursor.ID} && ${String[@Param0].Equal[1]}) {
/autoinventory
} else {
/destroy
}
/delay 5
/goto :itemloop
}
/return
Sub EndMacro
/echo
/echo
/echo
/echo
/echo --------------------------------------------------------------------------------------
/echo Total time running: ${Macro.RunTime}
/echo Combines Attempted: @COMBINEATTM
/echo Combines Successfull: @COMBINESUCC
/echo Success rate: ${Int[${Calc[@COMBINESUCC/@COMBINEATTM*100]}]}%
/if n @COMBINESKIL>0 /echo Combines per skillup: ${Int[${Calc[@COMBINEATTM/@COMBINESKIL]}]}
/echo --------------------------------------------------------------------------------------
/endmacro
/return
If it doesnt work, it could be a good starting point?
-
loadingpleasewait
- a snow griffon

- Posts: 332
- Joined: Sat Sep 14, 2002 8:46 am
Post
by loadingpleasewait » Thu Apr 22, 2004 12:08 pm
Tried it, doesnt work.. dont know why.. Oh well, complex tradeskill macros were never my thing.. = (
-
Hades0721
- a lesser mummy

- Posts: 31
- Joined: Sun Apr 11, 2004 4:57 pm
-
Contact:
Post
by Hades0721 » Thu Apr 22, 2004 3:49 pm
Hmm, at first glance it looks ok. Might need to change all /if statements to /newif i'll test it out in a few...
"I'm Goin' to Hell. Who's comin' with me?" - Eminem