Humman bard pl? [Request Fulfilled]

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

nikeman
a lesser mummy
a lesser mummy
Posts: 70
Joined: Tue Jun 18, 2002 10:37 am

Humman bard pl? [Request Fulfilled]

Post by nikeman » Thu Sep 12, 2002 7:20 am

anyone got a marco for eather freeport bards. like self runing type i understand the risks of going afk with a marco runing. what i would like it to do is kill stuff in the newbe zone loot all when bags full go sell to a vendor and i am not sure if this is posable but mem spells each ding and use them bah bah bah so on and so on. this is a not a project for the week thats why am askin for it =)

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Thu Sep 12, 2002 10:28 am

rememeber, this is not a problem for the *week*

sigh.

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Thu Sep 12, 2002 11:36 am

I think RW actually meant "weak"


Mag

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Thu Sep 12, 2002 4:39 pm

understood :)

User avatar
RPZip
a lesser mummy
a lesser mummy
Posts: 63
Joined: Sun Aug 11, 2002 11:31 pm

Post by RPZip » Fri Sep 13, 2002 10:45 am

Erm... modify newlevel.mac, which comes with MQ. It currently doesn't support looting, but it'll level ya.

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Fri Sep 13, 2002 12:19 pm

I actually did mods for newlevel.mac to allow it to semi-intelligently loot, and do some combat skills (plug beg and sense heading) while in combat... not fully tested yet, but most of it should work...

Code: Select all

| - NewLevel.mac -
| Semi-intelligent lowbie melee leveling macro for the newbie areas
|
| Modified by Valerian to include looting and an alert list for "guard" types.
|
| 1. Selects the closest target
| 2. Chases it around swinging (flee to guards if under 30% HP)
| 3. If <50% HP, run to nearest guard
| 4. If mob is killed in combat, attempt to target it's corpse and loot it.
| 5. Sit until >80% HP
| Repeat...
|
| OPTIONAL: 2 parms to determine what level mobs you wish to fight.
|
| NOTE: Included event to stop the macro when you zone, but it's not always
|       triggered _before_ you zone. Still, any measure of safety from the
|       zone-with-macro-running-and-lose-everything-bug is good.
|
#include routines.mac
#event attacked YOU for
#event loading "LOADING"
#define inbattle v40
#define resting v41

Sub Main
   /if n $p0>0 /if n $p1>0 {
      /varset v91 $p0
      /varset v92 $p1
   }
   /varset v93 0
   /varset v80 0
   /alert clear 1
   /alert add 1 wolf
   /alert add 1 bear
   /alert add 1 cat
   /alert add 1 lion
   /alert add 1 snake
   /alert add 1 goblin
   /alert add 1 bat
   /alert add 1 spider
   /alert add 1 scarab
   /alert add 1 skeleton
   /alert add 1 skunk
   /alert add 1 rat
|   /alert add 1 bandit
   /alert add 1 wasp
   /alert add 1 orc
   /alert add 1 pawn
   /alert clear 9
   /alert add 9 guard
   /alert add 9 bouncer

   :Autokill
      /stand
      /call SelectTarget
      /if "$target()"=="FALSE" /goto :WaitASec
      /if "$target(type)"=="NPC" /call AttackAndFollow
      :WaitASec
      /call Rest
   /goto :AutoKill
/return


Sub SelectTarget
   /press esc
   /for v81 1 to 5
      /if "$target()"=="TRUE" /return
      /delay 5
      /doevents
   /next v81
   /if n v91>0 /if n v91>0 {
      /varset v11 $v91
      /varset v12 $v92
   } /else {
      /varcalc v11 $char(level)*2/3-1
      /varcalc v12 $char(level)*7/10+1
   }
   /echo Attempting to target mob from level $v11 to $v12
   /target npc range $v11 $v12 alert 1 nopcnear 100
/return

Sub AttackAndFollow
   /varset inbattle 1
   /varset v90 $target(id)
   /echo Going after $target(name) -- Lvl $target(level)...
   /face nopredict fast
   /attack on
   /varset t0 5m
   :CloserAF
      /if "$target(id)"!="$v90" /goto :EndAF
      /if n $target(distance)>14 /call AutoRun 1
      /if n $target(distance)<16 /call AutoRun 0
      /if n $target(distance)<5 /call AutoRun 0
      /if n $target(distance)<5 /call BackPedal 1
      /if n $target(distance)>6 /if n $target(distance)<15 {
         /call AutoRun 0
         /call BackPedal 0
      }
      /if n $t0==0 /press esc
      /if n $char(hp,pct)<30 /press esc
      /face nopredict fast
      /doevents
      /if n $target(level)>$v12 /if "$target(type)=="NPC" {
         /echo Attacking higher level NPC! Retreating...
         /attack off
         /varset v93 1
      }
      /if n $char(ability,"Bash")>0 /doability "Bash"
      /if n $char(ability,"Slam")>0 /doability "Slam"
      /if n $char(ability,"Flying Kick")>0 /doability "Flying Kick"
      /if n $char(ability,"Begging")>0 {
         /attack off
         /doability "Begging"
         /attack on
      }
      /if n $char(ability,"Bash")>0 /doability "Bash"
      /if n $char(ability,"Taunt")>0 /doability "Taunt"
      /if n $char(ability,"Sense Heading")>0 /doability "Sense Heading"
   /goto :CloserAF

   :EndAF
   /call AutoRun 0
   /call BackPedal 0
   /if $combat!="TRUE" {
      /target corpse id $v90
      /delay 1s
      /if "$target()"!="FALSE" /call autoloot
   }
   /press esc
   /attack off
   /varset inbattle 0
/return


Sub Rest
   /if n $char(hp,pct)>50 /if n $v93==0 /goto :DontMove
   /varset v93 0
   /varset resting 1
   /target npc alert 9
   /sendkey down up
   :CloserRest
      /face nopredict fast
      /doevents
   /if n $char(hp,pct)<80 /if n $target(distance)>15 /goto :CloserRest
   /sendkey up up
   /press esc
   :DontMove
   /if n $char(hp,pct)>80 /return
   /sit
   /if n $char(ability,"Sense Heading")>0 /doability "Sense Heading"
   :KeepResting
      /if "$target()"!="FALSE" /goto :doneresting
      /doevents
   /if n $char(hp,pct)<80 /goto :KeepResting
   :doneresting
   /varset resting 0
   /stand
/return

Sub Event_Death
   /mqlog You died ;(
/return

Sub Event_SkillUp
   /mqlog Your '$p0' went up: $p1
/return

Sub Event_Level
   /mqlog Ding, level $p1!
   /shout Ding, level $p1!
/return

Sub Event_attacked
   /if n $inbattle==0 /if n $resting==0 {
      /target npc $arg(1,$p0)
      /call AttackAndFollow
   }
/return

Sub Event_loading
   /endmacro
/return

sub autoloot 
   /if n $target(distance)>=75 /goto :continue 
   /stand 
   /echo Looting $target(name) 
   /face fast
   /if n $target(distance)<15 /goto :CloseEnough 
   /sendkey down up 
   /varset t0 3m 
   :CloserAL 
      /if $t0==0 /goto :continue 
      /face fast
   /if n $target(distance)>14 /if n $t0>0 /goto :CloserAL 

   :CloseEnough 
   /sendkey up up 
   /loot 
   /Delay 10 
   /varset t0 10s
   /for v10 0 to 9 
      :waitforitem0 
      /if $cursor()==true /goto :waitforitem0 
      /click left corpse $v10 
      :waitforitem1 
      /if $t0==0 /goto :continue
      /doevents
      /if $cursor()!=true /goto :waitforitem1 
      /varset t0 5s
      /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 
      /if $cursor(nodrop)==true /click left destroy
      /if $cursor()==true /echo looted $cursor(name). it has a value of $cursor(value). 
      /if n $cursor(value)>9 /click left auto 
   /next v10 
   :continue 
   /cleanup 
/return