DrWebber Posted July 8, 2014 Share Posted July 8, 2014 Все сдела что хотел: А для чего все это делал: кладете файл по пути http://www.*****.ru/text.txt . Соклановцы устанавливают себе этот скрипт. Вы в файлике пишите инфу и все ваши соклановцы видят ее. Тут возник еще один вопрос: как сейчас сделать что бы это сообщение было поверх остальных? как реализовано у Юши когда выходит новая версия сборки. import BigWorld import urllib from gui import SystemMessages from Account import Account link = Account.onBecomePlayer def _First(self): link(self) txt = urllib.urlopen('http://www.*****.ru/text.txt').read() type = SystemMessages.SM_TYPE.Warning SystemMessages.pushMessage(txt, type) Account.onBecomePlayer = link Account.onBecomePlayer = _First Можешь захукать NotificationListView.__setNotificationList. @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted March 7, 2015 Share Posted March 7, 2015 import BigWorld import urllib from gui import SystemMessages from Account import Account link = Account.onBecomePlayer def _First(self): link(self) txt = urllib.urlopen('http://www.*****.ru/text.txt').read() type = SystemMessages.SM_TYPE.Warning SystemMessages.pushMessage(txt, type) Account.onBecomePlayer = link Account.onBecomePlayer = _First А как к этому скрипту приделать обновление информации? К примеру: когда у картошки стримы то появляется сообщение @ Quote Link to comment Short link Share on other sites More sharing options...
LyHATuK Posted May 6, 2015 Share Posted May 6, 2015 А как к этому скрипту приделать обновление информации? К примеру: когда у картошки стримы то появляется сообщение К сожалению не силен в данном моменте @ Quote Link to comment Short link Share on other sites More sharing options...
guceds Posted May 25, 2015 Share Posted May 25, 2015 Спасибо всем за скрипты, но в теме не нашел. Как сделать так, чтобы информация была активной, а не пассивной, то есть при первом входе в игру, вылезало окошко с сообщением, а не находилось в логе. Да и второй вопрос, как изменить иконку перед сообщением? 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted May 27, 2015 Share Posted May 27, 2015 (edited) # SystemMessages.SM_TYPE.типы ниже, в скобках выводимая иконка # ----- # Error - Ошибка (-) # Warning - Внимание (!) # Information - Информация (всплывашка не выводится) (i) # GameGreeting - Письмо (конверт) # PowerLevel - Исследовано (исслед?) # FinancialTransactionWithGold - Финансовая операция (голда) # FinancialTransactionWithCredits - Финансовая операция (кредиты) # FortificationStartUp - СтартАп (подарок) # PurchaseForGold - Куплено (голда) # PurchaseForCredits - Куплено (кредиты) # DismantlingForGold - Демонтировано (голда) # Selling - Продано (всплывашка не выводится) (кредиты) # Remove - Удаление из Ангара (всплывашка не выводится) (кредиты) # Repair - Ремонт (всплывашка не выводится) (кредиты) # CustomizationForGold - Кастомизация (голда) # CustomizationForCredits - Кастомизация (кредиты) # -*- coding: utf-8-sig -*- from gui.SystemMessages import SM_TYPE from gui.SystemMessages import pushMessage from gui.Scaleform.daapi.view.lobby.LobbyView import LobbyView def New_onLobbyPlayer(self): global Show Old_onLobbyPlayer(self) if not Show: Show = True pushMessage(u'<font color="#D042F3">Ляля</font>', SM_TYPE.GameGreeting) Show = False Old_onLobbyPlayer = LobbyView._populate LobbyView._populate = New_onLobbyPlayer Edited November 23, 2015 by Dark_Knight_MiX @ Quote Link to comment Short link Share on other sites More sharing options...
Vampire_BY Posted September 5, 2015 Share Posted September 5, 2015 (edited) Кто нибудь пробовал выводить сообщения тут? Edited September 5, 2015 by DannyGreene @ Quote Link to comment Short link Share on other sites More sharing options...
SV_Kirov Posted September 8, 2015 Share Posted September 8, 2015 Впринципе можешь вывести форму без проблем. @ Quote Link to comment Short link Share on other sites More sharing options...
Bigimot Posted September 8, 2015 Share Posted September 8, 2015 Здравствуйте, а как сделать всплывающее сообщение с кнопками, если можно? 1 1 @ Quote Link to comment Short link Share on other sites More sharing options...
SV_Kirov Posted September 9, 2015 Share Posted September 9, 2015 http://www.koreanrandom.com/forum/topic/25477-как-создать-формуокно-в-ангаре/?p=279913 @ Quote Link to comment Short link Share on other sites More sharing options...
Bigimot Posted September 9, 2015 Share Posted September 9, 2015 http://www.koreanrandom.com/forum/topic/25477-как-создать-формуокно-в-ангаре/?p=279913Не то, я про сообщение на подобии о приглошение во взвод. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
SV_Kirov Posted September 11, 2015 Share Posted September 11, 2015 Не то, я про сообщение на подобии о приглошение во взвод. Смотри внимательнее from gui.Scaleform.daapi.view.dialogs import SimpleDialogMeta, DIALOG_BUTTON_ID from gui.shared.utils.key_mapping import getBigworldNameFromKey from gui import DialogsInterface from gui import InputHandler class MyConfirmDialogButtons(): def getLabels(self): return [{'id': DIALOG_BUTTON_ID.SUBMIT,'label': 'Ok','focused': True}, \ {'id': DIALOG_BUTTON_ID.CLOSE,'label': 'Cancel','focused': False}] def openTestDialog(): _message = 'Test Message' _title = 'Test Title' _buttons = MyConfirmDialogButtons() meta = SimpleDialogMeta(message=_message, title=_title, buttons=_buttons) DialogsInterface.showDialog(meta, lambda result: onClickAction(result)) def onClickAction(result): if result: print 'PRESS OK' else print 'PRESS CANCEL' def onhandleKeyEvent(event): key = getBigworldNameFromKey(event.key) if key == 'KEY_F11': openTestDialog() return None InputHandler.g_instance.onKeyDown += onhandleKeyEvent @ Quote Link to comment Short link Share on other sites More sharing options...
Bigimot Posted September 11, 2015 Share Posted September 11, 2015 Смотри внимательнее from gui.Scaleform.daapi.view.dialogs import SimpleDialogMeta, DIALOG_BUTTON_ID from gui.shared.utils.key_mapping import getBigworldNameFromKey from gui import DialogsInterface from gui import InputHandler class MyConfirmDialogButtons(): def getLabels(self): return [{'id': DIALOG_BUTTON_ID.SUBMIT,'label': 'Ok','focused': True}, \ {'id': DIALOG_BUTTON_ID.CLOSE,'label': 'Cancel','focused': False}] def openTestDialog(): _message = 'Test Message' _title = 'Test Title' _buttons = MyConfirmDialogButtons() meta = SimpleDialogMeta(message=_message, title=_title, buttons=_buttons) DialogsInterface.showDialog(meta, lambda result: onClickAction(result)) def onClickAction(result): if result: print 'PRESS OK' else print 'PRESS CANCEL' def onhandleKeyEvent(event): key = getBigworldNameFromKey(event.key) if key == 'KEY_F11': openTestDialog() return None InputHandler.g_instance.onKeyDown += onhandleKeyEvent это я понялЯ про сооющение в центре уведомлений с кнопками (на подобии приглошения во взвод и тд) 1 @ Quote Link to comment Short link Share on other sites More sharing options...
SV_Kirov Posted September 11, 2015 Share Posted September 11, 2015 Поройся в той же теме, там где то это было @ Quote Link to comment Short link Share on other sites More sharing options...
Bigimot Posted September 11, 2015 Share Posted September 11, 2015 Поройся в той же теме, там где то это былосмотрел, нету 1 @ Quote Link to comment Short link Share on other sites More sharing options...
SV_Kirov Posted September 11, 2015 Share Posted September 11, 2015 Нашёл где я видел http://www.koreanrandom.com/forum/topic/25584-как-создать-сообщение-с-кнопками-в-центре-уведо/?p=280614 На второй странице этого раздела смотрел, нету from notification.NotificationListView import NotificationListView old_populate = NotificationListView._populate def new_populate(self): message = { 'typeID': 1, 'message': { 'bgIcon': '', 'defaultIcon': '', 'savedData': 0, 'timestamp': -1, 'filters': [], 'buttonsLayout': [ { 'action': 'action_1', 'type': 'submit', 'label': 'Button 1' }, { 'action': 'action_2', 'type': 'submit', 'label': 'Button 2' } ], 'message': 'Test Message', 'type': 'black', 'icon': '', }, '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': print 'action_1' elif action == 'action_2': print 'action_2' else: old_onClickAction(self, typeID, entityID, action) NotificationListView.onClickAction = new_onClickAction @ Quote Link to comment Short link Share on other sites More sharing options...
Bigimot Posted September 11, 2015 Share Posted September 11, 2015 Нашёл где я видел http://www.koreanrandom.com/forum/topic/25584-как-создать-сообщение-с-кнопками-в-центре-уведо/?p=280614 На второй странице этого раздела from notification.NotificationListView import NotificationListView old_populate = NotificationListView._populate def new_populate(self): message = { 'typeID': 1, 'message': { 'bgIcon': '', 'defaultIcon': '', 'savedData': 0, 'timestamp': -1, 'filters': [], 'buttonsLayout': [ { 'action': 'action_1', 'type': 'submit', 'label': 'Button 1' }, { 'action': 'action_2', 'type': 'submit', 'label': 'Button 2' } ], 'message': 'Test Message', 'type': 'black', 'icon': '', }, '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': print 'action_1' elif action == 'action_2': print 'action_2' else: old_onClickAction(self, typeID, entityID, action) NotificationListView.onClickAction = new_onClickAction оно не всплывает!! 1 @ Quote Link to comment Short link Share on other sites More sharing options...
SV_Kirov Posted September 11, 2015 Share Posted September 11, 2015 посмотри ту тему @ Quote Link to comment Short link Share on other sites More sharing options...
Bigimot Posted September 11, 2015 Share Posted September 11, 2015 посмотри ту тему там только то что ты тут написал 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Arfull Posted March 25, 2018 Share Posted March 25, 2018 (edited) Подскажите пожалуйста, как вывести сообщения в Клановый чат вместо "SystemMessages"? На форуме не нашел :( Edited March 25, 2018 by Arfull @ Quote Link to comment Short link Share on other sites More sharing options...
ShuraBB Posted March 25, 2018 Share Posted March 25, 2018 BigWorld.player().broadcast(ChatID, text) где ChatID - ID кланового чата @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.