Results 1 to 3 of 3

Threaded View

  1. #1
    VizikYundersen's Avatar
    Join Date
    Feb 2015
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0

    Post (H1Z1) Vizik's LOCHelper

    Vizik's LOCHelper (For H1Z1)

    This tool will guide you in which direction you should be facing. Select a major city/area, enter x/z coords and try to match the heading it gives you.

    It isn't really accurate, it will give you a vague 90 degrees so there's no absolute guarantee it will give you satisfying results.
    I apologize in advance since I am a beginner but I hope this will be helpful or atleast a little interesting... or something to laugh at. Enjoy




    Code:
    //Vizik's LOCHelper
    
    #include <iostream>
    #include <string>
    using namespace std;
    
    void headingCal(int cityXCoord,int cityYCoord);
    void area(char menuOption);
    
    
    void headingCal(int cityXCoord,int cityYCoord)
    {
    	int xCoord;
    	int yCoord;
    	string SN;// Will be set to North or South and will output
    	string EW;
    	string snHeading; //Gives the proper heading for North/South
    	string ewHeading;
    	cout << "Enter your x: ";
    	cin >> xCoord;
    	cout << "Enter your z; ";
    	cin >> yCoord;
    	if (xCoord >= cityXCoord){
    		SN = "South";
    		snHeading = "-1.5";
    	}
    	else if (xCoord <= cityXCoord){
    		SN = "North";
    		snHeading = "1.5";
    	}
    	if (yCoord >= cityYCoord){
    		EW = "East";
    		ewHeading = "0.0";
    	}
    	else if (yCoord <= cityYCoord){
    		EW = "West";
    		ewHeading = "-3.1";
    	}
    	cout << "Head " << SN << " " << EW << "." << endl;
    	cout << "Your heading should be between " << snHeading << " and " << ewHeading << "." << endl;
    }
    
    void area(char menuOption)
    {
    	int xCoord [5] = {0, 1000, -900, -1900, -1300};
    	int yCoord [5] = {-1000, 2700, 2700, -2200, 1700};
    	switch (menuOption) {
    	
    	case 'P':
    	cout << "PleasantValley:" << endl;
    	headingCal(xCoord[1], yCoord[1]);	
    	break;
    	
    	case 'V':
    	cout << "VillasDevelopment:" << endl;
    	headingCal(xCoord[2], yCoord[2]);	
    	break;
    
    	case 'L':
    	cout << "LonePineDevelopment:" << endl;
    	headingCal(xCoord[3], yCoord[3]);	
    	break;
    
    	case 'H':
    	cout << "HerringTruckStop:" << endl;
    	headingCal(xCoord[4], yCoord[4]);	
    	break;
    
    	case 'T':
    	cout << "Tamatama" << endl;
    	headingCal(xCoord[5], yCoord[5]);
    	break;
    	}
    }
    
    int main()
    {
    	cout << "Vizik's LOCHelper" << endl << endl;
    	bool menuRun = true;
    	
    	cout << "_________[Menu]________" << endl;
    	cout << "|[P]easantValley       |" << endl;
    	cout << "|[V]illasDevelopment   |" << endl;
    	cout << "|[L]onePineDevelopment |" << endl;
    	cout << "|[H]erringTruckstop    |" << endl;
    	cout << "|[T]amatama(Cranberry) |" << endl;
    	cout << "|[E]xit                |" << endl;
    	cout << "|______________________|" << endl;
    	
    	while (menuRun == true){
    	char menuOption;
    	cin >> menuOption; //Takes user's input
    	menuOption = toupper(menuOption);//Sets char to uppercase 
    	
    	if (menuOption == 'E') //If user enters e or E the program will stop
    	{
    		menuRun = false;
    	
    	}
    	area(menuOption);
    	
    }
    	return 0;
    }
    Last edited by VizikYundersen; 02-02-2015 at 07:33 PM.

Similar Threads

  1. [Info] Status of H1Z1
    By TheFlyingDutchman' in forum H1Z1 Hacks & Cheats
    Replies: 58
    Last Post: 03-08-2020, 05:13 PM
  2. h1z1 vs dayz
    By 2Skillz4You in forum General
    Replies: 10
    Last Post: 07-25-2014, 09:18 PM
  3. New Game : H1Z1! SOE Game! 1000 Player+ Servers!
    By Rance-Llama in forum General Gaming
    Replies: 0
    Last Post: 04-19-2014, 10:54 PM
  4. H1Z1 hype!
    By Polygon in forum General
    Replies: 14
    Last Post: 04-19-2014, 03:10 PM