EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   New Commands #1 <The Heading Command> (https://www.eqemulator.org/forums/showthread.php?t=3)

Nefarious 01-16-2002 07:21 AM

New Commands #1 <The Heading Command>
 
These are some commands i have made:

#heading

Description: Gives the user a feedback with they're heading in a number format and the cardinal direction.

Code:

else if (strcasecmp(sep.arg[0], "#heading") == 0 )
{
int cHeading = heading;
char card[11];

if ( cHeading &lt; 0 )

cHeading = cHeading + 260;

if ((cHeading >= 0 &amp;&amp; cHeading &lt;= 20) || (cHeading &lt;= 260 &amp;&amp; cHeading >= 240))
strcpy(card, "North");

else if (cHeading > 20 &amp;&amp; cHeading &lt;= 40)
strcpy(card, "North West");
else if (cHeading > 40 &amp;&amp; cHeading &lt;= 80)
strcpy(card, "West");
else if (cHeading > 80 &amp;&amp; cHeading &lt;= 100)
strcpy(card, "South West");
else if (cHeading > 100 &amp;&amp; cHeading &lt;= 150)
strcpy(card, "South");
else if (cHeading > 150 &amp;&amp; cHeading &lt;= 170)
strcpy(card, "South East");
else if (cHeading > 170 &amp;&amp; cHeading &lt;= 210)
strcpy(card, "East");
else if (cHeading > 210 &amp;&amp; cHeading &lt; 240)
strcpy(card, "North East");
else if (cHeading > 260 || cHeading &lt; 0)
strcpy(card, "N/A");

Message(1, " Your current heading is: %d", cHeading);
Message(1, " Your current cardinal heading is: %s", card);
}


--------------------------------------------------

Check New Commands 2 for next one :p

Yodason 01-20-2002 10:38 AM

this is in #loc
 
this is in #loc in 0.1.9

Nefarious 01-20-2002 10:47 AM

Not the Cardinal, and i posted before 1.9 came out :)

Yodason 01-20-2002 01:18 PM

I know I am just saying something like it is in this version.


All times are GMT -4. The time now is 06:04 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.