Updatet Cleric BOT

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

Moderator: MacroQuest Developers

|| Napolion ||
a ghoul
a ghoul
Posts: 96
Joined: Sat Dec 28, 2002 7:45 am

Updatet Cleric BOT

Post by || Napolion || » Sat Mar 29, 2003 9:50 pm

I did expand the use of the cleric.mac. There was a set of secutery hols in the old one, also add some new function to it.

Now only the name you give the macro is the controler of the bot, and if the bot gets a tell it will say from who and what to the controler of the bot. You can also give tells true the bot to any one you wants.

Well my first macro. Any improment you want just say so.

Code: Select all

| cleric.mac 
| cleric petbot 
|  
| Usage: /macro cleric.mac <character in control>
|
| Spell gem as follow
| 1 : Superior Heal
| 2 : Celestial Healing
| 3 : Armor of Faith
| 4 : Reso
| 5 : Symbol
| 6 : Instill
| 7 : A dd spell
| 8 : complite Heal

#define GroupMember v93 
#define GroupMax v90 
#define ChatCommand p2
#define Charincommand v69
#define XLOC v52 
#define YLOC v53 
#define $GroupClass $spawn($group($GroupMember),class) 

#include SpellSub.mac 
#include loot.inc 
#include routines.mac 
#chat tell 
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel"
#Event RejectInvite " rejects you offer to join the group."
#Event ClarityGone "Your mind returns to normal." 
#Event InvisGone "You feel yourself starting to appear" 
#Event RootGone "Your Instill spell has worn off." 
#Event FollowOff "You are no longer auto-following "
#Event hityou " hits YOU for " 

Sub Main 
   /if "$p0"=="" {
      /echo Usage: /macro cleric <Char to be in command>
      /echo You have to write the name of your controler
      /return
   }
   /varset v69 "$p0" 
   /echo I am running Cleric BOT. ($Charincommand is in command)
:chkevent 
   /doevents 
   | *** AutoHeal *** 

   /varcalc GroupMax $group(count)-1 
   /for GroupMember 0 to $GroupMax 
      /if n $spawn($group($GroupMember),hp,pct)<41 { 
         /if n $spawn($group($GroupMember),hp,pct)<1 /goto :nextmember 
         /if "$GroupClass"=="Warrior" /goto :Tankheal 
         /if "$GroupClass"=="Paladin" /goto :Tankheal 
         /if "$GroupClass"=="Shadow Knight" /goto :Tankheal 
         /if "$GroupClass"=="Monk" /goto :Tankheal 
         /if "$GroupClass"=="Ranger" /goto :Tankheal
         /doevents
         /goto :CasterHeal 

:Tankheal 
         /if n $group($GroupMember)==$char(id) /press F1 
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember) 
         /stand 
         /g COMPLETE HEAL on %T in 10seconds 
         /call SpellSub 8 115 
         /sit 
         /press esc 
         /goto :nextmember 

:Casterheal 
         /if n $group($GroupMember)==$char(id) /press F1 
         /if n $group($GroupMember)!=$char(id) /target id $group($GroupMember) 
         /stand 
         /g Healing %T 
         /call SpellSub 2 50 
         /sit 
         /press esc 
:nextmember 
      } 
   /next GroupMember 
   /goto :chkevent 
/return 

Sub Event_Chat 

:Commands 

/if "$Charincommand"=="$p1" {
  /if "$left(1,"$ChatCommand")"=="#" { | Calles the command issue function
    /call commandissu $p2

| *** Complete Heal *** 

  } else /if "$ChatCommand"=="ch" { 
    /target $p1 
    /stand 
    /g COMPLETE HEAL on %T in 10seconds 
    /call SpellSub 8 105 
    /sit 
    /press esc 

| *** HEAL OVER TIME *** 

  } else /if "$ChatCommand"=="ce" { 
    /target $p1 
    /stand 
    /g Celestial Healing on %T 
    /call SpellSub 2 45 
    /sit 
    /press esc 

| *** DD *** 

  } else /if "$ChatCommand"=="dd" {
    /target $p1
    /ass
    /delay 7 
    /stand 
    /g BOOM casting DD on %t 
    /call SpellSub 7 45
    /delay 60
    /sit on
      
| *** HP BUFF *** 

  } else /if "$ChatCommand"=="HP" { 
    /target $p1
    /call buffhp

| *** Superior Heal *** 

  } else /if "$ChatCommand"=="Heal" { 
    /target $p1
    /call buffheal

| *** Pet Complete Heal *** 

  } else /if "$ChatCommand"=="pet" { 
    /press esc 
    /press f2 
    /press f2 
    /stand 
    /g CH on %T 
    /call SpellSub 2 105 
    /sit 
    /press esc 

| *** Symbol *** 

  } else /if "$ChatCommand"=="Symbol" { 
    /target $p1 
    /stand 
    /g Symbol on %T 
    /call SpellSub 5 55 
    /sit  
    /press esc 

| *** AC BUFF *** 

  } else /if "$ChatCommand"=="AC" { 
    /target $p1 
    /stand 
    /g AC BUFF on %T 
    /call SpellSub 3 85 
    /sit 
    /press esc 

| *** Root *** 

  } else /if "$ChatCommand"=="root" { 
    /target $p1 
    /assist 
    /delay 7 
    /stand 
    /g Rooting %T 
    /call SpellSub 6 40 
    /sit 
    /press esc 

| *** Report Mana *** 

  } else /if "$ChatCommand"=="mana" { 
    /stand 
    /dismount 
    /press F1 
    /g Mana is at $char(mana,pct)%
    /press esc 
    /press esc
    /sit on

| *** Auto Loot *** 

  } else /if "$ChatCommand"=="loot" { 
    /stand 
|     /call AutoLoot 
    /echo Sorry cant loot right now...
    /goto :return 

| *** AUTOFOLLOW *** 

  } else /if "$ChatCommand"=="follow" { 
    /target $p1 
    /face 
    /sit off 
    /follow 
    /g Lead on %T 
    /varset v10 0 

| *** Define Camp Spot *** 

  } else /if "$ChatCommand"=="setcamp" { 
    /press F1 
    /delay 5 
    /varset XLOC $char(x) 
    /varset YLOC $char(y) 
    /g Ok. Here I sit. 

| *** AUTORETURN (to camp)*** 

  } else /if "$ChatCommand"=="return" { 
:return 
    /stand 
    /face loc $YLOC,$XLOC 
    /call GotoLoc $YLOC,$XLOC 
    /sit 

| *** AUTOSTOP *** 

  } else /if "$ChatCommand"=="stop" { 
    /press down 
    /varset v10 1 
    /say Stopping here. 

| *** SIT/STAND *** 

  } else /if "$ChatCommand"=="sit" { 
    /sit 

| *** MOUNT HORSE *** 

  } else /if "$ChatCommand"=="mount" { 
    /sendkey down shift 
    /press 2 
    /press shift 
    /press 0 

| *** DISMOUNT HORSE *** 

  } else /if "$ChatCommand"=="dismount" { 
    /dismount 

| *** LFG ON *** 

  } else /if "$ChatCommand"=="LFG" { 
    /delay 10 
    /press f1 
    /delay 10 
    /disband 
    /delay 10 
    /lfg on 
    /r LFG now. 

| *** CAMP *** 

  } else /if "$ChatCommand"=="camp" { 
    /sit off 
    /sit 
    /camp 
    /delay 10 
    /unload 

| *** COMMAND HELP *** 

  } else /if "$ChatCommand"=="command help" { 
    /reply [CE] - Celestial Heal, [CH] - Complete Heal, [AC] - HP Buff, [HP] - HP Buff, [Heal] - Superior Heal, [Root] - Root Mob, [DD] - Direct Dmg, [Gate] - Gate out, [Mana] - Report Mana, [Follow] - Follow, [Stop] - Stop Follow, [Setcamp] - Set camp spot, [Return] - Return to camp, [Sit] - Sit/Stand, [MOUNT/DISMOUNT] - (dis)mount Horse[LFG] - LFG ON, [Camp] - Camp, [command help2] - Advance command
  } else /if "$ChatCommand"=="command help2" {
    /r [#t <char> <text>] - [#hp [char]] - [#heal [char]] - [#afk [text]] - [#inv [name]] - [#accept] - [#reject]
  }
} else { | End check on who is inchage
  /echo Tell from unknowen user ($p1)
  /tell $Charincommand [$p1] - $p2
}

/return 

Sub Event_Invited 
  /tell $Charincommand I have been invitedet into a group. Accept or Reject the invite ??
/return

Sub Event_RejectInvite
  /tell $Charincommand char did reject the invite.
/return

Sub Event_ClarityGone 
   /g Clarity just faded... 
/return 

Sub Event_InvisGone 
   /g Invis is wearing off. 
/return 

Sub Event_RootGone 
   /g Root Wore off. 
     /press f2 
     /assist 
     /delay 11 
     /stand 
     /g Rooting %T 
     /call SpellSub 3 40 
     /sit 
     /press esc 
/return 

Sub Event_FollowOff 
   /if n $v10==1 { 
      /r Parked. 
   } else { 
      /g Lost ya. 
      /sendkey down up 
      :KeepRunning 
      /face 
          /if n $target(distance)<50 { 
             /sendkey up up 
             /follow 
             /varset v10 0 
             /g Back on Auto-Follow. go ahead. 
          } else { 
             /goto :KeepRunning 
          } 
       } 
/return

Sub Event_hityou
	/tell $Charincommand Somthing is hitting you cleric. GET IT OFF ME !!!!
/return

Sub commandissu
  /if "$p0"=="#t" {
      /tell "$p1" "$p2"
  } else /if "$p0"=="#hp" { | Casting HP buff on controler's target or on name giving
    /if "$p2"=="" {
      /assist $Charincommand
    } else {
      /target $p1
    }
    /call buffhp 
  } else /if "$p0"=="#heal" {
    /if "$p2"=="" {
      /assist $Charincommand
    } else {
      /target $p1
    }
    /call buffheal
  } else /if "$p0"=="#afk" {
    /afk $p1
  } else /if "$p0"=="#inv" {
    /if "$p2"=="" {
      /invite $Charincommand
    } else {
      /invite $p1
    }
  } else /if "$p0"=="#accept" {
    /invite
  } else /if "$p0"=="#reject" {
    /disband
  }
/return

Sub buffhp
    /stand 
    /g HP Buff on %T 
    /call SpellSub 4 65 
    /sit  
    /press esc 
/return

Sub buffheal
    /stand 
    /g Healing %T 
    /call SpellSub 1 50 
    /sit 
    /press esc 
/return

stigmatine
a lesser mummy
a lesser mummy
Posts: 50
Joined: Wed Oct 02, 2002 2:52 pm

Post by stigmatine » Mon May 12, 2003 3:12 pm

onlything i saw,( and it's because i'm really picky) , is in yoru Camp command for the cleric, instead of doing /sit off, /sit, just type /sit on, and that will make him sit no matter what.

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

Post by Valerian » Tue May 13, 2003 8:32 am

no, /sit is a toggle, /sit off or /stand will ALWAYS make you stand, but /sit or /sit on will make you stand if seated, sit if standing. try it

|| Napolion ||
a ghoul
a ghoul
Posts: 96
Joined: Sat Dec 28, 2002 7:45 am

Post by || Napolion || » Sat May 17, 2003 5:21 pm

Have to do a /sit off to be sure that I stand up. If I do a /sit on when I am sitting then I will stand up. May be a error in EQ's macro.

|| Napolion ||

Shocks
a ghoul
a ghoul
Posts: 101
Joined: Tue Feb 18, 2003 3:26 pm
Contact:

Crashing

Post by Shocks » Thu May 22, 2003 1:02 am

I seem to be crashing when my bot joins the group and auto heal starts. Any ideas. I did take out the loot.mac #include.

Shocks

User avatar
MSBoy1
a lesser mummy
a lesser mummy
Posts: 57
Joined: Mon May 19, 2003 3:42 pm
Location: Mississippi

Post by MSBoy1 » Wed May 28, 2003 5:51 pm

I seem to be having the same problem. As soon as the cleric joins my group, EQ crashes to desktop.

This seems to be happening with all the cleric bot code for me, so I think that I might be doing something wrong.

I will be debugging it when I get home tonight.

User avatar
MSBoy1
a lesser mummy
a lesser mummy
Posts: 57
Joined: Mon May 19, 2003 3:42 pm
Location: Mississippi

Post by MSBoy1 » Thu May 29, 2003 12:55 am

Definitely seems to be bonking out at the end of the for loop.

Here is that last little bit of info from the logs. If anyone sees anything wrong, please tell me.





VarCalc - Var90 = 0.00

$spawn(): id=2356 (0C166A80), rest=hp,pct) (len=7)

FailIf - Skipping to end of {}

FailIf - Starting macroblock: /if n $spawn($group($v93),hp,pct)<41 {

FailIf - Skipping(1): /if n $spawn($group($v93),hp,pct)<1 /goto :nextmember

FailIf - Skipping(1): /if "$spawn($group($v93),class)"=="Warrior" /goto :Tankheal

FailIf - Skipping(1): /if "$spawn($group($v93),class)"=="Paladin" /goto :Tankheal

FailIf - Skipping(1): /if "$spawn($group($v93),class)"=="Shadow Knight" /goto :Tankheal

FailIf - Skipping(1): /if "$spawn($group($v93),class)"=="Monk" /goto :Tankheal

FailIf - Skipping(1): /if "$spawn($group($v93),class)"=="Ranger" /goto :Tankheal

FailIf - Skipping(1): /doevents

FailIf - Skipping(1): /goto :CasterHeal

FailIf - Skipping(1): :Tankheal

FailIf - Skipping(1): /if n $group($v93)==$char(id) /press F1

FailIf - Skipping(1): /if n $group($v93)!=$char(id) /target id $group($v93)

FailIf - Skipping(1): /stand

FailIf - Skipping(1): /g COMPLETE HEAL on T in 10seconds

FailIf - Skipping(1): /call SpellSub 8 115

FailIf - Skipping(1): /sit

FailIf - Skipping(1): /press esc

FailIf - Skipping(1): /goto :nextmember

FailIf - Skipping(1): :Casterheal

FailIf - Skipping(1): /if n $group($v93)==$char(id) /press F1

FailIf - Skipping(1): /if n $group($v93)!=$char(id) /target id $group($v93)

FailIf - Skipping(1): /stand

FailIf - Skipping(1): /g Healing T

FailIf - Skipping(1): /call SpellSub 2 50

FailIf - Skipping(1): /sit

FailIf - Skipping(1): /press esc

FailIf - Skipping(1): :nextmember

FailIf - End at: }

FailIf - } seen

CChatHook::Detour(You have joined the group.)

$spawn(): id=2356 (0C166A80), rest=class) (len=6)

$spawn(): id=2356 (0C166A80), rest=class) (len=6)

$spawn(): id=2356 (0C166A80), rest=class) (len=6)

$spawn(): id=2356 (0C166A80), rest=class) (len=6)

$spawn(): id=2356 (0C166A80), rest=class) (len=6)

$spawn(): id=2356 (0C166A80), rest=hp,pct) (len=7)

$spawn(): id=2356 (0C166A80), rest=hp,pct) (len=7)

Next - End of loop 0 to 0

Goto - went to label :chkevent

0. 2

1. -

2. 1

VarCalc - Var90 = 1.00

$spawn(): id=2356 (0C166A80), rest=hp,pct) (len=7)

FailIf - Skipping to end of {}

FailIf - Starting macroblock: /if n $spawn($group($v93),hp,pct)<41 {

FailIf - Skipping(1): /if n $spawn($group($v93),hp,pct)<1 /goto :nextmember

FailIf - Skipping(1): /if "$spawn($group($v93),class)"=="Warrior" /goto :Tankheal

FailIf - Skipping(1): /if "$spawn($group($v93),class)"=="Paladin" /goto :Tankheal

FailIf - Skipping(1): /if "$spawn($group($v93),class)"=="Shadow Knight" /goto :Tankheal

FailIf - Skipping(1): /if "$spawn($group($v93),class)"=="Monk" /goto :Tankheal

FailIf - Skipping(1): /if "$spawn($group($v93),class)"=="Ranger" /goto :Tankheal

FailIf - Skipping(1): /doevents

FailIf - Skipping(1): /goto :CasterHeal

FailIf - Skipping(1): :Tankheal

FailIf - Skipping(1): /if n $group($v93)==$char(id) /press F1

FailIf - Skipping(1): /if n $group($v93)!=$char(id) /target id $group($v93)

FailIf - Skipping(1): /stand

FailIf - Skipping(1): /g COMPLETE HEAL on T in 10seconds

FailIf - Skipping(1): /call SpellSub 8 115

FailIf - Skipping(1): /sit

FailIf - Skipping(1): /press esc

FailIf - Skipping(1): /goto :nextmember

FailIf - Skipping(1): :Casterheal

FailIf - Skipping(1): /if n $group($v93)==$char(id) /press F1

FailIf - Skipping(1): /if n $group($v93)!=$char(id) /target id $group($v93)

FailIf - Skipping(1): /stand

FailIf - Skipping(1): /g Healing T

FailIf - Skipping(1): /call SpellSub 2 50

FailIf - Skipping(1): /sit

FailIf - Skipping(1): /press esc

FailIf - Skipping(1): :nextmember

FailIf - End at: }

FailIf - } seen

$spawn(): id=2356 (0C166A80), rest=class) (len=6)

$spawn(): id=2356 (0C166A80), rest=class) (len=6)

$spawn(): id=2356 (0C166A80), rest=class) (len=6)

$spawn(): id=2356 (0C166A80), rest=class) (len=6)

$spawn(): id=2356 (0C166A80), rest=class) (len=6)

$spawn(): id=2356 (0C166A80), rest=hp,pct) (len=7)

$spawn(): id=2356 (0C166A80), rest=hp,pct) (len=7)

Next - End of loop 0 to 1

User avatar
MSBoy1
a lesser mummy
a lesser mummy
Posts: 57
Joined: Mon May 19, 2003 3:42 pm
Location: Mississippi

Post by MSBoy1 » Thu May 29, 2003 11:04 am

Ok, I think I have found what is the problem.... Basically, I am an idiot.

You need to be sure that when cutting and pasting from the forums, that you have line-wrap off :)

This is what I was getting after cutting and pasting:

:Tankheal
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id
$group($GroupMember)

It needs to be:
:Tankheal
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group ($GroupMember)



So to all the noobs like me, be sure that you have line-wrap off when cutting and pasting. :)

User avatar
MSBoy1
a lesser mummy
a lesser mummy
Posts: 57
Joined: Mon May 19, 2003 3:42 pm
Location: Mississippi

Post by MSBoy1 » Thu May 29, 2003 2:02 pm

Well, I spoke too soon. When I got home to check the line wrapping problem, it was non-existent.

So back to the drawing board.

Dirtface
a lesser mummy
a lesser mummy
Posts: 39
Joined: Tue Nov 12, 2002 2:43 am

Post by Dirtface » Mon Jun 02, 2003 3:28 pm

Can I please have credit in the macro? All I ask. This was clearly my code.

User avatar
MSBoy1
a lesser mummy
a lesser mummy
Posts: 57
Joined: Mon May 19, 2003 3:42 pm
Location: Mississippi

Post by MSBoy1 » Mon Jun 02, 2003 4:11 pm

Update:

The group offset was not correct in the eqgame.ini. Once the correct offset is used, everything works properly.


I noticed it was based on your code as well Dirtface :)

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Mon Jun 02, 2003 6:06 pm

Can I please have credit in the macro? All I ask. This was clearly my code
No one's name is in the code of that macro as I can see. You're all using code of many developers and their names aren't anywhere ...it's a part of this type of project. Statements like this simply make me feel like I'm in high school again.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Mon Jun 02, 2003 7:51 pm

Salutations,
If the macro is based off of someone's code (updating someone's code) it really needs to be given credit, "|Updated version of code originall written by ________" is fine, as for putting a line of code that says /echo $sin(0) I'm sure someone did that before, but you don't need to give them credit ;p

Dirtface
a lesser mummy
a lesser mummy
Posts: 39
Joined: Tue Nov 12, 2002 2:43 am

Post by Dirtface » Mon Jun 02, 2003 8:25 pm

Yeah, thats great about the high school thing. I dont really care.

Fact is, its my code. Compare it to where I originally posted it if you want, all I want is credit. You can make it a "Have sex with underage girls" code if you want, I dont care what you do with it. Just give me credit for my code.

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Mon Jun 02, 2003 9:22 pm

Yea...so every command you issue, we'll have it say PROVIDED BY DKAA's MEMCHECK ROUTINES. And, every time you use a slash command, Plazmic would spam across the screen to remind you who did all the hard work in the first place.

The point is simply, who cares? If you're going to be anal about macros you give out here, then I say keep it to yourself. The guy that posted it didn't put his name in it ANYWHERE, nor did he claim it was all done by himself. And, if someone were to copy it onto their computer as it is right now, they'd forget in about 5 minutes who posted it and it would just be another feature of MacroQuest. One of the many features you use EVERY day, coded by people that don't have their names ANYWHERE in lights.

It's one thing when people make money off something you did, or even obtain glamour. But, no one gained anything through the use of it other than refurbishing it and posting it.