Mudlet Questions

by Rika

Back to Mechanic's Corner.

Janalon2010-10-08 20:05:15
QUOTE (Lilia @ Oct 8 2010, 03:59 PM) <{POST_SNAPBACK}>
deleteLine()

Just put that in the script, and you only need one trigger for spam, just add all the lines you want deleted as different patterns.


Any disadvantage to highlighting black on black?


EDIT:

Actually,

CODE
^You feel the (.*?)\\ open again.$


With black on black highlights produces:

QUOTE
You feel the ____________ open again.


Where the ____________ is the highlighted black text.
Lilia2010-10-08 20:18:33
QUOTE (Janalon @ Oct 8 2010, 03:05 PM) <{POST_SNAPBACK}>
Any disadvantage to highlighting black on black?


EDIT:

Actually,

CODE
^You feel the (.*?)\\ open again.$


With black on black highlights produces:



Where the ____________ is the highlighted black text.


Yeah, when you use parentheses, the color highlights only apply to what is 'captured.' Also, if you just highlight black on black, you'll have a blank line, which would annoy the hell out me. With deleteLine() you just get an extra prompt, as if you had hit enter.
Vadi2010-10-08 21:11:26
You can also use mm.deleteLineP() (comes with m&m) and the extra prompt will be gone!

It'll make things so invisible.
Lilia2010-10-08 21:12:43
QUOTE (Vadi @ Oct 8 2010, 04:11 PM) <{POST_SNAPBACK}>
You can also use mm.deleteLineP() (comes with m&m) and the extra prompt will be gone!

It'll make things so invisible.

wub.gif
Unknown2010-10-09 06:17:43
QUOTE (Lilia @ Oct 8 2010, 05:12 PM) <{POST_SNAPBACK}>
wub.gif



For those of you without m&m, use something like this as the script for your lines of spam to gag:
CODE
deleteLine()
gagPrompt = true

(Yeag, gagPrompt is just something I pulled out of thin air, call it what you like. Should be recognizable as whether or not to gag the next prompt.)

and then, in your prompt trigger, you can add
CODE
if gagPrompt then
  deleteLine()
  gagPrompt = false
end



Simple yet effective prompt gagging.
Janalon2010-10-09 08:39:33
QUOTE (Vadi @ Oct 8 2010, 05:11 PM) <{POST_SNAPBACK}>
You can also use mm.deleteLineP() (comes with m&m) and the extra prompt will be gone!

It'll make things so invisible.


WOW... I thought the effects would be subtle. This helps tremendously!
Janalon2010-10-09 08:53:41
I have another question. I have an INSANE number of movement abilities that need cardinal direction mapping:

walk
swim
psymet glide
psymet shift
stealth evade
stealth drag
aether piloting
etc...

Not to mention all of the abilities that need a direction specified:
psionic psychic push
stealth darts
stealth rush
nekotai scorpionstrike
etc...

Want to keybind some of these to a USB keypad that I've acquired (yeah, using a laptop) and want to have the ability to toggle through these various groupings via either an alias OR another keybind (i.e. alt+1 to walk, alt+2 to swim, etc). Sidd gave me something to get started, but I thought that I'd ask here for additional support. Anyone have a quick Mudlet fix?
Neos2010-10-09 16:23:41
QUOTE (Janalon @ Oct 9 2010, 04:53 AM) <{POST_SNAPBACK}>
I have another question. I have an INSANE number of movement abilities that need cardinal direction mapping:

walk
swim
psymet glide
psymet shift
stealth evade
stealth drag
aether piloting
etc...

Not to mention all of the abilities that need a direction specified:
psionic psychic push
stealth darts
stealth rush
nekotai scorpionstrike
etc...

Want to keybind some of these to a USB keypad that I've acquired (yeah, using a laptop) and want to have the ability to toggle through these various groupings via either an alias OR another keybind (i.e. alt+1 to walk, alt+2 to swim, etc). Sidd gave me something to get started, but I thought that I'd ask here for additional support. Anyone have a quick Mudlet fix?


I have my keypad for directions and could probably give you that. Has walking, swimming, and tumbling tied to the regular numbers, and the numbers with ctrl and alt. You could probably edit it to fit your needs. Though you'd have to rip out the parts using demonnics stygian balance chaser, unless you do want to use it. For psychic push I just tend to use an alias, because I haven't gotten around to really making many keybindings.
Janalon2010-10-09 23:18:57
QUOTE (AquaNeos @ Oct 9 2010, 12:23 PM) <{POST_SNAPBACK}>
I have my keypad for directions and could probably give you that. Has walking, swimming, and tumbling tied to the regular numbers, and the numbers with ctrl and alt. You could probably edit it to fit your needs. Though you'd have to rip out the parts using demonnics stygian balance chaser, unless you do want to use it. For psychic push I just tend to use an alias, because I haven't gotten around to really making many keybindings.


Yeah. The main issue is that I am using a USB keypad for my laptop and not one built into the keyboard. I can only use what's on the keypad to keybind and cannot combine meta keys (i.e. command, control, function, alt) from my keyboard. Also looked into using Num Lock versus not, though for some reason Mudlet doesn't seem to want to capture all of my non-num locked keys (i.e. like 6 doubles as right arrow).

I can organize groups by folder, and then activate and deactivate as deemed necessary. FYI, if two keybindings that use the same key are activated at the same time, it appears Mudlet will take the topmost one. This will help me switch from piloting to walking... but becomes tedious when switching between swimming and walking (for example).

I suppose my more refined question is how to (dis)/(en)able a entire group, such as a folder of keybindings, with an alias or keybind.
Vadi2010-10-10 00:21:44
enableKey("my group"), disableKey("my group")
Janalon2010-10-10 01:17:02
QUOTE (Vadi @ Oct 9 2010, 08:21 PM) <{POST_SNAPBACK}>
enableKey("my group"), disableKey("my group")


What about naming conventions for groups? How do you adjust for nested folders?

I.E.

CODE
JANALON KEYS
     Basic Hunting
     Support
     Choke Progression
     Bleed Progression
     Slitlock
     Movement
          Walk
          Swim
          Glide
          Evade
          Pilot
Vadi2010-10-10 01:25:15
It's still just disableKey("Evade") or disableKey("Movement")
Unknown2010-10-10 02:56:37
Could someone point me to a tutorial, if one exists, about how to use GMCP? Showing how to modify from the ATCP demo script that was going around would be great, which I had been using. Very basic coding ability but I'm guessing it's something to do with matching table entries rather than one pattern?

This was my very slightly modified version of the ATCP setup.
CODE

status = {}
function CharVitals(event, arg)
local r = rex.new( "NL:(\\\\d+)/(\\\\d+) H:(\\\\d+)/(\\\\d+) M:(\\\\d+)/(\\\\d+) E:(\\\\d+)/(\\\\d+) P:(\\\\d+)/(\\\\d+) N:(\\\\d+)/(\\\\d+) W:(\\\\d+)/(\\\\d+)" )
if r:match( arg ) then
status.current_xp, status.max_xp,
status.current_health, status.max_health,
status.current_mana, status.max_mana,
status.current_ego, status.max_ego,
status.current_power, status.max_power,
status.current_endurance, status.max_endurance,
status.current_willpower, status.max_willpower,
status.next_level = r:match( arg )
end

-- tonumber() stuff here
display(status)
end


Thanks!
Vadi2010-10-10 04:18:18
well, in a nutshell:

slightly different event names - to see them, enable Debug. stuff is stored in gmcp table, not atcp. ie, gmcp.Char.Vitals.hp would be your current hp. you can do display(gmcp) to display all contents of the table
Unknown2010-10-10 04:33:54
Awesome, thanks!
Lilia2010-10-10 19:00:35
QUOTE (Vadi @ Oct 9 2010, 11:18 PM) <{POST_SNAPBACK}>
you can do display(gmcp) to display all contents of the table

That was nil for me, how do you enable gmcp?

Edit: I just updated to 1.2.0-pre7, now it gives an empty table.

Updating also seems to have messed up my map display. The miniconsole is still there, and it looks like the map is being captured, but it's not going to the window.
Lilia2010-10-10 20:45:21
On a different note, is there anyway to make custom colors? I'm trying to use Anisu's name highlighter, but I can seem to find a color that looks right. I want colors that match the config colors 1 and 5.
Vadi2010-10-10 20:52:55
You need enable GMCP in settings for to be enabled. It's not enabled by default because Rapture is buggy and will disable ATCP - this scripts that rely on ATCP only will break.

You can give RGB colour to setFgColor / setBgColor functions - can look in Google how to work with those, but that'll do for custom colors.
Lilia2010-10-10 21:15:12
QUOTE (Vadi @ Oct 10 2010, 03:52 PM) <{POST_SNAPBACK}>
You need enable GMCP in settings for to be enabled. It's not enabled by default because Rapture is buggy and will disable ATCP - this scripts that rely on ATCP only will break.

I did that, apparently I need to reconnect for it to take effect. Now I'm getting system messages all the time. I assume this has something to do with events, which I know nothing about. Should I just gag them until I figure out what to do with them?

Because I learn best by example I went looking in my system for something to play with. I found this as part of the influencer package I downloaded from demonnic. I don't think it's currently being used for anything so messing with it shouldn't break anything:

CODE
function CharVitalsHandler( msg, arg )
--NL:89/100 H:3770/3770 M:4860/4860 E:4404/4404 P:10/10 N:16740/16740 W:22440/22440
-- ATCP
charVital_regex = rex.new(])
local nl, h, mh, m, mm, e, me, p,mp, n,mn, w,mw = charVital_regex:match(arg)
demonnic_nextLevel = tonumber(nl)
demonnic.curHealth = tonumber(h)
demonnic.maxHealth = tonumber(mh)
demonnic.curMana = tonumber(m)
demonnic.maxMana = tonumber(mm)
demonnic.curEgo = tonumber(e)
demonnic.maxEgo = tonumber(me)
demonnic.curPower = tonumber(p)
demonnic.maxPower = tonumber(mp)
demonnic.curWillpower = tonumber(w)
demonnic.maxWillpower = tonumber(mw)
demonnic.curEndurance = tonumber(n)
demonnic.maxEndurance = tonumber(mn)
end


I assume what I need to change is in those first few lines. This has CharVitals in Registered Event Handlers. Again, I don't know very much about events. I think I understand the concept, but not how to use them at all. I'm looking in the mudlet manual, but it only mentions ATCP, there's no section on GMCP. Any help, or nudges in the right directions would be greatly appreciated!
Vadi2010-10-10 22:22:11
Click on Debug again and it'll be disabled.

That's a script to deal with ATCP, not GMCP. GMCP isn't documented yet because 1.2.0 isn't actually released - it's in pre-release, as it's said everywhere - so how GMCP is handled might very well change before release. It's mostly a technical preview for experienced coders so we can fiddle with things until they're the way we like it.

So I'm a bit wary on writing out how it works in detail, best to wait until the release is out imho and then it'll be all polished for you.