Greasemonkey/Tampermonkey script for the MMORPG Freewar.de.
It automatically computes whether a fight against a NPC on the current field would be winning or loosing for the player. If the outcome is a defeat for the player, it removes the fast-attack link from the NPC, preventing the player from accidentally dying from the NPC.
The available documentation can be found in our wiki.
Two scripts have to be imported.
The script BattleCalculatorStatCrawler-Freewar.user.js runs on the inventory
frame, extracting all player stats, such as the players current lifepoints,
attack- or defense-power.
This is then made available to the main script through HTML5 Webstorage, or alternatively through a cookie.
The script BattleCalculator-Freewar.user.js is the main script, running in the
main frame and decorating the fast-attack links of all NPCs with data.
It uses the players stats extracted by the Crawler for its calculations.
NPC data, such as lifepoints and attack-power is taken from the in-game NPC description, if available (Onlo, Sicht des Lebens, ...). Otherwise, a database populated based on FreewarWiki data is used as fallback.
| Case | UI |
|---|---|
| Winning | ![]() |
| Losing (Fast-Attack disabled) | ![]() |
| High LP Loss or Dangerously low LP | ![]() |
| Unique-NPC | ![]() |
| Group-NPC | ![]() |
| (Super-) Resistance-NPC | ![]() |
NPCs can be marked forbiddenNpc, the UI then also has the fast-attack link
removed and shows (do not attack).
NPCs marked (unknown) are currently missing in the NPC database, lifepoints or
attackpower is not known yet. The fast-attack link remains active, do not
accidentally click on it before checking the NPC.
The fallback database for the NPC data can be found in
BattleCalculator-Freewar.user.js:
initForbiddenNpcs()initNpcCorrections()initNpcData()
From time to time, this data should be updated. For that, see the following tools:
C# NPC List Refresher Source Code\Program.csFreewar\src\de\zabuza\battleCalculator\BattleCalculatorTool.java





