Simple Shaman Bot

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

Ghedrain
decaying skeleton
decaying skeleton
Posts: 6
Joined: Wed Jun 09, 2004 11:35 am

Simple Shaman Bot

Post by Ghedrain » Wed Jun 09, 2004 11:45 am

Just looking for a simple shaman bot that only slows the target and heals the tank at a certain percent health. I've looked at several of the shaman bots but most of them are either too complicated or don't have heals included.

Oid
a snow griffon
a snow griffon
Posts: 416
Joined: Thu Oct 17, 2002 3:26 am
Contact:

Post by Oid » Wed Jun 09, 2004 3:56 pm

Make an attempt at it, then ill help ya.
Smokey the Lax says only you can prevent reproduction.

Ghedrain
decaying skeleton
decaying skeleton
Posts: 6
Joined: Wed Jun 09, 2004 11:35 am

Post by Ghedrain » Thu Jun 10, 2004 11:07 am

Here's what I've done up myself. I read some other code and read some of the MQ2 Manual. I've never programmed anything like this before so I might ask a few questions.

Code: Select all



|Simple shaman bot

#include spellcast.inc 
#event exp "You have gained#*#" 
#event slow "#*#yawns"    

Sub Main 
   /declare slowed int outer 
   
   :main
   /assist maintank 
   /call cast "Togor's Insects" 
   /doevents 
   /delay 1s 
   /goto :checkcast 
   /return 
       
         :checkcast
            /doevents
            /delay 1s
            /if (${slowed}==1) /goto :waitforexp 
            /return 

         :waitforexp 
            /doevents 
            /delay 1s 
            /if (${slowed}==0) /goto :main 
            /goto :waitforexp 
            /return 
          
Sub Event_exp 
   /varset slowed 0
   /return 

Sub Event_slow 
   /varset slowed 1
   /return 


/endmacro
This isn't working when tested. It grabs my specified assist target, assists, slows the mob and then ends the macro. It's not supposed to end the macro but go in a continuous loop. I don't know how to fix this to do what I want.

Oid
a snow griffon
a snow griffon
Posts: 416
Joined: Thu Oct 17, 2002 3:26 am
Contact:

Post by Oid » Thu Jun 10, 2004 3:31 pm

Alright i'll take a look at it when i wake up
Smokey the Lax says only you can prevent reproduction.

Botmaker
orc pawn
orc pawn
Posts: 14
Joined: Mon Jan 26, 2004 11:46 am

Post by Botmaker » Thu Jun 10, 2004 4:10 pm

something like that may work better.
i am sure there are many marcro that you can copy/past to slow a mob, i think there is a debuff macro out there that does more then just slow, might wanna check it out :)

Code: Select all

|Simple shaman bot 

#include spellcast.inc 
#event exp "You have gained#*#"   

Sub Main 
	/declare slowed bool outer FALSE

	:main 
	/doevents 
	/assist maintank 

	/if (!${slowed}) {
		/call Cast "Togor's Insects" 
		/if (${String[${Macro.Return}].Equal[CAST_SUCCESS]}) {
			/varset slowed TRUE
		}
	}
		
	/goto :main 
/return 
        

Sub Event_exp 
   /varset slowed FALSE
/return 
Edit: made it simpler
Last edited by Botmaker on Thu Jun 10, 2004 4:28 pm, edited 1 time in total.

Oid
a snow griffon
a snow griffon
Posts: 416
Joined: Thu Oct 17, 2002 3:26 am
Contact:

Post by Oid » Thu Jun 10, 2004 4:28 pm

Code: Select all

|Simple shaman bot 

#include spellcast.inc 
#event exp "You have gained#*#"    

Sub Main 
   /declare slowed bool outer FALSE 
   /declare maintank string outer [color=red]Tank Name Here[/color]

   :main 
   /doevents 
   /assist ${maintank}

   :slow 
   /if (!${slowed}) { 
      /call Cast "Togor's Insects" 
      /if (!${String[${Macro.Return}].Equal[CAST_SUCCESS]}) { 
         /goto :slow 
      } else { 
         /varset slowed TRUE 
      } 
   } 
   :tank
   /target ${maintank}
   /if (${Target.PctHPs}<=[color=red]50[/color]) {
      /call Cast "[color=red]Shaman Heal Spell[/color]"
      /if (!${String[${Macro.Return}].Equal[CAST_SUCCESS]}) { 
         /goto :tank
      }
   }
   /goto :main 
/return 
        

Sub Event_exp 
   /varset slowed FALSE 
/return 
That should work, the stuff in red needs to be changed.
Smokey the Lax says only you can prevent reproduction.

kellewic
a lesser mummy
a lesser mummy
Posts: 38
Joined: Tue Jun 08, 2004 2:27 am
Location: AZ

Post by kellewic » Fri Jun 11, 2004 9:22 pm

I'm working on one right now for my Shaman/Zerker combo and here is what I came up with while trying to learn the macros myself. It's very basic right now and only handles casting spells, but can handle fizzles and checks to make sure the spell is mem'd and ready to cast; if not ready to cast, it waits until it is ready then casts it. Not really shaman specific but you can easily make hotkeys to tell the bot what spells to cast and on what target.

A few simple hotkeys would be:

/tell BOT cast minor healing on MY_NAME
/tell BOT cast drowsy on %T
etc

Code: Select all

|*
	Simple usage is:
	
	-- Name a specific target. Can use %T and make a hotkey
	"/tell BOT_NAME cast minor healing on TARGET"
	
	-- This version uses flags to determine
	-- who to cast the spell on
	"/tell BOT_NAME cast minor healing"
*|


#chat tell
#chat group
#chat chat

#Event Cast		"#*#|${Master}|#*#cast #1#'"
#Event Fizzle	"#*#Your spell fizzles#*#"


Sub Main
	/declare Debug int outer 0
	/declare Master string outer
	/declare RelayChannel string outer tell
	/declare ProgramName string outer ShamanBot
	
	|||||||||||||||||||||||||||||||||||||||||||
	| Flags that modify the bots behaviour
	
	| Sit down after casting a spell
	/declare AutoSitAfterCast int outer 1
	
	| If the bot receives no specific target, it will
	| use its current target, if any
	/declare UseActiveTargetForSpells int outer 1
	
	| If the bot receives no specific target, it will
	| use its Master. UseActiveTarget is processed first
	| if they are both set
	/declare UseMasterTargetForSpells int outer 0

	||||||||||||||||||||||||||||||||||||
	| State variables
	
	| In case of fizzles
	/declare LastSpellCast string outer


	| Startup variable settings
	/if (${Defined[Param0]}) {
		/varset Master ${Param0}
	
		/if (${Defined[Param1]}) {
			/varset RelayChannel ${Param1}
		}

		/call Output "Initialization complete"
	} else {
		/varset Debug 1
		/call Output "You must specify a master"
		/endmacro
	}

	| Umm... main loop
	:MainLoop
	/doevents
	/delay 1

	/goto :MainLoop
/return


Sub Output
	/if (${Debug})	/echo "[${ProgramName}] ${Param0}
/return


Sub RelayInfo
	/docommand /${RelayChannel} ${Master} ${Param0}
/return


Sub CastSpell
	/if (${Param0.NotEqual["NULL"]}) {
		/if (${Me.Sitting})		/docommand /stand
		
		| Delay until the spell is available
		/delay 35s ${Me.SpellReady[${Param0}]}
		/varset LastSpellCast ${Param0}

		/call RelayInfo "Casting ${Param0} on ${Target.CleanName}"
		/cast "${Param0}"
		
		| Delay until casting is done
		/delay 30s !${Me.Casting.ID}
		
		| Do we need to perform actions after casting?
		/if (${AutoSitAfterCast})	/docommand /sit
	}
/return


| Param1 will be something like "This Spell on Target" with " on Target" being optional
Sub Event_Cast
	| Can't cast if we're moving can we
	/if (${Me.Moving})	/return

	/if (${Defined[Param1]}) {
		/declare target string local
		/declare tmp int local 0
		/declare spellName string local

		| Was a target specified?
		/varset tmp ${Param1.Find[ on ]}
		
		| Target was specified
		/if (${tmp}) {
			| Get target name
			/varcalc tmp ${Param1.Length} - (${tmp}+3)
			/varset target ${Param1.Right[${tmp}]}
			
			| Get spell name
			/varcalc tmp (4+${tmp})*-1
			/varset spellName ${Param1.Left[${tmp}]}
		} else {
			| Do we have a current target and should we use it?
			/if (${UseActiveTargetForSpells}) {
				/varset target ${Target.Name}
			} else {
				| Use our master if we were told to
				/if (${UseMasterTargetForSpells}) {
					/varset target ${Spawn[${Master}].Name}
				}
			}
			
			| Get spell name
			/varset spellName ${Param1}
		}

		| Make sure we have a valid target
		/if (!${Spawn[${target}].ID}) {
			/call RelayInfo "Spell target <${target}> is not valid"
			/return
		} else {
			| Do we have the spell memorized?
			/if (${Me.Gem[${spellName}]}) {
				/target ${target}
				/call CastSpell "${spellName}"
			} else {
				/call RelayInfo "${spellName} is not memorized"
			}
		}
	}
/return


Sub Event_Fizzle
	/call CastSpell "${LastSpellCast}"
/return

hytiek
Contributing Member
Contributing Member
Posts: 54
Joined: Mon Jun 14, 2004 5:45 pm

Post by hytiek » Mon Jun 14, 2004 6:00 pm

I'm almost finished with a shaman macro that is duo'ing in Plane of Fire with a 7.5k hp tank (hybrid).

The macro and I are not friends at the moment, but I am sure by this weekend I'll have a great first releasable piece of code.

Basic features:

gmCheck, manaCheck, attacking while bored, conditional healing (depending on % and choses the right type of heal [slow,fast,over time]), debuffing (malos,slow), buffing (#chat group), rebuffing on event (<buff fades...>) only if it's safe to (not fighting a mob), debug options (display as MQ2 output or not), idle checking (avoids spamming of target changes)

I must say Job well done to Lax, Oid, and all others; and thank God for the search function.

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Mon Jun 14, 2004 6:26 pm

here's a slightly modified version of the slow routine i wrote. basically, you target the mob you want to slow, then just "/call Slow" one time. it handles resists etc, and will reslow the mob if needed automatically.

i just have it declare a timer for each mob. just make sure to have /doevents in your main loop so it refreshes slow when it fades. can write similar things for other debuffs

Code: Select all

#include spell_routines.inc
#define slowduration 4m
#define slowspell "Togor's Insects"

| .... add in your main macro code here ....

Sub Slow
   /declare tempID int local ${Target.ID}
   /call Cast "slowspell" 
   /if ( !${Defined[slowTimer${tempID}]} ) /declare slowTimer${tempID} timer outer
   /if ( ${Macro.Return.Equal[CAST_IMMUNE]} ) {
      /deletevar slowTimer${tempID}
      /declare slowTimer${tempID} int outer -1
   } else /if ( ${Macro.Return.Equal[CAST_SUCCESS]} ) {
      /varset slowTimer${tempID} slowduration
   } else {
      /varset slowTimer${tempID} 1
   }
/return ${Macro.Return}

Sub Event_Timer(string timerName,int timerValue)
   /declare tempID int local 0
   /declare oldTargetID int local ${Target.ID}
   /if ( ${timerName.Left[9].Equal[slowTimer]} ) {
      /varset tempID ${timerName.Right[-9]}
      /if ( ${Spawn[${tempID}].Type.Equal[NPC]} || ${Spawn[${tempID}].Master.Type.Equal[NPC]} ) {
         /target id ${tempID}
         /call Slow
         /if ( ${Target.ID}==${tempID} ) {
            /if ( ${Spawn[${oldTargetID}].ID} ) {
               /target id ${oldTargetID}
            } else {
               /keypress clear_target
            }
         }
      } else {
         /deletevar ${timerName}
      }
   }
/return ${Macro.Return}

FrankJScott
naggy
naggy
Posts: 2365
Joined: Sun Feb 19, 2023 7:11 am

Useful Business Trip Massage Site

Post by FrankJScott » Thu Aug 24, 2023 11:28 am

To the person asking about mobile massage llc, things to add to massage practice, small business massage, business massage, essential escape massage llc, 777 massage spa, I highly suggest this recommended business trip massage site or merge massage llc, massage therapy business plan, reiki relaxation station llc, swan massage oasis llc, essential escape massage llc, starting a massage therapy business, and don't forget this great business trip massage info and don't forget serenity massage & wellness spa llc, boon thai massage & bodywork llc, a massage practice, the serenity spa & executive mobile massages, massage business llc, ezekiel's massage studio llc, as well as this great business trip massage tips which is also great. Also, have a look at this excellent business trip massage forum and don't forget 777 massage spa, chinese massage spa llc, massage therapy marketing ideas, sports massage business plan, imperial studio massage llc, self employed massage therapist near me, as well as this best business trip massage info on top of building a massage business, massage shop for sale, master's touch massage therapy llc, massage clinic business plan, massage marketing ideas, mobile massage business, as well as top rated business trip massage site which is also worth a look. I also suggest this updated business trip massage url as well as tracy pieper licensed massage therapist, the mobile massage company, foot spa business, cost to start a massage business, mantra massage llc, massage practice builder, not to mention this updated business trip massage forum not to mention serenity massage & wellness spa llc, reflexology marketing ideas, boon thai massage & bodywork llc, magic feet reflexology llc, massage business blueprint podcast, start up costs for massage business, as well as high rated business trip massage info alongside all target market for massage therapy, bespoke massage llc, owning your own massage therapy business, massage therapy business plan powerpoint, healing hands therapeutic spa llc, home based massage therapy, which is also great. Finally, have a look at this top rated business trip massage details with opening a massage business, massage therapy llc, mobile massage business, mobile massage therapy near me, open massage shop, mobile massage ideas, for good measure. Check more @ New Skiing Base Layers Info 6b3ce3c

FrankJScott
naggy
naggy
Posts: 2365
Joined: Sun Feb 19, 2023 7:11 am

Useful Product Blog

Post by FrankJScott » Fri Aug 25, 2023 4:30 pm

Please Google it! before posting

FrankJScott
naggy
naggy
Posts: 2365
Joined: Sun Feb 19, 2023 7:11 am

Great Demo Slot Online Tips

Post by FrankJScott » Fri Sep 01, 2023 7:15 pm

To the guy inquiring about habanero slot demo, demo pragmatic 88, dragon slot demo, star777 slot demo, slot habanero demo, rtp win88 live, I highly recommend this great rtp live slot url or aztec bonanza slot demo, sugar slot demo, rtp live cuan77, ion slot demo, rtp cnn slot, power of thor megaways demo, and don't forget this useful prediksi togel url on top of plinko gambling demo, demoslots, link demo pragmatic play, demo link slot, demoslot sugar rush, evil goblins slot demo, and don't forget this top prediksi togel link which is also great. Also, have a look at this recommended rtp live slot link as well as joker jewels slot, rtp in slot hari ini, scarab slot demo, rtp live 29hoki, trik main game slot olympus, demo slot princess starlight, not to mention this high rated rtp live slot blog not to mention demo great rhino, joker demo play, live streaming rtp slot, trex master togel, rtp live slot pragmatic tertinggi hari ini, bocoran toto 4d besok, and don't forget new prediksi togel site which is also worth a look. I also suggest this great demo slot online details alongside all demo slot extra chili, update rtp pragmatic hari ini, zeus slot pragmatic demo, akun demo pragmatic olympus, main game olympus, bonanza88 jp rtp, on top of this best rtp live slot tips as well as starz megaways demo, rtp live ak4d, slot demo pragmatic x500, microgaming slot demo zeus, rtp indowin168, rogtoto rtp, not to mention excellent rtp live slot link alongside all demo pragmatic midas, demo slot aztec gems, demo slot buy free spin, rtp slot live virgo4d, pragmatic777 demo, demo slot chili heat, which is also great. Finally, have a look at this best prediksi togel details with double fortune slot demo, live pg soft, mahjong ways slot demo, bonanza megaways demo, princess casino demo, rtp 138 live, for good measure. Check more @ Top Rated Prediksi Togel Info 6b3ce3c

FrankJScott
naggy
naggy
Posts: 2365
Joined: Sun Feb 19, 2023 7:11 am

Top Outdoor Clothing Tips

Post by FrankJScott » Tue Oct 10, 2023 12:21 am

Please try Google before asking about New Outdoor Clothing Guide 72_595d

FrankJScott
naggy
naggy
Posts: 2365
Joined: Sun Feb 19, 2023 7:11 am

Awesome Product Site

Post by FrankJScott » Thu Oct 26, 2023 1:51 pm

Please try Google for Updated Product Website a61d1ac