My shaman.mac is busted =(

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

Moderator: MacroQuest Developers

[40oz]
a hill giant
a hill giant
Posts: 156
Joined: Tue Nov 12, 2002 12:14 pm

My shaman.mac is busted =(

Post by [40oz] » Tue Nov 12, 2002 12:19 pm

Hello. I found a druid.mac and one modified slightly for a shaman here on the boards.

I'm using MQ version IRC-20021104, with the offsets from 31-10.

I'm confused about a few things, and maybe I haven't read the manual thoroughly enough on these things.

I'm not quite sure where you get player names and such using /varset. So I left those as is in the macroes, and I modified what I wanted.

I'm new to perl, i'm a c++ jockey =) Anyhow, anything that can make this run I'd love it.

The error I get when I use /macro shaman.mac is "Cannot Call when a macro isn't running."

Here is my shaman.mac (it not very complex)
|shaman.mac
|**********
|yes, i took ideas from druid.mac and a modified version already out there for shamans
|
|Spells needed:
| Harnessing of Spirit
| Riotous Health
| Turgur's Insects
| Chloroblast
| Root
| Alacrity
| Regrowth
| Canniblize III

#include SpellSub.mac
#include Spellbook.mac
#chat tell

Sub Main
/varset v30 $p0
/varset v34 $p1
/tell $v30 Ready

:a
/doevents
/goto :a

/return

Sub Event_Chat
/stand
/varset v33 $p1

| Check if Tell is from the Controller, if not inform Controller
/if "$v33"!="$v30"
{
/mqlog Tell from $p1 : $p2
/tell $p1 Sorry i'm really busy at the moment and not avaible for tells
/delay 2
/tell $v30 Tell from $p1 to $char(name) , i told him that i'm busy
/sit
/return
}

/target $v33

/if "$p2" ~~ "slow" /call Slowsub
/if "$p2" ~~ "heal" /call HealSub
/if "$p2" ~~ "stamina" /call StaminaSub
/if "$p2" ~~ "hos" /call HoSSub
/if "$p2" ~~ "Regen" /call RegenSub
/if "$p2" ~~ "root" /call RootSub
/if "$p2" ~~ "sheal" /call SelfHeal
/if "$p2" ~~ "sregen" /call Sregen
/if "$p2" ~~ "status" /call Status
/if "$p2" ~~ "dance" /call CanniDance

/doevents
/return

sub Slowsub
/assist $v33
/tell $v33 slowing %t
/cast "turgur's insects"
/delay 5s
/target myself
/delay 0s
/tell $v33 Slowed %t i hope, Mana: $char(mana,pct), HP: $char(hp,pct)

/return

sub HealSub
/tell $v33 INC Heal for %T
/cast "chloroblast"
/delay 6s
/target myself
/delay 0s
/tell $v33 Healing done, Mana: $char(mana,pct), HP: $char(hp,pct)
/return

sub StaminaSub
/tell $v33 INC stamina for %T
/cast "riotous health"
/delay 5s
/target myself
/delay 0s
/tell $v33 sta Buff done, Mana: $char(mana,pct), HP: $char(hp,pct)
/return

sub HoSSub
/tell $v33 INC HoS for %T
/cast "Harnessing of Spirit"
/delay 8s
/target myself
/delay 0s
/tell $v33 Talisman Buff done, Mana: $char(mana,pct), HP: $char(hp,pct)
/return

sub RegenSub
/tell $v33 INC Regrowth for %T
/cast "Regrowth"
/delay 8s
/target myself
/delay 0s
/tell $v33 Regeneration Buff done, Mana: $char(mana,pct), HP: $char(hp,pct)
/return

sub SelfHeal
/press F1
/tell $v33 INC Heal for %T
/cast "chloroblast"
/delay 5s
/target myself
/delay 0s
/tell $v33 Healing done, Mana: $char(mana,pct) HP: $char(hp,pct)
/target $v33
/return

sub Sregen
/target myself
/tell $v33 Regening self
/cast "Regrowth"
/delay 8s
/target myself
/delay 0s
/tell $v33 regen done Mana: $char(mana,pct), HP: $char(hp,pct)
/target $v33
/return

sub Status
/target myself
/delay 0s
/tell $v33 HP: $char(hp,pct) Mana: $char(mana,pct)
/return

Sub CanniDance
/target myself

:danceloop
/if $char(hp,pct) > $char(mana,pct)
{
/sit off
/cast "Cannibalize III"
/delay 2s
/sit on
/delay 1s
}
else
{
/goto :dancedone
}
/goto :danceloop

:dancedone
/return

[40oz]
a hill giant
a hill giant
Posts: 156
Joined: Tue Nov 12, 2002 12:14 pm

oops

Post by [40oz] » Tue Nov 12, 2002 12:22 pm

Oops, I see one problem.

The $p# in the if statements have "" around them, I must fix~ Still doesn't fix it though :cry:

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Tue Nov 12, 2002 4:10 pm

the $p# should have "" around them.

In the first instance are you sure you have SpellSub.mac and Spellbook.mac in your macros directory.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

[40oz]
a hill giant
a hill giant
Posts: 156
Joined: Tue Nov 12, 2002 12:14 pm

blarg!

Post by [40oz] » Tue Nov 12, 2002 4:35 pm

yah, those files come with MQ and are both in the .\macros directory along with shaman.mac.

in IRC earlier someone said i might be using /call wrong, and that I shouldn't call functions out of events, but i don't see how that would matter.

also, could somebody explain how /varset works? this is only modified code, i don't quite understand how all the functions work yet.

Lurker_005
a lesser mummy
a lesser mummy
Posts: 51
Joined: Thu Oct 17, 2002 12:08 pm

Post by Lurker_005 » Tue Nov 12, 2002 5:27 pm

You might want to set a minimum health % on your canabalize sub

lso use code and /code enclosed in [] instead of quote keeps the formating

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Tue Nov 12, 2002 6:21 pm

Nothing wrong with calling subs in events. I notice you call a RootSub which doesn't exist.

MQ comes with Spellcast.mac, not spellsub.mac BTW
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]