your stuff is really, really hard to read! Try ovoiding gotos and try to do something like this (the stuff bellow is just an example, i wrote it fast so i dont know if it will work, but it should give you a hint how things should look like).
set %itemtype KDP
set %hammertype CGG
set %WeigtTurnIn 400
set %wood TLK
; Seting up wood bag and opening it
Display Target your wood bag(right?).
set #targcurs = 1
while #targcurs = 1
  wait 1
set %packy #ltargetid
set #lobjectid %packy
event macro 17
wait 1s
; Seting up turn bag and opening it
Display Target your wood pack(right?).
set #targcurs = 1
while #targcurs = 1
  wait 1
set %turnbag #ltargetid
set #lobjectid %turnbag
event macro 17
wait 1s
; Mainloop
repeat
  Gosub CheckForTurnIn
  Gosub CheckHammers
  Gosub CheckWood
  Gosub MakeItem
until #charghost = yes
; End of Mainloop
; Subs
Sub CheckForTurnIn
  if #weight > %WeigtTurnIn
  {
    finditem %itemtype C_ , #Backpackid
    while #findcnt > 0
    {
      key f10 ; YOU COULD DO BETTER THAN THIS AND YOU KNOW IT, but for now it's ok.
      wait 15
      finditem %itemtype C_ , #Backpackid
    }
  }
return
Sub CheckHammers
  finditem %hammertype C_ , #backpackid
  if #findcnt < 1
  {
    finditem %hammertype C_ , %packy
    if #findcnt > 0
    {
      exevent drag #findid
      exevent dropc #backpackid
      wait 20
    }
    else
    {
      display You are out of hammers.
      stop
    }
  }
return
Sub CheckWood
  finditem %wood C_ , #backpackid
  if #findstack < 10 ; if less than 10 in a stack then
  {
    finditem %wood C_ , %packy
    if #findcnt > 0 && #findstack > 10 ; if any wood in packy found and the stack os greater than 10
    {
      exevent drag #findid 150
      exevent dropc #backpackid
      wait 20
    }
  }
return
Sub MakeItem
  if #contsize <> 666_666 ; if contsize not XXX_XXX then we use the crafting tool ; ++ edit to the contsize of the crafting menu to get this working
  {
    finditem %hammertype C_ , #backpackid
    if #findcnt > 0
    {
      set #lobjectid #findid
      event macro 17
      wait 1s
    }
  }
  set %makelastx #CONTPOSX + 281
  set %makelasty #CONTPOSY + 456
  for %i 1 10 ; repeat 10 times
  {
    if #contsize = 666_666  ; edit the contisze of crafting menu to get this working
    {
      click %makelastx %makelasty
      wait 10
    }
  }
return