warrior as a pet

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

Moderator: MacroQuest Developers

craspit
decaying skeleton
decaying skeleton
Posts: 3
Joined: Wed Dec 11, 2002 6:45 am

warrior as a pet

Post by craspit » Wed Dec 11, 2002 6:58 am

I am one of the people who doesn't understand programming language so I put this request up just if someone feels like it:


Purpose:
warrior recognizes a master by a name and can perform 2 easy commands.

Commands:
/tell warrior, 'attack this'
-- warrior assists the master, and attacks the mob trying to stay in range, and not too close so as to not see target.
-- continually taunt
-- continually kick
/tell warrior, 'stop attacking'
-- warrior ceases attacking.

Required extra options:
a) Recognize "has become ENRAGED"
--stop attacking stop kicking
b) Recognize "is no longer enraged"
--resume attacking
c) /tell master when he drops below points 40% life
d) Easy terminate script button on warriors computer (like escape or something)


Is that possible/plausible?? I looked around and it's all mumjo jumbo to me, but I thought this might help out for twoboxxing a melee and a healer.

waxmy
decaying skeleton
decaying skeleton
Posts: 3
Joined: Tue Oct 29, 2002 10:40 am
Location: NY

Post by waxmy » Wed Dec 11, 2002 9:04 am

There is already very good cleric/healer bots..
Instead of controlling your cleric , why not control the melee and use a helaer bot?

Look around..answers are all here..you are not gonna get one reply for questions like this

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

Post by rizwank » Wed Dec 11, 2002 11:54 am

sup buddy...

i icqed you some links..

fippy can you help him out, hes a friend... and im still knee high in mq code to worry about macro code ;p
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Wed Dec 11, 2002 12:03 pm

OK mate I'll post something asap. In fact heres a start.

Code: Select all


#define NoLOS v38 
#define TooFarAway v39
#define TargetDead v40


#event CannotSee "You cannot see your target" 
#event TooFar "Your target is too far away" 


sub main
   
   /assist $p0
   /mqlog Started melee on $target(name,clean)
   /varset TargetDead 0
   /stand
   /attack on
   :Combat 
      | Check events 
      /doevents flush 
      
      | Make sure were staring the critter out 
      /face nopredict 
      
      /if $char(ability,"Sense Heading")>0 /doability "Sense Heading" 

      | If we are too far away close in 
      /if n $target(distance)>15 { 
         /face nopredict 
         /delay 2 
         /call autorun2 1 
         /mqlog $target(distance,nopredict) from $target(name) 
      } 
        
      | If we are in melee range stop running 
      /if n $target(distance)<15 { 
         /call autorun2 0 
         /delay 2 
         /face fast nopredict 
         /mqlog In melee with $target(name) at $target(hp,pct) I am at $char(hp,pct) 
      } 
      
      /doevents 
      
      | If we cannot see the target backup and face it again. 
      /if n $NoLOS==1 { 
         /mqlog Cannot see 
         /face nopredict 
         /sendkey down down 
         /delay 4 
         /sendkey up down 
         /varset NoLOS 0 
         /delay 3 
      } 
      
      | If we are too far away close in 
      /if n $TooFarAway==1 { 
         /face nopredict 
         /delay 2 
         /call autorun2 1 
         /varset TooFarAway 0 
      } 
      
      /if $char(ability,"Kick")>0 /doability "Kick" 
      /if $char(ability,"Slam")>0 /doability "Slam" 
      /if $char(ability,"Taunt")>0 /doability "Taunt"
      /if $char(ability,"Begging")>0 {
         /attack off
         /doability "Begging"
         /attack on
      }
      /if $char(ability,"Disarm")>0 /doability "Disarm"
      
      
      | Check if target is dead or we have lost it 
      /if n $target(id)==0 /varset TargetDead 1
      /if "$target(name)"~~"corpse" /varset TargetDead 1
      
      | If target is still alive keep at it 
      /if n $TargetDead!=1 /goto :Combat 
      
      | Target is dead so stop attacking
      /attack off 
            
/return

Sub AutoRun2 
   /if $p0==1 /sendkey down up 
   /if $p0==0 /sendkey up up 
/return 


sub Event_TooFar 
   /varset TooFarAway 1 
/return 

sub Event_CannotSee 
   /varset NoLOS 1 
/return 
Dump this in your macros directory. Set up a macro button or alias with /macro kill <name of master>

Then when your master character has a mob targeted hit the macro button on your warrior pet and hell assist the master then melee the target until dead. It will also do Sense Heading, Kick, Slam, Taunt, Begging and Disarm during the fight. Begging and Disarm are great taunts btw.

Ill try and add some chat events to respond to tells later on today.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

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

Post by rizwank » Wed Dec 11, 2002 2:38 pm

fipp i just rewrote druid.mac for my wizard.mac, but you know how to do chat events soo.

btw, fippy, have i ever told you that i love you?
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]

craspit
decaying skeleton
decaying skeleton
Posts: 3
Joined: Wed Dec 11, 2002 6:45 am

Post by craspit » Sat Dec 14, 2002 4:18 am

thanks a bunch Fippy,

this is actually quite perfect, no need for the tells thingy. Both keyboards are beside each other so it's easy.

Only thing is... can the warrior know When to stop attacking because the monster is Enraged, and to resume attacking when it is not?

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Sat Dec 14, 2002 8:31 am

This should do it.

Code: Select all

#define NoLOS v38 
#define TooFarAway v39 
#define TargetDead v40
#define RealMad v41


#event CannotSee "You cannot see your target" 
#event TooFar "Your target is too far away" 
#event Enraged "has become ENRAGED"
#event Chilled "is no longer enraged"

sub main 
    
   /assist $p0 
   /mqlog Started melee on $target(name,clean) 
   /varset TargetDead 0 
   /stand  
   :Combat 
   
     /if n RealMad==1 {
        /attack off
        /goto :Combat
     }
     
     /attack on
     
     | Check events 
      /doevents flush 
      
      | Make sure were staring the critter out 
      /face nopredict 
      
      /if $char(ability,"Sense Heading")>0 /doability "Sense Heading" 

      | If we are too far away close in 
      /if n $target(distance)>15 { 
         /face nopredict 
         /delay 2 
         /call autorun2 1 
         /mqlog $target(distance,nopredict) from $target(name) 
      } 
        
      | If we are in melee range stop running 
      /if n $target(distance)<15 { 
         /call autorun2 0 
         /delay 2 
         /face fast nopredict 
         /mqlog In melee with $target(name) at $target(hp,pct) I am at $char(hp,pct) 
      } 
      
      /doevents 
      
      | If we cannot see the target backup and face it again. 
      /if n $NoLOS==1 { 
         /mqlog Cannot see 
         /face nopredict 
         /sendkey down down 
         /delay 4 
         /sendkey up down 
         /varset NoLOS 0 
         /delay 3 
      } 
      
      | If we are too far away close in 
      /if n $TooFarAway==1 { 
         /face nopredict 
         /delay 2 
         /call autorun2 1 
         /varset TooFarAway 0 
      } 
      
      /if $char(ability,"Kick")>0 /doability "Kick" 
      /if $char(ability,"Slam")>0 /doability "Slam" 
      /if $char(ability,"Taunt")>0 /doability "Taunt" 
      /if $char(ability,"Begging")>0 { 
         /attack off 
         /doability "Begging" 
         /attack on 
      } 
      /if $char(ability,"Disarm")>0 /doability "Disarm" 
      
      
      | Check if target is dead or we have lost it 
      /if n $target(id)==0 /varset TargetDead 1 
      /if "$target(name)"~~"corpse" /varset TargetDead 1 
      
      | If target is still alive keep at it 
      /if n $TargetDead!=1 /goto :Combat 
      
      | Target is dead so stop attacking 
      /attack off 
            
/return 

Sub AutoRun2 
   /if $p0==1 /sendkey down up 
   /if $p0==0 /sendkey up up 
/return 


sub Event_TooFar 
   /varset TooFarAway 1 
/return 

sub Event_CannotSee 
   /varset NoLOS 1 
/return 

sub Enraged 
   /varset RealMad 1 
/return 

sub Chilled
   /varset RealMad 0 
/return 

Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]