Catch Zeppelin/Ship
Quest profile: Catch Zeppelin and Ship Sample.xml
// Sample of how to use Zeppelin/Ship
// In this sample, WRobot catch Zeppelin from Kalimdor (Ogrimmard) to Northrend (Borean Tundra (Warsong Hold))
/* Quest settings:
* Can condition: "return Usefuls.ContinentId == (int) ContinentId.Kalimdor;"
* Is complete condition: "return Usefuls.ContinentId == (int) ContinentId.Northrend && !ObjectManager.Me.InTransport;"
* Not required in quest log: "True"
* Quest type: "OverridePulseCSharpCode"
*/
// You can get zeppelin/ship/player positions and entry ID in tab "Tools" > "Development Tools" > "Dump all informations" (or "Memory information").
// Settings:
var zeppelinEntryId = 186238; // Zeppelin/Ship EntryId
// From
var fromZeppelinWaitPosition = new Vector3(1775.066, -4299.745, 151.0326); // Position where Zeppelin/Ship waits players (from)
var fromPlayerWaitPosition = new Vector3(1762.322, -4282.175, 133.1072); // Position where the player waits Zeppelin/Ship (from)
var fromPlayerInZeppelinPosition = new Vector3(1768.199, -4289.856, 133.1912); // Position where the player waits in the Zeppelin/Ship (from)
// To
var toZeppelinWaitPosition = new Vector3(2837.908, 6187.443, 140.1648); // Position where Zeppelin/Ship waits players (to)
var toPlayerLeavePosition = new Vector3(2836.5, 6184.367, 121.9332); // Position to go out the Zeppelin/Ship (to)
// Change WRobot settings:
wManager.wManagerSetting.CurrentSetting.CloseIfPlayerTeleported = false;
// Code:
if (!Conditions.InGameAndConnectedAndProductStartedNotInPause)
return true;
if (Usefuls.ContinentId == (int)ContinentId.Kalimdor)
{
if (!ObjectManager.Me.InTransport)
{
if (GoToTask.ToPosition(fromPlayerWaitPosition))
{
var zeppelin = ObjectManager.GetWoWGameObjectByEntry(zeppelinEntryId).OrderBy(o => o.GetDistance).FirstOrDefault();
if (zeppelin != null && zeppelin.Position.DistanceTo(fromZeppelinWaitPosition) < 1)
{
GoToTask.ToPosition(fromPlayerInZeppelinPosition);
}
}
}
}
else if (Usefuls.ContinentId == (int)ContinentId.Northrend)
{
if (ObjectManager.Me.InTransport)
{
var zeppelin = ObjectManager.GetWoWGameObjectByEntry(zeppelinEntryId).OrderBy(o => o.GetDistance).FirstOrDefault();
if (zeppelin != null && zeppelin.Position.DistanceTo(toZeppelinWaitPosition) < 1)
{
GoToTask.ToPosition(toPlayerLeavePosition);
}
}
}
return true;