Question about checking mana

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

Moderator: MacroQuest Developers

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Question about checking mana

Post by Draekz » Fri Oct 04, 2002 8:58 am

I was wondering, in my clericbot, i wanted the script to check my current mana when its about to heal a party member, if my mana is lower then 25 percent I wanted it to output to the group that im LoM (and then the percent)..

Now, I think i have an idea how to do this, but not sure because in the help file it says

Code: Select all

$char(mana,pct)
returns the value of the TARGETS mana? Not necessarily the players?

I dont know if it does return the players mana value even if a target is selected so wanted to see if anyone knew if it would work (since its in my heal loop, i'd have selected my target for healing, then it would check to see how much mana i had..and if i was LoM it would tell them that and how much I had).

So i'll write the code i think would do this, but would like feedback if possible :) thanks!

Here's the part of the script im working on atm

Code: Select all


 :Casters
   /if n $char(mana,pct)<=25
   /gsay Low on mana currently at "$char(mana,pct)" percent!

^^Above is where i am having a bit of a problem also..im not sure how to output what my mana percentage is in groupchat? would i just put the code "$char(mana,pct)" in there? Im honestly not sure?..Anyway...
To continue (the following is still part of the above code)

Code: Select all

    
   	/delay 1
   /sit off
   /gsay SHealing $target(name)
   /cast "PLAYER_1"
   /if n $v23==0 {
       /call MemorizeSpell "PLAYER_1" 1
  	 /delay 10
  	 /sit off
  	 }
  	 /delay 5s
    /sit on
   /goto :LoopStart

In any case! If anyone can help me figure that out, that'd be great :) thanks!

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

Post by Fippy » Fri Oct 04, 2002 10:05 am

I am pretty sure that the stuff in the readme where it mentions target under the $char is just cause the text was cut and pasted from the $target explaination. I have had no problems using $char when other mobs are targeted, it still returns info about me. The client could not find out what a targets mana is anyway so I think you are safe. Your code looks spot on btw for reporting back to the group i dont think ya need the quotes though.

Fippy

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Fri Oct 04, 2002 10:15 am

ahh alright thanks fippy! Thats good to hear ;) Cuz it means im actually learning something for a change lol

I appreciate the feedback!

Draekz

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Fri Oct 04, 2002 5:15 pm

blehh... manual bug.

last time i copy paste.. damn you bill gates!
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Fri Oct 04, 2002 6:53 pm

rofl

yah i know the feeling...btw..why is it on these boards you cant click and drag select multiple text...that really sucks lol

dreakz

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Fri Oct 04, 2002 8:53 pm

the current theme is bad.
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]