Cleric.mac

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

Moderator: MacroQuest Developers

Java
a lesser mummy
a lesser mummy
Posts: 73
Joined: Sat Jul 13, 2002 12:03 pm

Cleric.mac

Post by Java » Tue Jul 16, 2002 2:19 pm

(( Edit - L124RD : made the code tags work))

Code: Select all

| Cleric.mac 
| Edited from Pet.mac, for making Cleric.mac
|
#include SpellSub.mac
#include routines.mac 
#chat tell 

sub Main 
  :loop 
    /doevents 
    /if n $return==1 /call attack 
    /if n $return==2 /call follow_me 
    /if n $return==9 { 
      /target pc $v10 
      /call MoveUP 
    } 
  /goto :loop 
/return 


Sub BuffOne
	/stand
	/target $p1
	/TT INC Heroic Bond for %T 4 Seconds.
	/call SpellSub 1 4
	/delay 1
	/sit
	/return
Sub BuffTwo
	/stand
	/target $p1
	/TT INC Shield of Words for %T 8 Seconds.
	/call SpellSub 2 8
	/delay 1
	/sit
	/return
Sub BuffThree
	/stand
	/target $p1
	/TT INC Symbol of Naltron for %T 5 Seconds.
	/call SpellSub 3 5
	/delay 1
	/sit
	/return
Sub HealOne
	/stand
	/target $p1
	/TT INC Remedy Heal for %T 3 Seconds.
	/call SpellSub 5 3
	/delay 1
	/sit
	/return
Sub HealTwo
	
	/stand
	/target $p1
	/TT INC Divine Light Heal for %T 4.5 Seconds.
	/call SpellSub 6 5
	/delay 1
	/sit
	/return
Sub HealThree
	
	/stand
	/target $p1
	/TT INC Celestial Heal for %T 4 Seconds.
	/call SpellSub 7 4
	/delay 1
	/sit
	/return
Sub HealFour
	
	/stand
	/target $p1
	/TT INC Complete Heal for %T 10 Seconds.
	/call SpellSub 8 10
	/delay 1
	/sit
	/return    

sub attack 
  /if n $distance($v10)>99 { 
    /tell $v10 Sorry $v10. You are too far away for me to assist you. 
    /return 
  } 

  /assist $v10 

  /if "$target()"!="true" { 
      /tell $v10 Sorry $v10. I can not attack what is not there. 
      /return 
  } 

  /if "$target(type)"!="npc" { 
    /tell $v10 Sorry $v10. I really don't want to attack that. 
    /return 
  }  
  
  /tell $v10 Attacking [$target(level) $target(race) $target(class)] $target(name) - $target(distance) 

  /varset v1  $target(id) 

  :attack_loop 
    /if n $target(id)!=$v1 /goto :end_attack_loop 
    /face 
    /if n $target(distance)>14 { 
      /if $combat!="false" /attack off 
      /call MoveUP 
    } else /if n $target(distance)<5 { 
      /press down 
    } else { 
      /if $combat=="false" /attack on 
      /if n $t0==0 /call KTD 
      /varset t0 5 
    } 

    /doevents 
    /if n $return!=0 /goto :end_attack_loop 
  /goto :attack_loop 
  
  :end_attack_Loop 
  /if $combat!="false" /attack off 
  /if n $return!=0 /return $return 

/return 

sub KTD 
  /doability 7 
  /doability 8 
  /doability 9 
/return 

sub follow_me 
  /tell $v10 I'm hitched...Lead onward, $v10. 
  /target pc $v10 
  :follow_me_loop 
    /if n $target(distance)>14 /call MoveUP 
    /doevents 
    /if n $return!=0 /return $return 
  /goto :follow_me_loop 

/return 

sub MoveUP 
  /sendkey down up 
  :MULoop 
    /face 
    /if n $target(distance)<10 /goto :EndMULoop 
  /goto :MULoop 
  :EndMULoop 
  /sendkey up up 
/return 

sub event_chat 


  /if "$p1"=="$v10" {

    /if "$p2"=="attack" { 
      /return 1 
    } else /if "$p2"=="follow" { 
      /return 2 
    } else /if "$p2"=="back" { 
      /tell $p1 Backing off...Your on your own $v10. 
      /return 9
    } else /if "$p2"=="health" { 
      /tell $p1 My health is $char(hp,cur) | $char(hp,max) >>> $char(hp,pct)%   
    
    } else /if "$p2"=="Heroic" {
	/call BuffOne
    } else /if "$p2"=="Shield" {
	/call BuffTwo
    } else /if "$p2"=="Symbol" {
	/call BuffThree
    } else /if "$p2"=="Remedy" {
	/call HealOne
    } else /if "$p2"=="Divine" {
	/call HealTwo
    } else /if "$p2"=="Celestial" {
	/call HealThree
    } else /if "$p2"=="Complete" {
	/call HealFour
    } else /if "$p2"=="sit" { 
     /tell $p1 Sit or Stand ... Ok with me. $v10. 
     /sit on 
     /return 7 
    } else /if "$p2"=="invite" { 
      /tell $p1 Lets Group Up... $v10. 
      /invite 
    } else /if "$p2"=="help" { 
      /tell $p1 Valid commands : Heroic, Shield, Symbol, Remedy, Divine, Celestial, Complete, attack, back, follow, health, sit, invite. 
    } 

  } else /if "$p2"=="password swordfish" { 
    /tell $p1 Hello $p1. You have control. Please ask for my help for a valid list of commands. 
    /varset v10 $p1 
  } 

/return
Ok, This is a Combo of Pet.mac, and Druid.mac (for code idea)..
This Cleric.mac works faster and better then Druid.mac on my system.
Added my Clerics (3) Buffs, and (4) Heal types to it. I left one <gem> out of the code so far cause I want to figure out a way to find a spell in the book and place it in that gem.. as suggested on the board somewhere.
And, so far i don't believe we are able to get MANA yet... as suggested below.
Todo List:

Command for the "Pet" to self Buff.
Command to have the "Pet" locate, drag, and Resurrect your corpse.
Add Section to check the "Pets" Race and Class, so to facilitate Different commands for Druid or Cleric that will be in the "help" /tell back to you depending which class is running this.
Find a way to remove a <gem> spell and replace it with another.
ex: Remove <gem> 8, and memorise Resurrection in that <gem> slot.
Possibly add an Auto heal command. :lol:

I advise changing the /tells back to you to suit yourself.
Aside from lag issues.. Sending the /tell Command works flawlessly.
I intend to make this thing work for both Druid and Cleric in a single script.
Thanks to the previous authors for your brilliant effort.
I love this mac. 8)[/code]
Last edited by Java on Thu Jul 18, 2002 6:37 pm, edited 3 times in total.
My perception is my reality.

[url=http://www.phpbb.com/][img]http://www.mutedfaith.com/images/illusion.jpg[/img][/url]

azwildfire
Contributing Member
Contributing Member
Posts: 72
Joined: Fri Jul 05, 2002 5:12 am
Location: Phoenix arizona
Contact:

additions

Post by azwildfire » Wed Jul 17, 2002 9:52 pm

you could pretty quicky throw in a MANA command that would give you the person's mana, throw ina buff command that would run a serious of buffs cast in various spots

i love these pet programs.... now i have to PL my cleric to hang with my rnager, set em both up to just do spiders all day in velks and wake up one weekend with 10000 aa points :) hahaha

i can dream!

heck, why not even throw a nuke command in there now that i think about it

sempi
orc pawn
orc pawn
Posts: 22
Joined: Wed Jul 10, 2002 10:31 pm

Post by sempi » Wed Aug 07, 2002 5:57 pm

Code: Select all

/if "$p2"=="mana" {
/tell $p1 $char(mana,pct) mana sire
}
nuking would be relatively easy to add. The current code is a little umm... wordy ;oP but looks really good. My cleric macro is about 40 lines and does everything including nuking besides the attack command (no weapon in hand).
Just thought I'd add the mana thing since the author hasn't. Might I also suggest an set of afk response msgs, at least one for anyone else that sends tells. How about also including the ability to heal other party members or other ppl in general.

Code: Select all

/varset v3 "$p2" 
 /target $arg(2,"$v3") 
that would target the 2nd argument in the tell, so you could do "/tell clericbot CH furor" and it would then /target furor and CH him

Genoius
a lesser mummy
a lesser mummy
Posts: 49
Joined: Sat Jul 13, 2002 8:20 am

Cleric.mac

Post by Genoius » Wed Aug 07, 2002 8:59 pm

I must say, very nice job. I wonder if this is gonna see clerics nerfed, since Verant hates those of us who use macros to better our lives...anyways, I like it, and now I won't have to be macroing and debugging for a cleric macro. :)

---Genoius---

Java
a lesser mummy
a lesser mummy
Posts: 73
Joined: Sat Jul 13, 2002 12:03 pm

Post by Java » Thu Aug 08, 2002 12:20 am

I been a bit lax lately, haven't been using the Cleric, i been building a Necro. But,.. thanks for the mana code. I guess most that see the macros here are able to just add what they want to the basics.

Still working on targeting a corpse you can't see, and running to it, to drag to a safe (command line LOC), then rezz it.
The problem is with the targeting, so working on tests between leveling.
If any have luck with "Target corpse, run to it around obstacles' without actually seeing the corpse to target first, let me know.
I'm nearly bald with pulling my hair out on that trick.

I can easily face and get to a location, by entering it on the command line,
i can target the corpse too, but can't get a corpse loc =/

Peace.
My perception is my reality.

[url=http://www.phpbb.com/][img]http://www.mutedfaith.com/images/illusion.jpg[/img][/url]

sempi
orc pawn
orc pawn
Posts: 22
Joined: Wed Jul 10, 2002 10:31 pm

Post by sempi » Thu Aug 08, 2002 12:44 pm

if you target the corpse

Code: Select all

/target corpse furor
then do a

Code: Select all

/who corpse %t : (or /who corpse furor from the start) 
I believe you can get a distance to target. I don't think there is any way in MQ to get an exact loc (like in showeq). And there will never be a way to make it run around any obstacles, that would require some massive coding to do that kind of collision detection and pathing. You could get something like this to work in say OT, but it would never work in karnors.

Java
a lesser mummy
a lesser mummy
Posts: 73
Joined: Sat Jul 13, 2002 12:03 pm

Post by Java » Thu Aug 08, 2002 5:36 pm

I'll give it a try, atleast when i have time for it, and i'll post the new Cleric.mac when i'm done.

But as for pathing, i can do that already, limited, but i can do it.
Already working on a new macro to enter a command like /macro Kaladim Bank and it will walk there.
Just not ready to post it, till it works with lag, Large people blocking the door, and other such unseens.

already use one pathing macro for OOT, i type /macro Sisters, or /macro Brothers, or /macro Sirens and from my point, i go right to the spot i designated. Using the same one for getting around doorways, people, etc.. when it's ready too like i said, i'll post it with the Cleric.mac.

Rome wasn't built in s day =)

Peace.
My perception is my reality.

[url=http://www.phpbb.com/][img]http://www.mutedfaith.com/images/illusion.jpg[/img][/url]

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

Post by L124RD » Fri Aug 09, 2002 11:45 am

Salutations,
You said you can do pathing, is this simply a string of points through the zone that the macro finds which one you are closest to, goes to it, then follows it to the destination? or some other one....?

Java
a lesser mummy
a lesser mummy
Posts: 73
Joined: Sat Jul 13, 2002 12:03 pm

Post by Java » Fri Aug 09, 2002 5:21 pm

Yes. it is a string of points.
Since MQ is a "fall through" sort of language starting from Top eventually getting to the bottom of the macro, it's perfect for a string of LOC's.
It faces each point, then walks to it, till the destination is reached.
Obstacles are gotten around by adding to the current loc by 30 then facing the original LOC.
I will post it here when im done with it. Just not completed yet.
Lizard your a smart one. i like that =)

Peace.
My perception is my reality.

[url=http://www.phpbb.com/][img]http://www.mutedfaith.com/images/illusion.jpg[/img][/url]

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

Post by L124RD » Fri Aug 09, 2002 7:15 pm

Salutations,
is that add 30 thing for getting to that string of locks?

Java
a lesser mummy
a lesser mummy
Posts: 73
Joined: Sat Jul 13, 2002 12:03 pm

Post by Java » Sun Aug 11, 2002 12:20 am

It's just adding 30 to the current heading. The current heading is used as a variable, if an obstruction is there i add 30 to the current heading.. it turns me slight left then the script returns me to the wanted direction after a second or 2.

Subtract 30 to turn slightly to the right.
the idea is to get around an obstacle.

The sample is somewhere in the macros on the board here. Thats where i found it. .. No sense in reinventing the wheel.
My perception is my reality.

[url=http://www.phpbb.com/][img]http://www.mutedfaith.com/images/illusion.jpg[/img][/url]

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

Post by L124RD » Sun Aug 11, 2002 4:36 am

Salutations,
m0nk wrote:

Code: Select all

Sub GoToLoc
	/face loc $p0
	/varset v81 $calc($rand(5)+3)
	/varset v96 "$char(x)"
	/varset v97 "$char(y)"
	/goto :moveGoToLoc
	
	:moveGoToLoc
		/varset v96 "$char(x)"
		/varset v97 "$char(y)"
		/delay 1
		/if n $distance($p0)<$v81 /goto :endGoToLoc
		/face fast loc $p0
		/if "$p1"=="u" /Press u
		/if n $distance($p0)>12 /sendkey down up
		/if n "$v96"=="$char(x)" /if n "$v97"=="$char(y)" /goto :stuckGoToLoc
		/if n $distance($p0)<$v81 /goto :endGoToLoc
		/if n $distance($p0)>$v81 /goto :moveGoToLoc
	:stuckGoToLoc
		/press U
		/varset v98 $char(heading)
		/face heading $calc($v98+50)
		/delay 1
		/goto :moveGoToLoc
	:endGoToLoc
		/sendkey up up
/return
that?

Java
a lesser mummy
a lesser mummy
Posts: 73
Joined: Sat Jul 13, 2002 12:03 pm

Post by Java » Tue Aug 13, 2002 7:52 am

Actually it's this code from the Routine.mac that i was refering to

Code: Select all

Sub GotoLoc
   :GotoLocLoop
      /face loc $p0
      /if "$p1"=="u" /Press u
      /call AutoRun 1
   /if n $distance($p0)>20 /goto :GotoLocLoop
   /call AutoRun 0
/return
This section of the routine.mac for getting around obstacles.
The hang up im having is a timer, to run or walk for a given amount of time to the next set of LOC.

I dunno where the code above came from, never seen it.
But does it work like what we are trying to do?
Does it start from one point, then move on to the next point, till the string of loc's is ended? (too new to macro writing, and too early in morning before work to figure it out right now).


Basically the code i been working on works like this:

Say i zone into Kaladim.
I type /macro Bank
I face the first LOC and walk to it.
Face the next LOC and walk to it.
Face the next LOC and walk to it.
Till the end of the macro is reached.

But it is doing it much to fast, so the character will run through the mac
in about 2 seconds, and hasn't reached the destination.
a timer is what i need to have the character walk to the first LOC till the timer is out, or the LOC is reached.

Thats my hang up.

As for the straight runs over an ocean, those are easy.. your macro will face the known LOC, then 'swim' to it, till you reach the spot.

Im no genious, nor a programmer, just person that tries to work with what i have available to me. Rather then post for answers, having people do all the owrk for me.. a helping hand is needed sometimes, and this is a request for some help.

Help me find a way to run a character to a given spot, or walk for a certian amount of time, till the timer is ended, or the loc is reached.

Then we can make a library of goto macs for popular spots with it.

peace.
My perception is my reality.

[url=http://www.phpbb.com/][img]http://www.mutedfaith.com/images/illusion.jpg[/img][/url]

Java
a lesser mummy
a lesser mummy
Posts: 73
Joined: Sat Jul 13, 2002 12:03 pm

Post by Java » Tue Aug 13, 2002 7:57 am

erm.. wrong code snippet above.. sorry. look in the macros for a Tree sub routine, it works, and is what im using.
My perception is my reality.

[url=http://www.phpbb.com/][img]http://www.mutedfaith.com/images/illusion.jpg[/img][/url]