I came across something weird, when using addxml in a plugin it resets all the timers. I don't know if that's suppose to happen or if I'm doing something wrong, here is a plugin that demonstrates this:
output:
Time left on timer tank: 1199.9999850523
Time left on timer dps: 599.99952481594
Reinstalled plugin test (ae563a798b323a32a21db226)
Time left on timer tank before addxml: 1195.9744291613
Time left on timer dps before addxml: 595.97398464102
Time left on timer tank after addxml: 1199.9999793945
Time left on timer dps after addxml: 599.99843474943
The last two notes show how the timers were reset after use addxml
edit: This seems to only happen in plugins, for example in the specified external script file under scripts in Configuration this doesn't happen .
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Monday, May 09, 2022, 12:36 PM -->
<!-- MuClient version 5.06 -->
<!-- Plugin "test" generated by Plugin Wizard -->
<muclient>
<plugin
name="test"
id="ae563a798b323a32a21db226"
language="Lua"
date_written="2022-05-09 12:36:21"
requires="5.06"
version="1.0"
>
</plugin>
<!-- Get our standard constants -->
<include name="constants.lua"/>
<script>
<![CDATA[
require "wait"
require "addxml"
addxml.timer {
name="tank",
enabled="y",
minute="20",
temporary="y",
send = "var_stop = 1",
send_to = 12,
}
addxml.timer {
name="dps",
enabled="y",
minute="10",
temporary="y",
send = "var_stop = 1",
send_to = 12,
}
wait.make (function()
Note("Time left on timer tank: " .. GetTimerInfo("tank",13))
Note("Time left on timer dps: " .. GetTimerInfo("dps",13))
wait.time(4)
Note("Time left on timer tank: " .. GetTimerInfo("tank",13))
Note("Time left on timer dps: " .. GetTimerInfo("dps",13))
wait.time(4)
addxml.trigger{
enabled="y",
name="stop_action_trig",
match=[[^\/stop$]],
sequence="90",
regexp="y",
one_shot="y",
send_to='12',
send="var_action_stop = 1",
}
Note("Time left on timer tank: " .. GetTimerInfo("tank",13))
Note("Time left on timer dps: " .. GetTimerInfo("dps",13))
end)
]]>
</script>
</muclient>
output:
Time left on timer tank: 1199.9999850523
Time left on timer dps: 599.99952481594
Reinstalled plugin test (ae563a798b323a32a21db226)
Time left on timer tank before addxml: 1195.9744291613
Time left on timer dps before addxml: 595.97398464102
Time left on timer tank after addxml: 1199.9999793945
Time left on timer dps after addxml: 599.99843474943
The last two notes show how the timers were reset after use addxml
edit: This seems to only happen in plugins, for example in the specified external script file under scripts in Configuration this doesn't happen .