Moderator: MacroQuest Developers

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
/returnCode: 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
