Script DIO-TOOLS-David1327

yomi yori

Chiliarch
@david1327
I have a suggestion for the script (I could suggest it to inno but that might take a year to implement)
Make it so that when farming villages become ready, a sound notification will go off, something simple and short... It could be very very very useful for productivity.
 

Shuri2060

Phrourach
Hello, can I ask that you change the code for adding the Percentage Trade button so its position isn't absolute. This is so it doesn't get in the way of other scripts that wants to add buttons.

At the moment I have an add-on which adds the Attack Planner button to Trade window (useful for funnelling resources).



This is my code which adds the Plan button inline:

JavaScript:
const onRcvData = WndHandlerTown.prototype.onRcvData
WndHandlerTown.prototype.onRcvData = function() {
  const t = this
  onRcvData.apply(t, arguments)

  if (t.action === 'trading') {
    const $btn_plan_attack = $($.parseHTML(`<div id="btn_plan_attack_town" class="button_new" name="Plan"><div class="left"></div><div class="right"></div><div class="caption js-caption">Plan<div class="effect js-effect"></div></div></div>`))
    t.wnd.getJQElement().find('.btn_trade_button').after($btn_plan_attack)
    $btn_plan_attack.button({}).on('btn:click', function() {
      AttackPlannerWindowFactory.openAttackPlannerForTarget(t.target_id)
    })
  }
}
 

skifiend

Phrourach
// ==UserScript==
// @name DIO-TOOLS-David1327
// @name:fr DIO-TOOLS-David1327
// @namespace https://www.tuto-de-david1327.com/pages/info/dio-tools-david1327.html
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7X8R9RK3TWGNN&source=url
// @version 4.16.1

I've had problems with this and other scripts (have isolated this script as being an issue) since October 2010 and I always keep up-to-date with all the version changes.

There are major problems with caching, so clicking doesn't respond on a regular basis. In Chrome it's not as bad as Edge (don't like Edge anyhow).
In Edge is just goes into inactivity and I have to close the browser.
I constantly have to clear the cache and sometimes that can be up to 50% of all the clicking I do.

I've enjoyed the scripts for some time since I came back into the game end of 2018 (I enjoyed the game more when I first started, but time dictates that I have to use scripts)

I don't get any problems if all my scripts are switched off, but then that ruins the gameplay for me.
 
Last edited:

david1327

Lochagos
Hello, can I ask that you change the code for adding the Percentage Trade button so its position isn't absolute. This is so it doesn't get in the way of other scripts that wants to add buttons.

At the moment I have an add-on which adds the Attack Planner button to Trade window (useful for funnelling resources).



This is my code which adds the Plan button inline:

JavaScript:
const onRcvData = WndHandlerTown.prototype.onRcvData
WndHandlerTown.prototype.onRcvData = function() {
  const t = this
  onRcvData.apply(t, arguments)

  if (t.action === 'trading') {
    const $btn_plan_attack = $($.parseHTML(`<div id="btn_plan_attack_town" class="button_new" name="Plan"><div class="left"></div><div class="right"></div><div class="caption js-caption">Plan<div class="effect js-effect"></div></div></div>`))
    t.wnd.getJQElement().find('.btn_trade_button').after($btn_plan_attack)
    $btn_plan_attack.button({}).on('btn:click', function() {
      AttackPlannerWindowFactory.openAttackPlannerForTarget(t.target_id)
    })
  }
}
hello this will be fixed for the next update

I work weekend on the update (big update)

Capture d’écran 2021-01-28 212816.png

// ==UserScript==
// @name DIO-TOOLS-David1327
// @name:fr DIO-TOOLS-David1327
// @namespace https://www.tuto-de-david1327.com/pages/info/dio-tools-david1327.html
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7X8R9RK3TWGNN&source=url
// @version 4.16.1

I've had problems with this and other scripts (have isolated this script as being an issue) since October 2010 and I always keep up-to-date with all the version changes.

There are major problems with caching, so clicking doesn't respond on a regular basis. In Chrome it's not as bad as Edge (don't like Edge anyhow).
In Edge is just goes into inactivity and I have to close the browser.
I constantly have to clear the cache and sometimes that can be up to 50% of all the clicking I do.

I've enjoyed the scripts for some time since I came back into the game end of 2018 (I enjoyed the game more when I first started, but time dictates that I have to use scripts)

I don't get any problems if all my scripts are switched off, but then that ruins the gameplay for me.
I would like to know which script is it? DIO-TOOLS? DIO-TOOLS? MOLE HOLE?
After I do not master this part :/
 

skifiend

Phrourach
hello this will be fixed for the next update

I work weekend on the update (big update)

View attachment 15022



I would like to know which script is it? DIO-TOOLS? DIO-TOOLS? MOLE HOLE?
After I do not master this part :/
Thanks. the same problem exhibits itself regardless of which script is running, so I'm wondering what the common theme is.
It's like only minimal information gets updated once some incident triggers this state.
If you keep doing one simple thing it's fine, but interacting with Planner is the worst problem I have.
If you want me to produce a test case with just your script running, I can provide the Network export HAR file (JSON format)
Just give me a list of commands and I'll reproduce them with just your script running.
 

Shuri2060

Phrourach
I'm not sure, but after the last update, I think the key O no longer maps to Barracks. It is now B.

I don't like this change --- previously the keys O and P mapped to Barracks/Harbor (the keys are right next to each other making it easy to remember)
 

xFate

Strategos
I'm not sure, but after the last update, I think the key O no longer maps to Barracks. It is now B.

I don't like this change --- previously the keys O and P mapped to Barracks/Harbor (the keys are right next to each other making it easy to remember)
:weirdchamp:
 

david1327

Lochagos
I'm not sure, but after the last update, I think the key O no longer maps to Barracks. It is now B.

I don't like this change --- previously the keys O and P mapped to Barracks/Harbor (the keys are right next to each other making it easy to remember)
sorry I completely forgot to answer you :confused:

this will be added is merged in the next update
Capture d’écran 2021-02-07 132800.png

sorry again and thank you for your help from the start
 

david1327

Lochagos

Shuri2060

Phrourach
Bug report: After pressing the Add units to Simulator button on a report, the unit icon of the hero becomes incorrect.



For some reason, this is because the unit_icon40x40 class becomes unit_icon25x25 in this div element:

<div class="report_unit unit report_side_defender unit_hercules hercules hero_unit unit_icon25x25">...</div>

I've found this bug only occurs when DIO is switched on, and I can consistently reproduce it by opening the report and adding the units to simulator while DIO tools is on. Does not happen when DIO is off.
 

aldo690

Chiliarch
Bug Report

There is an issue with council of heroes, I simply can't open open it.
Also serveral other bugs like when changing cities it show the units of the previous city
and the icon to shift cities doesn't work
 

david1327

Lochagos
Bug Report

There is an issue with council of heroes, I simply can't open open it.
Also serveral other bugs like when changing cities it show the units of the previous city
and the icon to shift cities doesn't work
hello sorry for the delay

Sorry but I couldn't reproduce it

do you still have the problem?