Jump to content
Korean Random
ktulho

Сборник py_macro

Recommended Posts

10 минут назад, Hyperion-1 сказал:

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

добавь ещё 10 сек, чтоб в уме не считать:

"format": "{{py:xvm.sixthSenseTimer(22)}}"

Share this post


Link to post

Short link
Share on other sites

Это не решает задачу, к сожалению, т.к. я могу перестреливаться с минуту, потом уйти в сейв и таймер нужен именно в этот момент.

Share this post


Link to post

Short link
Share on other sites

Ну вообще таймеры по хоткею прикольная идея, всякие разные тайминги засекать) Разъезды, выстрелы вражеской арты) Я б хотел такое в XVM)

Share this post


Link to post

Short link
Share on other sites
14.06.2017 в 22:49, ktulho сказал:

Быстрый выход из боя

  

01.02.2023 в 17:15, HEKPOMAHT сказал:

  в Стальном Охотнике срабатывает, когда танк ещё живой

 

Share this post


Link to post

Short link
Share on other sites

Сделано, есть таймер по хоткею и по шестому чувству. Клавиша Q, в файле можно изменить. Прилагаю доработанную версию. Может, кому нужно. Странно, что никто из знатоков не смог помочь, оказалось очень просто, если знать синтаксис, пришлось разобраться ))

 

Прописать в файле hotkeys.xc 

"timerQ":        { "enabled": true, "keyCode": 16, "modifier": "none"},

 

Прописать в файле battleLabels.xc

${ "battleLabelsTemplates.xc":"def.sixthSenseTimer"}

 

Прописать в файле battleLabelsTemplates.xc

"sixthSenseTimer": { 
      "enabled": true,
      "updateEvent": "PY(ON_SIXTH_SENSE_SHOW)",
      "x": 0,
      "y": 170,
      "width": 90,
      "height": 70,
      "screenHAlign": "center",
      "shadow": { "distance": 1, "angle": 90, "alpha": 50, "blur": 4, "strength": 1 },
      "textFormat": {"align": "center", "color": "0xffdd00", "size": 60 },
      "format": "{{py:xvm.sixthSenseTimer(10)}}"

 

sixthSense.py

Edited by Hyperion-1
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

@ktulho

Error spam in python.log from collection.py:

2023-05-15 20:31:32.328: INFO: 2023-05-15 20:31:32: [ERROR] mods/xfw_libraries/xfw/events.pyc
2023-05-15 20:31:32.328: ERROR: Traceback (most recent call last):
2023-05-15 20:31:32.328: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2023-05-15 20:31:32.329: ERROR:   File "./xfw/events.py", line 24, in fire
2023-05-15 20:31:32.329: ERROR: TypeError: PlayerMessages__onShowPlayerMessageByCode() takes exactly 6 arguments (7 given)
2023-05-15 20:31:32.329: INFO: =============================

 

python.log

Share this post


Link to post

Short link
Share on other sites
25 минут назад, Aslain сказал:

@ktulho

Error spam in python.log from collection.py:


2023-05-15 20:31:32.328: INFO: 2023-05-15 20:31:32: [ERROR] mods/xfw_libraries/xfw/events.pyc
2023-05-15 20:31:32.328: ERROR: Traceback (most recent call last):
2023-05-15 20:31:32.328: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2023-05-15 20:31:32.329: ERROR:   File "./xfw/events.py", line 24, in fire
2023-05-15 20:31:32.329: ERROR: TypeError: PlayerMessages__onShowPlayerMessageByCode() takes exactly 6 arguments (7 given)
2023-05-15 20:31:32.329: INFO: =============================

 

python.log 89 kB · 0 скачиваний

Исправил, обновил скрипт из аддона Макросы для "ушей", маркеров и миникарты 

  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

@ktulho подскажи, плз, а можно ли добавить в скрипт "выход из боя по клавише" возможность настройки, чтобы автоматом выходило при смерти?

Share this post


Link to post

Short link
Share on other sites
2 часа назад, ZloyYurich сказал:

@ktulho подскажи, плз, а можно ли добавить в скрипт "выход из боя по клавише" возможность настройки, чтобы автоматом выходило при смерти?

Я не буду добавлять такую возможность.

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

@ktulho глянь ещё этот баг:

01.02.2023 в 17:15, HEKPOMAHT сказал:

  в Стальном Охотнике срабатывает, когда танк ещё живой

Share this post


Link to post

Short link
Share on other sites
11 часов назад, HEKPOMAHT сказал:

нужно глянуть aimingSystem.py для арт прицела огнемёта - не работает.

Исправил. Обновил скрипт в аддоне Режим прицела.

  • Upvote 2

Share this post


Link to post

Short link
Share on other sites
5 минут назад, ktulho сказал:

Исправил. Обновил скрипт в аддоне Режим прицела.

проверил на реплее - норм :hmm:

Share this post


Link to post

Short link
Share on other sites
01.02.2023 в 17:15, HEKPOMAHT сказал:

  в Стальном Охотнике срабатывает, когда танк ещё живой

А там есть окно  с дезертирством?

Share this post


Link to post

Short link
Share on other sites
Только что, ktulho сказал:

А там есть окно  с дезертирством?

хз - могу проверить, на тесте был режим :hmm:

Share this post


Link to post

Short link
Share on other sites
8 минут назад, ktulho сказал:

А там есть окно  с дезертирством?

нет, только это:

gnlOZHw.png

Share this post


Link to post

Short link
Share on other sites

Поэтому и выходит.

14.06.2017 в 22:49, ktulho сказал:

Дополнение позволяет назначит клавишу для быстрого выхода из боя, если выход не повлечет штраф за "дезертирство" (при просмотре реплея - закроет клиент).

 

Share this post


Link to post

Short link
Share on other sites
6 минут назад, ktulho сказал:

Поэтому и выходит.

тогда нужно убрать этот режим из мода :ok:

Share this post


Link to post

Short link
Share on other sites

ktulho на тесте 1.21.0.0 в xvm логе выдает ошибку:

[ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 101, in __load_lib
    __execute(code, file_name, {'xvm': XvmNamespace})
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 93, in __execute
    raise ExecutionException("{} at file '{}' line {}: {}".format(error_name, file_name, line_number, message))
ExecutionException: AttributeError at file 'res_mods/configs/xvm/py_macro\collection.py' line 42: type object 'PlayerMessages' has no attribute '_PlayerMessages__onShowPlayerMessageByCode'
На вякий случай прикреплю логи

python.log xvm.log

  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...