I've gone over the code a bit more thoroughly now and noted a few things:
- You use a lot of local unit groups and destroy them, since you always utilise them in a way that leaves them empty you do not need to do this and can use one global unit group for all uses (adding one global but removing all the lines creating/destroying local groups)
- Please give your local variables meaningful names using single letters is very unhelpful; while you do explain what they are in most functions (some are not) having to scroll back up every two seconds isn't that great
- You have the number for bj_DEGTORAD (57.2957795) instead of the constant bj_DEGTORAD in your code, seems a bit pointless
- When you recycle with a linked list you don't need to null all the unit variables, it will not leak regardless (as the variable will be reused)
- Having a GUI configuration does not a GUI spell make; this is a pure JASS submission
- udg_ClsR_trig can be a local making
JASS:
if udg_ClsR_trig != null then
call DestroyTrigger(udg_ClsR_trig)
endif
redundant
- this makes the spell uncastable on the line x == 0 of any map (again unlikely but it is a problem)
JASS:
if GetOrderTarget() != null or GetOrderPointX() != 0 then
I'd note not all of these are mandatory (the ones towards the top particularly) but it would be helpful and would be slight improvements in my opinion (notably in terms of readability) The spell is great and I'd like to approve it once these things have been solved