Feat Req. $target(direction)

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

User avatar
Kint
a hill giant
a hill giant
Posts: 208
Joined: Thu Mar 13, 2003 3:36 am

Feat Req. $target(direction)

Post by Kint » Sat Nov 08, 2003 10:32 pm

would like to have this CVS'd. it'll return a direction like NWN, E, etc. when $target(direction) is used. This would be wonderfull for the new UI labels. I would love having the direction of your target in whatever.

Code: Select all

     // $target(direction)	
    } else if (!strncmp("target(direction)",szVar,17)) {
        i+=16;
		CHAR szTemp[MAX_STRING] = {0};
		INT Angle = (INT)((atan2f(pChar->X - pTarget->X, pChar->Y - pTarget->Y) * 180.0f / PI + 360.0f) / 22.5f + 0.5f) % 16;
		sprintf(szTemp,szHeadingShort[Angle]);
        strcat(szOutput,szTemp);
	        }
Last edited by Kint on Tue Nov 11, 2003 3:42 am, edited 1 time in total.

Teh_ish
UI Guru
Posts: 168
Joined: Wed Nov 05, 2003 12:18 am

Post by Teh_ish » Sat Nov 08, 2003 11:31 pm

Great work. Might wanna edit this to not be a feature req but a feature addition :)
OMGWTFBBQ

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Sat Nov 08, 2003 11:37 pm

Doesn't quite work... it's missing a check:

Code: Select all

     // $target(direction)    
    } else if (!strncmp("target(direction)",szVar,17)) { 
        i+=16; 
[color=red]        if (!pTarget) {
            strcat(szOutput,"NULL");
        } else {[/color]
      CHAR szTemp[MAX_STRING] = {0}; 
      INT Angle = (INT)((atan2f(pChar->X - pTarget->X, pChar->Y - pTarget->Y) * 180.0f / PI + 360.0f) / 22.5f + 0.5f) % 16; 
      sprintf(szTemp,szHeadingShort[Angle]); 
        strcat(szOutput,szTemp); 
           }
- Plazmic

User avatar
Kint
a hill giant
a hill giant
Posts: 208
Joined: Thu Mar 13, 2003 3:36 am

Post by Kint » Sat Nov 08, 2003 11:59 pm

aye, thought I might need that, but it already returns NULL without it if nothing is specified...

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Sun Nov 09, 2003 12:03 am

I guess it depends where in the function you put it... I put it by the distance stuff which is before the generic NULL check...
- Plazmic

User avatar
Kint
a hill giant
a hill giant
Posts: 208
Joined: Thu Mar 13, 2003 3:36 am

Post by Kint » Sun Nov 09, 2003 12:07 am

ahh

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun Nov 09, 2003 12:47 am

cvs and zip updated
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

FrankJScott
naggy
naggy
Posts: 2385
Joined: Sun Feb 19, 2023 7:11 am

Updated 322TOTO Website

Post by FrankJScott » Fri Apr 25, 2025 11:30 am

In reply to the lady asking about pusat togel online, slot permainan, main slot, withdraw slot online, judi togel online, judi slot game, web judi terpercaya, cara main slot game, situs slot terpercaya online 24 jam, game ini game ini, I highly recommend this useful 322 toto link or main slot login, pasaran togel slot, situs slot online, judi toto, deposit via pulsa, ikan gaming, permainan slot pragmatic, menang togel terbesar, situs slot online indonesia, situs online toto, as well as this right here for 322 toto url not to mention game terpercaya, togel games, pragmatic menang slot online, situs slot game terbaru, permainan judi slot yang mudah menang, situs mudah menang, macam macam situs slot online, situs togel aman, sini slot login, game slot tembak ikan, alongside all this his comment is here about 322 toto advice which is also great. Also, have a look at this go to the website for 322 toto forum together with casino slot online, resmi slot, situs deposit via pulsa, agen slot, situs deposit pulsa telkomsel, situs slot yang terpercaya, game slot termudah menang, situs slot game terbaru, website judi terpercaya, slot togel login, on top of this learn more here on 322 toto details alongside all game nolimit city, slot online slot, depo slot via pulsa, situs slot yg resmi, game slot live, additional hints on and don't forget situs online 24 jam, yang punya pragmatic play, slot via pulsa telkomsel, aplikasi togel resmi online, aplikasi judi online terpercaya, for good measure. Check more @ Best Event Transportation Guide 7_a768e