I'll break down the code so as to answer each little bit.
Sub CraftAway
CraftAwayLoop:
finditem %TinkerTools C_ , #backpackid
if #findcnt < 2
gosub MakeTinkerKit
finditem %FletchersTools C_ , #backpackid
if #findcnt < 2
gosub MakeFletchersTools
finditem %FletchersTools C_ , #backpackid
set #lobjectid #findid
event macro 17
gosub waitforgump %cwin
if ! #result
{
Goto CraftAwayLoop
}
Set %Find%CurrentItemAttempts 0
Set %Find%CurrentItemAttemptsSuccess 0 ;;[color=red]I am not sure about these 3 lines, looks like code for a menu but maybe the script uses it to track other than real skill?[/color]
He is setting Variables up to later be used in his script to define how many times it has attepted to do the items and how many times it was actually successful in making the item.
Set %NeedToResetCurrentItem No
REPEAT
{
finditem %FletchersTools C_ , #backpackid ;;[color=red]If there aren't at least 2 fletcher kit it goes to the loop that tell is to make more kits[/color]
If #findcnt < 2
goto CraftAwayLoop
Yes, if there is less than 2 fletcher kits it goes back to the beginning of the sub to make new kits. There are different ways of doing this rather than using gotos but that will come with practice. Some of us don't like gotos. Some do.
chooseskill bowc real
Set %CurrentSkill #Skill ;; [color=red]I believe this is so the script can reference which items to make[/color]
Gosub OffSetClick 280 450 ; make last ;; [color=red] This confuses me, what if the last thing made was to low and it should have gone to something new?[/color]
This part of the script is just for updating the current skill level prior to it making last so that it can see if you get a gain. That is all.
gosub waitforgump %cwin
if ! #result ;; [color=red]Checking to see if tool is still working?[/color]
Goto CraftAwayLoop
This is using a different sub to check for the gump. So unless the other sub is posted we cannot see what the #result means.
Finditem %CurrentItem C_ , #BackpackID ;; [color=red] I don't understand this. Is it looking for the item made in the bag? If so, why?[/color]
Set %FindCurrentItemAttempts %FindCurrentItemAttempts + 1
If #FindCnt >= 1
{
Set %FindCurrentItemAttemptsSuccess %FindCurrentItemAttemptsSuccess + 1 ;; [color=red]I am confused on this to, is this and the previous one checking so it knows what to dump but I don't see a ref to weight. Does the weight sub run constantly and independently from the crafting sub?[/color]
Gosub Dump
}
If %FindCurrentItemAttempts > 9 && %FindCurrentItemAttemptsSuccess < 1 ;; [color=red]Does this mean it is going to go to a lower item regardless of skill since it made 9 without a success? Is this the reason for the lines at the beginning?[/color]
Set %NeedToResetCurrentItem Yes
The reason it has a finditem is to search for the item you are making to see if it successfully made the item. By it finding 1 or more, it knows that it was successful and it will udpate with how many are in the bag. Then it moves them using gosub dump and gets rid of the item in your backpack so it does not count it again.
I believe it will go to a lower level item. Not sure, it is based on how he wrote his other subs to determine the correct item. Maybe you were using a bracelet before and then took it off and now you are below the minimum. It will make it update itself to do the correct item.
Chooseskill Bowc real
If Siege in #Shard && #Skill >= 700 ;; [color=red]Siege ROT timer, completely understand this one, nice sub! EN's?[/color]
{
GoSub RoT_Timer Bowc
finditem %FletchersTools C_ , #backpackid
If #FindCnt < 1
Goto CraftAwayLoop
set #lobjectid #findid
event macro 17
}
If #skill >= %threshhold || %NeedToResetCurrentItem = Yes
gosub SkillCheck
If #Skill = #SkillCap
Gosub SkillCheck
gosub weightcheck
finditem %Boards C_ , #backpackid
}
UNTIL #findstack < %ItemBoards ;; [color=red]board check? I don't think I have seen a check like this but is it referring to the stack being smaller than the amount needed to make the bow which is addressed in the item1 item2 section of the script?[/color]
Gosub OffsetClick 30 450 ;; [color=red]Does this close out the crafting gump? If so, Why? So it can grab more boards?[/color]
Return
yes, that is saying that it will do the repeat until there are not enough boards to do the item. So whatever %ItemBoards is set to it will not break out of it. It is a different way of writing it, but it is effective.
I am not sure what click is 30 450, but only way to close a gump is to make it do a right click. So i am unsure of this click.