Files
Mush-Soundpack/cosmic rage/worlds/plugins/auto_retyping.xml
2025-07-01 23:28:00 +03:00

108 lines
1.8 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Friday, April 09, 2010, 1:52 PM -->
<!-- MuClient version 4.51 -->
<!-- Plugin "auto_retyping" generated by Plugin Wizard -->
<muclient>
<plugin
name="auto_retyping"
author="Oriol Gomez"
save_state="y"
id="369e8998ba42093fcc9231a2"
language="Lua"
purpose="auto retyping features"
date_written="2010-04-09 13:51:50"
requires="3.51"
version="1.0"
>
</plugin>
<!-- Get our standard constants -->
<include name="constants.lua"/>
<!-- Aliases -->
<aliases>
<alias
match="EnterKey"
enabled="y"
send_to="14"
sequence="100"
>
<send>
if autort==1 then
Note(Send(''))
end
</send>
</alias>
<alias
match="autoretyping"
enabled="y"
send_to="14"
sequence="100"
>
<send>if (GetVariable("autort") == "1") then
SetVariable("autort", 0)
SaveState()
Note("Auto re typing off.")
return
end
if (GetVariable("autort") == "0") then
SetVariable("autort", 1)
SaveState()
Note("Auto re typing on.")
return
end</send>
</alias>
<alias
match="GetPrevCommand"
enabled="y"
send_to="14"
sequence="100"
>
<send>
if(c==nil) then
Note("Sorry, but either auto retyping is currently disabled, or no command has been entered. Please enable auto retyping to paste the last command entered.")
else
Execute("tts_interrupt "..c)
PasteCommand(c)
return
end
</send>
</alias>
</aliases>
<!-- Script -->
<script>
<![CDATA[
function OnPluginCommandEntered(s)
if (GetVariable("autort") == "1") then
if s == ' ' or s == '\t' or s == '\r' or s == '\n' or s=='' then
return c
else
c=s
end
end
end
function OnPluginInstall()
if(GetVariable("autort")==nil) then
SetVariable("autort","1")
end
Accelerator("ctrl + enter", "autoretyping")
Accelerator("ctrl + p", "GetPrevCommand")
Accelerator("shift+enter", "EnterKey")
end
]]>
</script>
</muclient>