Testers for Clericbot macro

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Testers for Clericbot macro

Post by Draekz » Thu Oct 03, 2002 11:32 pm

Well here's a cleric GROUP bot macro that is basically made to sit and heal (havent put buff program in yet..much more work to do)

Anyway I wanted people to either look at it and mention any "tweaks/bugs" i need to fix or to even test it out and let me know if it works or not!

I have a feeling my spell memorization thing isnt going to work but here's to hoping!

Code: Select all


| - clericAH.mac - 
| Original powerspike 
| Basic group auto heal script
| Extremely Altered by Draekz 
#include spellsub.mac
#include spellbook.mac

#chat say
#chat tell
#Event NotMem " You do not seem to have that spell memorized."

    Sub Main 
|This makes sure all spells are properly Memorized, if not it
|memorizes it for the player.
	:next1
        /if "$char(gem,1)"=="NULL" {
        /goto :Gem1 
|This is the name of the spell in Gem slot 1 *hence (gem,#) *
|Note there is a bug in 1001a (on my comp) that names Superior
|Heal "PLAYER_1", hence the reason its named so
        }else /if "$char(gem,1)"!="PLAYER_1" {
        /call Gem1
        }else {
        /goto :next2
        {

/return

        :next2

/if "$char(gem, 2)"=="NULL" {
/call Gem2
}else /if "$char(gem,2)"!="Complete Healing" {
/call Gem2
}else {
|If it doesnt see anything wrong, it goes to the next Gem
/goto :next3
{

/return

:next3

/if "$char(gem,3)"=="NULL" {
/call Gem3
}else /if "$char(gem,3)"!="Greater Healing" {
/call Gem3
}else {
/goto :next4
{

/return

:next4

/if "$char(gem,4)"=="NULL" {
/call Gem4
}else /if "$char(gem,4)"!="Valor" {
/call Gem4
}else {
/goto :next5
{

/return

:next5

/if "$char(gem,5)"=="NULL" {
/call Gem5
}else /if "$char(gem,5)"!="Armor of Faith" {
/call Gem5
}else {
/goto :next6
{

/return

:next6

/if "$char(gem,6)"=="NULL" {
/call Gem6
}else /if "$char(gem,6)"!="Root" {
/call Gem6
}else {
/goto :next7
{

/return

:next7

/if "$char(gem,7)"=="NULL" {
/call Gem7
}else /if "$char(gem,7)"!="Divine Aura" {
/call Gem7
}else {
/goto :next8
{

/return

:next8

/if "$char(gem,8)"=="NULL" {
/call Gem8
}else /if "$char(gem,8)"!="Divine Barrier" {
/call Gem8
}else {
/goto :restofcode
{

/return

	:restofcode
   /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 
   
         /delay 1
 
|/echo $v7 -- 
	:start
      /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<=85 {
        /goto :Heal
        }else /if n $v59>=90 
        {
        /delay 1
        } 
        
        /next v40 
        /goto :LoopStart 
 
/return 
               
         :Heal 
   
               /if $target(class)=="Enchanter" {
               /goto :Casters
               }else /if $target(class)=="Magician" {
               /goto :Casters
               }else /if $target(class)=="Wizard" {
               /goto :Casters
               }else /if $target(class)=="Druid" {
               /goto :Casters
               }else /if $target(class)=="Shaman" {
               /goto :Casters
               }else /if $target(class)=="Cleric" {
               /goto :Casters
               }else /if $target(class)=="Necromancer" {
               /goto :Casters
               }else /if $target(class)=="Beastlord" {
               /goto :Casters
               }else {
               /goto :CHeal
               }

/return
           
         :Casters
    
   	/delay 1
   /sit off
   /gsay SHealing $target(name)
   /cast "PLAYER_1"
   /if n $v23==0 {
       /call MemorizeSpell "PLAYER_1" 1
  	 /delay 10
  	 }else {
  	 /goto :Casters
  	 }
   	/delay 5s
   /sit on
   
/return
            
              
         :CHeal
 
   	/delay 1
   /sit off 
   /gsay Completely Healing $target(name) 
   /cast "Complete Healing"
   /if n $v23==0{
       /call MemorizeSpell "Complete Healing" 2
   	/delay 10
  	 }else {
   	/goto :CHeal
   	{
   	/delay 10s 
   /sit on

/return 



Sub Event_NotMem
   
	/varset v23 0
     
/return

Sub Gem1

	/call MemorizeSpell "PLAYER_1" 1
	/delay 10
	/goto :next2

/return

Sub Gem2

	/call MemorizeSpell "Complete Healing" 2
	/delay 10
	/goto :next3

/return

Sub Gem3

	/call MemorizeSpell "Greater Healing" 3
	/delay 10
	/goto :next4

/return

Sub Gem4

	/call MemorizeSpell "Valor" 4
	/delay 10
	/goto :next5

/return

Sub Gem5

	/call MemorizeSpell "Armor of Faith" 5
	/delay 10
	/goto :next6

/return

Sub Gem6

	/call MemorizeSpell "Root" 6
	/delay 10
	/goto :next7

/return

Sub Gem7

	/call MemorizeSpell "Divine Aura" 7
	/delay 10
	/goto :next8

/return

Sub Gem8

	/call MemorizeSpell "Divine Barrier" 8
	/delay 10
	/goto :restofcode

/return

PLEASE post feedback in here and any corrections (or examples of ways to improve it or make it less lengthy)..

Thanks

Draekz

PS (this is my first real attempt at a decent macro :P so give me slack! But feel free to lemme in on any secrets u might have in improving it..thanks :) )

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Thu Oct 03, 2002 11:39 pm

Woot..just tested the spell memorizing section..so far so good :)

Next about to test the healing process (and what happens if i dont have the spell memmed..to see whether or not it mems it then heals :)

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Thu Oct 03, 2002 11:42 pm

Hmm just noticed my guy cant walk :\ Anytime i push the up arrow key it
brings up the last text i wrote in the text bar

bleh! hehe Any help (look at above code) would be greatful! thanks :)

EDIT: Hmm even after turning off the macro i still cant move..for some reason thinks one of the keys is stuck (which ever key is used to scroll back text that u wrote in the textbar)


EDIT2: OK nm its not the macro lol its EQW i think...i unloaded eqw and then reloaded it without running any macros and i still cant move (with the same problem in the first one)


Mebbe just a buggie EQW or macroquest? hehe bleh i'll test it out
Draekz

User avatar
DeathSpiral
a ghoul
a ghoul
Posts: 95
Joined: Thu Aug 22, 2002 6:31 pm

Post by DeathSpiral » Fri Oct 04, 2002 12:34 am

you used a /sendkey down shift and never sent it as up. You also havn't tapped shift yet to reset its state. :) If you tap shift a few times, it'll clear the problem up. :)
I am orc pawn, hear me yell for centurians...

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Fri Oct 04, 2002 12:51 am

Ahh thanks Death ;) Much appreciated :) i'll check that out!

As for the macro..it ends without cause for some reason..just does its thing once then /endsmacro or something hehe no error msg's eithr!

Draekz

EDIT: hah im retarded..just forgot to tell it to return to :StartLoop after healing..instead it was just /return ending :P

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Fri Oct 04, 2002 1:34 am

UPDATED CODE:

This is an updated version of the previous macro (tested)

You'll have to edit the spells accordingly to your level.

And it works!

Code: Select all

| - cbot2.mac-
| Original powerspike 
| Basic group auto heal script
| Extremely Altered by Draekz 
|#include spellsub.mac
#include spellbook.mac

#chat say
#chat tell
|#Event NotMem " You do not seem to have that spell memorized."

    Sub Main 
|This makes sure all spells are properly Memorized, if not it
|memorizes it for the player.
	:next1
        /if "$char(gem,1)"=="NULL" {
        /call Gem1 
|This is the name of the spell in Gem slot 1 *hence (gem,#) *
|Note there is a bug in 1001a (on my comp) that names Superior
|Heal "PLAYER_1", hence the reason its named so
        }else /if "$char(gem,1)"!="PLAYER_1" {
        /call Gem1
        }else {
        /echo Gem Slot 1 correct, now checking Gem Slot 2
        /goto :next2
        {

/return

        :next2

/if "$char(gem, 2)"=="NULL" {
/call Gem2
}else /if "$char(gem,2)"!="Complete Healing" {
/call Gem2
}else {
/echo Gem Slot 2 Correct, now checking Gem Slot 3
|If it doesnt see anything wrong, it goes to the next Gem
/goto :next3
{

/return

:next3

/if "$char(gem,3)"=="NULL" {
/call Gem3
}else /if "$char(gem,3)"!="Greater Healing" {
/call Gem3
}else {
/echo Gem Slot 3 Correct, now checking Gem Slot 4
/goto :next4
{

/return

:next4

/if "$char(gem,4)"=="NULL" {
/call Gem4
}else /if "$char(gem,4)"!="Valor" {
/call Gem4
}else {
/echo Gem Slot 4 Correct, now checking Gem Slot 5
/goto :next5
{

/return

:next5

/if "$char(gem,5)"=="NULL" {
/call Gem5
}else /if "$char(gem,5)"!="Armor of Faith" {
/call Gem5
}else {
/echo Gem slot 5 Correct, now checking Gem Slot 6
/goto :next6
{

/return

:next6

/if "$char(gem,6)"=="NULL" {
/call Gem6
}else /if "$char(gem,6)"!="Wrath" {
/call Gem6
}else {
/echo Gem slot 6 correct, now checking gem slot 7
/goto :next7
{

/return

:next7

/if "$char(gem,7)"=="NULL" {
/call Gem7
}else /if "$char(gem,7)"!="Divine Aura" {
/call Gem7
}else {
/echo Gem slot 7 correct, now checking gem slot 8
/goto :next8
{

/return

:next8

/if "$char(gem,8)"=="NULL" {
/call Gem8
}else /if "$char(gem,8)"!="Divine Barrier" {
/call Gem8
}else {
/echo All gem slots filled correctly, starting macro...ENJOY :)
/goto :restofcode
{

/return

	:restofcode
   /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 
   
         /delay 1
 
 |/echo $v7 -- 
	:LoopStart
      /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<=85 {
        /goto :Heal
        }else /if n $v59>=90 
        {
        /delay 1
        } 
        
        /next v40 
        /goto :LoopStart 
 
/return 
               
         :Heal 
   
               /if $target(class)=="Enchanter" {
               /goto :Casters
               }else /if $target(class)=="Magician" {
               /goto :Casters
               }else /if $target(class)=="Wizard" {
               /goto :Casters
               }else /if $target(class)=="Druid" {
               /goto :Casters
               }else /if $target(class)=="Shaman" {
               /goto :Casters
               }else /if $target(class)=="Cleric" {
               /goto :Casters
               }else /if $target(class)=="Necromancer" {
               /goto :Casters
               }else /if $target(class)=="Beastlord" {
               /goto :Casters
               }else {
               /goto :CHeal
               }

/return
           
         :Casters
    
   	/delay 1
   /sit off
   /gsay SHealing $target(name)
   /cast "PLAYER_1"
   /if n $v23==0 {
       /call MemorizeSpell "PLAYER_1" 1
  	 /delay 10
  	 /sit off
  	 }
  	 /delay 5s
    /sit on
   /goto :LoopStart
   
   
/return
            
              
         :CHeal
 
   	/delay 1
   /sit off 
   /gsay Completely Healing $target(name) 
   /cast "Complete Healing"
   /if n $v23==0 {
       /call MemorizeSpell "Complete Healing" 2
   	/delay 10
   	/sit off
   	}
  	/delay 10s 
   /sit on
   /goto :LoopStart
   
/return 



Sub Event_NotMem
   
	/varset v23 0
	/goto :Heal
     
/return

Sub Gem1

	/call MemorizeSpell "PLAYER_1" 1
	/delay 10
	/goto :next2

/return

Sub Gem2

	/call MemorizeSpell "Complete Healing" 2
	/delay 10
	/goto :next3

/return

Sub Gem3

	/call MemorizeSpell "Greater Healing" 3
	/delay 10
	/goto :next4

/return

Sub Gem4

	/call MemorizeSpell "Valor" 4
	/delay 10
	/goto :next5

/return

Sub Gem5

	/call MemorizeSpell "Armor of Faith" 5
	/delay 10
	/goto :next6

/return

Sub Gem6

	/call MemorizeSpell "Wrath" 6
	/delay 10
	/goto :next7

/return

Sub Gem7

	/call MemorizeSpell "Divine Aura" 7
	/delay 10
	/goto :next8

/return

Sub Gem8

	/call MemorizeSpell "Divine Barrier" 8
	/delay 10
	/goto :restofcode

/return
Enjoy! Again feel free to post tweaks and whatnot and once all the kinks are worked out u can move this post to macro depot if you want.

Draekz

loadingpleasewait
a snow griffon
a snow griffon
Posts: 332
Joined: Sat Sep 14, 2002 8:46 am

hmm.. would love to try it..

Post by loadingpleasewait » Mon Oct 14, 2002 2:51 am

ok, one small problem.. I have a spellsub.mac, not sure if its the same one yer useing, but it seems to work with other macros.. BUT, I do not have a spellbook.mac.. = \
LOADING PLEASE WAIT...

User avatar
ap50
a snow griffon
a snow griffon
Posts: 425
Joined: Sun Aug 18, 2002 2:29 pm

spellboox.mac

Post by ap50 » Mon Oct 14, 2002 3:24 am

You'll find spellbook.mac here.
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]