Jump to content

razmisli

Members
  • Posts

    17
  • Joined

  • Last visited

Reputation Activity

  1. Like
    razmisli reacted to Droidz in Snippets codes for quest profiles   
    Change position of path generated by WRobot
    (this can help you to resolve  stuck on specific doors and doorways)
    With this code, you can replace specific point of path by another.
    // Continent (item1), DefaultPosition (item2), DefaultPositionSearchRange (item3), NewPosition (item4) var positionChange = new List<Tuple<ContinentId, Vector3, float, Vector3>> { new Tuple<ContinentId, Vector3, float, Vector3>(ContinentId.Kalimdor, new Vector3(1422.318, -4662.921, 35.46182), 0.5f, new Vector3(1422.063, -4665.421, 35.46295)), /// new Tuple<ContinentId... }; wManager.Events.MovementEvents.OnMovementPulse += delegate(List<Vector3> points, CancelEventArgs cancelable) { var continent = (ContinentId) Usefuls.ContinentId; foreach (var p in points) { foreach (var pchange in positionChange) { if (p != null && pchange.Item1 == continent && p.DistanceTo(pchange.Item2) <= pchange.Item3) { Logging.WriteDebug("Change path position of " + p + " to " + pchange.Item4); p.X = pchange.Item4.X; p.Y = pchange.Item4.Y; p.Z = pchange.Item4.Z; p.Type = pchange.Item4.Type; p.Action = pchange.Item4.Action; } } } };
    (you need to run this code one time by WRobot session, you can run this code in step type "RunCode")
×
×
  • Create New...