First off just wanted to say hats off to the Devs of MQ and each of you in the forums for all your help in the past. Even though this is the first post I’ve ever made.. for almost a full year I’ve been able to learn from the questions and answers posted by others to do all the things I’ve wanted to do.
Now I’m trying my first baby steps to make or try things I’ve not seen but feel are possible. I’ve been stuck a few days on something I’m trying to do and am asking for some help. Pardon my long winded explanations. I’m one of those kind of guys that says there is no such thing as too much info.
I’m putting the finishing touches on a MQ detailed information window using the friends window. I’m using this window as a test to get all the info I ultimately want embedded into other windows later. So for now I’m just trying to get my equations to show and work in the friends window. Once it all works as intended I’ll post that code and then scrap it and pepper it all thought-out the other windows in my UI.
First, I wanted to know if there is a way to change the color of the text or a graphic in the UI depending on the value of the variable. For example if $char(mana,max) = $char(mana,cur) display $char(mana,cur) in green on the UI, Otherwise show it yellow and if $char(mana,cur) =<400 display $char(mana,cur) in red. The answer I think is no you can’t do this. I’m asking to make sure there isn’t some sort of trick or way to do it. It would be really nice to be able to call attention to a stat or gauge based on color.
Second, I was working on an equation to tell me how many times I can cast a given spell with the mana I currently have. This was actually pretty easy with: $calc($char(mana,cur)/316) because I know that it takes 316 mana to cast my complete heal. However what I really want to do is have a number next to all my spell gems that reads the spell I have memed pulls the mana it takes to cast it place it in a varable such as $spell,manacost and then I can have the UI do $calc($char(mana,cur)/$spell,manacost) for each spell I have in my gem and tell me how many times I can cast that spell with my current mana. Something that sounds great for any casting class to me. Clerics, Wizards and Enchanters for sure. I’m pretty sure.. once again that this is not currently possible. I’m looking for someone to tell me for sure.
Third, and most important to me, I’m stuck on the last few equations I’m trying to do and I can’t seem to get them to work I’ll explain one of them the best I can below and see if any of you can help me from there I should be able to do the rest if this one is possable. I was never very good in algebra as a kid and it unfortunately shows here. What I’m trying to do in the first equation is take the 3 things we know, $char(mana,max) $char(mana,cur) $char(mana,regen) and determine the time (in mins and seconds) it will take to reach full mana. I’m trying to display this as a $calc in real time on the UI.
So far most of my other simple equations are working such as $calc($char(mana,cur)/316) to tell me how many casts of Complete Heal I still have in me at any given time and $calc($char(mana,max)-($char(mana,cur)) to tell me how much mana I’m lacking till I reach full mana. My problem is two fold. I don’t EXACTLY know the equation I need to get what I want here. I know it’s simple it’s just evading me and two..
As I’m experimenting with /echo $calc commands to slowly build the equation a step at a time I can’t seem to get MQ to parse the $calc line when I think I have it right. I’m trying something like: $calc(($char(mana,max)-($char(mana,cur)/$char(mana,regen))/60) to give me time in seconds till max mana. But it’s not working. Even when I try to put something simple and known like this in the parser can’t do it: $calc(($char(mana,max)-($char(mana,cur))+(2+2)) It acts like I’m missing a parenthesis someplace and maybe I am. But I tried combos and changes till almost 3 am lastnight and it seems like I tried everything. I am almost convinced that $calc has a limit to how many calculations in can do inside it but I’m not sure. I’m not a programmer and I’m sure not a mathematician so I can’t be sure if what I’m trying to do is even possible.
Does anyone have any insight into any of these?
J

