I once believed GUI is good but trust me it is not; JASS is a new thing to you and that's why you find it hard. As a proof, I will use your function:
function IsDestructableTree takes destructable d return boolean
call IssueTargetOrder( ISD_dummy, "harvest", d )
if GetUnitCurrentOrder(ISD_dummy) == String2OrderIdBJ("harvest") then
return true
endif
return false
endfunction
As for your GUI one when converted to JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
endfunction
function Trig_IsDestructableTree_Func002C takes nothing returns boolean
if ( not ( GetUnitCurrentOrder(ISD_dummy) == String2OrderIdBJ("harvest") ) ) then
return false
endif
return true
endfunction
function IsDestructableTree takes destructable d returns boolean
call IssueTargetDestructableOrder( ISD_dummy, "harvest", d )
if ( Trig_IsDestructableTree_Func002C() ) then
call IssueImmediateOrderBJ( ISD_dummy, "stop" )
return true
else
endif
return false
endfunction