Jump to content
Korean Random
Sign in to follow this  
SmartAG

Средний урон за бой по аккаунту в ангаре

Recommended Posts

Привет. какой макрос использовать для отображения среднего урона по аккаунту в ангаре. файл widgetsTemplates. Выделенная строчка

 

statistics": {
    "enabled": true,
    "layer": "normal",
    "type": "extrafield",
    "formats": [
      { // background image, left part
        // фоновая картинка, левая часть.
        "x": 66,
        "y": 193,
        "screenHAlign": "center",
        "format": "<img src='xvm://res/icons/clock/clockBg.png' width='160' height='80'>"
      },
      { // background image, right part
        // фоновая картинка, правая часть.
        "x": 390,
        "y": 193,
        "screenHAlign": "center",
        "scaleX": -1,
        "format": "<img src='xvm://res/icons/clock/clockBg.png' width='160' height='80'>"
      },
      { // text block
        // текстовый блок
        "updateEvent": "ON_MY_STAT_LOADED",
        "x": 185,
        "y": 198,
        "width": 320,
        "height": 150,
        "screenHAlign": "center",
        "shadow": { "alpha": 80, "blur": 4, "strength": 2 },
        "textFormat": { "color": "0x959688", "size": 15 },
        "format": "{{l10n:WN8}}:<font color='{{mystat.c_wn8}}'>{{mystat.wn8}}</font> {{l10n:EFF}}: <font color='{{mystat.c_eff}}'>{{mystat.eff}}</font> <font size='13'>{{l10n:Wins}}: <font color='{{mystat.c_winrate}}'>{{mystat.winrate%.2f~%}}</font>"

Share this post


Link to post

Short link
Share on other sites

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

выкрутился через math.py делением общего дамага(который в отличие от среднего почему-то присутствует!?) на кол-во боев

{{py:math.div({{mystat.dmg}},{{mystat.battles}})%d~}}

если хочешь результат с сотыми замени %d~   на    %.2f~

Edited by steaxch
  • 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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...