Jump to content
Korean Random

sergey spb

User
  • Content Count

    131
  • Joined

  • Last visited

Posts posted by sergey spb


  1. Добрый вечер, кому не трудно помогите!

    Раньше открывалось в браузере игры, а сейчас нет (долгая загрузка и всё...)

    Делал по подобию из образцов и советов на форуме для себя, сам к сожалению не шарю.

    # Source Generated with Decompyle++
    # File: mod_newclik .pyc (Python 2.7)
    
    import BigWorld
    from notification.NotificationListView import NotificationListView
    from notification.settings import NOTIFICATION_BUTTON_STATE
    from gui.SystemMessages import SM_TYPE
    from adisp import process
    
    def messages():
        return {
            'typeID': 1,
            'message': {
                'bgIcon': '',
                'defaultIcon': '',
                'savedData': 0,
                'timestamp': -1,
                'filters': [],
                'buttonsStates': {
                    'cancel': NOTIFICATION_BUTTON_STATE.HIDDEN },
                'buttonsLayout': [
                    {
                        'action': 'action_1',
                        'type': 'submit',
                        'label': '\xd0\x9e\xd1\x82\xd0\xba\xd1\x80\xd1\x8b\xd1\x82\xd1\x8c',
                        'width': 110 },
                    {
                        'action': 'action_2',
                        'type': 'cancel',
                        'label': 'Button 2',
                        'width': 90 }],
                'message': '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f ModPackSG',
                'type': 'black',
                'icon': 'img://../icons/SG.png' },
            'entityID': 99999,
            'auxData': [
                'GameGreeting'] }
    
    
    def new_getMessagesList(self):
        result = old_getMessagesList(self)
        if self._NotificationListView__currentGroup in 'info':
            result.append(messages())
        return result
    
    old_getMessagesList = NotificationListView._NotificationListView__getMessagesList
    NotificationListView._NotificationListView__getMessagesList = new_getMessagesList
    import BigWorld
    from adisp import process
    from helpers import dependency
    from skeletons.gui.game_control import IBrowserController
    
    class BrowserWindow(object):
        
        def browser(self, url, title, browserID, browserSize):
            browserCtrl = dependency.instance(IBrowserController)
            yield browserCtrl.load(url = url, title = title, browserID = browserID, browserSize = browserSize, showActionBtn = True, showCloseBtn = True, showWaiting = True)
    
        browser = process(browser)
    
    g_browserWindow = BrowserWindow()
    
    def new_onClickAction(self, typeID, entityID, action):
        if action == 'action_1':
            g_browserWindow.browser('http://sgtspb.ucoz.net/ModPack_SG.jpg', 'Please wait...', 'Pack', [
                1366,
                768])
        elif action == 'action_2':
            print 'action_2'
        else:
            old_onClickAction(self, typeID, entityID, action)
    
    old_onClickAction = NotificationListView.onClickAction
    NotificationListView.onClickAction = new_onClickAction

    Сейчас код такой, но открывается в браузере Windows, не подскажете ка переделать? Спасибо!

    # Source Generated with Decompyle++
    # File: mod_newclik_win .pyc (Python 2.7)
    
    import BigWorld
    from notification.NotificationListView import NotificationListView
    from notification.settings import NOTIFICATION_BUTTON_STATE
    from gui.SystemMessages import SM_TYPE
    from adisp import process
    
    def messages():
        return {
            'typeID': 1,
            'message': {
                'bgIcon': '',
                'defaultIcon': '',
                'savedData': 0,
                'timestamp': -1,
                'filters': [],
                'buttonsStates': {
                    'cancel': NOTIFICATION_BUTTON_STATE.HIDDEN },
                'buttonsLayout': [
                    {
                        'action': 'action_1',
                        'type': 'submit',
                        'label': '\xd0\x9e\xd1\x82\xd0\xba\xd1\x80\xd1\x8b\xd1\x82\xd1\x8c',
                        'width': 110 },
                    {
                        'action': 'action_2',
                        'type': 'cancel',
                        'label': 'Button 2',
                        'width': 90 }],
                'message': '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f ModPackSG',
                'type': 'black',
                'icon': 'img://../icons/SG.png' },
            'entityID': 99999,
            'auxData': [
                'GameGreeting'] }
    
    
    def new_getMessagesList(self):
        result = old_getMessagesList(self)
        if self._NotificationListView__currentGroup in 'info':
            result.append(messages())
        return result
    
    old_getMessagesList = NotificationListView._NotificationListView__getMessagesList
    NotificationListView._NotificationListView__getMessagesList = new_getMessagesList
    import BigWorld
    from adisp import process
    from helpers import dependency
    from skeletons.gui.game_control import IBrowserController
    
    class BrowserWindow(object):
        
        def browser(self, url, title, browserID, browserSize):
            browserCtrl = dependency.instance(IBrowserController)
            yield browserCtrl.load(url = url, title = title, browserID = browserID, browserSize = browserSize, showActionBtn = True, showCloseBtn = True, showWaiting = True)
    
        browser = process(browser)
    
    g_browserWindow = BrowserWindow()
    
    def new_onClickAction(self, typeID, entityID, action):
        if action == 'action_1':
            BigWorld.wg_openWebBrowser('http://sgtspb.ucoz.net/ModPack_SG.jpg')
        elif action == 'action_2':
            print 'action_2'
        else:
            old_onClickAction(self, typeID, entityID, action)
    
    old_onClickAction = NotificationListView.onClickAction
    NotificationListView.onClickAction = new_onClickAction

     


  2. damageLog.xc

     

    "damageLog": {
        // false - disable.
        // false - отключить.
        "enabled": true,
        // true - disable standard detailed damage.
        // true - отключить стандартный детальный урон.
        "disabledDetailStats": true,
        // true - disable standard summarized damage.
        // true - отключить стандартный суммарный урон.
        "disabledSummaryStats": true,

    • Upvote 1

  3. @HEKPOMAHT СПАСИБО всё получилось!

    А как правильно прописать:

    если dmg=0 то цвет зеленый

    если -dmg то цвет красный.

     

     

    shot_013.jpg.27cdc33eea616af9a2ef82a735cd62a4.jpg

     

     "formatHistory": "<font color='{{c:team-dmg}}'><textformat tabstops='{{l10n:[26,58,129,136,172,191]}}'>{{my-alive?<font face='mono'>{{number%02d}}</font>{{critical-hit}}|<font alpha='#E6' face='xvm' size='15'>&#x2B;</font>}}\t{{dmg=0?<img src='img://../icons/log/{{c:team-dmg}}/arrow.png' width='27' height='27' vspace='-9'>|-{{dmg}}}}\t<img src='img://../icons/log/{{c:team-dmg}}/{{c:dmg-kind}}.png' width='27' height='27' vspace='-9'>{{dmg-kind}}<img src='img://../icons/nations flag/{{nation}}.png' width='16' height='12' vspace='-1'><font size='21' color='{{c:team-dmg}}'> {{vtype}} </font>\t<font color='{{c:team-dmg}}'>{{vehicle}}</textformat></font>"

    • Upvote 1

  4. чтобы открывало картинку сохранённую на компе ? это хз. . а нельзя эту же картинку залить куда нить на хостинг и уже оттуда ссылку прописать в скрипт?  

    Да, можно, но хотелось бы чтобы открывалась уже сохраненная как иконка.


  5. хз. только проверил у меня открывается. хотя тока заметил у тебя код чуть другой вероятно поэтому у тебя игровой браузер не открывает. я сам мало что в этом понимаю так что нужно ждать ответа спецов))

     

    P/S... там по ходу другой код идёт..

     

    Спасибо, большое!!!

    Всё получилось, кому надо, берите:

    import BigWorld
    from notification.NotificationListView import NotificationListView
    from notification.settings import NOTIFICATION_BUTTON_STATE
    from gui.SystemMessages import SM_TYPE
    from adisp import process
    
    
    
    def messages():
        return {'typeID': 1,
         'message': {'bgIcon': '',
                     'defaultIcon': '',
                     'savedData': 0,
                     'timestamp': -1,
                     'filters': [],
                     'buttonsStates': {'cancel': NOTIFICATION_BUTTON_STATE.HIDDEN},
                     'buttonsLayout': [{'action': 'action_1',
                                        'type': 'submit',
                                        'label': '\xd0\x9e\xd1\x82\xd0\xba\xd1\x80\xd1\x8b\xd1\x82\xd1\x8c',
                                        'width': 110}, {'action': 'action_2',
                                        'type': 'cancel',
                                        'label': 'Button 2',
                                        'width': 90}],
                     'message': '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f',
                     'type': 'black',
                     'icon': 'img://../icons/SG.png'},
         'entityID': 99999,
         'auxData': ['GameGreeting']}
    
    
    def new_getMessagesList(self):
        result = old_getMessagesList(self)
        if self._NotificationListView__currentGroup in 'info':
            result.append(messages())
        return result
    
    
    old_getMessagesList = NotificationListView._NotificationListView__getMessagesList
    NotificationListView._NotificationListView__getMessagesList = new_getMessagesList
    
    import BigWorld
    
    from adisp import process
    from helpers import dependency
    from skeletons.gui.game_control import IBrowserController
    
    class BrowserWindow(object):
                           
        @process
        def browser(self, url, title, browserID, browserSize): 
            browserCtrl = dependency.instance(IBrowserController) 
            yield browserCtrl.load(url=url, title=title, browserID=browserID, browserSize=browserSize, showActionBtn=True, showCloseBtn=True, showWaiting=True)
    
    g_browserWindow = BrowserWindow()
    
    
    
    def new_onClickAction(self, typeID, entityID, action):
        if action == 'action_1':
            g_browserWindow.browser('https://docviewer.yandex.ru', 'Please wait...', 'Pack', [990, 550])
        elif action == 'action_2':
            print 'action_2'
        else:
            old_onClickAction(self, typeID, entityID, action)
    
    
    old_onClickAction = NotificationListView.onClickAction
    NotificationListView.onClickAction = new_onClickAction 

    • Upvote 1
    • Downvote 1

  6.  

    если нужно чтобы открывалось во внешнем браузере то вот так попробуй...

    def new_onClickAction(self, typeID, entityID, action):
        if action == 'action_1':
            BigWorld.wg_openWebBrowser('http://koreanrandom.com')
        elif action == 'action_2':
            BigWorld.wg_openWebBrowser('http://koreanrandom.com')
        else:
            old_onClickAction(self, typeID, entityID, action)
    

    Спасибо!!!

    А как в браузере игры, не подскажешь?


  7. Добрый день!

    При нажатии кнопки не открывается в браузере, что не так?

    # Embedded file name: mod_clik
    import BigWorld
    from notification.NotificationListView import NotificationListView
    from notification.settings import NOTIFICATION_BUTTON_STATE
    from gui.SystemMessages import SM_TYPE
    from adisp import process
    
    @process
    def openBrowserWindow(url, title):
        from gui import game_control
        width = 990
        height = 550
        browserSize = [width, height]
        yield game_control.g_instance.browser.load(url=url, title=title, showActionBtn=True, browserSize=browserSize, showCloseBtn=True)
    
    
    def messages():
        return {
            'typeID': 1,
            'message': {
                     'bgIcon': '',
                     'defaultIcon': '',
                     'savedData': 0,
                     'timestamp': -1,
                     'filters': [],
                     'buttonsStates': {'cancel': NOTIFICATION_BUTTON_STATE.HIDDEN},
                     'buttonsLayout': [{'action': 'action_1',
                                        'type': 'submit',
                                        'label': '\xd0\x9e\xd1\x82\xd0\xba\xd1\x80\xd1\x8b\xd1\x82\xd1\x8c',
                                        'width': 100}, {'action': 'action_2',
                                        'type': 'cancel',
                                        'label': 'Button 2',
                                        'width': 100}],
                     'message': '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f ModPackSG',
                     'type': 'black',
                     'icon': 'img://../icons/SG.png'},
         'entityID': 99999,
         'auxData': ['GameGreeting']
         }
    def new_getMessagesList(self):
        result = old_getMessagesList(self)
        if self._NotificationListView__currentGroup in 'info':
            result.append(messages())
        return result
        
        
    old_getMessagesList = NotificationListView._NotificationListView__getMessagesList
    NotificationListView._NotificationListView__getMessagesList = new_getMessagesList
    
    
    
    def new_onClickAction(self, typeID, entityID, action):
        if action == 'action_1':
            openBrowserWindow('https://docviewer.yandex.ru/?url=ya-disk-public%3A%2F%2FzQ%2BixpkQPkBLxjSdk%2B5hLdC1vUIYT%2FnITuvj7140U9A%3D&name=%20information.docx&c=579508c0090d', '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f')
        elif action == 'action_2':
            print 'action_2'
        else:
            old_onClickAction(self, typeID, entityID, action)
    
    
    old_onClickAction = NotificationListView.onClickAction
    NotificationListView.onClickAction = new_onClickAction 



  8. # Embedded file name: mod_clik
    import BigWorld
    from notification.NotificationListView import NotificationListView
    from notification.settings import NOTIFICATION_BUTTON_STATE
    from gui.SystemMessages import SM_TYPE
    from adisp import process

    @process
    def openBrowserWindow(url, title):
    from gui import game_control
    width = 990
    height = 550
    browserSize = [width, height]
    yield game_control.g_instance.browser.load(url=url, title=title, showActionBtn=True, browserSize=browserSize, showCloseBtn=True)


    old_populate = NotificationListView._populate

    def new_populate(self):
    message = {'typeID': 1,
    'message': {'bgIcon': '',
    'defaultIcon': '',
    'savedData': 0,
    'timestamp': -1,
    'filters': [],
    'buttonsStates': {'cancel': NOTIFICATION_BUTTON_STATE.HIDDEN},
    'buttonsLayout': [{'action': 'action_1',
    'type': 'submit',
    'label': '\xd0\x9e\xd1\x82\xd0\xba\xd1\x80\xd1\x8b\xd1\x82\xd1\x8c',
    'width': 100}, {'action': 'action_2',
    'type': 'cancel',
    'label': 'Button 2',
    'width': 100}],
    'message': '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f ModPackSG',
    'type': 'black',
    'icon': 'img://../icons/SG.png'},
    'entityID': 99999,
    'auxData': ['GameGreeting']}
    old_populate(self)
    self.as_appendMessageS(message)


    NotificationListView._populate = new_populate
    old_onClickAction = NotificationListView.onClickAction

    def new_onClickAction(self, typeID, entityID, action):
    if action == 'action_1':
    openBrowserWindow('https://docviewer.yandex.ru/?url=ya-disk-public%3A%2F%2FzQ%2BixpkQPkBLxjSdk%2B5hLdC1vUIYT%2FnITuvj7140U9A%3D&name=%20information.docx&c=579508c0090d', '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f ModPackSG')
    elif action == 'action_2':
    print 'action_2'
    else:
    old_onClickAction(self, typeID, entityID, action)


    NotificationListView.onClickAction = new_onClickAction

     


  9. Добрый день!
    Парни не поможите, что не так?

    # Embedded file name: mod_clik
    import BigWorld
    from notification.NotificationListView import NotificationListView
    from notification.settings import NOTIFICATION_BUTTON_STATE
    from gui.SystemMessages import SM_TYPE
    from adisp import process

    @process
    def openBrowserWindow(url, title):
    from gui import game_control
    width = 990
    height = 550
    browserSize = [width, height]
    yield game_control.g_instance.browser.load(url=url, title=title, showActionBtn=True, browserSize=browserSize, showCloseBtn=True)

    old_populate = NotificationListView._populate

    def new_populate(self):
    message = {'typeID': 1,
    'message': {'bgIcon': '',
    'defaultIcon': '',
    'savedData': 0,
    'timestamp': -1,
    'filters': [],
    'buttonsStates': {'cancel': NOTIFICATION_BUTTON_STATE.HIDDEN},
    'buttonsLayout': [{'action': 'action_1',
    'type': 'submit',
    'label': '\xd0\x9e\xd1\x82\xd0\xba\xd1\x80\xd1\x8b\xd1\x82\xd1\x8c',
    'width': 100}, {'action': 'action_2',
    'type': 'cancel',
    'label': 'Button 2',
    'width': 100}],
    'message': '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f ModPackSG',
    'type': 'black',
    'icon': 'img://../icons/SG.png'},
    'entityID': 99999,
    'auxData': ['GameGreeting']}
    old_populate(self)
    self.as_appendMessageS(message)

    NotificationListView._populate = new_populate
    old_onClickAction = NotificationListView.onClickAction

    def new_onClickAction(self, typeID, entityID, action):
    if action == 'action_1':
    openBrowserWindow('https://docviewer.yandex.ru/?url=ya-disk-public%3A%2F%2FzQ%2BixpkQPkBLxjSdk%2B5hLdC1vUIYT%2FnITuvj7140U9A%3D&name=%20information.docx&c=579508c0090d\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f')
    elif action == 'action_2':
    print 'action_2'
    else:
    old_onClickAction(self, typeID, entityID, action)

    NotificationListView.onClickAction = new_onClickAction

    Работало до версии 0.9.15 (примерно).
    Спасибо.


  10. Добрый день!

    Парни не поможите, что не так?

    # Embedded file name: mod_clik

    import BigWorld
    from notification.NotificationListView import NotificationListView
    from notification.settings import NOTIFICATION_BUTTON_STATE
    from gui.SystemMessages import SM_TYPE
    from adisp import process

    @process
    def openBrowserWindow(url, title):
    from gui import game_control
    width = 990
    height = 550
    browserSize = [width, height]
    yield game_control.g_instance.browser.load(url=url, title=title, showActionBtn=True, browserSize=browserSize, showCloseBtn=True)


    old_populate = NotificationListView._populate

    def new_populate(self):
    message = {'typeID': 1,
    'message': {'bgIcon': '',
    'defaultIcon': '',
    'savedData': 0,
    'timestamp': -1,
    'filters': [],
    'buttonsStates': {'cancel': NOTIFICATION_BUTTON_STATE.HIDDEN},
    'buttonsLayout': [{'action': 'action_1',
    'type': 'submit',
    'label': '\xd0\x9e\xd1\x82\xd0\xba\xd1\x80\xd1\x8b\xd1\x82\xd1\x8c',
    'width': 100}, {'action': 'action_2',
    'type': 'cancel',
    'label': 'Button 2',
    'width': 100}],
    'message': '\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f ModPackSG',
    'type': 'black',
    'icon': 'img://../icons/SG.png'},
    'entityID': 99999,
    'auxData': ['GameGreeting']}
    old_populate(self)
    self.as_appendMessageS(message)


    NotificationListView._populate = new_populate
    old_onClickAction = NotificationListView.onClickAction

    def new_onClickAction(self, typeID, entityID, action):
    if action == 'action_1':
    openBrowserWindow('https://docviewer.yandex.ru/?url=ya-disk-public%3A%2F%2FzQ%2BixpkQPkBLxjSdk%2B5hLdC1vUIYT%2FnITuvj7140U9A%3D&name=%20information.docx&c=579508c0090d''\xd0\x98\xd0\xbd\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f')
    elif action == 'action_2':
    print 'action_2'
    else:
    old_onClickAction(self, typeID, entityID, action)


    NotificationListView.onClickAction = new_onClickAction

     

     

    Работало до версии 0.9.15 (примерно).

    Спасибо.


  11. Добрый день!
    Не подскажите как выполнить условие(если пожар,то S)?
    markersDeadNormal
    "damageMessage": "<font face='$FieldFont' size='30' color='#ffdd33'>{{my-frags}}<font face='icons' size='30' color='#ffdd33'?{{dmg-kind={{l10n:fire}}}}>53;</font>\n<img src='img://gui/maps/icons/vehicle/contour/{{vehiclename}}.png' width='80' height='24'>\n<font face='$FieldFont' size='15' color='#ffdd33'>-{{dmg}}</font>",
    Спасибо!

     

    Сделал!!! + таран

     

    "damageMessage": "<font face='$FieldFont' size='30' color='#ffdd33'>{{my-frags}}<font face='icons' size='30' color='#ffdd33'>{{dmg-kind={{l10n:fire}}? m}}<font face='XVMSymbol' size='30' color='#ffdd33'>{{dmg-kind={{l10n:ramming}}? \u002c}}</font>\n<img src='img://gui/maps/icons/vehicle/contour/{{vehiclename}}.png' width='80' height='24'>\n<font face='$FieldFont' size='15' color='#ffdd33'>-{{dmg}}</font>",

     

    Для всех (не проверял!!!)

    "damageMessage": "<font face='icons' size='30'  color='{{ally?#96FF00|{{enemy?#F50800|{{squadman?#FFB964|{{teamKiller?#00EAFF}}}}}}}}'>{{dmg-kind={{l10n:fire}}?{{ally?m|{{enemy?m|{{squadman?m|{{teamKiller?m}}}}}}}}}}<font face='XVMSymbol' size='30' color='{{ally?#96FF00|{{enemy?#F50800|{{squadman?#FFB964|{{teamKiller?#00EAFF}}}}}}}}'>{{dmg-kind={{l10n:ramming}}?{{ally?\u002c|{{enemy?\u002c|{{squadman?\u002c|{{teamKiller?\u002c}}}}}}}}}}</font>\n<img src='img://gui/maps/icons/vehicle/contour/{{vehiclename}}.png' width='80' height='24'>\n-{{dmg}}",

×
×
  • Create New...