Shaman macro

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

Moderator: MacroQuest Developers

Flint_the_dorf
orc pawn
orc pawn
Posts: 13
Joined: Sat Oct 12, 2002 3:14 pm
Location: Atlanta, GA
Contact:

Shaman macro

Post by Flint_the_dorf » Mon Oct 28, 2002 2:41 pm

Right now all this does is make my shaman stand there if anyone could help me figure out how to get it to work it would be much appreciated.


Code: Select all

| lala.mac 
| Event_Chat's parameters are as follows: 
| $p0: chat type (tell/say/etc) 
| $p1: Sender 
| $p2: message 
#include routines.mac
#chat tell 
#Event Resist "resists your Torgor's Insects"
#Event MedTime "Insufficient Mana to cast this spell" 
/varset v77 "toon ill be plvling" 

Sub Main  
:a 
/doevents 
/goto :a  
/return 

Sub Event_Chat 
| Check if Tell is from the Controller, if not inform Controller 
  /if "$p1"=="$v77" { 
    /target $v77 
    /call Functions
    }
/return
  
Sub Mana
    /if "$p2"~~"mana" { 
      /tell $v77 $char(mana,pct)% mana. $char(hp,pct)% hp. 
      } 
/return

Sub Functions
    /if "$p2"~~"sit" { 
      /sit on 
      } 
    /if "$p2"~~"stand" { 
      /sit off 
      } 
    /if "$p2"~~"slow" {
      /target $v77
      /assist $v77
      /tell $v77 Slowing %t because you suck!
      /cast $char(gem,6)
      /delay 8s
      /call Mana
      }
    /if "$p2"~~"heal" {
      /target $v77
      /tell $v77 Healing.
      /cast $char(gem,5)
      /delay 6s
      /call Mana
      }
    /if "$p2"~~"talisman" {
      /target $v77
      /tell $v77 Talis'ing.
      /cast $char(gem,7)
      /delay 10s
      /call Mana
      }
    /if "$p2"~~"regen" {
      /target $v77
      /tell $v77 Regen inc~
      /cast $char(gem,4)
      /delay 8s
      /call Mana
      }
    /if "$p2"~~"sow" {
      /target $v77
      /tell $v77 Sowing~
      /cast $char(gem,8)
      /delay (Insert)s
      /call Mana
      }
    /if "$p2"~~"root" {
      /assist $v77
      /tell $v77 rooting %t
      /cast $char(gem,3)
      /delay 6s
      /call Mana
      }
    /if "$p2"~~"self" {
      /target myself
      /tell $v77 Self Buffing~
      /cast $char(gem,2)
      /delay 5s
      /cast $char(gem,7)
      /delay 10s
      /cast $char(gem,4)
      /delay 10s
      /cast $char(gem,8)
      /delay 5s
     /call Mana
      }
    /if "$p2"~~"sheal" {
      /target myself
      /tell $v77 Self Healing~
      /cast $char(gem,5)
      /delay 6s
      /call Mana
      }
    /if "$p2"~~"stamina" {
      /target $v77
      /cast $char(gem,2)
      /delay 4s
      /call mana
    }
    /if "$p2"~~"nuke" {
      /assist $v77
      /tell $v77 Nuking harhar~
      /press 3
      /delay 15s
      /call Mana
      }
    /if "$p2"~~"follow" {
      :CloserAF 
  /if "$v77"!="$v1" /goto :EndAF 
  /if n $v77(distance)>20 /sendkey down up 
  /if n $v77(distance)<11 /sendkey down down 
  /if n $v77(distance)<21 /sendkey up up 
  /if n $v77(distance)>10 /sendkey up down 
  /face 
  /goto :CloserAF 
   
    :EndAF 
    /sendkey up up 
    /sendkey up down 
   } 

   /if "$p2"~~"help {
     tell $v77 Slow, SoW, Heal, sheal, self, root, nuke, regen, talisman, stamina, follow, help
    }
/return

Sub Event_MedTime 
  /sit 
  :GetMana 
  /if n $char(mana,pct)<95 /goto :GetMana 
  /sit off 
/return 
Flint

macrotoon
a ghoul
a ghoul
Posts: 106
Joined: Wed Sep 18, 2002 4:38 pm

Post by macrotoon » Mon Oct 28, 2002 6:03 pm

Code: Select all

Sub Main  
:a 
/doevents 
/goto :a  
/return 
this might be a problem

Flint_the_dorf
orc pawn
orc pawn
Posts: 13
Joined: Sat Oct 12, 2002 3:14 pm
Location: Atlanta, GA
Contact:

Post by Flint_the_dorf » Mon Oct 28, 2002 7:12 pm

could you explain what you mean and what i might be able to do to fix it?
<hr>
<b>Flint_the_dorf</b>

theafkxper
a hill giant
a hill giant
Posts: 207
Joined: Sun Sep 08, 2002 6:41 pm

Post by theafkxper » Mon Oct 28, 2002 9:39 pm

Ive looked through it and im afraid im not going to be of much help on this one, you might want to check out this post: http://macroquest2.com/phpBB2/viewtopic.php?t=158
which is exactly the same thing your doing, but made for a druid. It might be faster and easier to just change the spell info to a shamans and rework some of the functions.
(of course if you post it make sure to give the original poster some credit)
-afk

eqaddict
a lesser mummy
a lesser mummy
Posts: 74
Joined: Sun Sep 15, 2002 10:05 pm

Post by eqaddict » Mon Oct 28, 2002 10:52 pm

Not bad script, what about canni when low on mana? then sit for a bit?

--EQAddict

fury
decaying skeleton
decaying skeleton
Posts: 8
Joined: Wed Mar 19, 2003 4:10 am

Fix for your macro

Post by fury » Mon Apr 21, 2003 6:42 am

Your problem was with mainly in the sub functions. The var $p2 that you used in the sub functions only has a life in the event chat. You have to send it as a augment then use the $p0 var in functions. i highlighted the updates. Other than that I didn't see any errors. Then again it is close to 4am and I am TIRED lol

GL to your macroing

Code: Select all

#include routines.mac 
#chat tell
#Event Resist "resists your Torgor's Insects" 
#Event MedTime "Insufficient Mana to cast this spell" 
/varset v77 "toon ill be plvling" 

Sub Main  
:a 
/doevents 
/goto :a  
/return 

Sub Event_Chat 
| Check if Tell is from the Controller, if not inform Controller 
  /if "$p1"=="$v77" { 
    /target $v77 
    [b]/call Functions $p2[/b]
    } 
/return 
  
[b]Sub Mana 
      /tell $v77 $char(mana,pct)% mana. $char(hp,pct)% hp.      
/return[/b] 

Sub Functions 
    /if [b]"$p0"[/b]~~"sit" { 
      /sit on 
      } 
    /if [b]”$p0”[/b]~~"stand" { 
      /sit off 
      } 
    /if [b]”$p0”[/b]~~"slow" { 
      /target $v77 
      /assist $v77 
      /tell $v77 Slowing %t because you suck! 
      /cast $char(gem,6) 
      /delay 8s 
      /call Mana 
      } 
    /if [b]”$p0”[/b]~~"heal" { 
      /target $v77 
      /tell $v77 Healing. 
      /cast $char(gem,5) 
      /delay 6s 
      /call Mana 
      } 
    /if [b]”$p0”[/b]~~"talisman" { 
      /target $v77 
      /tell $v77 Talis'ing. 
      /cast $char(gem,7) 
      /delay 10s 
      /call Mana 
      } 
    /if [b]”$p0”[/b]~~"regen" { 
      /target $v77 
      /tell $v77 Regen inc~ 
      /cast $char(gem,4) 
      /delay 8s 
      /call Mana 
      } 
    /if [b]”$p0”[/b]~~"sow" { 
      /target $v77 
      /tell $v77 Sowing~ 
      /cast $char(gem,8) 
      /delay (Insert)s 
      /call Mana 
      } 
    /if [b]”$p0”[/b]~~"root" { 
      /assist $v77 
      /tell $v77 rooting %t 
      /cast $char(gem,3) 
      /delay 6s 
      /call Mana 
      } 
    /if [b]”$p0”[/b]~~"self" { 
      /target myself 
      /tell $v77 Self Buffing~ 
      /cast $char(gem,2) 
      /delay 5s 
      /cast $char(gem,7) 
      /delay 10s 
      /cast $char(gem,4) 
      /delay 10s 
      /cast $char(gem,8) 
      /delay 5s 
     /call Mana 
      } 
    /if [b]”$p0”[/b]~~"sheal" { 
      /target myself 
      /tell $v77 Self Healing~ 
      /cast $char(gem,5) 
      /delay 6s 
      /call Mana 
      } 
    /if [b]”$p0”[/b]~~"stamina" { 
      /target $v77 
      /cast $char(gem,2) 
      /delay 4s 
      /call mana 
    } 
    /if [b]”$p0”[/b]~~"nuke" { 
      /assist $v77 
      /tell $v77 Nuking harhar~ 
      /press 3 
      /delay 15s 
      /call Mana 
      } 
    /if [b]”$p0”[/b]~~"follow" { 
      :CloserAF 
  /if "$v77"!="$v1" /goto :EndAF 
  /if n $v77(distance)>20 /sendkey down up 
  /if n $v77(distance)<11 /sendkey down down 
  /if n $v77(distance)<21 /sendkey up up 
  /if n $v77(distance)>10 /sendkey up down 
  /face 
  /goto :CloserAF 
    
    :EndAF 
    /sendkey up up 
    /sendkey up down 
   } 

   /if [b]"$p0"[/b]~~"help { 
     tell $v77 Slow, SoW, Heal, sheal, self, root, nuke, regen, talisman, stamina, follow, help 
    } 
/return 

Sub Event_MedTime 
  /sit 
  :GetMana 
  /if n $char(mana,pct)<95 /goto :GetMana 
  /sit off 
/return