Added toggle

Added a toggle `roomids` to toggle on/off.
master
AardCrowley 3 years ago committed by GitHub
parent 57f6f7c924
commit 47fdb1a70a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -33,6 +33,19 @@
</trigger> </trigger>
</triggers> </triggers>
<aliases>
<alias
enabled="y"
keep_evaluating="y"
match="roomids"
send_to="12"
sequence="100"
>
<send>idEnabled = not idEnabled
SetVariable("idEnabled", tostring(idEnabled))
ColourNote("white", "blue", "Room IDs are now " .. (tostring(idEnabled) == "true" and "enabled" or "disabled") .. "!")</send>
</alias>
</aliases>
<!-- Script --> <!-- Script -->
@ -40,6 +53,9 @@
<script> <script>
<![CDATA[ <![CDATA[
require "gmcphelper" require "gmcphelper"
idEnabled = GetVariable("idEnabled") or "true"
TSRtable = {} TSRtable = {}
function OnPluginBroadcast(msg, id, name, text) function OnPluginBroadcast(msg, id, name, text)
@ -53,11 +69,13 @@ function OnPluginBroadcast(msg, id, name, text)
break; break;
end end
end end
-- ColourTell("white", "", " (" .. gmcp("room.info.num") .. ")") if tostring(idEnabled) == "true" then
ColourTell("black", "black", " ")
Hyperlink ("mapper goto " .. gmcp("room.info.num"), Hyperlink ("mapper goto " .. gmcp("room.info.num"),
"(" .. gmcp("room.info.num") .. ")", "(" .. gmcp("room.info.num") .. ")",
"", "",
"white", "black", 0) "white", "black", 0)
end
Note("") Note("")
end end
end end

Loading…
Cancel
Save