avogatro
-
Posts
5 -
Joined
-
Last visited
Posts posted by avogatro
-
-
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
-
full code, no problem, I have 2 version:
version 0.1 https://pastebin.com/6qKw35KS
version 0.11 more clean up https://pastebin.com/yDvPxjkF
-
STAT_DIFF_KEY = 'stats' # I forgot this...
- 1
-
-
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:
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. 😎
-
If I want to do coalition-15 mission with honor,
and I got 2 ace and 1 first class already,
I expect the mod to not reset, until I fail all 20 games.
observation:
It reset, even when I still have 12 games left.
mod for spam blocking
in Request a mod
Posted
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.