This commit is contained in:
Bartek Stalewski 2019-07-02 16:20:29 +02:00
parent bd8e3e0cca
commit 8ace0508ad

View File

@ -2035,154 +2035,6 @@ end</script>
</regexCodePropertyList>
</Trigger>
</TriggerGroup>
<TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>ftpd-daracan-lampa</name>
<script></script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList />
<regexCodePropertyList />
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>ftpd_daracan_lampa_timery_start</name>
<script>enableTimer("ftpd_daracan_lamp_info_timer")
lampa_zapalona_key = true
enableTrigger("ftpd_daracan_lampa_timery_dopelnienie")
selectCurrentLine()
fg("orange")
info_lamp_value = 300
resetFormat()</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^[ &gt;]*Zapalasz(|[a-z ]+) lampe</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>ftpd_daracan_lampa_timery_off</name>
<script>if lampa_zapalona_key == true then
disableTimer("ftpd_daracan_lamp_info_timer")
lampa_zapalona_key = false
disableTrigger("ftpd_daracan_lampa_timery_dopelnienie")
end
selectCurrentLine()
fg("orange")
resetFormat()
scripts.ui:info_lamp_update("")</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^Gasisz(|[a-z ]+) lampe</string>
<string>nie jest zapalona\.$</string>
<string>[ &gt;]*Probujesz zapalic [a-z ]+ jest wyczerpana\.$</string>
<string>(?&lt;!fajka) wypala sie i gasnie.$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<integer>1</integer>
<integer>1</integer>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="no" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>ftpd_daracan_lampa_timery_dopelnienie</name>
<script>selectCurrentLine()
fg("yellow")
resetFormat()
info_lamp_value = 300</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^[ &gt;]*Dopelniasz(|[a-z ]+) butelki oleju</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>ftpd_daracan_pusta_butelka</name>
<script>selectCurrentLine()
fg("yellow")
resetFormat()
scripts.utils.bind_functional("odloz olej; wez olej ze swojego plecaka; napelnij lampe olejem", false)</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>oprozniajac zupelnie(|[a-z ]+) butelke oleju\.$</string>
<string>utelka oleju jest pusta\.$</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
<Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
<name>ftpd_daracan_brak_butelki</name>
<script>selectCurrentLine()
fg("yellow")
resetFormat()
cecho("&lt;green&gt; &gt;&gt; Wyciagnij butelke z plecaka!")
scripts.utils.bind_functional("odloz olej; wez olej ze swojego plecaka; napelnij lampe olejem", false)</script>
<triggerType>0</triggerType>
<conditonLineDelta>0</conditonLineDelta>
<mStayOpen>0</mStayOpen>
<mCommand></mCommand>
<packageName></packageName>
<mFgColor>#ff0000</mFgColor>
<mBgColor>#ffff00</mBgColor>
<mSoundFile></mSoundFile>
<colorTriggerFgColor>#000000</colorTriggerFgColor>
<colorTriggerBgColor>#000000</colorTriggerBgColor>
<regexCodeList>
<string>^Czym chcesz napelnic(|[a-z ]+) lampe</string>
</regexCodeList>
<regexCodePropertyList>
<integer>1</integer>
</regexCodePropertyList>
</Trigger>
</TriggerGroup>
</TriggerGroup>
</TriggerPackage>
<TimerPackage>
@ -2208,35 +2060,6 @@ end </script>
<packageName></packageName>
<time>00:00:01.000</time>
</Timer>
<Timer isActive="no" isFolder="no" isTempTimer="no" isOffsetTimer="no">
<name>ftpd_daracan_lamp_info_timer</name>
<script>info_lamp_value = info_lamp_value - 1
scripts.ui.footer_info_lamp:echo("&lt;font color='"..scripts.ui["footer_info_normal"].."'&gt;Lampa:&lt;/font&gt; &lt;font color='"..scripts.ui["footer_info_green"].."'&gt;" .. SecondsToClock(info_lamp_value) .. "&lt;/font&gt;")
if info_lamp_value == 120 then
cecho("\n&lt;green&gt; &gt;&gt;&gt; Lamp: 2 min.\n\n")
elseif info_lamp_value == 60 then
cecho("\n&lt;yellow&gt; &gt;&gt;&gt; Lamp: 1 min.\n\n")
elseif info_lamp_value == 30 then
cecho("\n&lt;red&gt; &gt;&gt;&gt; Lamp: 30 secs!")
scripts.utils.bind_functional("napelnij lampe olejem", false)
elseif info_lamp_value == 10 then
cecho("\n&lt;red&gt; &gt;&gt;&gt; LAMP: 10 SECS!")
raiseEvent("playBeep")
scripts.utils.bind_functional("napelnij lampe olejem", false)
end
if info_lamp_value &lt; 61 then
scripts.ui.footer_info_lamp:echo("&lt;font color='"..scripts.ui["footer_info_normal"].."'&gt;Lampa:&lt;/font&gt; &lt;font color='"..scripts.ui["footer_info_yellow"].."'&gt;" .. SecondsToClock(info_lamp_value) .. "&lt;/font&gt;")
end
if info_lamp_value &lt; 31 then
scripts.ui.footer_info_lamp:echo("&lt;font color='"..scripts.ui["footer_info_normal"].."'&gt;Lampa:&lt;/font&gt; &lt;font color='"..scripts.ui["footer_info_red"].."'&gt;" .. SecondsToClock(info_lamp_value) .. "&lt;/font&gt;")
end</script>
<command></command>
<packageName></packageName>
<time>00:00:01.000</time>
</Timer>
</TimerGroup>
</TimerPackage>
<AliasPackage>
@ -3031,10 +2854,10 @@ end</script>
<string>gmcp.gmcp_msgs</string>
</eventHandlerList>
</Script>
<Script isActive="yes" isFolder="no">
<name>ftpd_daracan_main_footer_updater</name>
<Script isActive="no" isFolder="no">
<name>ftpd_main_footer_updater_mode3_daracan</name>
<packageName></packageName>
<script>function scripts.ui:process_label_text(prefix, val, max, color)
<script>function scripts.ui:process_label_text_mode3(prefix, val, max, color)
if val == -1 then
return
end
@ -3090,7 +2913,6 @@ end</script>
elseif val == 1 and prefix == "Man" then
str = str.. ""..belki1.."" ..color2.."" ..belki7
elseif val == 0 and prefix == "Man" then
-- str = str.. ""..color2.."" ..belki8
str = str.. ""..belki8
elseif val == 0 and prefix == "Zme" then
@ -3127,7 +2949,6 @@ end</script>
elseif val == 1 and prefix == "Prz" then
str = str.. ""..belki1.."" ..color2.."" ..belki5
elseif val == 0 and prefix == "Prz" then
-- str = str.. "" ..color2.. ""..belki6
str = str.. "" ..belki6
elseif val == 5 and prefix == "Pan" then
@ -3141,7 +2962,6 @@ end</script>
elseif val == 1 and prefix == "Pan" then
str = str.. ""..belki1.."" ..color2.."" ..belki4
elseif val == 0 and prefix == "Pan" then
-- str = str.. ""..color2.."" ..belki5
str = str.. ""..belki5
elseif val == 6 and prefix == "Kac" then
@ -3157,7 +2977,6 @@ end</script>
elseif val == 1 and prefix == "Kac" then
str = str.. ""..belki1.."" ..color2.."" ..belki5
elseif val == 0 and prefix == "Kac" then
-- str = str.. "" ..color2.."" ..belki6
str = str.. ""..belki6
elseif val == 3 and prefix == "For" then
@ -3167,7 +2986,6 @@ end</script>
elseif val == 1 and prefix == "For" then
str = str.. ""..belki1.."" ..color2.."" ..belki2
elseif val == 0 and prefix == "For" then
-- str = str.. "" ..color2.."" ..belki6
str = str.. "" ..belki3
elseif val == 10 and prefix == "Upi" then
@ -3191,7 +3009,6 @@ end</script>
elseif val == 1 and prefix == "Upi" then
str = str.. ""..belki1.."" ..color2.."" ..belki8
elseif val == 0 and prefix == "Upi" then
-- str = str.. "" ..color2.."" ..belki9
str = str.. "" ..belki9
elseif val == 3 and prefix == "Glo" then
@ -3201,7 +3018,6 @@ end</script>
elseif val == 1 and prefix == "Glo" then
str = str.. ""..belki2.."" ..color2.."" ..belki2
elseif val == 0 and prefix == "Glo" then
-- str = str.. ""..belki1.."" ..color2.."" ..belki3
str = str.. ""..belki4
elseif val == 3 and prefix == "Pra" then
@ -3211,7 +3027,6 @@ end</script>
elseif val == 1 and prefix == "Pra" then
str = str.. ""..belki2.."" ..color2.."" ..belki2
elseif val == 0 and prefix == "Pra" then
-- str = str.. ""..belki1.."" ..color2.."" ..belki3
str = str.. ""..belki4
elseif val == 0 and prefix == "Pos" then
@ -3221,34 +3036,24 @@ end</script>
end</script>
<eventHandlerList />
</Script>
<Script isActive="yes" isFolder="no">
<name>ftpd_daracan_lampa</name>
<Script isActive="no" isFolder="no">
<name>ftpd_main_footer_updater_mode4_kazur</name>
<packageName></packageName>
<script>-------------------------------------------------
-- Put your Lua functions here. --
-- --
-- Note that you can also use external Scripts --
-------------------------------------------------
function SecondsToClock(seconds)
local seconds = tonumber(seconds)
if seconds &lt;= 0 then
return "0"
else
hours = string.format("%02.f", math.floor(seconds/3600))
mins = string.format("%01.f", math.floor(seconds/60 - (hours*60)))
secs = string.format("%02.f", math.floor(seconds - hours*3600 - mins *60))
--newTime = hours..":"..mins..":"..secs
if seconds &lt; 10 then
return seconds
elseif seconds &lt;60 then
return secs
else
return mins..":"..secs
end
<script>function scripts.ui:process_label_text_mode4(prefix, val, max, color)
if val == -1 then
return
end
local str = [[&lt;center&gt;&lt;font color='#b3b3b3'&gt;]] .. prefix .. [[ &lt;font face="inversionz" size="5"&gt;&lt;font color="]] .. color .. [["&gt;]]
for tmpi = 1,val,1 do
str = str .. tmpi
end
str = str .. "&lt;/font&gt;" .. [[&lt;font color='#b3b3b3' background='#aaaaaa'&gt;]]
val = val + 1
for tmpi = val,max,1 do
str = str ..tmpi
end
str = str .. "&lt;/font&gt;&lt;/font&gt;&lt;/center&gt;"
return str
end
</script>
<eventHandlerList />