cleric.mac New Basic Cleric bot.

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

cleric.mac New Basic Cleric bot.

Post by grimjack » Sun Jun 08, 2003 11:49 pm

Removed since genbot.mac will do everything this did and is more up to date.

Thanks
GrimJack
Last edited by grimjack on Fri Sep 05, 2003 12:59 am, edited 10 times in total.

banananose
orc pawn
orc pawn
Posts: 27
Joined: Sun Sep 01, 2002 8:13 am

Post by banananose » Wed Jun 11, 2003 5:30 pm

Hi!

I tried both this, and the "generic" macro to run a bot cleric. I have the same problem with each one. Whenever I try to make my bot cast a spell, it crashes to desktop. I send the bot the tell, /tell <botname> sp heroism in one case, /tell <botname> hp in the other case, depending on the macro. The bot receives the tell, and replies to me, "Casting heroism on <toon-name>." And then immediately lands in desktopville. I'm thinking it must be something in the Spellsub routine, because it seems to make it's way to there just fine. Damned if I have the "skillz" to troubleshoot it anymore than that. Maybe something in today's patch changed and that function doesn't work properly now? Any help/suggestions appreciated - I like the idea of 2 boxing from one box :)

Thanks,

BN

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Thu Jun 12, 2003 2:21 am

banananose wrote:Hi!

I tried both this, and the "generic" macro to run a bot cleric. I have the same problem with each one. Whenever I try to make my bot cast a spell, it crashes to desktop. I send the bot the tell, /tell <botname> sp heroism in one case, /tell <botname> hp in the other case, depending on the macro. The bot receives the tell, and replies to me, "Casting heroism on <toon-name>." And then immediately lands in desktopville. I'm thinking it must be something in the Spellsub routine, because it seems to make it's way to there just fine. Damned if I have the "skillz" to troubleshoot it anymore than that. Maybe something in today's patch changed and that function doesn't work properly now? Any help/suggestions appreciated - I like the idea of 2 boxing from one box :)

Thanks,

BN
I would guess, since the problem is with the spellcasting part of the macro, that the structure used or the offset used for $spell or $char is not right yet. I'm not home to test it at the moment but if you want you can try this yourself in game.

/echo $char(gem,"Name of one of your memed spells")
/echo $spell("Name of one of your memed spells",casttime)

If either of those crash you to your desktop you know where your problem is.

mongo
decaying skeleton
decaying skeleton
Posts: 8
Joined: Sun Jun 22, 2003 7:52 pm

Beastlords target problem

Post by mongo » Sun Jun 22, 2003 8:03 pm

I'm using this script, and everything works great... almost. I play a beastlord, and when I send the bot

/tell BOT AC XXXX

I get Casting AC on XXXX's warder.


no pet up, it works fine. mage or chanter with pet up works fine. Autoheal works fine too (with the pet up). It does the same if I use the /assist (/tell BOT AC)

Any ideas?

banananose
orc pawn
orc pawn
Posts: 27
Joined: Sun Sep 01, 2002 8:13 am

Post by banananose » Sun Jun 22, 2003 8:25 pm

Thanks for the input - everything works correctly - I had just tried to use it too close after the last patch and part of the CVS was incorrect. Works fine since that got straightened out.

I do, however, have the same problem with running it with a beastlord. I have to make sure I'm closer to the cleric than the pet is or the pet gets my heals and buffs. It's fine for the most part because I make my pet /guard a nice distance away from me and my cleric bot, but when I need that emergency heal in battle, and the bear gets it instead of me, it's kind of frustrating. I really wish they'd named beastlord pets like they named all the other pets.

If someone has a way to make sure the PC is targeted rather than the PC's warder, that'd be aweseome :)

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

Post by Valerian » Mon Jun 23, 2003 12:28 am

try /rtarget, targets the person who sent the last tell.

khazil
orc pawn
orc pawn
Posts: 24
Joined: Wed Sep 04, 2002 8:52 pm

Post by khazil » Mon Jun 23, 2003 3:04 am

lol :P

/target PC pcsname

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

Post by Valerian » Mon Jun 23, 2003 8:14 am

either one...

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Tue Jun 24, 2003 5:02 am

Valerian wrote:either one...
I don't think /rtarget would be good to use for group watch auto heals. The heals go off based off group member percent health, not based on tells coming into the bot. /rtarget would not really work well for the /tell commands either since you may be telling the bot to heal someone else.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

IHQ
decaying skeleton
decaying skeleton
Posts: 2
Joined: Mon Jun 30, 2003 1:14 pm

Post by IHQ » Mon Jun 30, 2003 5:39 pm

I've been playing around with this script, the abilities, and the commands and have a question about the following piece of code:

Code: Select all

   /if n $spawn($group($GroupMember),hp,pct)<41 { 
      /if n $spawn($group($GroupMember),hp,pct)>=1 { 
         /if "$spawn($group($GroupMember),class)"=="Warrior" /call Tankheal 
         /if "$spawn($group($GroupMember),class)"=="Paladin" /call Tankheal 
         /if "$spawn($group($GroupMember),class)"=="Shadow Knight" /call Tankheal 
         /if "$spawn($group($GroupMember),class)"=="Monk" /call Tankheal 
         /if "$spawn($group($GroupMember),class)"=="Ranger" /call Tankheal 
        
      } 
   } 
How does the $spawn command work? is it looking up the text in a file?The reason I ask is because it doesn't seem to work for me and ends up not calling tankheal, but calling regular heal. (meaning it doesn't identify the class a player is).


I also made the following additional command available to the cleric since the ones I know cast their pets a fair number of times.

Code: Select all

Sub Do-pet 
   /varset CmdArrayNum 0 
   /if n $strlen("$p1")<=0 { 
      /assist $MasterName 
      /delay 3 
   } else /if n $strlen("$p2")<=0 { 
      /target "$p1" 
   } else /if n $strlen("$p3")<=0 { 
      /target "$p1 $p2" 
   } else /if n $strlen("$p4)<=0 { 
      /target "$p1 $p2 $p3" 
   } else /target "$p1 $p2 $p3 $p4" 
   /stand 
||||||||||||||||||||||||||||Begin Edit||||||||||||||||||||||||||||||||||||||| 
   /tell "$MasterName" Casting pet on %t 
   /call SpellSub "Unswerving Hammer of Faith" 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
   /if "$SitAfterCast"=="1" /sit on 
   /press esc 
/return 
and added:

Code: Select all

  /varset a(1,34) pet 
as well as fixed the array of commands.

User avatar
BlueSkies
a ghoul
a ghoul
Posts: 132
Joined: Tue Oct 01, 2002 6:22 pm

Post by BlueSkies » Mon Jun 30, 2003 6:01 pm

The $spawn() function is well documented in the readme.htm. Well worth a look.
From the Manual wrote:$spawn(id,xxx)
Returns information on a spawn
xxx can be: name[clean], surname, id, x, y, z, heading, headingto, state, speed, distance[,nopredict|x|y|z], type, level, gm, class, race, gender, light, pet, master
state can return: STAND, SIT, DUCK, BIND, FEIGN, DEAD
$spawn(id,hp,xxx) returns the spawn's hp: cur, max, pct
$spawn(id,next/prev) returns the id of the next/previous spawn.
$spawn(id,held,xxx) returns the model name for a held slot
xxx can be: right, left, shield
Live your dreams! Blue Skies everyone

wilddoug
orc pawn
orc pawn
Posts: 12
Joined: Tue Jul 01, 2003 11:18 am

Change to do-camp

Post by wilddoug » Tue Jul 01, 2003 11:27 am

Was using this over the weekend and it really helped!

One change to the do-camp routine: add dismount in case Cleric is on a mount.

Code: Select all

Sub Do-camp 
   /tell $MasterName Camping out. 
   /stand
   /dismount 
   /sit 
   /camp 
/return 
Another change I made was to remove the /dismount from the do-mana routine. It didn't make sense to me to get off the horse during a mana check - but maybe I was using it differently than others.

Excellent script!

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Re: Change to do-camp

Post by grimjack » Tue Jul 01, 2003 4:31 pm

wilddoug wrote:Was using this over the weekend and it really helped!

One change to the do-camp routine: add dismount in case Cleric is on a mount.

Code: Select all

Sub Do-camp 
   /tell $MasterName Camping out. 
   /stand
   /dismount 
   /sit 
   /camp 
/return 
Another change I made was to remove the /dismount from the do-mana routine. It didn't make sense to me to get off the horse during a mana check - but maybe I was using it differently than others.

Excellent script!
At one point in time mana was not reported correctly while on a mount. I'm glad to hear that's fixed.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

mongo
decaying skeleton
decaying skeleton
Posts: 8
Joined: Sun Jun 22, 2003 7:52 pm

changes to autoheal

Post by mongo » Mon Jul 07, 2003 10:37 am

I've made some tweaks to the autoheal, for both Tank heal and caster heals. The tank heal will do a quick heal if below 30% before casting CH. The caster heal is using HoT heals (Celestial Healing). This mod corrects the "chain casting" by using timers for HoT (A timer for each group member). Also it will still drop a quick heal on casters if below 50% no mater the status of HoT.

Here is the changes needed... First make sure the $GroupMember is still v53

Code: Select all

#define GroupMember v53
if not or you want to use your own setup just make sure you change the following line in Casterheal with the v## (For what ever reason I could not use $GroupMember, had the use the $v53... can someone tell me why?)

Code: Select all

	 /if n $t$v53!="0" /return  | Make sure you set the $v53 to the correct v## for $GroupMember
Add the following #defines to your script for the timers.

Code: Select all

#define HOTTimer0 t0
#define HOTTimer1 t1
#define HOTTimer2 t2
#define HOTTimer3 t3
#define HOTTimer4 t4
#define HOTTimer5 t5
Also I use #defines for the spells...

Code: Select all

#define hotspell "Celestial Healing"
#define healspell "Superior Healing"
#define chspell "Complete Healing"

And the sub tank and caster sections...

Code: Select all

Sub Tankheal 
         
	 /if n $group($GroupMember)==$char(id) /press F1 
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
         /delay 4
         /if n $spawn($group($GroupMember),hp,pct)<30 {
	 /stand
	 /call spellsub "healspell"
	 /delay 4
	 /return
	 } else
         /g "chspell" on %T in 10seconds... I hope %S will make it! 
         /stand
	 /call SpellSub "chspell"
         /if "$SitAfterCast"=="1" /sit on 
         /press esc 
/return 

Sub Casterheal 

	 

         /if n $spawn($group($GroupMember),hp,pct)<50 {
	 /if n $group($GroupMember)==$char(id) /press F1 
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
	 /stand
	 /call spellsub "healspell"
	 /delay 4
	 /press esc
	 /return
	 } else
	 /if n $t$v53!="0" /return  | Make sure you set the $v53 to the correct v## for $GroupMember

	 /if n $group($GroupMember)==$char(id) /press F1 
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
	 /stand
	 /g Healing %T
         /call SpellSub "hotspell"
	 /varset t$v53 24s
	 /press esc
         /if "$SitAfterCast"=="1" /sit on 
          
/return


Ive made some other changes like:
-Loads spells into gems at startup
-changing out all buff spells on one gem
-auto mem and cast buffs when drops after combat (HP, AC, Symbol and spell haste)
-combat detection (other hits and misses must be on)
-run to target if out of range or skip if runtotraget not set
-added focus command (spell casting haste)
-added autosit, autohp, autoac, autosymbol, autofocus, autoDD, and movetotarget to commands
- updated the following subs to mem the spell before casting if not loaded: gate, hp, ac, symbol, and focus
-top off heals after combat. Will cast HoT spells on everyone under 85% (hate when puller is sitting at 51% and runs off for pull)
- mem a spell via command (not working yet, crash to desktop)
- AutoDD (not started yet) I'm thinking of assist $master and if Mana 100% and mob <80%(for agro), drop a nuke- gives her/him something to do at FM.


Its work in progress but will keep you up to date on it. I've taken her to the planes and works great. just need to fix/add a few more tweaks...

Rahn
orc pawn
orc pawn
Posts: 12
Joined: Tue Mar 18, 2003 7:22 pm

Post by Rahn » Tue Jul 29, 2003 3:13 am

the do-afk was turning on then right back off automatically so i commented out that seemingly extra /afk ? seems to work now.

Code: Select all

Sub Do-afk 
   /varset CmdArrayNum 0 
   /if n $strlen("$p1")<=0 { 
      /afk 
   } else /if n $strlen("$p2")<=0 { 
      /afk $p1 
   } else /if n $strlen("$p3")<=0 { 
      /afk $p1 $p2 
   } else /if n $strlen("$p4")<=0 { 
      /afk $p1 $p2 $p3 
   } else /if n $strlen("$p5")<=0 { 
      /afk $p1 $p2 $p3 $p4 
   } else /if n $strlen("$p6")<=0 { 
      /afk $p1 $p2 $p3 $p4 $p5 
   } else /if n $strlen("$p7")<=0 { 
      /afk $p1 $p2 $p3 $p4 $p5 $p6 
   } else /if n $strlen("$p8")<=0 { 
      /afk $p1 $p2 $p3 $p4 $p5 $p6 $p7 
   } else /if n $strlen("$p9")<=0 { 
      /afk $p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8 
   } else { 
      /afk $p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8 $p9 
   } 
   |/afk 
/return