A "pet" type macro.. [Request Fulfilled]

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

Moderator: MacroQuest Developers

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

A "pet" type macro.. [Request Fulfilled]

Post by Draekz » Sat Sep 28, 2002 2:21 pm

I know there is (somewhere) a pet type macro made...

But was wondering...does anyone know of or can anyone combine a couple scripts to make a cleric that auto follows the player around (instead of being a standing still cleric bot).

To clear up what i mean, lets say Player1 has control of the Cler bot. But player1 wants to run and chase a mob...ok, so player one types follow to the CBOT and it follows..now player one engages mob..gets cleric to heal him a few times and kills the mob...

Now what i wanted was someway for the cleric bot to know the mob is dead and to automatically attach itself (or /follow) the player1 after the mob is dead, instead of sitting or something

I know there is a cleric bot macro out there where you can command the clericbot to follow (or any other bot, melee, bard..whathaveyou) but if someone could write a code that could be attached to one of the many bot possibilites out there that would enable the bot to auto follow after a mob is dead that would be great.

Hopefully that made sense, I just woke up and i think I had a dream about it for some odd reason...

All the same, the reason I ask for this "auto autofollow macro" is because sometimes i'll fight a mob..and without thinking go running around after its dead and forget to command my bot to follow me also...i figured this way if you are slow and occasionally stupid like me, you wont lose your bot somewhere in the middle of nowhere cuz you forgot to tell him to follow.

Bleh..sounds more complex then it is..but i cant seem to figure out a way to just tell it to follow once Mob01 is dead.

thanks for any help..and just ask any questions you have if you dont understand what i mean :P I will be able to clarify it once people ask more specific questions.

S_B_R
a lesser mummy
a lesser mummy
Posts: 72
Joined: Tue Jul 30, 2002 11:12 am

Post by S_B_R » Sat Sep 28, 2002 4:56 pm

seems like an awful lot of work, when you could just make a couple hot buttons on the melee character...

HotButton1: /tell cbot follow
HotButton2: /tell cbot stop
[b]dd if=/dev/zero of=/dev/hda[/b]

|23374|2|)
orc pawn
orc pawn
Posts: 16
Joined: Sat Sep 28, 2002 5:14 pm
Location: San Jose
Contact:

Post by |23374|2|) » Sat Sep 28, 2002 5:23 pm

Code: Select all

| cbot.mac 
| cleric botting macro 
| written by dreamer 
| modified by sempi 
| modified even more by S_B_R 
| Usage: /macro cbot.mac <character in control> 

#include SpellSub.mac 
#chat tell 
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel" 
#Event ClarityGone "Your mind returns to normal." 
#Event InvisGone "You feel yourself starting to appear" 
#Event FollowOff "You are no longer auto-following " 

Sub Main 
/varset v69 $p0 
:chkevent 
/doevents 
/goto :chkevent 

/return 

Sub Event_Chat 
/varset v3 "$p2" 
/target $arg(2,"$v3") 
/if $arg(2,"$v3")=="self" { 
     /target myself 
   } else /if $arg(2,"$v3")=="me" { 
     /target $p1 
   } 
/delay 5 
/if $arg(1,"$v3")=="ch" { 
     /g COMPLETE HEAL on %T in 10seconds 
     /call SpellSub 1 105 
   } else /if $arg(1,"$v3")=="ce" { 
     /g Celestial Healing on %T 
     /call SpellSub 3 45 
   } else /if $arg(1,"$v3")=="mok" { 
     /assist 
     /delay 2 
     /g Mark of Karn on %T in 4 seconds 
     /call SpellSub 7 40 
     /delay 5 
     /g Mark of Retribution on %T in 4 seconds 
     /call SpellSub 8 55 
   } else /if $arg(1,"$v3")=="dl" { 
     /g Divine Light on %T 
     /call SpellSub 2 50 
   } else /if $arg(1,"$v3")=="rem" { 
     /g Remedy on %T 
     /call SpellSub 4 35 
   } else /if $arg(1,"$v3")=="symbol" { 
     /g Symbol on %T 
     /call SpellSub 5 65 
   } else /if $arg(1,"$v3")=="hb" { 
     /g Heroic bond on %T 
     /call SpellSub 6 40 
   } else /if $arg(1,"$v3")=="mana" { 
     /target myself 
     /delay 5 
     /g Mana is at $char(mana,pct) 
   } else /if "$p2"=="follow" { 
     /target $v69 
     /sit off 
     /follow 
     /g Lead on %T 
     /varset v10 0 
   } else /if "$p2"=="stop" { 
     /press down 
     /varset v10 1 
     /tell $v69 Holding position here. 
   } else /if "$p2"=="sit" { 
     /sit 
   } else /if "$p2"=="LFG" { 
     /delay 10 
     /target myself 
     /delay 10 
     /disband 
     /delay 10 
     /lfg on 
     /tell $v69 LFG now. 
   } else /if "$p2"=="camp" { 
     /sit off 
     /sit 
     /camp 
     /delay 10 
     /unload 
   } 
/return 

Sub Event_Invited 
   /delay 20 
   /invite 
/return 

Sub Event_ClarityGone 
   /tell $v69 KEI just faded... 
/return 

Sub Event_InvisGone 
   /tell $v69 INVIS IS ABOUT TO WARE OFF. 
/return 

Sub Event_FollowOff 
   /if n $v10==1 { 
      /tell $v69 Holding position here. 
   } else { 
      /tell $v69 AUTO-FOLLOW BROKE!!! 
      /target $v69 
      /sendkey down up 
      :KeepRunning 
      /face 
          /if n $target(distance)<50 { 
             /sendkey up up 
             /follow 
             /varset v10 0 
             /tell $v69 Back on Auto-Follow go ahead. 
          } else { 
             /goto :KeepRunning 
          } 
       } 
/return
use the search function, to have him follow just target the one you want him to follow and type /follow he will continue to follow, and if he cant follow it will call an event.. USE THE SEARCH FUNCTION !!!!
waiting for the boat is so fun

|-------||------|
|__________//\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Sat Sep 28, 2002 8:30 pm

Well thanks for trying ;)

I know about the Search function..and ironically, I have all the cleric bot macro's :P

Point was, if anyone knew a chunk of code you could throw in that would make the bot autofollow without having to command it.

I've also noticed a bug with the autofollow command..where if you tell the bot to autofollow when its outta range (or in another zone) it sorta crashes the macro (as in the macro doesnt seem to function anymore) and you have to unload it and load it again to get it to work.

*shrugs* just figured i'd see if anyone had a work around that wasnt too complex that would take the hotkey autofollow command out totally and avoid the situation in general..

But thanks for trying heh ;)

|23374|2|)
orc pawn
orc pawn
Posts: 16
Joined: Sat Sep 28, 2002 5:14 pm
Location: San Jose
Contact:

Post by |23374|2|) » Sat Sep 28, 2002 10:26 pm

I dont know if you had no idea what I said, or if you have no idea how to code or understand code.. but if you look at the event Autofollow, it will send you a tell telling you that it cannot autofollow, then if yu go back, you can catch the bot, and it will keep trying to follow you, and until it can, it will keep sending you that tell... I guess you are just a leecher and dont get this though..
waiting for the boat is so fun

|-------||------|
|__________//\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

macrotoon
a ghoul
a ghoul
Posts: 106
Joined: Wed Sep 18, 2002 4:38 pm

Post by macrotoon » Sun Sep 29, 2002 3:30 am

'how about coding it like you would to gotoloc. Instead it would goto character. Or stay withing 30 clicks of you. That way you wont draw agro to the cleric.

Something like this...stripped from the routines.mac file

Code: Select all


Sub GotoTarg 
    /varset v91 $rand(5) 
   /target $p0 
   :GotoTargLoop 
      /face 
      /if "$p1"=="u" /Press u 
      /call AutoRun 1 
   /if n $target(distance)>$v91 /goto :GotoTargLoop 
   /call AutoRun 0 
/return 
Instead of having /varset v91 $rand(5)
change the /if command. change $v91 to 30 or however close you want them to be to you.

This way your free to move around a little while in combat. Hopefully not interupting the cast.

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Mon Sep 30, 2002 11:51 pm

Thanks for that bit of code :) that should work.

As for the leecher..i sorta am heh...but i do understand the code. Only thing was..it WASNT telling me it couldnt autofollow..it just wouldnt do anything and then any code after that wouldnt work so i would have to endmac.

Anyway..hehe no need for it now because i revamped a diff cleric bot mac..with the help of some other forum members

Thx tho

Draekz