Attacking in groups...

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Iceassassin
a lesser mummy
a lesser mummy
Posts: 49
Joined: Tue Nov 05, 2002 11:40 am

Attacking in groups...

Post by Iceassassin » Sun Nov 10, 2002 9:28 pm

I was thinking of creating a macro which would let me go afk in a group... The macro would do a radius thing, and I would kill anything within a certain radius of my group. Is this possible? Would there be any way to assist only my group members? BTW.. I'm a warrior

-Mqz-
orc pawn
orc pawn
Posts: 10
Joined: Thu Oct 17, 2002 1:29 am

Post by -Mqz- » Mon Nov 11, 2002 7:18 am

Sure mister Iceassassin - the warrior...
It is possible to make a script that makes you check if anything moves close to your group, can even check if your team mates gets hit, could actualy automaticaly use /shield <friendlymage> if he got hit, even check the names on your team and only assist and help them..

But uhhh.. You shouldnt have said, quote: "which would let me go afk in a group", you just dont run macros while your afk, you want to know why, because its dumb :)
The script aint that hard to write, and if you want to go afk while running it, I for one would strongly prefere to write it myself ("Don't go afk and thrust a script ya havn't made yourself", thats what my momma always said, when I was little) 8)
Your just jalous because the voices are talking to me.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Mon Nov 11, 2002 1:21 pm

Salutatations,
There is a group Monk and group Rogue macro i wrote a while back... I'll post it later (when i have access to it) for you to read over...

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Mon Nov 11, 2002 7:29 pm

Salutations,
This backstab macro, you just hit the hotkey to start it with the argument of the person to assist...

Code: Select all

sub bsattack
 /stand
 /assist $p0
 /varset a(0,0) $target(id)
 /varset a(0,1) 1
 :loop
  /if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>5 /call gotopoint
  /face
  /if n $a(0,1)==1 {
   /varset a(0,1) 0
   /attack off
   /doability 7
   /doability 1
   /attack on
   /varset t0 10s
  }
  /if n $t0==0 {
   /attack off
   /doability 7
   /doability 1
   /attack on
  }
  /if $combat==FALSE {
   /call sitdown
   /return
  }
  /if $target()==FALSE {
   /call sitdown
   /return
  }
 /goto :loop
/return

sub gotopoint
 /sendkey down up
 :gotopointloop
  /if $combat==FALSE {
   /call sitdown
   /return
  }
  /if $target()==FALSE {
   /call sitdown
   /return
  }
  /face fast loc $calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10)
  /doevents
  /if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>5 /goto :gotopointloop
 /sendkey up up
/return

sub sitdown
 /attack off
 /face loc -6551.89,1332.45
 /sendkey down up
 :sitdownloop
  /face fast loc -6551.89,1332.45
  /doevents
  /if n $distance(-6551.89,1332.45)>3 /goto :sitdownloop
  /sendkey up up
 /face loc -6551.83,1312.45
 /sit
/return
With this one, it works automagickly :p

Code: Select all

| monkgroup.mac
| Assists, goes to a safe place to sit and faces the camp... pretty simple
| syntax: /macro monkgroup.mac <persontoassist> <safeloc> <camploc> [corpsesubstring]
|  persontoassist - A PC which the macro will assist in fighting
|  safeloc - The place away from the camp where it is safe to sit down and rest
|  camploc - When sitting down, you want to face the camp that way it actually looks
|   like your there...
|  corpsesubstring - If this is contained in the corpses name, loot it, if its not, don't
| ----------------------------------------------------------------------------------
|  Written by: L124RD

#include routines.mac

sub main
/mqlog monkgroup.mac starting...
/varset v4 $char(level)
/varset v0 0
:grouploop
  /if n $char(level)>$v70 /call ding
  /if n $hp(pct)<50 /goto :resting
  /assist $q0
  /if "$target()"!="FALSE" /if "$target(type)"=="NPC" /call AttackAndFollow
  /if "$target()"!="FALSE" /if "$target(type)"!="NPC" /goto :corpseloot
  /if "$target()"=="FALSE" /goto :corpseloot
  /goto :grouploop

:corpseloot
 /target corpse $q3
 /if "$target()"!="FALSE" /call autoloot
 /if "$target()"=="FALSE" /goto :resting
 /goto :grouploop

:resting
  /sendkey down up
:restloop
  /if n $v0==0 /face loc $q1
  /if $distance($q1)<5 /goto :restloop

  /sendkey up up
  /delay 2
  /face loc $q2
  /delay 2

  /if n $v0==0 /sit
  /if n $v0==0 /varset v0 1
  /if n $v0==0 /mqlog resting...
  /goto :grouploop

/return

Sub AttackAndFollow
/mqlog Fighting $target(name). It is level $target(level).
/varset s0 $target(name)
/varset v3 $target(id)
/stand
/delay 3
/face
/sendkey down up
/attack on
:CloserAF
  /if "$target(id)"!="$v3" /goto :EndAF
  /if n $target(distance)>20 /sendkey down up
  /if n $target(distance)<11 /sendkey down down
  /if n $target(distance)<21 /sendkey up up
  /if n $target(distance)>10 /sendkey up down
  /doability 9
  /doability 8
  /doability 7
  /face
  /goto :CloserAF

:EndAF
  /mqlog $s0 is dead
  /sendkey up up
  /attack off
  /varset v0 0

/return

Sub AutoLoot
   /if $target(distance)<75 /goto :continue
   /stand
   /mqlog Looting $taget(name)
   /face
   /if n $target(distance)<15 /goto :CloseEnough
   /call AutoRun 1
   /varset t0 3m
   :CloserAL
      /face
   /if n $target(distance)>14 /if n $t0>0 /goto :CloserAL

   :CloseEnough
   /call AutoRun 0
   /loot
   /Delay 10
   /for v10 0 to 9
      /Delay 5
      /click left corpse $v10
      /Delay 10
      /if "$cursor(name)"=="NULL" /goto :continue
      /if "$target(name)"~~$char(name) /click left auto
      /if n $cursor(weight)>5 /click left destroy
      /if n $cursor(value)<10 /click left destroy
      /mqlog looting $curosr(name). it has a value of $cursor(value).
      /if n $cursor(value)>9 /click left auto
      /delay 4
      /delay $rand(5)
   /next v10
   :continue
   /delay 5
   /delay $rand(5)
   /press esc
/return

sub ding
/varset v70 $char(level)
/groupsay Ding, level $char(level)!
/return

Iceassassin
a lesser mummy
a lesser mummy
Posts: 49
Joined: Tue Nov 05, 2002 11:40 am

How do I work it?

Post by Iceassassin » Tue Nov 12, 2002 4:12 pm

Li2ard how do i work this thing? What do I have to input?

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Tue Nov 12, 2002 7:31 pm

Salutations,
backstab macro you need the person you wish to assist. for the other one it is described at the top...

Iceassassin
a lesser mummy
a lesser mummy
Posts: 49
Joined: Tue Nov 05, 2002 11:40 am

So I edit these?

Post by Iceassassin » Tue Nov 12, 2002 9:05 pm

So I edit these?

| persontoassist - A PC which the macro will assist in fighting
| safeloc - The place away from the camp where it is safe to sit down and rest
| camploc - When sitting down, you want to face the camp that way it actually looks

| corpsesubstring - If this is contained in the corpses name, loot it, if its not, don't

I tried editing yours to make it so i wasn't TOTALLY copying.. But it got so messed up.. lol

Do I add the things inside the parentheses?
EX: loc (500,200)

Thanks a lot li22y