示例#1
0
def Main(ptr):
 try:
    p1x = stz3.CPGetData(ptr, GET_POSX, STZ3_P1)
    p2x = stz3.CPGetData(ptr, GET_POSX, STZ3_P2)
    delta = abs(p1x - p2x)
    delta = delta - 50
    result = 0

    '''Hadoken'''
    '''mytuple = ((PRESS_DOWN, 2), (PRESS_DOWN|PRESS_RIGHT, 2), (PRESS_RIGHT, 2), (PRESS_B, 2), (0, 10))'''

    '''Patthai'''
    '''mytuple = ((PRESS_DOWN, 2), (PRESS_DOWN|PRESS_LEFT, 2), (PRESS_LEFT, 2), (PRESS_A, 2), (0, 60))'''

    '''Ryu combo'''
    mytuple = ((PRESS_UP|PRESS_LEFT, 24), (PRESS_B, 6), (0, 10),
               (PRESS_B|PRESS_DOWN, 3), (PRESS_B|PRESS_DOWN|PRESS_RIGHT, 3), (PRESS_RIGHT, 3), (PRESS_A, 3),
               (0, 120), (PRESS_B|PRESS_DOWN, 3),(PRESS_B|PRESS_DOWN|PRESS_LEFT, 3), (PRESS_LEFT, 3), (PRESS_A|PRESS_B, 3),
               (0, 60))

    result = stz3.CPPressCustomCombo(ptr, mytuple)

    return result
 except Exception, detail:
    arg0 = traceback.extract_tb(sys.exc_info()[2])[0][0]
    arg1 = traceback.extract_tb(sys.exc_info()[2])[0][1]
    arg2 = traceback.extract_tb(sys.exc_info()[2])[0][2]
    arg3 = traceback.extract_tb(sys.exc_info()[2])[0][3]
    print arg0,'\n', arg1,'\n', arg2,'\n', arg3,'\n', detail,'\n\n'
    return -1
示例#2
0
def Main(ptr):
    try:
        p1x = stz3.CPGetData(ptr, GET_POSX, STZ3_P1)
        p2x = stz3.CPGetData(ptr, GET_POSX, STZ3_P2)
        delta = abs(p1x - p2x)
        delta = delta - 50
        result = 0
        '''Hadoken'''
        '''mytuple = ((PRESS_DOWN, 2), (PRESS_DOWN|PRESS_RIGHT, 2), (PRESS_RIGHT, 2), (PRESS_B, 2), (0, 10))'''
        '''Patthai'''
        '''mytuple = ((PRESS_DOWN, 2), (PRESS_DOWN|PRESS_LEFT, 2), (PRESS_LEFT, 2), (PRESS_A, 2), (0, 60))'''
        '''Ryu combo'''
        mytuple = ((PRESS_UP | PRESS_LEFT,
                    24), (PRESS_B, 6), (0, 10), (PRESS_B | PRESS_DOWN, 3),
                   (PRESS_B | PRESS_DOWN | PRESS_RIGHT, 3), (PRESS_RIGHT, 3),
                   (PRESS_A, 3), (0, 120), (PRESS_B | PRESS_DOWN, 3),
                   (PRESS_B | PRESS_DOWN | PRESS_LEFT,
                    3), (PRESS_LEFT, 3), (PRESS_A | PRESS_B, 3), (0, 60))

        result = stz3.CPPressCustomCombo(ptr, mytuple)

        return result
    except Exception, detail:
        print detail
        return 0
示例#3
0
def Main(ptr):
    p1x = stz3.CPGetData(ptr, GET_POSX, STZ3_P1)
    p2x = stz3.CPGetData(ptr, GET_POSX, STZ3_P2)
    delta = abs(p1x - p2x)
    delta = delta - 50
    result = 0
    '''mytuple = ((1,2), (3,4))'''
    '''mytuple = ((PRESS_DOWN, 10), (PRESS_RIGHT, 10), (PRESS_A, 8), (PRESS_B, 8))'''
    mytuple = ((PRESS_DOWN, 2), (PRESS_DOWN | PRESS_RIGHT, 2),
               (PRESS_RIGHT, 2), (PRESS_B, 2), (0, 10))
    '''mytuple = ((PRESS_DOWN, 2), (PRESS_DOWN|PRESS_LEFT, 2), (PRESS_LEFT, 2), (PRESS_A, 2), (0, 60))'''
    '''mytuple = (PRESS_DOWN, 10, PRESS_RIGHT, 10, PRESS_A, 8, PRESS_B, 8)'''
    result = stz3.CPPressCustomCombo(ptr, mytuple)
    '''result = stz3.CPPressCustomCombo(ptr, PRESS_DOWN | PRESS_A, 8, 0, 0, 0, 0)'''

    return result
示例#4
0
def Main(ptr):
    p1x = stz3.CPGetData(ptr, GET_POSX, STZ3_P1)
    p2x = stz3.CPGetData(ptr, GET_POSX, STZ3_P2)
    delta = abs(p1x - p2x)
    delta = delta - 50
    result = 0
    '''Hadoken'''
    '''mytuple = ((PRESS_DOWN, 2), (PRESS_DOWN|PRESS_RIGHT, 2), (PRESS_RIGHT, 2), (PRESS_B, 2), (0, 10))'''
    '''Patthai'''
    '''mytuple = ((PRESS_DOWN, 2), (PRESS_DOWN|PRESS_LEFT, 2), (PRESS_LEFT, 2), (PRESS_A, 2), (0, 60))'''
    '''Low kick'''
    mytuple = ((PRESS_RIGHT, 2), (PRESS_DOWN, 2), (PRESS_DOWN | PRESS_RIGHT,
                                                   2), (PRESS_B, 2), (0, 60))

    result = stz3.CPPressCustomCombo(ptr, mytuple)

    return result