Autosipper Isn't Working

Post Reply
User avatar
Jules
Posts: 118
Joined: Sun Oct 11, 2009 5:41 pm
Location: Plymouth State University - Sophomore

Autosipper Isn't Working

Post by Jules »

Just as the title says, my Mantis Autosipper isn't working appropriately... And I'm not sure why. My code seems to look okay... But I just never know.

Anyhow, I'm attaching the Autosipper.xml file here, any help will be greatly appreciated.

EDIT: Nevermind, the forums won't let me upload it. Here's the link to the downloads page for the Mantis Autosipper:
http://sites.google.com/site/mantissystem/download

johndahlstrom edit:
link now works ;)

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Autosipper Isn't Working

Post by Vadi »

well, first thing:

^(\d+)h, (\d+)m, (\d+)e$

was not matching my newb prompt of

182h, 348m, 351e, 0p ex-

Because it doesn't end with "e". $ means the line ends here, nothing is after it.

So what you want is "^(\d+)h, (\d+)m, (\d+)e" + the option n mudlet settings, main window called "fix unnecessary linebreaks on GA servers" (or whatever it's called, its the first one in 'Display workarounds'.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Autosipper Isn't Working

Post by Vadi »

2nd thing is that you were using a filter instead of a funnel. filter means that it will give the part of the line that was in regex () to it's children. funnel means that it'll give its whole line to its children. so removing the filter checkbox turned it into a funnel, and I changed the patterns to be "(\d+)h" and etc, because it was getting the whole line to match on.

lastly, the matches table is all strings. if you have a number in there, it's counted as a string, so if you're getting a number from it, use the tonumber function to turn it into one:

curHealth = tonumber(matches[2])
curMana = tonumber(matches[3])
curEgo = tonumber(matches[4])


and then your sipper works!

here is the working version

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Autosipper Isn't Working

Post by Vadi »


User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: Autosipper Isn't Working

Post by demonnic »

Sorry about that gents, forums are fixed now, upload files to your heart's content

User avatar
Jules
Posts: 118
Joined: Sun Oct 11, 2009 5:41 pm
Location: Plymouth State University - Sophomore

Re: Autosipper Isn't Working

Post by Jules »

Thank you very much! The updates have been added, and Mantis Beta Release 3 has been officially released, with the new Autosipper being up-to-date.

Post Reply