Very good script other than that stack issue. I tried a workaround for this but not too sure whether it works perfectly or not. Appreciate feedback on this modification.
Change the LoadMaterials sub with this one and also add another sub.sub LoadMaterials
finditem %Ingots C_ , #backpackid
if #findstack < ( 100 * %itemingots )
{
set %quantityinpack ( ( %itemingots * 100 ) - #findstack ) ; 2000 - 20 = 1980
lp1:
gosub CountIngot
set %cnt1 0
if %sumIngot < %quantityinpack
{
display You need to place more ingots in your Resource Secure and restart the script.
halt
}
else
{
lp2:
finditem %Ingots C_ , %ResourceSecure
if #findstack < %quantityinpack
{
set %cnt1 %cnt1 + 1
if %cnt1 > %IngotStackCount
{
exevent drag #findid #findstack
wait 10
exevent dropc %ResourceSecure
wait 20
goto lp1
}
ignoreitem #findid
goto lp2
}
else
{
ignoreitem reset
exevent drag #findid %quantityinpack
wait 10
exevent dropc #backpackid
wait 20
}
}
finditem %Tinkertools C_ , #backpackid
if #findcnt < 2
{
gosub MakeTinkerKit
gosub skillcheck
}
Return
and the new sub is this:
sub CountIngot
finditem %Ingots C_ , %ResourceSecure
set %IngotStackCount #FINDCNT
for %i 1 %IngotStackCount
{
finditem %Ingots C_ , %ResourceSecure
set %ingotstack . %i #FINDID
set %sumIngot %sumIngot + #FINDSTACK
ignoreitem %ingotstack . %i
}
ignoreitem reset
return
I didn't test it throughly but it should work in theory.