Okay its still not working. Can someone help. It makes the weapon and stores it, dont unravel, and stores ALL weapons, no matter of the property. And when the runic runs out of uses it stops. This is a tough one, if it was a one word property I know I could get it right. I dont know what Im doing wrong cause you basicly did the sub for me EN.
EDIT: It is trying to unravel but it is moving it to storagepack before. So there is my problem.
Event Macro 8 7
Display Ok Select the Resource Container.
set #targcurs 1
while #targcurs = 1
wait 1
set %ResourceBag #ltargetID
set #lobjectID #ltargetID
set #nextcposx 200
set #nextcposy 0
event macro 17
wait 10
Display Ok Select your storage Bag in Resource Container.
set #targcurs 1
while #targcurs = 1
wait 1
set %StorageBag #ltargetID
set #lobjectID #ltargetID
set #nextcposx 400
set #nextcposy 0
event macro 17
wait 20
set %residue TKR_WKR
set %weapon KDP
set %Wood TLK
set %elemental Poison_Fire_Cold_Energy
set %percent 100%
set %runic ZFG_
set %slayer Elemental_Reptile_Undead_Arachnid_Demon_Slayer
set #nextcposx 0
set #nextcposy 0
set %imain 520_250 ; Imbuing Main menu size
set %isec 520_440 ; Imbuing secondary menus for properties and value
set %cwin 530_507 ; Crafting window size
set %gumpwait 5 ; Increase number to slow down clicks on menus. 20 = 1 second.
MainLoop:
Gosub GetTools
Gosub MakeWeapon
Gosub CheckWeapon1
Goto MainLoop
sub GetTools
finditem %runic C_ , #backpackid
if #findcnt < 1
{
finditem %runic C_ , %ResourceBag
if #findkind = -1
{
display You are out of runics.
halt
}
exevent drag #findid 1
wait 10
exevent dropc #backpackid
wait 20
}
finditem %Wood C_ , #backpackid
if #findstack < 200
{
set %quantityinpack 200 - #findstack
finditem %Wood C_ , %ResourceBag
if #findstack < %quantityinpack
{
display You need more wood.
halt
}
else
{
exevent drag #findid %quantityinpack
wait 10
exevent dropc #backpackid
wait 20
}
}
Return
Sub MakeWeapon
finditem %Weapon C_ , #BackPackid
If #findcnt = 1
{
set %MadeWeapon #findid
gosub CheckWeapon1
Return
}
finditem %runic C_ , #BackPackid
set #lobjectid #findid
event macro 17
gosub waitforgump %cwin
Click 335 500 f ;Make Last
gosub waitforgump %cwin
Click 77 505 f ;exit
wait 20
finditem %Weapon C_ , #BackPackID
set %MadeWeapon #findid
Return
sub CheckWeapon1
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if Cold_Damage_100 in #property ||
Fire_Damage_100 in #property ||
Poison_Damage_100 in #property ||
Energy_Damage_100 in #property
gosub StoreWeapon
}
if #findcnt = 0
Gosub Unravel
Return
Sub StoreWeapon
finditem %Weapon C_ , #backpackid
exevent drag #findid #findstack
wait 10
exevent dropc %StorageBag
wait 20
finditem %MadeWeapon C_ , #backpackid
exevent drag #findid #findstack
wait 10
exevent dropc %StorageBag
wait 20
Return
Sub StoreResidue
finditem %Residue C_ , #backpackid
if #findcnt < 1
return
exevent drag #findid #findstack
wait 10
exevent dropc %ResourceBag
wait 20
Return
Sub Unravel
Repeat
finditem %MadeWeapon C_ , #BackPackid
If #findcnt = -1
{
Return
}
Event Macro 13 56
gosub waitforgump %imain
if ! #result
{
display ok Problems opening the imbue menu. Dble Click fletcher tool and click play
pause
}
Click 228 248 f
wait 30
set #ltargetID %MadeWeapon
event macro 22 0
;gosub waitforgump %imain
if ! #result
{
display ok Problems with imbue unravel menu. Dble Click fletcher tool and click play
pause
}
Click 50 250 f
wait 30
gosub StoreResidue
Return
;================== Wait for gump ======================
sub waitforgump
set %timeout #scnt + 30
while #contsize <> %1
{
wait 1
if #scnt > %timeout
{
return #false
}
}
wait %gumpwait
return #true
sub CheckWeapon1
finditem %MadeWeapon C_ , #backpackid
if #findcnt 1
{
event property #findid
if %elemental in #Property && Damage in #property && %percent in #property
;if Slayer in #property
;if Physical_Damage_100% in #property || %slayer in #property || Energy_Damage_100% in #property || Fire_Damage_100% in #property || Cold_Damage_100% in #property || Slayer in #property
{
gosub StoreWeapon
Return
}
Gosub Unravel
Return