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
}
/returnThis 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.
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]


