Jump to content

avogatro

Regular Member
  • Posts

    5
  • Joined

  • Last visited

Posts posted by avogatro

  1. 8 hours ago, Quaksen said:

     

    I assume you already know that you can turn off messages from "not in friends list"? 🙂 

    Yes I am very aware of that. 🙂
    I don't want to block all messages from unknown gamers, because I still enjoy the normal "appreciation" after games.

  2. Currently I get 3 spam message a day, to promote so called "replay", on scam website.

     

    Is it possible to write a mod, that can delete messages from people with following criteria:

    not on my friend list AND

    have less then for example 500 battles AND

    have URL in the message that is not on a white list OR  have URL on a blacklist: for example worldftanks.com.

     

    I also want to have a User Interface that enable configuration of those criteria.

     

    Thank for response.

    Best Regard

    Avogatro

  3. Your mod is very helpful, for people doing 279e missions. I hope more people can find it.

     

    I am newbie at WOT mod programming, because of the lack of English documentation.

     

    I decompiled your code here: 

    https://pastebin.com/hdPJXAGS

     

    original snippet: 

    if 'state' in questKeys and quest['battlesSeries']['state'] >= 5:
        if len(quest['battlesSeries']['battles']) == 0 and len(quest['battlesSeriesAdv']['battles']) > 0:
            for battle in quest['battlesSeriesAdv']['battles']:
                if battle:
                    advConditionFailed = False
                    break

    should be changed to:

    #...
    #init value of advConditionFailed should be False
    advConditionFailed = False
    #...
    if 'state' in questKeys and quest['battlesSeries']['state'] >= 5:
        if len(quest['battlesSeries']['battles']) == 0 and len(quest['battlesSeriesAdv']['battles']) > 0:
            #only set advConditionFailed  to true, before the for loop
            advConditionFailed = True
            for battle in quest['battlesSeriesAdv']['battles']:
                if battle:
                    advConditionFailed = False
                    break

     

    The reason: 

    right after I finish the first part of the mission and before I finish the honor/advanced part, both list for battles are not empty.

    Then without enter the for loop, advConditionFailed keep the init value of True, and cause the reset.

     

    Also using a different event listener, save me some manuel reset, while waiting in garage until the battle finishes.

     

    from gui.ClientUpdateManager import g_clientUpdateManager
    
    _STAT_DIFF_FORMAT = STAT_DIFF_KEY + '.{0:>s}'
    CREDITS_DIFF_KEY = _STAT_DIFF_FORMAT.format('credits')
    
    #check when credit changes
    def _onCreditsUpdate(self, _):
        self.canReset = True
        self._checkQuestState()
        
    def _initListeners(self):
        self.itemsCache.onSyncCompleted += self._onSyncCompleted
        g_playerEvents.onBattleResultsReceived += self._onBattleResultsReceived
        #add the credit change event listener
        g_clientUpdateManager.addCallbacks({CREDITS_DIFF_KEY: self._onCreditsUpdate})

     

    Thank you. 😎

     

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.