inc.mac

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Dr. Blunderpants
orc pawn
orc pawn
Posts: 25
Joined: Fri Dec 19, 2003 5:29 pm

inc.mac

Post by Dr. Blunderpants » Sun May 02, 2004 3:54 am

Usage: /mac inc <radius> Channel <channel>
or: /mac inc <radius> Group|Raid|Say

Code: Select all

|inc.mac 
|Incoming Macro for pullers. 
|Version 1.2
|Date:04/27/2004

#turbo 40
Sub main()
/declare Index int outer
/declare Casters int outer
/declare NPCID int outer
/declare Incoming int outer
/declare ChatIn string global
/declare ChatInChannel global
/varset Index 0
/varset Incoming 1
/varset Casters 0

/if (${Defined[Param1]}) /varset ChatIn ${Param1}
/if (${Defined[Param2]}) /varset ChatInChannel ${Param2}

/call Chatout ${ChatIn}, "[${Int[${Incoming}]}] - Incoming -> [${Target.Level} ${Target.Class}] ${Target.CleanName} Cons ${Target.ConColor} <-- TARGET"


:mainloop
/varcalc Index ${Math.Calc[${Index}+1]}
/if (${String[${Target.NearestSpawn[${Index},npc radius ${Param0}].ID}].Equal[NULL]}) /goto :end
/varcalc NPCID ${Target.NearestSpawn[${Index},npc radius ${Param0}].ID}
/if (${Spawn[${NPCID}].Speed}>114.29) {
/varcalc Incoming ${Math.Calc[${Incoming}+1]}
/call ChatOut ${ChatIn}, "[${Int[${Incoming}]}] - Incoming -> [${Spawn[${NPCID}].Level} ${Spawn[${NPCID}].Class}] ${Spawn[${NPCID}].CleanName} Cons ${Spawn[${NPCID}].ConColor}"
}
/goto :mainloop


:end
/call ChatOut ${ChatIn}, "Total Incoming: ${Int[${Incoming}]} mob(s)."

/deletevar ChatIn
/deletevar ChatInChannel
/endmacro

Sub ChatOut(string ChatTarget,string ChatText)
   /if (${ChatTarget.Equal[GROUP]}) { 
      /g ${ChatText} 
      /return 
   } 
   /if (${ChatIn.Equal[tell]}) { 
      /tell ${ChatTarget} ${ChatText} 
   } else /if (${ChatIn.Equal[Group]}) { 
      /g ${ChatText} 
   } else /if (${ChatIn.Equal[Raid]}) { 
      /rs ${ChatText} 
   } else /if (${ChatIn.Equal[Say]}) { 
      /say ${ChatText} 
   } else /if (${ChatIn.Equal[Channel]}) { 
      /chat #${ChatInChannel} ${ChatText} 
   } else /if (${ChatIn.Equal[IRC]}) { 
      /irc ${ChatText} 
   } 
/return
You're ugly.

s16z
a ghoul
a ghoul
Posts: 97
Joined: Thu Apr 01, 2004 12:03 pm

Post by s16z » Sun May 02, 2004 11:13 am

Too much information in your incoming messages, good way to let everyone know you use MQ2.

TheWarden
a hill giant
a hill giant
Posts: 253
Joined: Sat Dec 27, 2003 3:51 pm
Location: In your bushes...

Post by TheWarden » Sun May 02, 2004 11:19 am

Well at least his name is right...