Shaman Bodyguard
Posted: Wed Nov 22, 2006 2:08 am
I am currently working on a shaman robot who act like my puppy that will keep following me, heal me and buff me ( upon request ). The macro is briefly done but it not seems to be efficiency as I donno how to handle the spell cast as my shaman may keep moving to follow the plee, is anyone have a better idea on this?
I will keep maintain this macro till everyone who have a shaman happy :)
I will keep maintain this macro till everyone who have a shaman happy :)
Code: Select all
|----------------------------------------------------------------------------------------
| Shaman Bodyguard 0.1
|
| Created by the God of Cat
|
| Usage : /mac bodyguard <plee> <percentage to heal>
| Example : /mac bodyguard Gimp 50
|
| Spell Recommendation :
|
| Gem 1 "Duration Heal"
| Gem 2 "Instant Heal"
| Gem 3 "Focus"
| Gem 4 "Sta"
| Gem 5 "Panther"
| Gem 6 "Haste"
| Gem 7 "Gate"
| Gem 8 "Canni"
| Gem 9 "Whatever"
|
| If you have any good idea, please do not hesitate to drop me a mail or tell in game
|----------------------------------------------------------------------------------------
#turbo 40
#include spellcast.inc
#chat tell
|----------------------------------------------------------------------------------------
| Main Loop
|----------------------------------------------------------------------------------------
Sub Main
| Variable declaration
/declare plee string outer ${Param0}
/declare healhps int outer ${Param1}
/declare assist bool outer TRUE
/declare follow bool outer TRUE
/declare mobid int outer
/declare incoming string outer Attacking
| Spell declaration
/declare healspell string outer Yoppa's Mending
/declare hotspell string outer Spiritual Sereity
/declare cannispell string outer Pained Memory
/declare focusspell string outer Talisman of Wunshi
/declare hastespell string outer Talisman of Celerity
| Marco Syntax Check
/if (!${Defined[Param0]}) {
/echo You didn't name your PL'ee
/echo Usage: /mac bodyguard <plee> <percentage to heal>
/echo Ex: /mac bodyguard gimp 50
/endmacro
}
/if (!${Defined[Param1]}) {
/echo You didn't define when to heal
/echo Usage: /mac bodyguard <plee> <percentage to heal>
/echo Ex: /mac bodyguard gimp 50
/endmacro
}
| Main Loop
:mainloop
/call movement
/call check
/call combat
/call remote
/doevents
/goto :mainloop
|----------------------------------------------------------------------------------------
| Movement Control
|
| Shaman will stay with 200 range of plee where most spell can land within this range
|----------------------------------------------------------------------------------------
sub movement
:movement
/target ${plee}
/if (${Target.ID} && ${Target.Distance}>=200 && $(follow)) {
/target ${plee}
/follow
/delay 5s
/keypress left
/keypress right
/goto :movement
}
/doevents
/return
|----------------------------------------------------------------------------------------
| Various Checking
|
| 1) Mana and Health
| 2) Buff
|----------------------------------------------------------------------------------------
sub check
:check
/call canni
/call heal1
/call heal2
/call pleedead
/goto :check
/return
sub canni
/if (${Me.PctHPs}>50 && ${Me.PctMana}<50) {
/call cast "${cannispell}" gem8 nodismount
} else {
/gsay Low on Mana and no guts to Eat myself... Let me med some
}
/return
sub heal1
:hotplee
/target ${plee}
/if (${Target.ID} && ${Target.PctHPs}<90 && ${Target.Distance}<=100) {
/target ${plee}
/gsay HoT on %T
/call cast "${hotspell}" gem1 nodismount
/goto :hotplee
}
/doevents
/return
sub heal2
:healplee
/target ${plee}
/if (${Target.ID} && ${Target.PctHPs}<${healhps} && ${Target.Distance}<=100) {
/target ${plee}
/gsay Healing %T
/call cast "${healspell}" gem2 nodismount
/goto :healplee
}
}
/doevents
/return
sub pleedead
:pleedead
/target ${plee}
/if (${Target.ID} && ${Target.PctHPs}=0) {
/gsay Fuck why die??!
/delay 1s
/gsay Now tell me I should flee or what..?
/goto :pleedead
}
/doevents
/return
|----------------------------------------------------------------------------------------
| Remote control module
|
| Shaman will follow the order made by Plee by tell
|
| Command List :
|
| Assist off - Stop slow the mob even with attack sign and hold pet
| Assist on - Start slow the mob on attack sign and send pet ( Default )
| Camp - Camp immediately
| Focus - Cast HP Buff on plee
| Follow - Start following plee ( Default )
| Gate - Gate back to bind point
| Haste - Cast Haste on plee
| Help - Display list of command available
| Stay - Stop following plee
|
|----------------------------------------------------------------------------------------
sub remote
/if (!${ChatType.Equal[TELL] && ${ChatSender.Equal[${plee}]}]}) /return
/call command
}
/return
sub command
/if (${ChatText.Equal[Assist off]}) {
/varset assist FALSE
/pet back
/delay 1s
/pet hold
/return
}
/if (${ChatText.Equal[Assist on]}) {
/varset assist TRUE
/return
}
/if (${ChatText.Equal[Camp]}) {
/gsay Camping now, protect me for 30second or HGC!
/camp
/endmacro
/return
}
/if (${ChatText.Equal[Focus]}) {
/target ${plee}
/call cast "${focusspell}" gem3 nodismount
/return
}
/if (${ChatText.Equal[Follow]}) {
/varset follow TRUE
/return
}
/if (${ChatText.Equal[Gate]}) {
/call cast "gate" gem7 nodismount
/endmacro
/return
}
/if (${ChatText.Equal[Haste]}) {
/target ${plee}
/call cast "${hastespell}" gem4 nodismount
/return
}
/if (${ChatText.Equal[Help]}) {
/reply Here is the list of command available :
/delay 1s
/reply Assist on, Assist off, Camp, Focus, Follow, Gate, Haste, Help, Stay
/return
}
/if (${ChatText.Equal[Stay]}) {
/varet follow FALSE
/return
}
/return
|----------------------------------------------------------------------------------------
| Combat Module
|
| If you do not have slow stick clicky, change it to use spell instead
| If you do not want to summon pet, comment out the /pet command
|----------------------------------------------------------------------------------------
sub combat
:slow
/if (${ChatText.Equal[${incoming}]} && ${assist}) {
/assist ${plee}
/delay 1s
/target ID ${mobid}
/if (${Target.ID} && ${Target.PctHPs}<99 && ${Target.Distance}<200) {
/target ID ${mobid}
/echo Casting Slow and sending pet
/pet attack
/itemnotify mainhand rightmouseup
/doevents
/goto :slow
}
}
/doevents
/return
/return
/return