Ultimate Cleric script [Request Fulfilled]

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

Moderator: MacroQuest Developers

Banned_From_EQ
orc pawn
orc pawn
Posts: 16
Joined: Mon Jun 24, 2002 7:01 pm

Ultimate Cleric script [Request Fulfilled]

Post by Banned_From_EQ » Fri Sep 06, 2002 11:08 pm

I have a few scripts I would like put together and I don't know how to do it. I will put the scripts here and I was hoping someone could put them all into one script. I want a cleric that accepts invites and give mana reports at 40, 20, and 5%. Also one that can determine by class how to heal remedy for int casters / CH for Warriors and divine light for everything else. Also when it hear's heroic bond or buffs or HB it will cast heroic bond. Now to the scripts.

Cleric group script

[[L124RD still loves those wonderful code brackets]]

Code: Select all

| - clericAH.mac - 
| By powerspike 
| Basic group auto heal script 
#include spellsub.mac 

Sub Main 
   /press ESC 
   /press F1 
   /if "$target()"=="TRUE" /varset v7 0 
   /press ESC 
   /press F2 
   /if "$target()"=="TRUE" /varset v7 1 
   /press ESC 
   /press F3 
   /if "$target()"=="TRUE" /varset v7 2 
   /press ESC 
   /press F4 
   /if "$target()"=="TRUE" /varset v7 3 
   /press ESC 
   /press F5 
   /if "$target()"=="TRUE" /varset v7 4 
   /press ESC 
   /press F6 
   /if "$target()"=="TRUE" /varset v7 5 
   /press ESC 
   :LoopStart 

      /delay 1 
         |/echo $v7 -- 
         /for v40 0 to $v7 
            /delay 5 
            /if n $v40==0 /press F1 
            /if n $v40==1 /press F2 
            /if n $v40==2 /press F3 
            /if n $v40==3 /press F4 
            /if n $v40==4 /press F5 
            /if n $v40==5 /press F6 
            /varset v59 $target(hp,pct) 
            | the if statement checks to see if HP are under 50% on the target if so stand heal and sit 
            /if n $v59<=50 { 
               /sit off 
               | This call spellsub is set to Sup Heal (slot 1) 
               /call SpellSub 1 8 
               | THis call Spell Sub is set to Cheal (slot 2) 
               | /call Spell Sub 2 13 
               /sit on 
            } else /if n $v59>=90 { 
               /delay 0             
            } 
         /next v40 
   /goto :LoopStart 
   /return 
/goto LoopStart 
/return

Cleric Buff script


| 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

Out of this one i want the ability for buffs

and here is the auto accept invite


| - autojoingroup.mac - 
| Automatically joins any group when invited 
| untested, written from the top of my head 

#event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel" 

sub Main 
   :WaitForInvite 
   /doevents 
   /goto :WaitForInvite 
/return 

sub Event_Invited 
   | In EQ, if you type /invite after being invited, you join... 
   /delay $rand(45) 
   /invite 
/return

Now I dont know how to do mana checks but i would like one that could report it for me. I appreciate the help ahead of time and i look forward to seeing your work.

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

Post by L124RD » Sat Sep 07, 2002 2:09 am

Salutations,
if you just want to echo it... i believe there is an alias built in 0905 named '/mana'... the code for it is:

Code: Select all

/echo Current Mana: $char(mana,cur) -- Max Mana: $char(mana,max)
so you can just use that to mqlog if you need to...

powerspike
a ghoul
a ghoul
Posts: 80
Joined: Sun Aug 11, 2002 11:40 pm
Location: Australia
Contact:

Post by powerspike » Sat Sep 07, 2002 6:25 am

for a mana check something like the following

Code: Select all

/if n $char(mana,pct) <= 5 {
|put what you want to do in here for 5%
} else /if n $char(mana,pct) <=10 {
|put here for 10% mana
} else /if n $char(mana,pct)  <= 20 {
put here 20% check
}

something like that for you mana check and actions
One for the Road guys, what's the worst that could happen......

LOADING, PLEASE WAIT ....

Banned_From_EQ
orc pawn
orc pawn
Posts: 16
Joined: Mon Jun 24, 2002 7:01 pm

Post by Banned_From_EQ » Sat Sep 07, 2002 8:04 am

Also i thought of a new feature in case of death it automatically logs out your acct just so you can res later can you throw that in also?

Banned_From_EQ
orc pawn
orc pawn
Posts: 16
Joined: Mon Jun 24, 2002 7:01 pm

Post by Banned_From_EQ » Sat Sep 07, 2002 8:06 am

Also can antone maje all that gibberis*code illiterate( into one script for me? Much appreiciated.