/* ----------------------------------------------------------------------------- | Healing Functions Rev.2.8.9 | CadTargetter 2.0.3 | Ultimate Cad 2.2.1 | | Asklepian 1.0 | SetBurst/Pulse 2.0.1 | -------------------------------------------------------------------------------- These macros are greatly enhanced versions of the QuickSwap Self-healing macro. These macros settle into a single pulse loop when you equip your moonstone. With Tarf's Ultimate Cad macro! This works better than the ring (if you're not a super respia healer), so long as you can equip your moonstone. Bugs? Suggestions? Comments? write noivad -at- mac -dot- com. Original QuickSwap macro, setting pulse/burst and fall detection by Noivad using Veer's feedback on the rev1 macro. ******************************************************************************* Latest version at http://www.noivad.net/files/macros/moonstone_functions.txt *********************** Installing and Activating ***************************** 1. To include this macro in your active macros, save this file to your macros folder. Then open your character's macro file and type: include "moonstone_functions.txt" (with the the double quotes) 1b.PC Users: either convert to PC format or rename file "moonstone_fuctions.mac" 2. Change the healingDevice and auraHDevice in the Global Variables section to a Caduceus, Mercurial Staff, Asklepian or Asklepian Staff. 2b.Change myWeapon to your weapon of choice. [Optional Setup] [3.] Set your pulse rate (in frames), and burst count in Global Variables [4.] Change the triggers in the Trigger section to you liking. ******************************** Basic operation ******************************* "control-click" on player, heals them with your Caduceus or Mercurial Staff. "control-click" on yourself equips you moonstone and goes into healing loop. "control-click" on ground uses your Asklepian or Asklepian Staff. "F3" swaps your weapon and moonstone. "F4" equips your Cad or Merc Staff and if a person is selected it tries to cad them. If no one is selected it cads the last person you cadded. ***************************** Global Variables **************************** */ set myWeapon "dagger" //change this to your weapon of choice set healingDevice "Asklepian Staff" // set to "Caduceus" or "Mercurial Staff" set auraHDevice "Asklepian Staff" //Set this to "Asklepian" or "Asklepian Staff" set cadTarget "" set pulseRate 8 //<--you can change the default here permanently set burstCount 6 //<-or use the setpulse/setburst to change it on the fly. set sleepToggle 1 // This is to allow you to turn off the healing loop if you //sleep (add: {setglobal sleepToggle 1} to your sleep macro. set infiniteControl 0 set rsaveitem @my.right_item set cadTarget[1] "" set cadTarget[2] "" set cadTarget[3] "" set cadTarget[4] "" set cadTarget[5] "" set icon 0 /* ******************************** Triggers ******************************** */ f3 call itemswap //f3 switches between myWeapon and your moonstone, shift-f3 call restartInfinityLoop f4 call cadLastTarget shift-f4 call LockCaddingOn f8 call staticTarget1 shift-f8 call staticTarget1Set f9 call staticTarget2 shift-f9 call staticTarget2Set f10 call staticTarget3 shift-f10 call staticTarget3Set f11 call staticTarget4 shift-f11 call staticTarget4Set f12 call staticTarget5 shift-f12 call staticTarget5Set "setpulse" call pulseRateSet "setburst" call burstAmountSet // Set control-click (right click) {healClicked} and // shift-control-click (shift-right-click) {LockCaddingOn} below. /* ------------------------- Moonstone Functions 2.8.9 ---------------------- */ /* ---------------------------- Ultimate Cad 2.2.1 -------------------------- */ //This section copies Tarf's Ultimate Cad Macro, and bolts on the healing loop control-click //healClicked { $any_click "/select " @click.simple_name "\r" if @selplayer.simple_name == @my.simple_name call burster else if @selplayer.simple_name == "" call burster else if @my.right_item == "chain" "/pull " @selplayer.name "\r" message "***Chaining, please use F3 or F4 to switch to your moonstone or cad.***" else call cadswap setglobal cadTarget @selplayer.simple_name message "You are healing " @selplayer.name "/use " cadTarget "\r" end if end if } shift-control-click { $any_click "/select " @clicksplayer "\r" if @selplayer.simple_name == "" call useAsklepian else if @selplayer.simple_name == @my.name call burster else call cadswap "/use /lock " @selplayer.simple_name "\r" message "You are healing " @selplayer.name end if end if } restartInfinityLoop { call itemswap call infinityloop setglobal sleepToggle 0 setglobal infiniteControl 0 } cadLastTarget //f4 equips your healing device (set above) { // & heals the currently selected person. if @my.right_item != healingDevice "/equip " healingDevice "\r" end if "\use " cadTarget "\r" } burster { //or it prematurely end. (I'm looking into that bug.) setglobal infiniteControl 0 setglobal sleepToggle 0 call moonswap pause 1 "/use " burstCount "\r" pause pulseRate setglobal infiniteControl 0 setglobal sleepToggle 0 call infinityloop } cadswap { if @my.right_item != healingDevice "/equip " healingDevice "\r" if icon == 1 "/options icon unarmed\r" setglobal icon 0 end if end if } itemswap { set @env.key_interrupts true if @my.right_item != "moonstone" setglobal rsaveitem @my.right_item "/equip moonstone\r" if icon == 1 "/options icon unarmed\r" setglobal icon 0 end if pause 1 "/use " burstCount "\r" pause pulseRate setglobal infiniteControl 0 setglobal sleepToggle 0 call infinityloop else if @my.right_item != myWeapon setglobal rsaveitem @my.right_item setglobal infiniteControl 1 setglobal sleepToggle 0 "/equip " myWeapon "\r" if icon == 0 "/options icon armed\r" setglobal icon 1 end if end if } moonswap { set burstRate pulseRate set burstRate * 2 set swaploop 3 set @env.key_interrupts true if @my.right_item != "moonstone" setglobal rsaveitem @my.right_item "/equip moonstone\r" if icon == 1 "/options icon unarmed\r" setglobal icon 0 end if end if } infinityloop //this loop makes constant self-healing possible { set @env.key_interrupts false set i 0 label infinity if sleepToggle == 0 if infiniteControl != 1 if i <= 120 set i + 1 if @my.right_item == "moonstone" //checks to make sure you have the moonstone equiped "/use\r" pause 1 if @env.textLog < "in your current condition." //if you fall this stops the loop setglobal infiniteControl 1 end if pause pulseRate goto infinity else pause 1 setglobal infiniteControl 1 end if else pause pulseRate set i 0 pause pulseRate call burster goto infinity end if end if end if if infiniteControl != 1 message "Constant healing loop has ended. To restart please press shift-f3" end if } /* ---------------------- Pulse and Bust Sets v2.0.1 ----------------------- */ pulseRateSet { set max 40 if @text == "?" message "This command lets the interval (in frames) between moonstone uses (called pulses)." pause 10 message "CL runs at 4 fps (3fps primetime), the maximum interval you can set is" max " frames unless you type \"setpulse override \"" pause 10 message " Curent pulse interval is " pulseRate "frames." "setpulse " else if @text < "override" setglobal pulseRate @text.word[1] else if @text <= max if @text > 1 setglobal pulseRate @text message "pulse rate is now " pulseRate else if @text < 1 setglobal pulseRate 0 message "Minimum pulse interval is 1 frame." end if else message @text "is out of scope. Type \"setpulse ?\" for help." "setpulse" end if } burstAmountSet { set max 100 if @text == "" "Type a number after typing \"setburst\". Type \"setburst ?\" for help." else if @text == "?" message "Type the number of uses for burst self-healing: \"setburst \"" pause 8 message "They maximum uses in one burst is " max "." pause 8 message "Curent burst rate is " burstCount pause 2 "burstRate" else if @text <= max setglobal burstCount @text else message @text "is out of scope. Type \"setpulse ?\" for help." end if } /* ------------------------------- Asklepian 1.0 ---------------------------- */ useAsklepian { if @my.right_item != auraHDevice "/equip " auraHDevice "\r" end if "/use\r" "/pose bless\r" } /* **************************** CadTargetter 2.0.3 ***************************** As of version 2.8.3 you can now set cad targets of up to 4 people. Setting Cad targets is easy, you right click on a player and hit F8-F12 the first time you set this. When to reset it to a new person hit shift-F8(-12) ***************************************************************************** */ staticTarget1 { call cadswap if cadTarget[1] == "" setglobal cadTarget[1] @selplayer.simple_name message "*Set " cadTarget[1] " as cad target F8." end if "/select " cadTarget[1] "\r" "/use " @selplayer.simple_name "\r" } staticTarget1Set { call cadswap setglobal cadTarget[1] @selplayer.simple_name "/use " cadTarget[1] "\r" message "*Set " cadTarget[1] " as cad target F8." } staticTarget2 { call cadswap if cadTarget[2] == "" setglobal cadTarget[2] @selplayer.simple_name message "*Set " cadTarget[2] " as cad target F9." end if "/select " cadTarget[2] "\r" "/use " @selplayer.simple_name "\r" } staticTarget2Set { call cadswap setglobal cadTarget[2] @selplayer.simple_name "/use " cadTarget[2] "\r" message "*Set " cadTarget[2] " as cad target F9." } staticTarget3 { call cadswap if cadTarget[3] == "" setglobal cadTarget[3] @selplayer.simple_name message "*Set " cadTarget[3] " as cad target F10." end if "/select " cadTarget[3] "\r" "/use " @selplayer.simple_name "\r" } staticTarget3Set { call cadswap setglobal cadTarget[3] @selplayer.simple_name "/use " cadTarget[3] "\r" message "*Set " cadTarget[3] " as cad target F10." } staticTarget4 { call cadswap if cadTarget[4] == "" setglobal cadTarget[4] @selplayer.simple_name message "*Set " cadTarget[4] " as cad target F11." end if "/select " cadTarget[4] "\r" "/use " @selplayer.simple_name "\r" } staticTarget4Set { call cadswap setglobal cadTarget[4] @selplayer.simple_name "/use " cadTarget[4] "\r" message "*Set " cadTarget[4] " as cad target F11." } staticTarget5 { call cadswap if cadTarget[5] == "" setglobal cadTarget[5] @selplayer.simple_name message "*Set " cadTarget[4] " as cad target F12." end if "/select " cadTarget[5] "\r" "/use " @selplayer.simple_name "\r" } staticTarget5Set { call cadswap setglobal cadTarget[5] @selplayer.simple_name "/use " cadTarget[5] "\r" message "*Set " cadTarget[5] " as cad target F12." } /* ---------------------------- Group Healing ---------------------------- */ /* THIS SECTION MADE OBSOLETE BY THE Asklepian setglobal execute 1 shift-f8 setglobal execute 0 f13 { if execute != 1 goto end end if set @env.key_interrupts true set @env.debug false if waxOn == 1 setglobal waxOn 0 goto end else setglobal waxOn 1 end if set sharers @my.shares_in set num_shares sharers.num_words set count 0 if debug == 1 message "**" @my.shares_in "**" end if label TargetSet if count < num_shares if sharers.word[count] != "" setglobal ct count setglobal ct + 1 setglobal cadTarget[ct] sharers.word[count] if debug == 1 message "**cadTarget[" count "] set to " cadTarget[ct] "**" end if else message "***You have no shares in***" goto end end if set count + 1 goto TargetSet end if call cadswap setglobal ct 1 label ConstantCaddingLoop if ct <= num_shares "/use " cadTarget[ct] "\r" "/select " cadTarget[ct] "\r" if debug == 1 message "cadding: " cadTarget[ct] end if pause 20 setglobal ct + 1 goto ConstantCaddingLoop else setglobal ct 1 if waxOn == 1 goto ConstantCaddingLoop end if message "*no one to heal" goto end end if label end setglobal execute 1 } */