static bool LoadedTilesCommand(StringArguments args, CommandHandler handler) { uint mapid = handler.GetPlayer().GetMapId(); Detour.dtNavMesh navmesh = Global.MMapMgr.GetNavMesh(mapid, handler.GetSession().GetPlayer().GetTerrainSwaps()); Detour.dtNavMeshQuery navmeshquery = Global.MMapMgr.GetNavMeshQuery(mapid, handler.GetPlayer().GetInstanceId(), handler.GetSession().GetPlayer().GetTerrainSwaps()); if (navmesh == null || navmeshquery == null) { handler.SendSysMessage("NavMesh not loaded for current map."); return(true); } handler.SendSysMessage("mmap loadedtiles:"); for (int i = 0; i < navmesh.getMaxTiles(); ++i) { Detour.dtMeshTile tile = navmesh.getTile(i); if (tile == null) { continue; } handler.SendSysMessage("[{0:D2}, {1:D2}]", tile.header.x, tile.header.y); } return(true); }
static bool HandleGMFlyCommand(StringArguments args, CommandHandler handler) { if (args.Empty()) { return(false); } Player target = handler.GetSelectedPlayer(); if (target == null) { target = handler.GetPlayer(); } string arg = args.NextString().ToLower(); if (arg == "on") { target.SetCanFly(true); target.SetCanTransitionBetweenSwimAndFly(true); } else if (arg == "off") { target.SetCanFly(false); target.SetCanTransitionBetweenSwimAndFly(false); } else { handler.SendSysMessage(CypherStrings.UseBol); return(false); } handler.SendSysMessage(CypherStrings.CommandFlymodeStatus, handler.GetNameLink(target), arg); return(true); }
static bool HandleMmapStatsCommand(StringArguments args, CommandHandler handler) { uint mapId = handler.GetPlayer().GetMapId(); handler.SendSysMessage("mmap stats:"); handler.SendSysMessage(" global mmap pathfinding is {0}abled", Global.DisableMgr.IsPathfindingEnabled(mapId) ? "En" : "Dis"); handler.SendSysMessage(" {0} maps loaded with {1} tiles overall", Global.MMapMgr.getLoadedMapsCount(), Global.MMapMgr.getLoadedTilesCount()); Detour.dtNavMesh navmesh = Global.MMapMgr.GetNavMesh(handler.GetPlayer().GetMapId(), handler.GetSession().GetPlayer().GetTerrainSwaps()); if (navmesh == null) { handler.SendSysMessage("NavMesh not loaded for current map."); return(true); } uint tileCount = 0; int nodeCount = 0; int polyCount = 0; int vertCount = 0; int triCount = 0; int triVertCount = 0; for (int i = 0; i < navmesh.getMaxTiles(); ++i) { Detour.dtMeshTile tile = navmesh.getTile(i); if (tile == null) { continue; } tileCount++; nodeCount += tile.header.bvNodeCount; polyCount += tile.header.polyCount; vertCount += tile.header.vertCount; triCount += tile.header.detailTriCount; triVertCount += tile.header.detailVertCount; } handler.SendSysMessage("Navmesh stats:"); handler.SendSysMessage(" {0} tiles loaded", tileCount); handler.SendSysMessage(" {0} BVTree nodes", nodeCount); handler.SendSysMessage(" {0} polygons ({1} vertices)", polyCount, vertCount); handler.SendSysMessage(" {0} triangles ({1} vertices)", triCount, triVertCount); return(true); }
static bool CheckSpellExistsAndIsValid(CommandHandler handler, SpellInfo spellInfo) { if (spellInfo == null) { handler.SendSysMessage(CypherStrings.CommandNospellfound); return(false); } if (!Global.SpellMgr.IsSpellValid(spellInfo, handler.GetPlayer())) { handler.SendSysMessage(CypherStrings.CommandSpellBroken, spellInfo.Id); return(false); } return(true); }
static bool HandleGameObjectDeleteCommand(StringArguments args, CommandHandler handler) { // number or [name] Shift-click form |color|Hgameobject:go_guid|h[name]|h|r string id = handler.extractKeyFromLink(args, "Hgameobject"); if (string.IsNullOrEmpty(id)) { return(false); } ulong guidLow = ulong.Parse(id); if (guidLow == 0) { return(false); } GameObject obj = handler.GetObjectFromPlayerMapByDbGuid(guidLow); if (!obj) { handler.SendSysMessage(CypherStrings.CommandObjnotfound, guidLow); return(false); } ObjectGuid ownerGuid = obj.GetOwnerGUID(); if (ownerGuid.IsEmpty()) { Unit owner = Global.ObjAccessor.GetUnit(handler.GetPlayer(), ownerGuid); if (!owner || !ownerGuid.IsPlayer()) { handler.SendSysMessage(CypherStrings.CommandDelobjrefercreature, ownerGuid.ToString(), obj.GetGUID().ToString()); return(false); } owner.RemoveGameObject(obj, false); } obj.SetRespawnTime(0); // not save respawn time obj.Delete(); obj.DeleteFromDB(); handler.SendSysMessage(CypherStrings.CommandDelobjmessage, obj.GetGUID().ToString()); return(true); }
static bool HandleTeleCommand(StringArguments args, CommandHandler handler) { if (args.Empty()) { return(false); } Player me = handler.GetPlayer(); GameTele tele = handler.extractGameTeleFromLink(args); if (tele == null) { handler.SendSysMessage(CypherStrings.CommandTeleNotfound); return(false); } if (me.IsInCombat()) { handler.SendSysMessage(CypherStrings.YouInCombat); return(false); } var map = CliDB.MapStorage.LookupByKey(tele.mapId); if (map == null || (map.IsBattlegroundOrArena() && (me.GetMapId() != tele.mapId || !me.IsGameMaster()))) { handler.SendSysMessage(CypherStrings.CannotTeleToBg); return(false); } // stop flight if need if (me.IsInFlight()) { me.GetMotionMaster().MovementExpired(); me.CleanupAfterTaxiFlight(); } // save only in non-flight case else { me.SaveRecallPosition(); } me.TeleportTo(tele.mapId, tele.posX, tele.posY, tele.posZ, tele.orientation); return(true); }
static bool HandleGameObjectNearCommand(StringArguments args, CommandHandler handler) { float distance = args.Empty() ? 10.0f : args.NextSingle(); uint count = 0; Player player = handler.GetPlayer(); PreparedStatement stmt = DB.World.GetPreparedStatement(WorldStatements.SEL_GAMEOBJECT_NEAREST); stmt.AddValue(0, player.GetPositionX()); stmt.AddValue(1, player.GetPositionY()); stmt.AddValue(2, player.GetPositionZ()); stmt.AddValue(3, player.GetMapId()); stmt.AddValue(4, player.GetPositionX()); stmt.AddValue(5, player.GetPositionY()); stmt.AddValue(6, player.GetPositionZ()); stmt.AddValue(7, distance * distance); SQLResult result = DB.World.Query(stmt); if (!result.IsEmpty()) { do { ulong guid = result.Read <ulong>(0); uint entry = result.Read <uint>(1); float x = result.Read <float>(2); float y = result.Read <float>(3); float z = result.Read <float>(4); ushort mapId = result.Read <ushort>(5); GameObjectTemplate gameObjectInfo = Global.ObjectMgr.GetGameObjectTemplate(entry); if (gameObjectInfo == null) { continue; } handler.SendSysMessage(CypherStrings.GoListChat, guid, entry, guid, gameObjectInfo.name, x, y, z, mapId); ++count; } while (result.NextRow()); } handler.SendSysMessage(CypherStrings.CommandNearobjmessage, distance, count); return(true); }
static bool HandleTeleCommand(StringArguments args, CommandHandler handler) { if (args.Empty()) { return(false); } Player player = handler.GetPlayer(); GameTele tele = handler.ExtractGameTeleFromLink(args); if (tele == null) { handler.SendSysMessage(CypherStrings.CommandTeleNotfound); return(false); } if (player.IsInCombat() && !handler.GetSession().HasPermission(RBACPermissions.CommandTeleName)) { handler.SendSysMessage(CypherStrings.YouInCombat); return(false); } var map = CliDB.MapStorage.LookupByKey(tele.mapId); if (map == null || (map.IsBattlegroundOrArena() && (player.GetMapId() != tele.mapId || !player.IsGameMaster()))) { handler.SendSysMessage(CypherStrings.CannotTeleToBg); return(false); } // stop flight if need if (player.IsInFlight()) { player.FinishTaxiFlight(); } else { player.SaveRecallPosition(); // save only in non-flight case } player.TeleportTo(tele.mapId, tele.posX, tele.posY, tele.posZ, tele.orientation); return(true); }
static bool TestArea(StringArguments args, CommandHandler handler) { float radius = 40.0f; WorldObject obj = handler.GetPlayer(); // Get Creatures List <Unit> creatureList = new List <Unit>(); var go_check = new AnyUnitInObjectRangeCheck(obj, radius); var go_search = new UnitListSearcher(obj, creatureList, go_check); Cell.VisitGridObjects(obj, go_search, radius); if (!creatureList.Empty()) { handler.SendSysMessage("Found {0} Creatures.", creatureList.Count); uint paths = 0; uint uStartTime = Time.GetMSTime(); float gx, gy, gz; obj.GetPosition(out gx, out gy, out gz); foreach (var creature in creatureList) { PathGenerator path = new PathGenerator(creature); path.CalculatePath(gx, gy, gz); ++paths; } uint uPathLoadTime = Time.GetMSTimeDiffToNow(uStartTime); handler.SendSysMessage("Generated {0} paths in {1} ms", paths, uPathLoadTime); } else { handler.SendSysMessage("No creatures in {0} yard range.", radius); } return(true); }
static bool HandleGameObjectAddTempCommand(StringArguments args, CommandHandler handler) { if (args.Empty()) { return(false); } uint id = args.NextUInt32(); if (id == 0) { return(false); } Player player = handler.GetPlayer(); uint spawntime = args.NextUInt32(); uint spawntm = 300; if (spawntime != 0) { spawntm = spawntime; } Quaternion rotation = Quaternion.fromEulerAnglesZYX(player.GetOrientation(), 0.0f, 0.0f); if (Global.ObjectMgr.GetGameObjectTemplate(id) == null) { handler.SendSysMessage(CypherStrings.GameobjectNotExist, id); return(false); } player.SummonGameObject(id, player, rotation, spawntm); return(true); }
static bool LoadedTilesCommand(CommandHandler handler, StringArguments args) { Player player = handler.GetSession().GetPlayer(); uint terrainMapId = PhasingHandler.GetTerrainMapId(player.GetPhaseShift(), player.GetMap(), player.GetPositionX(), player.GetPositionY()); Detour.dtNavMesh navmesh = Global.MMapMgr.GetNavMesh(terrainMapId); Detour.dtNavMeshQuery navmeshquery = Global.MMapMgr.GetNavMeshQuery(terrainMapId, handler.GetPlayer().GetInstanceId()); if (navmesh == null || navmeshquery == null) { handler.SendSysMessage("NavMesh not loaded for current map."); return(true); } handler.SendSysMessage("mmap loadedtiles:"); for (int i = 0; i < navmesh.getMaxTiles(); ++i) { Detour.dtMeshTile tile = navmesh.getTile(i); if (tile.header == null) { continue; } handler.SendSysMessage("[{0:D2}, {1:D2}]", tile.header.x, tile.header.y); } return(true); }
static bool HandleCharacterRenameCommand(StringArguments args, CommandHandler handler) { Player target; ObjectGuid targetGuid; string targetName; if (!handler.ExtractPlayerTarget(args, out target, out targetGuid, out targetName)) { return(false); } string newNameStr = args.NextString(); if (!string.IsNullOrEmpty(newNameStr)) { string playerOldName; string newName = newNameStr; if (target) { // check online security if (handler.HasLowerSecurity(target, ObjectGuid.Empty)) { return(false); } playerOldName = target.GetName(); } else { // check offline security if (handler.HasLowerSecurity(null, targetGuid)) { return(false); } Global.CharacterCacheStorage.GetCharacterNameByGuid(targetGuid, out playerOldName); } if (!ObjectManager.NormalizePlayerName(ref newName)) { handler.SendSysMessage(CypherStrings.BadValue); return(false); } if (ObjectManager.CheckPlayerName(newName, target ? target.GetSession().GetSessionDbcLocale() : Global.WorldMgr.GetDefaultDbcLocale(), true) != ResponseCodes.CharNameSuccess) { handler.SendSysMessage(CypherStrings.BadValue); return(false); } WorldSession session = handler.GetSession(); if (session != null) { if (!session.HasPermission(RBACPermissions.SkipCheckCharacterCreationReservedname) && Global.ObjectMgr.IsReservedName(newName)) { handler.SendSysMessage(CypherStrings.ReservedName); return(false); } } PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.SEL_CHECK_NAME); stmt.AddValue(0, newName); SQLResult result = DB.Characters.Query(stmt); if (!result.IsEmpty()) { handler.SendSysMessage(CypherStrings.RenamePlayerAlreadyExists, newName); return(false); } // Remove declined name from db stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_CHAR_DECLINED_NAME); stmt.AddValue(0, targetGuid.GetCounter()); DB.Characters.Execute(stmt); if (target) { target.SetName(newName); session = target.GetSession(); if (session != null) { session.KickPlayer(); } } else { stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_NAME_BY_GUID); stmt.AddValue(0, newName); stmt.AddValue(1, targetGuid.GetCounter()); DB.Characters.Execute(stmt); } Global.CharacterCacheStorage.UpdateCharacterData(targetGuid, newName); handler.SendSysMessage(CypherStrings.RenamePlayerWithNewName, playerOldName, newName); Player player = handler.GetPlayer(); if (player) { Log.outCommand(session.GetAccountId(), "GM {0} (Account: {1}) forced rename {2} to player {3} (Account: {4})", player.GetName(), session.GetAccountId(), newName, playerOldName, Global.CharacterCacheStorage.GetCharacterAccountIdByGuid(targetGuid)); } else { Log.outCommand(0, "CONSOLE forced rename '{0}' to '{1}' ({2})", playerOldName, newName, targetGuid.ToString()); } } else { if (target) { // check online security if (handler.HasLowerSecurity(target, ObjectGuid.Empty)) { return(false); } handler.SendSysMessage(CypherStrings.RenamePlayer, handler.GetNameLink(target)); target.SetAtLoginFlag(AtLoginFlags.Rename); } else { // check offline security if (handler.HasLowerSecurity(null, targetGuid)) { return(false); } string oldNameLink = handler.PlayerLink(targetName); handler.SendSysMessage(CypherStrings.RenamePlayerGuid, oldNameLink, targetGuid.ToString()); PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_ADD_AT_LOGIN_FLAG); stmt.AddValue(0, AtLoginFlags.Rename); stmt.AddValue(1, targetGuid.GetCounter()); DB.Characters.Execute(stmt); } } return(true); }
static bool HandleGameObjectAddCommand(StringArguments args, CommandHandler handler) { if (args.Empty()) { return(false); } // number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r string idStr = handler.extractKeyFromLink(args, "Hgameobject_entry"); if (string.IsNullOrEmpty(idStr)) { return(false); } if (!uint.TryParse(idStr, out uint objectId) || objectId == 0) { return(false); } uint spawntimeSecs = args.NextUInt32(); GameObjectTemplate objectInfo = Global.ObjectMgr.GetGameObjectTemplate(objectId); if (objectInfo == null) { handler.SendSysMessage(CypherStrings.GameobjectNotExist, objectId); return(false); } if (objectInfo.displayId != 0 && !CliDB.GameObjectDisplayInfoStorage.ContainsKey(objectInfo.displayId)) { // report to DB errors log as in loading case Log.outError(LogFilter.Sql, "Gameobject (Entry {0} GoType: {1}) have invalid displayId ({2}), not spawned.", objectId, objectInfo.type, objectInfo.displayId); handler.SendSysMessage(CypherStrings.GameobjectHaveInvalidData, objectId); return(false); } Player player = handler.GetPlayer(); Map map = player.GetMap(); GameObject obj = GameObject.CreateGameObject(objectInfo.entry, map, player, Quaternion.fromEulerAnglesZYX(player.GetOrientation(), 0.0f, 0.0f), 255, GameObjectState.Ready); if (!obj) { return(false); } PhasingHandler.InheritPhaseShift(obj, player); if (spawntimeSecs != 0) { obj.SetRespawnTime((int)spawntimeSecs); } // fill the gameobject data and save to the db obj.SaveToDB(map.GetId(), new List <Difficulty>() { map.GetDifficultyID() }); ulong spawnId = obj.GetSpawnId(); // this will generate a new guid if the object is in an instance obj = GameObject.CreateGameObjectFromDB(spawnId, map); if (!obj) { return(false); } // TODO: is it really necessary to add both the real and DB table guid here ? Global.ObjectMgr.AddGameObjectToGrid(spawnId, Global.ObjectMgr.GetGOData(spawnId)); handler.SendSysMessage(CypherStrings.GameobjectAdd, objectId, objectInfo.name, spawnId, player.GetPositionX(), player.GetPositionY(), player.GetPositionZ()); return(true); }
static bool HandleGameObjectTurnCommand(StringArguments args, CommandHandler handler) { // number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r string id = handler.extractKeyFromLink(args, "Hgameobject"); if (string.IsNullOrEmpty(id)) { return(false); } if (!ulong.TryParse(id, out ulong guidLow) || guidLow == 0) { return(false); } GameObject obj = handler.GetObjectFromPlayerMapByDbGuid(guidLow); if (!obj) { handler.SendSysMessage(CypherStrings.CommandObjnotfound, guidLow); return(false); } string orientation = args.NextString(); float oz = 0.0f, oy = 0.0f, ox = 0.0f; if (!orientation.IsEmpty()) { if (!float.TryParse(orientation, out oz)) { return(false); } orientation = args.NextString(); if (!orientation.IsEmpty()) { if (!float.TryParse(orientation, out oy)) { return(false); } orientation = args.NextString(); if (!orientation.IsEmpty()) { if (!float.TryParse(orientation, out ox)) { return(false); } } } } else { Player player = handler.GetPlayer(); oz = player.GetOrientation(); } Map map = obj.GetMap(); obj.Relocate(obj.GetPositionX(), obj.GetPositionY(), obj.GetPositionZ()); obj.SetWorldRotationAngles(oz, oy, ox); obj.SaveToDB(); // Generate a completely new spawn with new guid // client caches recently deleted objects and brings them back to life // when CreateObject block for this guid is received again // however it entirely skips parsing that block and only uses already known location obj.Delete(); obj = GameObject.CreateGameObjectFromDB(guidLow, map); if (!obj) { return(false); } handler.SendSysMessage(CypherStrings.CommandTurnobjmessage, obj.GetSpawnId(), obj.GetGoInfo().name, obj.GetGUID().ToString(), obj.GetOrientation()); return(true); }
static bool HandleGameObjectTurnCommand(StringArguments args, CommandHandler handler) { // number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r string id = handler.extractKeyFromLink(args, "Hgameobject"); if (string.IsNullOrEmpty(id)) { return(false); } if (!ulong.TryParse(id, out ulong guidLow) || guidLow == 0) { return(false); } GameObject obj = handler.GetObjectFromPlayerMapByDbGuid(guidLow); if (!obj) { handler.SendSysMessage(CypherStrings.CommandObjnotfound, guidLow); return(false); } string orientation = args.NextString(); float oz = 0.0f, oy = 0.0f, ox = 0.0f; if (!orientation.IsEmpty()) { if (!float.TryParse(orientation, out oz)) { return(false); } orientation = args.NextString(); if (!orientation.IsEmpty()) { if (!float.TryParse(orientation, out oy)) { return(false); } orientation = args.NextString(); if (!orientation.IsEmpty()) { if (!float.TryParse(orientation, out ox)) { return(false); } } } } else { Player player = handler.GetPlayer(); oz = player.GetOrientation(); } obj.Relocate(obj.GetPositionX(), obj.GetPositionY(), obj.GetPositionZ()); obj.RelocateStationaryPosition(obj.GetPositionX(), obj.GetPositionY(), obj.GetPositionZ(), obj.GetOrientation()); obj.SetWorldRotationAngles(oz, oy, ox); obj.DestroyForNearbyPlayers(); obj.UpdateObjectVisibility(); obj.SaveToDB(); handler.SendSysMessage(CypherStrings.CommandTurnobjmessage, obj.GetSpawnId(), obj.GetGoInfo().name, obj.GetGUID().ToString(), obj.GetOrientation()); return(true); }
static bool LocCommand(StringArguments args, CommandHandler handler) { handler.SendSysMessage("mmap tileloc:"); // grid tile location Player player = handler.GetPlayer(); int gx = (int)(32 - player.GetPositionX() / MapConst.SizeofGrids); int gy = (int)(32 - player.GetPositionY() / MapConst.SizeofGrids); float x, y, z; player.GetPosition(out x, out y, out z); handler.SendSysMessage("{0:D4}{1:D2}{2:D2}.mmtile", player.GetMapId(), gy, gx); handler.SendSysMessage("gridloc [{0}, {1}]", gx, gy); // calculate navmesh tile location uint terrainMapId = PhasingHandler.GetTerrainMapId(player.GetPhaseShift(), player.GetMap(), x, y); Detour.dtNavMesh navmesh = Global.MMapMgr.GetNavMesh(terrainMapId); Detour.dtNavMeshQuery navmeshquery = Global.MMapMgr.GetNavMeshQuery(terrainMapId, player.GetInstanceId()); if (navmesh == null || navmeshquery == null) { handler.SendSysMessage("NavMesh not loaded for current map."); return(true); } float[] min = navmesh.getParams().orig; float[] location = { y, z, x }; float[] extents = { 3.0f, 5.0f, 3.0f }; int tilex = (int)((y - min[0]) / MapConst.SizeofGrids); int tiley = (int)((x - min[2]) / MapConst.SizeofGrids); handler.SendSysMessage("Calc [{0:D2}, {1:D2}]", tilex, tiley); // navmesh poly . navmesh tile location Detour.dtQueryFilter filter = new Detour.dtQueryFilter(); float[] nothing = new float[3]; ulong polyRef = 0; if (Detour.dtStatusFailed(navmeshquery.findNearestPoly(location, extents, filter, ref polyRef, ref nothing))) { handler.SendSysMessage("Dt [??,??] (invalid poly, probably no tile loaded)"); return(true); } if (polyRef == 0) { handler.SendSysMessage("Dt [??, ??] (invalid poly, probably no tile loaded)"); } else { Detour.dtMeshTile tile = new Detour.dtMeshTile(); Detour.dtPoly poly = new Detour.dtPoly(); if (Detour.dtStatusSucceed(navmesh.getTileAndPolyByRef(polyRef, ref tile, ref poly))) { if (tile != null) { handler.SendSysMessage("Dt [{0:D2},{1:D2}]", tile.header.x, tile.header.y); return(false); } } handler.SendSysMessage("Dt [??,??] (no tile loaded)"); } return(true); }
static bool PathCommand(StringArguments args, CommandHandler handler) { if (Global.MMapMgr.GetNavMesh(handler.GetPlayer().GetMapId()) == null) { handler.SendSysMessage("NavMesh not loaded for current map."); return(true); } handler.SendSysMessage("mmap path:"); // units Player player = handler.GetPlayer(); Unit target = handler.getSelectedUnit(); if (player == null || target == null) { handler.SendSysMessage("Invalid target/source selection."); return(true); } string para = args.NextString(); bool useStraightPath = false; if (para.Equals("true")) { useStraightPath = true; } bool useStraightLine = false; if (para.Equals("line")) { useStraightLine = true; } // unit locations float x, y, z; player.GetPosition(out x, out y, out z); // path PathGenerator path = new PathGenerator(target); path.SetUseStraightPath(useStraightPath); bool result = path.CalculatePath(x, y, z, false, useStraightLine); var pointPath = path.GetPath(); handler.SendSysMessage("{0}'s path to {1}:", target.GetName(), player.GetName()); handler.SendSysMessage("Building: {0}", useStraightPath ? "StraightPath" : useStraightLine ? "Raycast" : "SmoothPath"); handler.SendSysMessage("Result: {0} - Length: {1} - Type: {2}", (result ? "true" : "false"), pointPath.Length, path.GetPathType()); var start = path.GetStartPosition(); var end = path.GetEndPosition(); var actualEnd = path.GetActualEndPosition(); handler.SendSysMessage("StartPosition ({0:F3}, {1:F3}, {2:F3})", start.X, start.Y, start.Z); handler.SendSysMessage("EndPosition ({0:F3}, {1:F3}, {2:F3})", end.X, end.Y, end.Z); handler.SendSysMessage("ActualEndPosition ({0:F3}, {1:F3}, {2:F3})", actualEnd.X, actualEnd.Y, actualEnd.Z); if (!player.IsGameMaster()) { handler.SendSysMessage("Enable GM mode to see the path points."); } for (uint i = 0; i < pointPath.Length; ++i) { player.SummonCreature(1, pointPath[i].X, pointPath[i].Y, pointPath[i].Z, 0, TempSummonType.TimedDespawn, 9000); } return(true); }