0 Members and 1 Guest are viewing this topic.
<config><command type = "script"><in>!start timer</in><out type = "pop" extdata = "timeup"/><out type = "pop" extdata = "endtime"/><out type = "pop" extdata = "endday"/><out type = "push" extdata = "user">%NAME%</out><out>#c7#Please input the end day. #c16#eg. !end friday</out></command><command type = "script"><in>!end %PARAM%</in><out type = "push" extdata = "endday">%PARAM%</out><out>#c7#Please input the end time. #c16#eg. !time 15#c7#:#c16#30</out></command><command type = "script"><in>!time %PARAM%</in><out type = "push" extdata = "timeup">1</out><out type = "push" extdata = "endtime">%PARAM%</out><out type = "push" extdata = "hourendtime"><operator type = "strtrm" lvalue = "$endtime$" rvalue = "2"/></out><out type = "push" extdata = "shortendtime"><operator type = "strright" lvalue = "$endtime$" rvalue = "3"/></out><out type = "push" extdata = "shortendtime"><operator type = "strrem" lvalue = "$shortendtime$" rvalue = ":"/></out><out type = "push" extdata = "shortendtime"><operator type = "strtrm" lvalue = "$shortendtime$" rvalue = "2"/></out><out>#c7#The timer has started</out></command><OnTimer type = "script" interval = "2700" condition = "1" lvalue = "$timeup$" rvalue = "1"><out type = "push" extdata = "time">%LOCALTIME%</out><out type = "push" extdata = "hourtime"><operator type = "strtrm" lvalue = "$time$" rvalue = "2"/></out><out type = "push" extdata = "shortime"><operator type = "strright" lvalue = "$time$" rvalue = "3"/></out><out type = "push" extdata = "shortime"><operator type = "strrem" lvalue = "$shortime$" rvalue = ":"/></out><out type = "push" extdata = "shortime"><operator type = "strtrm" lvalue = "$shortime$" rvalue = "2"/></out><out type = "push" extdata = "shortime"><operator type = "+" lvalue = "$shortime$" rvalue = "2"/></out><out type = "push" extdata = "wkdy">%DAY-OF-WEEK%</out><out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "0">sunday</out><out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "1">monday</out><out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "2">tueday</out><out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "3">wednesday</out><out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "4">thursday</out><out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "5">friday</out><out type = "push" extdata = "wkday" condition = "1" lvalue = "$wkdy$" rvalue = "6">saturday</out><out>#c16#It is now #c8#%LOCALTIME% on #c7#%LONGDATE% #c16#(#c8#Whatever text you want#c16#)#c7#will start on #c16#$endday$ at #c8#$endtime$</out><out type = "goto" extdata = "3" condition = "0" lvalue = "$endday$" rvalue = "$wkday$"/><out type = "goto" extdata = "2" condition = "0" lvalue = "$hourendtime$" rvalue = "$hourtime$"/><out type = "self" condition = "2" lvalue = "$shortendtime$" rvalue = "$shortime$">!timerend</out><out></out> </OnTimer><command type = "script" users = "_BOT_SELF_TRIGGER_;user;"><in>!timerend</in><out type = "push" extdata = "timeup">0</out><out>#c7#Timer finished</out></command></config>
<config><command type = "script"><in>!timerstart</in><out type = "push" extdata = "name">%NAME%</out><out type = "pop" extdata = "count"/><out>#c16#Please input the event day eg. #c8#!ed monday</out></command><command type = "script"><in>!ed %PARAM%</in><out type = "push" extdata = "ed">%PARAM%</out><out>#c16#Please input the event time eg. #c8#!et 12#c16#:#c8#15</out></command><command type = "script"><in>!et %PARAM%</in><out type = "push" extdata = "activate">1</out><out type = "push" extdata = "currentday">%DAY-OF-WEEK%</out><out type = "push" extdata = "et">%PARAM%</out><out type = "push" extdata = "ethours"><operator type = "strtrm" lvalue = "$et$" rvalue = "2"/></out><out type = "push" extdata = "etmins"><operator type = "*" lvalue = "$ethours$" rvalue = "60"/></out><out type = "push" extdata = "etextramins"><operator type = "strright" lvalue = "$et$" rvalue = "3"/></out><out type = "push" extdata = "etmins"><operator type = "+" lvalue = "$etmins$" rvalue = "$etextramins$"/></out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "sunday">0</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "monday">1</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "tuesday">2</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "wednesday">3</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "thursday">4</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "friday">5</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "saturday">6</out><out type = "push" extdata = "endday" condition = "2" lvalue = "$endday$" rvalue = "$currentday$"><operator type = "+" lvalue = "$endday$" rvalue = "7"/></out><out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$endday$" rvalue = "$currentday$"/></out><out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$numdays$" rvalue = "1"/></out><out type = "push" extdata = "dayhours"><operator type = "*" lvalue = "$numdays$" rvalue = "24"/></out><out type = "push" extdata = "daymins"><operator type = "*" lvalue = "$dayhours$" rvalue = "60"/></out><out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$etmins$"/></out><out type = "push" extdata = "time">%LOCALTIME%</out><out type = "push" extdata = "hourtime"><operator type = "strtrm" lvalue = "$time$" rvalue = "2"/></out><out type = "push" extdata = "mintime"><operator type = "*" lvalue = "$hourtime$" rvalue = "60"/></out><out type = "push" extdata = "extramintime"><operator type = "strright" lvalue = "$time$" rvalue = "3"/></out><out type = "push" extdata = "extramintime"><operator type = "strtrm" lvalue = "$extramintime$" rvalue = "2"/></out><out type = "push" extdata = "mintime"><operator type = "+" lvalue = "$mintime$" rvalue = "$extramintime$"/></out><out type = "push" extdata = "extradaymins"><operator type = "*" lvalue = "24" rvalue = "60"/></out><out type = "push" extdata = "extradaymins"><operator type = "-" lvalue = "$extradaymins$" rvalue = "$mintime$"/></out><out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$extradaymins$"/></out><out>#c7#The Countdown Timer has been started on #c8#%LONGDATE% #c7#at #c8#%LOCALTIME% #c7#for the #c16#(#c8#event#c16#) #c7#starting at $et$ on $ed$.</out></command><OnTimer type = "script" interval = "60" condition = "1" lvalue = "$activate$" rvalue = "1"><out type = "push" extdata = "count"><operator type = "+" lvalue = "$count$" rvalue = "1"/></out><out type = "push" extdata = "daymins"><operator type = "-" lvalue = "$daymins$" rvalue = "1"/></out><out type = "push" extdata = "hour"><operator type = "/" lvalue = "$daymins$" rvalue = "60"/></out><out type = "push" extdata = "minute"><operator type = "%" lvalue = "$daymins$" rvalue = "60"/></out><out condition = "1" lvalue = "$count$" rvalue = "45">#c7#The #c16#(#c8#whatever text you want #c16#) #c7#will begin in #c8#$hour$ #c7#hours #c16#: #c8#$minute$ #c7#minutes</out><out type = "push" extdata = "count" condition = "1" lvalue = "$count$" rvalue = "45">0</out><out type = "push" extdata = "activate" condition = "2" lvalue = "$daymins$" rvalue = "1">0</out> </OnTimer><command type = "script" users = "$name$"><in>!stoptimer</in><out type = "push" extdata = "activate">0</out><out>#c7#Timer Stopped</out></command></config>
Let me know if I'm right, there is a better solution.
<config><command type = "script"><in>!timerstart</in><out type = "push" extdata = "name">%NAME%</out><out type = "pop" extdata = "count"/><out>#c16#Please input the event day eg. #c8#!ed monday</out></command><command type = "script"><in>!ed %PARAM%</in><out type = "push" extdata = "ed">%PARAM%</out><out>#c16#Please input the event time eg. #c8#!et 12#c16#:#c8#15</out></command><command type = "script"><in>!et %PARAM%</in><out type = "push" extdata = "activate">1</out><out type = "push" extdata = "currentday">%DAY-OF-WEEK%</out><out type = "push" extdata = "et">%PARAM%</out><out type = "push" extdata = "ethours"><operator type = "strtrm" lvalue = "$et$" rvalue = "2"/></out><out type = "push" extdata = "etmins"><operator type = "*" lvalue = "$ethours$" rvalue = "60"/></out><out type = "push" extdata = "etextramins"><operator type = "strright" lvalue = "$et$" rvalue = "3"/></out><out type = "push" extdata = "etmins"><operator type = "+" lvalue = "$etmins$" rvalue = "$etextramins$"/></out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "sunday">0</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "monday">1</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "tuesday">2</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "wednesday">3</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "thursday">4</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "friday">5</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "saturday">6</out><out type = "goto" extdata = "7" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/><out type = "push" extdata = "endday" condition = "2" lvalue = "$endday$" rvalue = "$currentday$"><operator type = "+" lvalue = "$endday$" rvalue = "7"/></out><out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$endday$" rvalue = "$currentday$"/></out><out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$numdays$" rvalue = "1"/></out><out type = "push" extdata = "dayhours"><operator type = "*" lvalue = "$numdays$" rvalue = "24"/></out><out type = "push" extdata = "daymins"><operator type = "*" lvalue = "$dayhours$" rvalue = "60"/></out><out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$etmins$"/></out><out type = "push" extdata = "time">%LOCALTIME%</out><out type = "push" extdata = "hourtime"><operator type = "strtrm" lvalue = "$time$" rvalue = "2"/></out><out type = "push" extdata = "mintime"><operator type = "*" lvalue = "$hourtime$" rvalue = "60"/></out><out type = "push" extdata = "extramintime"><operator type = "strright" lvalue = "$time$" rvalue = "3"/></out><out type = "push" extdata = "extramintime"><operator type = "strtrm" lvalue = "$extramintime$" rvalue = "2"/></out><out type = "push" extdata = "mintime"><operator type = "+" lvalue = "$mintime$" rvalue = "$extramintime$"/></out><out type = "goto" extdata = "3" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/><out type = "push" extdata = "extradaymins"><operator type = "*" lvalue = "24" rvalue = "60"/></out><out type = "push" extdata = "extradaymins"><operator type = "-" lvalue = "$extradaymins$" rvalue = "$mintime$"/></out><out type = "push" extdata = "daymins" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"><operator type = "-" lvalue = "$etmins$" rvalue = "$mintime$"/></out><out type = "goto" extdata = "2" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/><out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$extradaymins$"/></out><out>#c7#The Countdown Timer has been started on #c8#%LONGDATE% #c7#at #c8#%LOCALTIME% #c7#for the #c16#(#c8#event#c16#) #c7#starting at $et$ on $ed$.</out></command><OnTimer type = "script" interval = "60" condition = "1" lvalue = "$activate$" rvalue = "1"><out type = "push" extdata = "count"><operator type = "+" lvalue = "$count$" rvalue = "1"/></out><out type = "push" extdata = "daymins"><operator type = "-" lvalue = "$daymins$" rvalue = "1"/></out><out type = "push" extdata = "hour"><operator type = "/" lvalue = "$daymins$" rvalue = "60"/></out><out type = "push" extdata = "minute"><operator type = "%" lvalue = "$daymins$" rvalue = "60"/></out><out condition = "1" lvalue = "$count$" rvalue = "45">#c7#The #c16#(#c8#whatever text you want #c16#) #c7#will begin in #c8#$hour$ #c7#hours #c16#: #c8#$minute$ #c7#minutes</out><out type = "push" extdata = "count" condition = "1" lvalue = "$count$" rvalue = "45">0</out><out type = "push" extdata = "activate" condition = "2" lvalue = "$daymins$" rvalue = "1">0</out> </OnTimer><command type = "script" users = "$name$;"><in>!stoptimer</in><out type = "push" extdata = "activate">0</out><out>#c7#Timer Stopped</out></command></config>
<config><command type = "script"><in>!timerstart</in><out type = "push" extdata = "name">%NAME%</out><out type = "pop" extdata = "count"/><out>#c16#Please input the event day eg. #c8#!ed monday</out></command><command type = "script"><in>!ed %PARAM%</in><out type = "push" extdata = "ed">%PARAM%</out><out>#c16#Please input the event time eg. #c8#!et 12#c16#:#c8#15</out></command><command type = "script"><in>!n %PARAM%</in><out type="push" extdata="remove"><operator type="readfile" nvalue="E:\Program Files\Metis 2.8\Plugins\remove.ini" lvalue="l" rvalue="%PARAM%"/></out><out>/message $name$ You have chosen $remove$ to be kicked when the timer ends</out></command><command type = "script"><in>!et %PARAM%</in><out type = "push" extdata = "activate">1</out><out type = "push" extdata = "currentday">%DAY-OF-WEEK%</out><out type = "push" extdata = "et">%PARAM%</out><out type = "push" extdata = "ethours"><operator type = "strtrm" lvalue = "$et$" rvalue = "2"/></out><out type = "push" extdata = "etmins"><operator type = "*" lvalue = "$ethours$" rvalue = "60"/></out><out type = "push" extdata = "etextramins"><operator type = "strright" lvalue = "$et$" rvalue = "3"/></out><out type = "push" extdata = "etmins"><operator type = "+" lvalue = "$etmins$" rvalue = "$etextramins$"/></out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "sunday">0</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "monday">1</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "tuesday">2</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "wednesday">3</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "thursday">4</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "friday">5</out><out type = "push" extdata = "endday" condition = "1" lvalue = "$ed$" rvalue = "saturday">6</out><out type = "goto" extdata = "7" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/><out type = "push" extdata = "endday" condition = "2" lvalue = "$endday$" rvalue = "$currentday$"><operator type = "+" lvalue = "$endday$" rvalue = "7"/></out><out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$endday$" rvalue = "$currentday$"/></out><out type = "push" extdata = "numdays"><operator type = "-" lvalue = "$numdays$" rvalue = "1"/></out><out type = "push" extdata = "dayhours"><operator type = "*" lvalue = "$numdays$" rvalue = "24"/></out><out type = "push" extdata = "daymins"><operator type = "*" lvalue = "$dayhours$" rvalue = "60"/></out><out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$etmins$"/></out><out type = "push" extdata = "time">%LOCALTIME%</out><out type = "push" extdata = "hourtime"><operator type = "strtrm" lvalue = "$time$" rvalue = "2"/></out><out type = "push" extdata = "mintime"><operator type = "*" lvalue = "$hourtime$" rvalue = "60"/></out><out type = "push" extdata = "extramintime"><operator type = "strright" lvalue = "$time$" rvalue = "3"/></out><out type = "push" extdata = "extramintime"><operator type = "strtrm" lvalue = "$extramintime$" rvalue = "2"/></out><out type = "push" extdata = "mintime"><operator type = "+" lvalue = "$mintime$" rvalue = "$extramintime$"/></out><out type = "goto" extdata = "3" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/><out type = "push" extdata = "extradaymins"><operator type = "*" lvalue = "24" rvalue = "60"/></out><out type = "push" extdata = "extradaymins"><operator type = "-" lvalue = "$extradaymins$" rvalue = "$mintime$"/></out><out type = "push" extdata = "daymins" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"><operator type = "-" lvalue = "$etmins$" rvalue = "$mintime$"/></out><out type = "goto" extdata = "2" condition = "1" lvalue = "$endday$" rvalue = "$currentday$"/><out type = "push" extdata = "daymins"><operator type = "+" lvalue = "$daymins$" rvalue = "$extradaymins$"/></out><out>#c7#The Countdown Timer has been started on #c8#%LONGDATE% #c7#at #c8#%LOCALTIME% #c7#for the #c16#(#c8#event#c16#) #c7#starting at $et$ on $ed$.</out></command><OnTimer type = "script" interval = "60" condition = "1" lvalue = "$activate$" rvalue = "1"><out type = "push" extdata = "count"><operator type = "+" lvalue = "$count$" rvalue = "1"/></out><out type = "push" extdata = "daymins"><operator type = "-" lvalue = "$daymins$" rvalue = "1"/></out><out type = "push" extdata = "hour"><operator type = "/" lvalue = "$daymins$" rvalue = "60"/></out><out type = "push" extdata = "minute"><operator type = "%" lvalue = "$daymins$" rvalue = "60"/></out><out condition = "1" lvalue = "$count$" rvalue = "45">#c7#The #c16#(#c8#whatever text you want #c16#) #c7#will begin in #c8#$hour$ #c7#hours #c16#: #c8#$minute$ #c7#minutes</out><out type = "push" extdata = "count" condition = "1" lvalue = "$count$" rvalue = "45">0</out><out type = "usercmd" condition = "2" lvalue = "$daymins$" rvalue = "1">/kick $remove$</out><out type = "push" extdata = "activate" condition = "2" lvalue = "$daymins$" rvalue = "1">0</out> </OnTimer><command type = "script" users = "$name$;"><in>!stoptimer</in><out type = "push" extdata = "activate">0</out><out>#c7#Timer Stopped</out></command></config>