khi Tradeskills - Tradeskills Macro with Ini File Support

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Falco
orc pawn
orc pawn
Posts: 23
Joined: Fri Sep 26, 2003 5:25 am

erm

Post by Falco » Thu May 27, 2004 8:26 am

erm, great macro, it runs through the recipe and first combine great. only problem i have is it keeps looping on the press combine button with out adding the next round of ingredients. any help would be appreciated

draco
a ghoul
a ghoul
Posts: 145
Joined: Thu Jan 29, 2004 7:06 pm
Contact:

Post by draco » Thu May 27, 2004 9:23 am

Three solutions:
1) Increase the combine delay so that the result isn't cleared before the event is triggered.
2) Comment out the clearCursor line in the :docombineloop. Only the on within this loop not the one in the :khiTSCombineLoop
This line creates a race condition where the cursor can be cleared before the text finishes outputting and thus the The macro hangs in the Event_SkillSucces. If you look at the include version I posted earlier this is fixed. Ignore the timer I setup in Event_SkillSuccess that was just a kludge until I figured out what the real problem was.

3) If you don't want to change the code. When it hangs just ctrl click on the output and it will continue. :-)

Kaitain
a ghoul
a ghoul
Posts: 109
Joined: Fri Oct 10, 2003 1:49 pm

Post by Kaitain » Thu May 27, 2004 9:31 am

Sorry for the lack of response. I haven't played in over a month, I'm burnt out on EQ. I've started playing City of Heros too so that's sucking up all my time...

Kaitain
a ghoul
a ghoul
Posts: 109
Joined: Fri Oct 10, 2003 1:49 pm

Post by Kaitain » Thu May 27, 2004 9:36 am

[quote="Oid"]Well written macro, but for some reason, it is very very slow imo.[/quote]

Yeah, it's slow as fuck, I do a lot of checking that's probably part of it. On my system it's still faster than the minimum combine delay though so while it annoys me, it wasn't a huge issue. Maybe when I get back into EQ in a few months I'll revisit this, for now I'm just too burnt out on the game.

Kaitain
a ghoul
a ghoul
Posts: 109
Joined: Fri Oct 10, 2003 1:49 pm

Re: Include file version

Post by Kaitain » Thu May 27, 2004 9:45 am

[quote="draco"]I have made an include file version of this macro. [/quote]

Good work Draco, and thank you for the fixes. I still consider myself a newbie at MacroQuest scripts, especially with all the recent changes, so any help is truly appriciated.

User avatar
Synergy
orc pawn
orc pawn
Posts: 19
Joined: Thu Nov 27, 2003 1:44 pm
Location: USA

Post by Synergy » Mon May 31, 2004 10:47 am

Heyas,

First off much thanks to Kaitain, this macro has always been one of my favorite and has saved me more time than I can begin to explain. I tried this new version and it kept looping after the first combine, so I loaded up the macro with Draco's additions. Then I kept getting 'Subroutine Main wasn't found'. Heh i'm an utter newbie but after reading through the code and changed "sub Make" to "sub Main", it begain to work for me. I'm a macro idiot so unsure if this was even a fix to a minor typo or whatever, but just thought i'd post incase it might help any.

/bow

Code: Select all


|** 

    khiTS.mac 

    Author:     Kaitain Heavy Industries 
    Date:       30 Apr 04 
    Version:    2.2.2.14 

    Description: 
    Performs tradeskill combines using recipes supplied in an ini file 

    Credits: 
    Inspired by Dont_Know_At_All's Trade Skills macro - The status report idea is completely stolen from him (but rewritten by me) 
    Ini file uses the format created by Diggler (this will eventually being changed to a new format using item id's) 

    Notes: 
    * Updated to use MQ2DataVars 
    * This is a complete overhaul of the whole macro in addition changing it to work with MQ2Data and MQ2DataVars 
    * You should be able to simply rename "sub main" to "sub khiTS" if you want to use this as an included file. 
    * No longer destroys tools or components used to do combines when destroy-results is enabled. 
    * This is a BIG macro and may be slow as hell on older computers. 

   Usage: 
   #include khits.inc 

   . 
   . 
   . 
   /call Make  <recipe_name> <options> 

   Example: 
   /call Make khits bits "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=0 silent-mode=0" 
   Ported to Inc by Draco 

**| 


#event SkillTrivial "You can no longer advance your skill from making this item#*#" 
#event SkillUp "You have become better at #1#!(#2#)#*#" 
#event SkillFailure "You lacked the skills#*#" 
#event SkillSuccess "You have fashioned the items together to create something new#*#" 
#event FullInventory "There was no place to put that#*#" 
#event CombineError "You cannot combine these items in this container type!" 
#chat tell 
#define INIPATH "recipes.ini" 

#define COMBINE_SUCCESS 0 
#define COMBINE_FAILED 1 
#define COMBINE_ERROR  2 
#define COMBINE_INVENTORY_FULL 3 
#define COMBINE_TRIVIAL   4 

| ***** Tweek this to your computer, if you get a lot of an item in the combine container, increase this number 
#define COMBINE_DELAY 2 

| Main entry point 
[color=red]sub Main[/color]
    /echo 
    /echo 
    /echo ***************************************** 
    /echo khiTs: Tradeskills running : ${Time} 
    /echo ***************************************** 
    /echo 
I speak fluent Lorem Ipsum.

GD
a snow griffon
a snow griffon
Posts: 353
Joined: Sat Jun 29, 2002 11:57 pm

Post by GD » Mon May 31, 2004 3:53 pm

He posted an Include version, not a standalone, that's why.
Opinions are like assholes, everyone has one, but most of them stink.

draco
a ghoul
a ghoul
Posts: 145
Joined: Thu Jan 29, 2004 7:06 pm
Contact:

Post by draco » Wed Jun 02, 2004 2:30 pm

Try something like this:

Where you would pass in the recipe name.

Code: Select all

#include khits.inc

Sub Main

/call Make ${Param0} ${Param1} ${Param2}

/return
I'm at work. Now, to get the rest of the options. You would need to add the rest of the param's to the /call Make line. Though, when I get a minute. And could actually try it. I would put some Param chaecking in the main. Etc. Lax, if you are listening a Params array would be nice.

However, Lax has been pretty thorough so I would be surprised If I just haven't read that part of TFM yet. So, when I get a chance to look at it I will.

Falco
orc pawn
orc pawn
Posts: 23
Joined: Fri Sep 26, 2003 5:25 am

Problem with containers

Post by Falco » Mon Jun 07, 2004 6:25 am

nomater what inventory container i name in recipe it keeps kicking back NULL

draco
a ghoul
a ghoul
Posts: 145
Joined: Thu Jan 29, 2004 7:06 pm
Contact:

Post by draco » Mon Jun 07, 2004 3:18 pm

NULL where? Need a little more info. As the macro does work very well. You didn't provide enough information to figure out what the problem with your config might be. Make sure you have the 6/4 version of Macro. As, of this writing the anouncement says the latest version is 6/2, however, there is a 6/4 version, that fixed some parsing of items read from an ini.

reccox
decaying skeleton
decaying skeleton
Posts: 2
Joined: Tue Jun 08, 2004 1:43 am
Contact:

Post by reccox » Tue Jun 08, 2004 2:01 am

im a newb and I have been using this for quite some time. I love it but when the format was changed I got left in the dust. Im not a programmer and dont understand this too well, but I do know how to tell you the problem im having.
Khits is crashing or stoping at cleaning out pack. text is as follows:
...
[MQ2]khiTS: Reading Paramaters
[MQ2]khiTS: Opening inventory and Containers
Usage:/windowstate<window> [open|close]
[MQ2]khiTS: cleaning out pack
[MQ2]khiTS Error: Unable to clean out pack (NULL)
The current macrro has ended
Thanks a newb

modena
orc pawn
orc pawn
Posts: 17
Joined: Wed May 19, 2004 10:51 am

Post by modena » Tue Jun 08, 2004 11:13 am

reccox, are you using the latest version of MQ? June 4th, not June 2nd. I was having the exact same issue with the June 2nd release.

Bacardi
decaying skeleton
decaying skeleton
Posts: 2
Joined: Fri Jun 04, 2004 7:32 am

Post by Bacardi » Tue Jun 08, 2004 2:56 pm

For some reason it makes one then says i must put the items in this object to create something new .... Ive changed the delay to 10 it was at 4 but i get the same result from both settings any help would be appreciated


Thanks,

Bacardi

reccox
decaying skeleton
decaying skeleton
Posts: 2
Joined: Tue Jun 08, 2004 1:43 am
Contact:

Post by reccox » Tue Jun 08, 2004 5:43 pm

I dont know how to tell if i have the newest version. I check by looking at the date last updated in the post and none of the post I have seen say june 4, the latest one I have seen is on May 4,
Thanks a newb

NBarnes
orc pawn
orc pawn
Posts: 19
Joined: Wed Jan 28, 2004 10:46 pm

Problems

Post by NBarnes » Sun Jun 13, 2004 3:59 am

I am having the same problem that Bacardi and Falco are having; the macro will complete one combine just fine, autoinven the result, and then keep trying to hit combine without putting anything more into the tradeskill container. I've read your comments, draco, but have not been able to get the macro to begin to work by either fiddling with the combine delay constant nor by commenting out line 281, '/call clearCursor ${iDestroyResults'.

Any insight into why this is failing would be much appriciated.