Van Dark Posted June 23, 2022 Share Posted June 23, 2022 (edited) Python. Как сделать чтобы скрипт начинал работу, когда игрок находится в бою? Смотрел этот мод https://github.com/spoter/spoter-mods/blob/master/mod_artySplash/source/mod_artySplash.py, но при импорте модулей скрипт прекращает работу. Edited June 23, 2022 by Van Dark @ Quote Link to comment Short link Share on other sites More sharing options...
StranikS_Scan Posted June 23, 2022 Share Posted June 23, 2022 Надо хукать функцию, которая вызывается, когда игрок входит в бой. Например startGUI вот так: from Avatar import PlayerAvatar old_startGUI = PlayerAvatar._PlayerAvatar__startGUI def new_startGUI(*args): old_startGUI(*args) <свой код размещаешь тут .... ....> PlayerAvatar._PlayerAvatar__startGUI = new_startGUI @ Quote Link to comment Short link Share on other sites More sharing options...
Van Dark Posted June 23, 2022 Author Share Posted June 23, 2022 спасибо за ответ @ 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.