Hello.
The first question. I'm trying to use
MovementManager.Face(ObjectManager.Target)
with
MovementManager.IsFacing(ObjectManager.Me.Position, ObjectManager.Me.Rotation, ObjectManager.Target.Position, 3.1f) == false
condition and it works but if once condition is true, my char facing to target every time while i dont move. I want facing once per condition is true. How i can to do it?
The second question. I'm using !TraceLine.TraceLineGo(ObjectManager.Target.Position) and some times i can cast through barriers (mountains) on private server, and i want do check on the Z coordinate. For example in Probably Engine exists function
function LoS_Check(ax, ay, az, bx, by, bz)
if ax ~= nil and bx ~= nil then
local los = TraceLine(ax, ay, az+1, bx, by, bz+1)
return los == nil
end
return false
end
As you can see i can change coordinates manualy. In that way i can change Z, for example Z+10 and check can i cast through mountains. And that the question: how can i get Z coordinate and use it with TraceLineGo? I think about
Vector3 targetZ = ObjectManager.GetTargetPosition();
!TraceLine.TraceLineGo(nearestPlayerEnemy.targetZ+10)
or something like this.
And other question is about wrobot api. Where i can find list of conditions and functions like?
Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause or Conditions.IsAttackedAndCannotIgnore
For example i want check spell cd and trying to use Conditions.CounterSpell("Spell name") and i guess it is wrong form. Tried use lua
var resultLua =
Lua.LuaDoString(
"ret = \"false\"; spell, rank, displayName, icon, startTime, endTime, isTradeSkill, castID, interrupt = UnitChannelInfo(\"player\"); if spell ~='Hurricane' then ret = \"true\" end",
"ret");
and condition is working but it ignored when checking all conditions, even if all conditions is true and lua condition (resultLua) is false, the function still performed.
Coding on C# on 3.3.5
Thanks in Advance