NM Waypoint Sharer

//---------------------Process Give/Receive Lists---------------------
	print("Start sharing Waypoints.");

	for (i in waypointsToShare) {
		print("Current waypointsToShare element: " + i);

		while (waypointsToReceive.length) {
			print("waypointsToReceive: " + waypointsToReceive[0]);

			if (Number(i) < waypointsToReceive[0]) { // Convert waypointsToShare element to a number (it is a string at this point) and compare it to the number in waypointsToReceive[0].
				break; // Exit while loop because we need to share a Waypoint before receiving this one (waypointsToShare element is a lower waypointAreas index than the lowest waypointAreas index in the waypointsToReceive array).
			}

			this.receiveWaypoint(waypointsToReceive.shift()); // Cut the lowest waypointAreas index from the waypointsToReceive array.
		}

		if (!me.findItem(518)) { // No Tome of Town Portal.
			if (me.area !== 1) {
				Pather.useWaypoint(1);
			}

			Town.move(NPC.Akara);

			var akara = getUnit(1, NPC.Akara);

			if (akara) {
				akara.startTrade();

				var scroll = akara.getItem(529);

				scroll.buy(); // Buy Scroll of Town Portal from Akara.

				me.cancel();
			}
		}

		Pather.useWaypoint(waypointAreas[i]); // Go to the Waypoint that needs to be given to other players.

		var portal = getUnit(2, 59); // A Town Portal at this stage means someone else is already sharing the Waypoint.

		if (!portal) { // Don't share this Waypoint if someone else is already.
			var player,
				playerList = waypointsToShare[i],
				finishedPlayerCount = Config.AutoSmurf.TeamSize - playerList.length;

			print("Sharing a Waypoint in area: " + waypointAreas[i]);

			print("playerList.length: " + playerList.length + " finishedPlayerCount: " + finishedPlayerCount);

			if (me.findItem(518)) {
				Pather.makePortal(); // SiC-666 TODO: Buy more scrolls if needed. Pather will throw an error if there are no scrolls in Tomb.
			} else {
				scroll = me.findItem(529);

				if (scroll) {
					scroll.interact(); // Use a Scroll of Town Portal.
				}
			}

			for (var j = 0 ; j <100 ; j += 1) { //Here is some wrong, it is too long time to wait. Dark-f < 720 ; j += 1) { // Wait up to 3 minutes Team Members to grab the Waypoint.
				if (playerList.length === 0) { //Dark-f: && Misc.getNearbyPlayerCount() <= finishedPlayerCount) {
					break;
				}

				delay(250);

				if (j % 20 == 0) { // Check for Team Members every 5 seconds.
					this.teamInGame();
				}

				player = getUnit(0); // Get nearby player unit.

				do {
					if (player.name !== me.name) {
						//print("player name is" + player.name);
						if (playerList.indexOf(player.name) > -1) { // Player's name is on the list of players needing this Waypoint.
							playerList.splice(playerList.indexOf(player.name), 1); // Remove player's name from the list.
						}
					}
				} while (player.getNext()); // Loop thru all nearby player units.
			}
		}
	}

	print("Done sharing Waypoints. Start receiving Waypoints.");

	print("waypointsToReceive.length: " + waypointsToReceive.length);

	while (waypointsToReceive.length) { // Receive any remaining Waypoints.
		print("waypointsToReceive: " + waypointsToReceive[0]);

		this.receiveWaypoint(waypointsToReceive.shift()); // Cut the lowest waypointAreas index from the waypointsToReceive array.
	}

	if (me.area !== whereIwas) { // Did share/receive something.
		Pather.useWaypoint(whereIwas); // All done sharing/receiving! Return to original town.

		delay(5000); // Allow the Waypointer Giver a moment to come back to Town.
	}

	print("Done receiving Waypoints.");
//---------------------End Waypoint Sharing---------------------

Trying to figure out in NIGHTMARE I do not want it to share waypoints, It creates a ton of bugs and would like to just comment out the part where it tries to share waypoints. Having difficulties figuring out what I should do.

DUE to it being such an issue, Even if modifying the script as it gets to nightmare is a consideration. ( I assume I would just delete all of this information from the script?)