Kio2010-07-23 16:46:12
So, it's been a longggggg time since I've done anything, and need a bit-o-help.
^The max\\/current ego strength of (.*?)\\: (.*?)\\/(.*?)$
Here's what I need to do.
If %3 / %2 < .5
Then Mindburst @target
Else Psychicvampirism @target
. . .
Someone shoot me. (or give teh helps!)
Thanks!
^The max\\/current ego strength of (.*?)\\: (.*?)\\/(.*?)$
Here's what I need to do.
If %3 / %2 < .5
Then Mindburst @target
Else Psychicvampirism @target
. . .
Someone shoot me. (or give teh helps!)
Thanks!
Faymar2010-07-23 17:19:46
QUOTE (Kio @ Jul 23 2010, 06:46 PM) <{POST_SNAPBACK}>
So, it's been a longggggg time since I've done anything, and need a bit-o-help.
^The max\\/current ego strength of (.*?)\\: (.*?)\\/(.*?)$
Here's what I need to do.
If %3 / %2 < .5
Then Mindburst @target
Else Psychicvampirism @target
. . .
Someone shoot me. (or give teh helps!)
Thanks!
^The max\\/current ego strength of (.*?)\\: (.*?)\\/(.*?)$
Here's what I need to do.
If %3 / %2 < .5
Then Mindburst @target
Else Psychicvampirism @target
. . .
Someone shoot me. (or give teh helps!)
Thanks!
The trigger pattern:
CODE
^The max\\/current ego strength of (?:+)\\: (\\d+)\\/(\\d+)$
%1 is their current ego, %2 is their max ego.
You're doing it wrong, you also need to check for your current power if their ego is below the threshold (you will need to get that from whatever system you are using).
If you cannot mindburst, DON'T attack. And in case you aren't aware, you can send two telep affs and mindblast/psyvamp in one attack.
Kio2010-07-23 18:49:48
I am aware, and I'm not doing it wrong.
I'm not doing it at all.
I just need to know how to perform the math and set it up the way I want it done.
This isn't a question about the offense itself, but the how to code it part.
I'm not doing it at all.
I just need to know how to perform the math and set it up the way I want it done.
This isn't a question about the offense itself, but the how to code it part.
Esano2010-07-23 23:42:53
if (tonumber("%3") / tonumber ("%2")) <= .5 then
Send("psi super mindburst @target")
else
Send("psi super psychicvampirism target")
end
Send("psi super mindburst @target")
else
Send("psi super psychicvampirism target")
end
Unknown2010-07-24 00:53:41
If you use (\\d+) to capture the value, you can just use %2 instead of tonumber("%2"). Even if you use (.*?) and only ever match numbers, it should still work.