Jump to content
Korean Random

Сборник py_macro


Recommended Posts

2 часа назад, HEKPOMAHT сказал:

походу в клиенте ограничитель строк чата сделали

И семи лет не прошло:veryhappy:

Link to comment
Short link
Share on other sites

Добавил модификацию:

Цитата

Начало боя:

Данная модификация добавляет py_macro:

{{py:isBattle}} - возвращает 'battle', если бой начался, иначе пусто.

PY(ON_BEGIN_BATTLE) - событие для обновления макроса {{py:isBattle}}.

 

  • Upvote 3
Link to comment
Short link
Share on other sites

 "updateEvent": "PY(ON_CAMERA_MODE), PY(ON_BEGIN_BATTLE)",
 "format": "{{py:isBattle?бой|начало}}"

aa55a9e9663e0a2481868d6b04fd6535.png

начало выскакивает после смены режима

>в начале боя всё работает как положено:

до начала боя 'иначе пусто', бой начался - 'battle'

может sight.py почистить нужно ?

===

без PY(ON_CAMERA_MODE)  'начало' не  появляется

Link to comment
Short link
Share on other sites

с этими объединениями сообщений... :angry:

 

продублирую, а-то увидишь через неделю )

2 часа назад, HEKPOMAHT сказал:

из sight.py этот кусок нужно выпилить ?


@xvm.export('sight.isBattle', deterministic=False)
def sight_isBattle():
    startBattle = arenaPeriod.getPeriod() if arenaPeriod is not None else 0
    # log('startBattle = %s' % startBattle)
    return 'battle' if startBattle >= 3 else None

 

Link to comment
Short link
Share on other sites

в шапке названия какой файл копировать тоже поправь тогда:

Файл debugРanel.py скопировать в 

Файл myНp.py скопировать

для порядка :wink:

Link to comment
Short link
Share on other sites

42 minutes ago, sicfunzler said:

hi sixthSense.py no go pls Update

 

MFG

SicFunzler

Also bei mir geht es mit der sixthSense.py Datei. Ich habe aber auch noch eine andere Config dafür.

 

Для меня он работает с файлом sixSense.py. Но у меня также есть другая конфигурация.

Link to comment
Short link
Share on other sites

i have this in my xvmLog:

 

2018-05-05 17:24:23: [B:003] [XFW] Mod loaded: xvm_battle_classic.swf
2018-05-05 17:24:23: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 156, in process_python_macro
    (func, deterministic) = get_function(arg)
  File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 147, in get_function
    (func, deterministic) = _container.get(func_name)
TypeError: 'NoneType' object is not iterable
arg='sight.isBattle'
2018-05-05 17:24:23: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 156, in process_python_macro
    (func, deterministic) = get_function(arg)
  File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 144, in get_function
    args = ast.literal_eval(args_string)
  File "scripts/common/Lib/ast.py", line 49, in literal_eval
  File "scripts/common/Lib/ast.py", line 37, in parse
  File "<unknown>", line 1

 

python:

2018-05-05 17:30:36.585: INFO: 2018-05-05 17:30:36: [ERROR] mods/xfw/python/xfw/events.pyc
2018-05-05 17:30:36.585: ERROR: Traceback (most recent call last):
2018-05-05 17:30:36.585: ERROR:   File "mods/xfw/python/xfw/events.py", line 57, in __event_handler
2018-05-05 17:30:36.586: ERROR:   File "mods/xfw/python/xfw/events.py", line 24, in fire
2018-05-05 17:30:36.586: ERROR:   File "res_mods/configs/xvm/py_macro\battleMessages.py", line 166, in onHealthChanged
2018-05-05 17:30:36.587: ERROR:     teamDamage_onHealthChanged(self, newHealth, attackerID, attackReasonID)
2018-05-05 17:30:36.587: ERROR:   File "res_mods/configs/xvm/py_macro\battleMessages.py", line 132, in teamDamage_onHealthChanged
2018-05-05 17:30:36.587: ERROR:     if (None in (player, attacker)) or (damage <= battleMessagesConfig['teamDamage']['ignoreLessThan']):
2018-05-05 17:30:36.587: ERROR: KeyError: 'ignoreLessThan'

 

now sixTimer go but no live in Game is updating i have so in my config:

    "My_HP_MY": {
      "enabled": true,
      "updateEvent": "PY(ON_MY_HP)",
      "alpha": "{{alive?100|0}}",
      "x": -20,
      "y": -9,
      "width": 120,
      "height": 24,
      "screenHAlign": "center",
      "screenVAlign": "bottom",
      "layer": "top",
      "textFormat": { "font": "$FieldFont", "size": 16, "color": "{{hp-ratio<25?#f94c4c|{{hp-ratio<50#d6d37f|{{hp-ratio<75?#ebee11|#44d80a}}}}}}", "bold": "true", "italic": false, "align": "center" },
      "format": "{{py:my_hp.health}}"

 

Edited by sicfunzler
Link to comment
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...