Cache GetDestructableTypeId to add some speed.
This will be much more efficient:
[jass=]
//This is for the then block:
if not HaveSavedBoolean(hash,id,key) then
set bool = true
call SaveBoolean(hash,id,key,bool
else
set bool = LoadBoolean(hash,id,key)[/code]
This way,users dont need to load them by them selves
edit
Dont do above,nevermind that.
Just return the boolean likes this in one line
set bool = IssueTargetOrderById(checker, OrderId("harvest"), d) and IssueImmediateOrderById(checker, OrderId("stop"))
Now,we are talking about the speed