I'm doing a quick test for manta illusion, it's fixed for illusion. while I realize IsShrineHealing( shrine_name ) seems always give out true? I have code for if bot health is lower than 90% and shrine is activated(healing) then move to shrine. But the result is whenever he is below 90% hp he move to shrine.
I will use get cool down instead of this for now.
elseif (nearestshrine ~= nil and (npcBot:GetHealth()/npcBot:GetMaxHealth() < 0.90 or npcBot:GetMana()/npcBot:GetMaxMana() < 0.90) and IsShrineHealing( shrine_name ) and GetUnitToLocationDistance(npcBot, nearestshrine:GetLocation()) < 1500) then
shrine_p = 12.05; --join a healing shirin, should be higher than all farmjungle_p
Another question is the difference between distance/straight line distance, I have set bot to go and use shrine only when shrine is in x unit range, then a decision to use shrine is made based on straight line distance, on his way to shrine, the straight line distance increase because you have to walk around trees and then bot find shrine is 'out of range' and go back to the camp location and jungle, and it repeat doing this. I could set a timer that once a decision is made, keep it unless..., but I think if we could make a decision based on path distance it could be much better.