DrWebber 5 #198345 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 Share this post Link to post Short link Share on other sites
Ekspoint 2,122 #256946 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 Share this post Link to post Short link Share on other sites
LyHATuK 0 #268621 Posted May 6, 2015 А как к этому скрипту приделать обновление информации? К примеру: когда у картошки стримы то появляется сообщение К сожалению не силен в данном моменте Quote Share this post Link to post Short link Share on other sites
guceds 2 #272217 Posted May 25, 2015 Спасибо всем за скрипты, но в теме не нашел. Как сделать так, чтобы информация была активной, а не пассивной, то есть при первом входе в игру, вылезало окошко с сообщением, а не находилось в логе. Да и второй вопрос, как изменить иконку перед сообщением? 1 Quote Share this post Link to post Short link Share on other sites
Ekspoint 2,122 #272776 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 Share this post Link to post Short link Share on other sites
Vampire_BY 3 #290406 Posted September 5, 2015 (edited) Кто нибудь пробовал выводить сообщения тут? Edited September 5, 2015 by DannyGreene Quote Share this post Link to post Short link Share on other sites
SV_Kirov 1 #291261 Posted September 8, 2015 Впринципе можешь вывести форму без проблем. Quote Share this post Link to post Short link Share on other sites
Bigimot 5 #291265 Posted September 8, 2015 Здравствуйте, а как сделать всплывающее сообщение с кнопками, если можно? 1 1 Quote Share this post Link to post Short link Share on other sites
SV_Kirov 1 #291494 Posted September 9, 2015 http://www.koreanrandom.com/forum/topic/25477-как-создать-формуокно-в-ангаре/?p=279913 Quote Share this post Link to post Short link Share on other sites
Bigimot 5 #291495 Posted September 9, 2015 http://www.koreanrandom.com/forum/topic/25477-как-создать-формуокно-в-ангаре/?p=279913Не то, я про сообщение на подобии о приглошение во взвод. 1 Quote Share this post Link to post Short link Share on other sites
SV_Kirov 1 #291734 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 Share this post Link to post Short link Share on other sites
Bigimot 5 #291736 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 Share this post Link to post Short link Share on other sites
SV_Kirov 1 #291740 Posted September 11, 2015 Поройся в той же теме, там где то это было Quote Share this post Link to post Short link Share on other sites
Bigimot 5 #291741 Posted September 11, 2015 Поройся в той же теме, там где то это былосмотрел, нету 1 Quote Share this post Link to post Short link Share on other sites
SV_Kirov 1 #291761 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 Share this post Link to post Short link Share on other sites
Bigimot 5 #291763 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 Share this post Link to post Short link Share on other sites
SV_Kirov 1 #291765 Posted September 11, 2015 посмотри ту тему Quote Share this post Link to post Short link Share on other sites
Bigimot 5 #291766 Posted September 11, 2015 посмотри ту тему там только то что ты тут написал 1 Quote Share this post Link to post Short link Share on other sites
Arfull 0 #425454 Posted March 25, 2018 (edited) Подскажите пожалуйста, как вывести сообщения в Клановый чат вместо "SystemMessages"? На форуме не нашел :( Edited March 25, 2018 by Arfull Quote Share this post Link to post Short link Share on other sites
ShuraBB 1,151 #425491 Posted March 25, 2018 BigWorld.player().broadcast(ChatID, text) где ChatID - ID кланового чата Quote Share this post Link to post Short link Share on other sites