Looking for simple shaman macro

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

dawnoffatex
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Aug 10, 2003 8:24 pm

Looking for simple shaman macro

Post by dawnoffatex » Thu Aug 21, 2003 5:58 pm

Basically what I had in mind was this

an $Event that triggered - stand, sendpet/malo/slow (check for resist and reslow if neccesary) epic dot , sit

A loop that checked mana/life - if mana below 80 and life above 80 - canni self, if 1 is true but 2 isnt, torpor self

Thats about it, maybe a few triggers for certain things like
/tell bot "haste" = bot stands, cast swift like the wind, sits
/tell bot heal meh = kraggs mending etc

Niceties, not neccesary, this doable?

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Post by YKW-28983 » Fri Aug 22, 2003 5:39 am

... Sorry this forum isn't really what it's labeled. This really isn't a forum that you request what your heart desires and poof it's made. you gotta show some effort (code) and you will be helped from there.

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Fri Aug 22, 2003 8:12 am

Actually, that's exactly what this forum is for. For someone to post a wishlist for a script, and someone MAY help out and make it. Macro Help forum is for when you've got code and need help making it work.

dawnoffatex
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Aug 10, 2003 8:24 pm

Post by dawnoffatex » Fri Aug 22, 2003 10:58 am

well, I thought it was a long shot, (Thanks for the backup val) but i also searched and didnt find anything like this, supposedly genbot can be customized to fit this, but at the same time - alot of people have shamans, and i believe this is a pretty cookie cutter setup that could benefit alot of people, including myself, so i figured id give it a shot. If i knew where to begin on making the code, you could bet your ass id be here working out the kinks, but unfortunatly im still in a hardcore learning stage

renagade8
orc pawn
orc pawn
Posts: 28
Joined: Sat Oct 19, 2002 9:17 pm

shaman macro

Post by renagade8 » Fri Aug 22, 2003 2:44 pm

This is what i use but i did have to edit some things out, you can change spells around to what you need and add events if needed. it will target the closest npc then check that npc with the npc of your assister and then malos/slow when they get within the range you want them to be, which is set to 80 atm. Also if your shaman doesnt have Cann5 then you can just take out that whole cann5 thing(/alt activate 47). Hope this helps

Code: Select all

|----- Shaman Macro
|  usage /macro shamanbot <assister>

#turbo

#include spellcast.mac

#define spellcheck v20
#define maloon v21
#define slowon v22
#define currmobid v23
#define asst1 v24
#define buffee v25
#define targetchk v26

#Event slow "yawns"
#Event malo "looks very uncomfortable"
#Event exp "party experience"
#Event exp2 "raid experience"
#Event focusoff "focus fades"
#Event staoff "health fades"
#Event join "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel


#chat tell

Sub main
	/varset asst1 $p0
	/varset slowon 0
	/varset maloon 0

	/call mainone
/return


Sub mainone
	:eventloop
	/doevents
	/target npc
	/varset currmobid $target(id)
	/if n $target(distance)<80 /call loopmain

	/if n $char(mana,pct)<65 {
		/if n $char(hp,cur)>=2000 {
			/if "$char(hotbutton,10)"=="TRUE" /alt activate 47
		} else /call cann
	}
	/if n $char(buff,"Quiescence")>0 {
		/if n $char(hp,pct)<=51 /call quies
	}
	/goto :eventloop
/return

Sub loopmain
	/varset slowon 0
	/varset maloon 0
	/stand
	/target clear
	/assist $asst1
	/delay 5
	/if n $currmobid==$target(id) {
		/pet kill
		/call debuff

	}
/return


Sub debuff
	:loop
	/if "$target(type)"=="PC" /return

	/doevents
	/if $maloon==0 {
		/call cast "Malos"
		/doevents
	}
	/delay 10

	/if $slowon==0 {
		/call cast "Turgur's Insects"
		/doevents
	}
	/if n $char(mana,pct)<65 {
		/if n $char(hp,cur)>2500 {
			/if "$char(hotbutton,10)"=="TRUE" /alt activate 47
		} else /call cann
	}
	/if n $char(buff,"Quiescence")>0 {
		/if n $char(hp,pct)<=51 /call quies
	}


	/if "$target()"=="TRUE" /goto :loop
/return

Sub focus
	/call cast "Focus of Soul"
/return

Sub sta
	/call cast "Talisman of the Boar"
/return

Sub camp
	/dismount
	/delay 2
	/sit
	/camp desktop
	/endmacro
/return

Sub cann
	/call cast "Cannibalize IV"
/return

Sub quies
	/target myself
	/call cast "Quiescence"
	/assist $asst1
/return

Sub Event_slow
	/assist $asst1
	/g <SLOWED> %T <SLOWED>
	/varset slowon 1
/return

Sub Event_malo
	/assist $asst1
	/g <MALOS> %T <MALOS>
	/varset maloon 1
/return	

Sub Event_focusoff
	/target myself
	/call focus
/return

Sub Event_staoff
	/target myself
	/call sta
/return

Sub Event_exp
	/varset slowon 0
	/varset maloon 0
/return

Sub Event_exp2
	/varset slowon 0
	/varset maloon 0
/return

Sub Event_join
	/press esc
	/press esc
	/invite
/return


Sub Event_Chat
	/varset targetchk $p1
	/if "$targetchk"=="$spawn($char(pet),name,clean)" {
		/assist $asst1
		/return
	}
	/if "$p2"=="camp" {
		/call camp
		/return
	}
	
	/stand
	/varset buffee $p1
	/if "$p2"=="focus" {
		/target pc $buffee
		/call focus
		/assist $asst1
		/return
	}
	/if "$p2"=="fos" {
		/target pc $buffee
		/call focus
		/assist $asst1
		/return
	}
	/if "$p2"=="sta" {
		/target pc $buffee
		/call sta
		/assist $asst1
		/return
	}
	/if "$p2"=="ferine" {
		/target pc $buffee
		/if n $char(gem,"Ferine Avatar")==-2 {
			/tt Can not cast Ferine Avatar yet
			/return
		} else {
			/call cast "Ferine Avatar"
			/assist $asst1
			/return
		}
	}
	/if "$p2"=="haste" {
		/target pc $buffee
		/call cast "Talisman of Alacrity"
		/assist $asst1
		/return
	}
/return

dawnoffatex
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Aug 10, 2003 8:24 pm

Post by dawnoffatex » Fri Aug 22, 2003 4:26 pm

ok , so i copy pasted etc, shaman.mac, tried to run it - it told me it couldnt load spellcast.mac - ok! didnt know i was supposed to have that. So i did some searching, found a current version on one of grimjacks older posts, 9th post down or so i believe, copy pasted that, boom boom, i have my spellcast.mac. So i go back into game to load up the shaman mac, and i get a Error something varset, a bunch of odd symbols <value>

=(

Trixz
a lesser mummy
a lesser mummy
Posts: 35
Joined: Mon Apr 21, 2003 8:18 am

RE

Post by Trixz » Fri Aug 22, 2003 4:34 pm

The way this script is written you have to put the name of the master after the name of the script... /macr shaman.mac <yournamehere>. Did you do that? If you didn't it would cause the error you mentioned.

dawnoffatex
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Aug 10, 2003 8:24 pm

Post by dawnoffatex » Fri Aug 22, 2003 7:57 pm

ok, i got it running, it constantly scans targets to slow it looks like, but the problem now is - whenever it has to cast, the macro ends, it happened both when it tried to slow, and when i /tell it for haste, i get this message:

Ending macro: Subroutine cast wasnt found
shaman.mac@75(debuff):/call cast "Malos"
shaman.mac@63(loopmain):/call debuff
shaman.mac@41(mainone):/if n $target(distance)<80 /call loopmain
shaman.mac@32(main)/call mainone
Cleared the following: Timers Vars Arrays
The current macro has ended

thats the error, got the same one only with "Swift like the wind" when i asked for haste essentially.

dawnoffatex
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Aug 10, 2003 8:24 pm

Post by dawnoffatex » Fri Aug 22, 2003 8:33 pm

actually, figured out myself what was wrong, /call cast wasnt operating properly, deleted call and it casts now.

Trixz
a lesser mummy
a lesser mummy
Posts: 35
Joined: Mon Apr 21, 2003 8:18 am

Post by Trixz » Sat Aug 23, 2003 1:16 am

Ummm.... I don't think you should've taken out the call. It was supposed to call cast... cast is found in the spellsub.mac... pretty sure you have the same spellcast.mac that I have cuz I had that same problem so heres a working version of spellcast.mac.

Code: Select all

| ** SpellCast.mac 
| ** This will cast a spell reliably for you... 
| ** Usage: 
| ** /call Cast "spellname" 
| ** It will return the following values: 
| ** CAST_SUCCESS 
| ** CAST_UNKNOWNSPELL 
| ** CAST_OUTOFMANA 
| ** CAST_OUTOFRANGE 
| ** CAST_CANNOTSEE 
| ** CAST_STUNNED 
| ** CAST_RESISTED 
| ** 

#event Fizzle "Your spell fizzles!" 
#event Interrupt "Your casting has been interrupted!" 
#event Interrupt "Your spell is interrupted." 
#event Recover "You haven't recovered yet..." 
#event Recover "Spell recovery time not yet met." 
#event Resisted "Your target resisted the " 
#event OutOfMana "Insufficient Mana to cast this spell!" 
#event OutOfRange "Your target is out of range, get closer!" 
#event NoLOS "You cannot see your target." 
#event Stunned "You cannot cast while stunned" 
#event Standing "You must be standing to cast a spell" 
#event Collapse "Your gate is too unstable, and collapses." 

#define CastStatus v59 
#define CastTimer t7 

#define CAST_SUCCESS 0 
#define CAST_UNKNOWNSPELL 1 
#define CAST_RESTART 2 
#define CAST_OUTOFMANA 3 
#define CAST_OUTOFRANGE 4 
#define CAST_CANNOTSEE 5 
#define CAST_STUNNED 6 
#define CAST_RESISTED 7 

Sub Cast 
  /if n $char(gem,"$p0")==0 /return CAST_UNKNOWNSPELL 
  :StartCast 
  /if n $char(gem,"$p0")<0 /call WaitForRefresh "$p0" 
  /cast "$p0" 
  /varset CastTimer $int($spell("$p0",mycasttime)*10+$spell("$p0",recoverytime)*10) 
  /varset CastStatus CAST_SUCCESS 
  :WaitCast 
     /doevents Fizzle 
     /doevents Interrupt 
     /doevents Recover 
     /doevents Standing 
     /doevents OutOfRange 
     /doevents OutOfMana 
     /doevents NoLOS 
     /doevents Resisted 
     /if n $CastStatus==CAST_RESTART /goto :StartCast 
     /if n $CastStatus>=CAST_RESTART /return $CastStatus 
  /if n $CastTimer>0 /goto :WaitCast 
  /varset CastTimer 0 
/return CAST_SUCCESS 

Sub WaitForRefresh 
   :LoopWaitForRefresh 
      /delay 0 
   /if n $char(gem,"$p0")<0 /goto :LoopWaitForRefresh 
/return 

Sub Event_Fizzle 
   /varset CastStatus CAST_RESTART 
/return 

Sub Event_Interrupt 
   /varset CastStatus CAST_RESTART 
/return 

Sub Event_Recover 
   /varset CastStatus CAST_RESTART 
   /delay 3
/return 

Sub Event_Standing 
   /varset CastStatus CAST_RESTART 
   /stand 
/return 

Sub Event_Collapse 
   /varset CastStatus CAST_RESTART 
/return 

Sub Event_OutOfMana 
   /varset CastStatus CAST_OUTOFMANA 
/return 

Sub Event_OutOfRange 
   /varset CastStatus CAST_OUTOFRANGE 
/return 

Sub Event_NoLOS 
   /varset CastStatus CAST_CANNOTSEE 
/return 

Sub Event_Stunned 
   /varset CastStatus CAST_STUNNED 
/return 

Sub Event_Resisted 
   /varset CastStatus CAST_RESTART 
/return

dawnoffatex
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Aug 10, 2003 8:24 pm

Post by dawnoffatex » Sat Aug 23, 2003 1:35 pm

Code: Select all

|Plazmic + 1 line change by Imperfect 
|** SpellCast.mac 
** This will cast a spell reliably for you... 
** Usage: 
** /call Cast "spellname" 
** It will return the following values: 
** CAST_SUCCESS 
** CAST_UNKNOWNSPELL 
** CAST_OUTOFMANA 
** CAST_OUTOFRANGE 
** CAST_CANNOTSEE 
** CAST_STUNNED 
** CAST_RESISTED 
**| 

#event Fizzle "Your spell fizzles!" 
#event Interrupt "Your casting has been interrupted!" 
#event Interrupt "Your spell is interrupted." 
#event Recover "You haven't recovered yet..." 
#event Recover "Spell recovery time not yet met." 
#event Resisted "You target resisted the " 
#event OutOfMana "Insufficient Mana to cast this spell!" 
#event OutOfRange "Your target is out of range, get closer!" 
#event NoLOS "You cannot see your target." 
#event Stunned "You cannot cast while stunned" 
#event Standing "You must be standing to cast a spell" 
#event Collapse "Your gate is too unstable, and collapses." 

#define CastStatus v59 
#define CastTimer t7 

#define CAST_SUCCESS 0 
#define CAST_UNKNOWNSPELL 1 
#define CAST_RESTART 2 
#define CAST_OUTOFMANA 3 
#define CAST_OUTOFRANGE 4 
#define CAST_CANNOTSEE 5 
#define CAST_STUNNED 6 
#define CAST_RESISTED 7 

Sub Cast 
  /if n $char(gem,"$p0")==0 /return CAST_UNKNOWNSPELL 
  :StartCast 
  /if n $char(gem,"$p0")<0 /call WaitForRefresh "$p0" 
  /cast "$p0" 
  /varset CastTimer $int($spell("$p0",casttime)*10+$spell("$p0",recoverytime)*10) 
  /varset CastStatus CAST_SUCCESS 
  :WaitCast 
     /doevents Fizzle 
     /doevents Interrupt 
     /doevents Recover 
     /doevents Standing 
     /doevents OutOfRange 
     /doevents OutOfMana 
     /doevents NoLOS 
     /doevents Resisted 
     /if n $CastStatus==CAST_RESTART /goto :StartCast 
     /if n $CastStatus>=CAST_RESTART /return $CastStatus 
  /if n $CastTimer>0 /goto :WaitCast 
  /varset CastTimer 0 
/return CAST_SUCCESS 

Sub WaitForRefresh 
   :LoopWaitForRefresh 
      /delay 0 
   /if n $char(gem,"$p0")<0 /goto :LoopWaitForRefresh 
/return 

Sub Event_Fizzle 
   /varset CastStatus CAST_RESTART 
/return 

Sub Event_Interrupt 
   /varset CastStatus CAST_RESTART 
/return 

Sub Event_Recover 
   /varset CastStatus CAST_RESTART 
   /delay 5 
/return 

Sub Event_Standing 
   /varset CastStatus CAST_RESTART 
   /stand 
/return 

Sub Event_Collapse 
   /varset CastStatus CAST_RESTART 
/return 

Sub Event_OutOfMana 
   /varset CastStatus CAST_OUTOFMANA 
/return 

Sub Event_OutOfRange 
   /varset CastStatus CAST_OUTOFRANGE 
/return 

Sub Event_NoLOS 
   /varset CastStatus CAST_CANNOTSEE 
/return 

Sub Event_Stunned 
   /varset CastStatus CAST_STUNNED 
/return 

Sub Event_Resisted 
   /varset CastStatus CAST_RESISTED 
/return 
is my spellcast.mac , should i update it to the one you posted?

And does /call cast mean it automatically memorizes spell if its not memorized?

dawnoffatex
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Aug 10, 2003 8:24 pm

Post by dawnoffatex » Sat Aug 23, 2003 1:37 pm

actually, they look exactly the same? In which case, it still wouldnt function for me with /call cast

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Post by YKW-28983 » Sat Aug 23, 2003 2:49 pm

times have changed. I remember a while ago when someone got bitch out about asking for a macro to be made for them ... sorry =X

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Post by EqMule » Sun Aug 24, 2003 4:00 am

dawnoffatex wrote:actually, they look exactly the same? In which case, it still wouldnt function for me with /call cast
they do not look the same...

Code: Select all

| ** SpellCast.mac 
| ** This will cast a spell reliably for you... 
| ** Usage: 
| ** /call Cast "spellname" 
| ** It will return the following values: 
| ** CAST_SUCCESS 
| ** CAST_UNKNOWNSPELL 
| ** CAST_OUTOFMANA 
| ** CAST_OUTOFRANGE 
| ** CAST_CANNOTSEE 
| ** CAST_STUNNED 
| ** CAST_RESISTED 
| ** 
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

dawnoffatex
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Aug 10, 2003 8:24 pm

Post by dawnoffatex » Mon Aug 25, 2003 1:52 am

Code: Select all

** SpellCast.mac 
| ** This will cast a spell reliably for you... 
| ** Usage: 
| ** /call Cast "spellname" 
| ** It will return the following values: 
| ** CAST_SUCCESS 
| ** CAST_UNKNOWNSPELL 
| ** CAST_OUTOFMANA 
| ** CAST_OUTOFRANGE 
| ** CAST_CANNOTSEE 
| ** CAST_STUNNED 
| ** CAST_RESISTED 
| **

Code: Select all

|Plazmic + 1 line change by Imperfect 
|** SpellCast.mac 
** This will cast a spell reliably for you... 
** Usage: 
** /call Cast "spellname" 
** It will return the following values: 
** CAST_SUCCESS 
** CAST_UNKNOWNSPELL 
** CAST_OUTOFMANA 
** CAST_OUTOFRANGE 
** CAST_CANNOTSEE 
** CAST_STUNNED 
** CAST_RESISTED 
**| 

Whats different?

EDIT: Valerian likes code brackets