I'm currently working on an autosipper, but I have prompt issue where it does not sip automatically and requires me to hit enter or requires another line to happen in the game before the trigger actually fires. I found a plugin that should solve this issue, it's called Add_Newlie_To_Prompt and is supposed to force the autosipper to fire properly by basically faking a newline on prompt
The problem I am having is that when I use the plugin and enable it, my prompt completely disappears. Can anyone help me figure out what I may be doing wrong here?
Here is the plugin I used. It appears to be the top plugin posted on the page I posted the URL for. It is definitely about autosippers. I am trying to get my own autosipper working, but it does not fire properly on the prompt. I have to enter a newline after the prompt manually, to get it to fire.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient[
<!ENTITY prompt_regexp "^\\x1B\\[0m<.+hp .+m .+mv .+xp> $" >
]>
<!-- MuClient version 3.59 -->
<!-- Plugin "Add_Newline_To_Prompt" generated by Plugin Wizard -->
<muclient>
<plugin
name="Add_Newline_To_Prompt"
author="Nick Gammon"
id="8316c19c35a9ebdb46055874"
language="Lua"
purpose="Adds a newline to prompt lines"
date_written="2004-12-13 12:08:00"
requires="3.59"
version="1.0"
>
<description trim="y">
Detects prompt lines without a newline, and if found, adds one.
Change ENTITY line on 3rd line of plugin to be a regular expression
that matches your prompt.
</description>
</plugin>
<!-- Script -->
<script>
re = rex.new ("&prompt_regexp;")
<![CDATA[
partial = "" -- partial line from last time through
function OnPluginPacketReceived (s)
-- add packet to what we already have (excluding carriage-returns)
partial = partial .. string.gsub (s, "\r", "")
t = {} -- table of lines to be returned
-- iterate over each line
partial = string.gsub (partial, "(.-)\n",
function (line)
table.insert (t, line)
return "" -- added for MUSHclient 3.80+
end)
-- look for prompt
if (re:match (partial)) then
table.insert (t, partial)
partial = ""
end -- if found prompt
if table.getn (t) > 0 then
table.insert (t, "") -- to get final linefeed
end -- if
-- return table of lines, concatenated with newlines between each one
return table.concat (t, "\n")
end -- function OnPluginPacketReceived
]]>
</script>
</muclient>
When matching incoming packets, the match text has to be exact, including any ANSI colour codes that might be there. To find what they are, we need to see an exact packet.
To do that, go to the Edit menu -> Debug Packets, and then grab a couple of prompts. Turn off Debug Packets afterwards.
Another window will open with the packet information in hex.