Help with coding Celestial Tranquility

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

hardarac
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sat Nov 30, 2002 2:25 pm

Help with coding Celestial Tranquility

Post by hardarac » Mon Aug 02, 2004 12:26 pm

All Please help me I am lost for a solution

I have decided not to go for my epic and instead get the Gloves of enlightenment to get the Celetial Tranquility effect. Cheaper and easier :)
However the macro I use does not seem to recognise the existance of the gloves and fails to "click" the effect on ... anyone know why?

Code: Select all

| 
|/mac monk 
| 
|/echo Set Tank   (Sets tank (assist) to your target) 
|/echo Drop Anchor   (Drops anchor (where you return after every fight)) 
#Event move "Your target is too far away, get closer!" 
#Event anchor "#*#Drop Anchor" 
#Event back "You cannot see your target." 
#Event exp "You gain party experience!!" 
#Event exp "You gain raid experience!" 
#Event tank "#*#Set Tank" 

Sub Main 
/declare AnchorY int outer 
/declare AnchorX int outer 
/declare tank string outer 
/varset tank none 
/varset AnchorY 0 
/varset AnchorX 0 
:Loop 
/call CheckHealth 
/if (!${String[${tank}].Equal[none]}) { 
  /assist ${tank} 
  /if (${Target.PctHPs}<=96 && ${String[${Target.Type}].Equal[NPC]}) { 
    /attack on 
  } 
} 
/doevents 
/if (${Me.Combat}) { 
  /if (${Me.AbilityReady[Flying Kick]}) /doability "Flying Kick" 
  /if (!${Me.Buff[Celestial Tranquility].ID} && !${Me.Buff[Speed of Vallon].ID} && !${Me.Buff[Vallon's Quickening].ID}) /cast item "Celestial Fists" 
  /call GetBehind 
} 
/if (!${Me.Combat}) { 
  /if (${Me.AbilityReady[Forage]}) { 
  /doability "Forage" 
  /delay 1s 
  /autoinventory 
  } 
} 
/goto :Loop 
/endmacro 

Sub Event_move 
  /keypress forward hold 
  :Checker 
  /face fast nolook 
  /newif (${Target.Distance}<=15) { 
    /face fast nolook 
    /keypress forward 
    /return 
  } 
  /goto :Checker 
/return 

Sub Event_anchor 
  /varset AnchorX ${Me.X} 
  /varset AnchorY ${Me.Y} 
  /echo Anchor dropped at ${AnchorX} , ${AnchorY} 
/return 

Sub Event_back 
  /face fast nolook 
/return 

Sub Event_exp 
/delay 1s 
/attack off 
/newif (${AnchorX}==0 || ${AnchorY}==0) { 
  /echo No anchor is set. 
  /return 
} 
  :AnchorMoveLoop 

   /newif (${Me.State.NotEqual[STAND]}) /stand 
   /face nolook loc ${AnchorY},${AnchorX} 
   /newif (${Math.Distance[${AnchorY},${AnchorX}]}>5) /keypress forward hold 
   /newif (${Math.Distance[${AnchorY},${AnchorX}]}<=5) { 
      /keypress forward 
      /newif (${Me.State.NotEqual[STAND]}) /stand 
      /face away nolook loc ${AnchorY},${AnchorX} 
      /return 
} 
    /goto :AnchorMoveLoop 
/return 

Sub Event_tank 
  /echo Setting tank... 
  /varset tank ${Target} 
  /echo Tank set to ${tank} 
/return 

Sub GetBehind 
   /if (${Target.ID}==0) { 
      /keypress forward 
      /goto :nomob 
   } 
   /if (${Math.Distance[${Math.Calc[${Target.Y}-${Math.Cos[${Target.Heading.DegreesCCW}]}*10]},${Math.Calc[${Target.X}-${Math.Sin[${Target.Heading.DegreesCCW}]}*10]}]}<4) /goto :noneed 
   /face nolook fast loc ${Math.Calc[${Target.Y}-${Math.Cos[${Target.Heading.DegreesCCW}]}*10]},${Math.Calc[${Target.X}-${Math.Sin[${Target.Heading.DegreesCCW}]}*10]} 
   /keypress Ctrl+R 
   /keypress forward hold 
   :gobehindloop 
   /delay 1 
   /if (${Target.ID}==0) { 
      /keypress forward 
      /goto :nomob 
   } 
   /face nolook fast loc ${Math.Calc[${Target.Y}-${Math.Cos[${Target.Heading.DegreesCCW}]}*10]},${Math.Calc[${Target.X}-${Math.Sin[${Target.Heading.DegreesCCW}]}*10]} 
   /if (${Math.Distance[${Math.Calc[${Target.Y}-${Math.Cos[${Target.Heading.DegreesCCW}]}*10]},${Math.Calc[${Target.X}-${Math.Sin[${Target.Heading.DegreesCCW}]}*10]}]}>3) /goto :gobehindloop 
   /keypress Ctrl+R 
   /keypress forward 
   :noneed 
   /face nolook fast 
   :nomob 
/return 

Sub CheckHealth 
  /if (${Me.PctHPs}<=30) { 
    /echo Feigning 
    /attack off 
    /delay 2 
    /doability "Feign Death" 
    /delay 1s 
    :Loopsie 
    /if (${Me.PctHPs}>=60 || ${String[${Me.State}].Equal[STAND]}) { 
      /return 
    } 
    /goto :Loopsie 
  } 
/return 
If someone can point me in the correct direction to fix it I would be well pleased ... My guess is that it is sommat to do with the

Code: Select all

 /if (!${Me.Buff[Celestial Tranquility].ID} && !${Me.Buff[Speed of Vallon].ID} && !${Me.Buff[Vallon's Quickening].ID}) /cast item "Celestial Fists"

Statement ... but i am such a N00b i cant see where or how to change it

TIA

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Mon Aug 02, 2004 1:00 pm

Converting strings to strings is wierd:

Code: Select all

/if (!${String[${tank}].Equal[none]})
.
.

/if (${Target.PctHPs}<=96 && ${String[${Target.Type}].Equal[NPC]})
.
.
.
/if (${Me.PctHPs}>=60 || ${String[${Me.State}].Equal[STAND]}) {
Just use this:

Code: Select all

/if (${tank.NotEqual[none]})
.
.

/if (${Target.PctHPs}<=96 && ${Target.Type.Equal[NPC]})
.
.
.
/if (${Me.PctHPs}>=60 || ${Me.State.Equal[STAND]}) {
Also there is no need for /newif anymore. /if works.


As far as that other problem... It appears to be a valid statement. You said you didn't go for the monk epic. Do you have the epic or not?

Replace

Code: Select all

/cast item "Celestial Fists"
with

Code: Select all

/cast item "Gloves of Enlightenment"

hardarac
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sat Nov 30, 2002 2:25 pm

Post by hardarac » Mon Aug 02, 2004 1:40 pm

No I dont have the Epic ... it needs too much work for me. I have chosen the gloves as a replacement :smile:

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Mon Aug 02, 2004 2:11 pm

OK, then why are you trying to cast an item you don't have?

hardarac
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sat Nov 30, 2002 2:25 pm

Post by hardarac » Mon Aug 02, 2004 4:02 pm

The Gloves have the same effect ... Celestial Tranquility as their effect .... I made the gloves last week

hardarac
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sat Nov 30, 2002 2:25 pm

Post by hardarac » Mon Aug 02, 2004 4:40 pm

Hmmm ..and I made the changes you suggested to

Replace

Code: Select all

/cast item "Celestial Fists"




with

Code: Select all

/cast item "Gloves of Enlightenment
"


and No effect :cry:

hardarac
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sat Nov 30, 2002 2:25 pm

Post by hardarac » Mon Aug 02, 2004 7:05 pm

I am such a silly bear

the items are GAUNTLETS of Enlightenment ....NOT Gloves of Enlightenment.

Now the macro works perfeck

Many thanks for the help