if target rang

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

jcooler
a ghoul
a ghoul
Posts: 87
Joined: Wed Dec 31, 2003 7:38 pm

if target rang

Post by jcooler » Sun Sep 05, 2004 2:32 pm

whats the way to do

if target in rang of 30

Sparr
a hill giant
a hill giant
Posts: 159
Joined: Mon Jun 24, 2002 5:41 am

Post by Sparr » Sun Sep 05, 2004 2:41 pm

it starts with a R
and ends with a TFM
[img]http://www.trifocus.net/~sparr/sparr_rotate_sig_16.gif[/img]

jcooler
a ghoul
a ghoul
Posts: 87
Joined: Wed Dec 31, 2003 7:38 pm

Post by jcooler » Sun Sep 05, 2004 11:35 pm

but i wanna target the closest PC thats not myself

so i got

/target ID ${NearestSpawn[2, pc].ID}

just wondering how to turn that into an iff statement where i target someone within a raidus of 30 thats not myself

hiipii
a ghoul
a ghoul
Posts: 93
Joined: Sat Jun 19, 2004 5:01 pm

Post by hiipii » Mon Sep 06, 2004 12:00 am

Code: Select all

/if (${Target.Distance}<=30) {
|-Whatever here-|
   }

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Mon Sep 06, 2004 12:19 am

jcooler wrote:but i wanna target the closest PC thats not myself

so i got

/target ID ${NearestSpawn[2, pc].ID}

just wondering how to turn that into an iff statement where i target someone within a raidus of 30 thats not myself

Code: Select all

/target pc id ${Me.NearestSpawn[2,pc radius 30].ID}

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Mon Sep 06, 2004 2:19 am

if target rang, say hello!

jcooler
a ghoul
a ghoul
Posts: 87
Joined: Wed Dec 31, 2003 7:38 pm

Post by jcooler » Mon Sep 06, 2004 1:25 pm

hehe is there a way to target the person who HAILs you ?

TheAFKBard
a ghoul
a ghoul
Posts: 133
Joined: Tue Dec 30, 2003 9:48 pm

Post by TheAFKBard » Mon Sep 06, 2004 2:00 pm

/tar npc radius 30
Use a blech event to target someone who hails you. RTFM

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Mon Sep 06, 2004 4:21 pm

TheAFKBard wrote:/tar npc radius 30
Use a blech event to target someone who hails you. RTFM
heh, you say RTFM, and can't even read his request:
but i wanna target the closest PC thats not myself

jcooler
a ghoul
a ghoul
Posts: 87
Joined: Wed Dec 31, 2003 7:38 pm

Post by jcooler » Mon Sep 06, 2004 4:53 pm

Code: Select all

#include spell_routines.inc
#chat say 

#event nomanna "#*#Insufficient Mana to cast this spell!#*#"



Sub Main 
:loop
/doevents
/goto :loop
/return





Sub Event_Chat[(ChatType,[b]Sender[/b],ChatText)]  
/if (${String.Equal[Hail, *myname here*]}) /call target
/return

Sub Target
/target pc ?????
/delay1
/cast "blah blah blah"

how do i target the SENDER =)

[/b]