Page 2 of 2

Re: A=? B=? C=?

Posted: 09 Mar 2017, 14:47
by Mortimal
o_O


Ookkk.... try this:

Code: Select all

automacro countItForMe1 {
    console /Unknown\s#\d+:\s>If\s?:\s([ABC])=(\d+)\s([ABC])=(\d+)\s([ABC])=(\d+).*\nUnknown\s#\d+: How many is A\s(-|\+)\sB\s(-|\+)\sC.*/i
    call doCount1
}

macro doCount1 {
    pause 1
    switch ($.lastMatch1) {
        case (== A){
            $a = $.lastMatch2
        }
        case (== B){
            $b = $.lastMatch2
        }
        case (== C){
            $c = $.lastMatch2
        }
    }
    switch ($.lastMatch3) {
        case (== A){
            $a = $.lastMatch4
        }
        case (== B){
            $b = $.lastMatch4
        }
        case (== C){
            $c = $.lastMatch4
        }
    }
    switch ($.lastMatch5) {
        case (== A){
            $a = $.lastMatch6
        }
        case (== B){
            $b = $.lastMatch6
        }
        case (== C){
            $c = $.lastMatch6
        }
    }
    $doThis = $a$.lastMatch7$b$.lastMatch8$c
    $res = @eval($doThis)
    do talk num $res
}

automacro countItForMe2 {
    console /Unknown\s#\d+:\s>If\s?:\s([AB])=(\d+)\s([AB])=(\d+).*\nUnknown\s#\d+: How many is A\s(-|\+)\sB.*/i
    call doCount2
}

macro doCount2 {
    pause 1
    switch ($.lastMatch1) {
        case (== A){
            $a = $.lastMatch2
        }
        case (== B){
            $b = $.lastMatch2
        }
    }
    switch ($.lastMatch3) {
        case (== A){
            $a = $.lastMatch4
        }
        case (== B){
            $b = $.lastMatch4
        }
    }
    $doThis = $a$.lastMatch5$b$
    $res = @eval($doThis)
    do talk num $res
}

Re: A=? B=? C=?

Posted: 09 Mar 2017, 14:52
by sobad123
some more errors :/ But Thank you for helping!

Re: A=? B=? C=?

Posted: 09 Mar 2017, 14:59
by Mortimal
I am totally lost o_O why there is this mistakes... your macro plugin i hope it isn't outdated? cause i really have no clue why... need someone from aside to look at this.

Re: A=? B=? C=?

Posted: 09 Mar 2017, 15:03
by sobad123
I m not sure but I download it fast again.

Update: Okay I m sure that it is the newest one :( or can you upload your macro folder? I used this link: https://sourceforge.net/p/openkore/code ... cro/trunk/