Mushclient Questions

by Esano

Back to Mechanic's Corner.

Dynami2010-05-31 07:09:29
QUOTE (AllergictoSabres @ May 31 2010, 03:04 AM) <{POST_SNAPBACK}>
You're going to have to be more specific with your problem, Dynami. Your code works as intended. I can post a log of it working from me copy/pasting it if you'd like. What Zarquan was talking about (And I was about to post about before he ninja'd me) is that if targetshield changes value, you'd have to do tar thisguy (Or whatever you alias is) again so it would reevaluate the variable. You want to put that check in your trigger for someone shielding. So like:

^(+|.*?@target.*?) (?:mutters and )?traces a cobalt blue pentagram in the air that remains hovering before (?:im|er)\\.$



Then in your aliases for attack, put the if else evaluation.

If you're having an issue besides variable evaluation, you'll have to be more specific, because the code you posted does indeed work as it is written.

I didn't know that! Thank you!
EDIT: So, um, how do I do that?
EDIT2: Nevermind! I got it to work! Thank you sooooooooo much!
Sylphas2010-05-31 07:42:52
Yeah, wow, I totally forgot that was a target alias and not something that procced every timed he swung. My bad.
ongaku2010-06-01 12:20:02
Is there any way to turn off the fact that < never shows in my Mushclient? Anything that has a < in it just turns invisible after that character. sad.gif
Unknown2010-06-01 12:44:46
Turn off MXP.
Sylphas2010-06-01 18:16:28
I use the following code to call out slivvens on an aetherhunt. It works fine when I manually use the checking alias. However, when I trigger someone asking for a check to call the alias, it always calls clear regardless of whether or not there are slivven. I changed the trigger to execute the exact same code as the alias instead of calling it, still fails. I am unsure why it would work when I do it myself but not when I trigger it. The parsing trigger is turning on fine, or it wouldn't call at all, so I know that the trigger for checking is working, it's just lying, and I don't know why. Anyone with some insight?

CODE
^\\"(+)(\\d+)\\"\\s+(\\w+ \\w+ \\w+)\\s+(\\d+)% / (\\w+ \\w+)( PARASITE!)?$

if "%1" == "chair" then
  aethercraft.modules = "%2"
elseif "%1" == "grid" then
  aethercraft.modules = "%2"
elseif "%1" == "orb" then
  aethercraft.modules = "%2"
elseif "%1" == "cube" then
  aethercraft.modules = "%2"
elseif "%1" == "turret" then
  aethercraft.turret = aethercraft.turret + 1
  aethercraft.modules = "%2"
end

if "%6" ~= "" then
  aethercraft.slivven = true
  if "%2" == aethercraft.modules then
    Send("shipt Slivven at " .. aethercraft.crew .. "! (turret1)")
  elseif "%2" == aethercraft.modules then
    Send("shipt Slivven at " .. aethercraft.crew .. "! (turret2)")
  elseif "%2" == aethercraft.modules then
    Send("shipt Slivven at " .. aethercraft.crew .. "! (turret3)")
  elseif "%2" == aethercraft.modules then
    Send("shipt Slivven at " .. aethercraft.crew .. "! (grid)")
  elseif "%2" == aethercraft.modules then
    Send("shipt Slivven at " .. aethercraft.crew .. "! (chair)")
  else
    Send("shipt Slivven at %1%2!")
  end
end


CODE
^OnAetherPrompt

if aethercraft.slivven == false and aethercraft.checking == true then
  Send("shipt Clear!")
end
aethercraft.checking = false
aethercraft.slivven = false
aethercraft.turret = 0
EnableTrigger("grid_modules_parse_", false)


CODE
^mod(c?)$
if "%1" == "c" then
  EnableTrigger("grid_modules_parse_", true)
  aethercraft.checking = true
end
Send("grid modules")
Zallafar2010-06-02 07:27:04
Just guessing. It is announcing clear from a prompt that happens before the "grid modules" command actually displays? I.e. when you trigger off the call for check, an extra prompt is happening that doesn't happen when you make the check manually.
Sylphas2010-06-02 07:39:07
QUOTE (Zallafar @ Jun 2 2010, 03:27 AM) <{POST_SNAPBACK}>
Just guessing. It is announcing clear from a prompt that happens before the "grid modules" command actually displays? I.e. when you trigger off the call for check, an extra prompt is happening that doesn't happen when you make the check manually.


shocked.gif

Yes, that's probably exactly it. Thanks!
Sakr2010-06-11 15:42:24
» Pipes not fully configured. Set 'treant_coltsfoot_id' to your pipe number.
» Pipes not fully configured. Set 'treant_faeleaf_id' to your pipe number.
» Pipes not fully configured. Set 'treant_myrtle_id' to your pipe number.


this keeps on coming out, but how do I set treant_cotsfoot_id to 249921 for example?

Thanks in advance
Ayisdra2010-06-11 16:13:11
QUOTE (Falcon @ Jun 11 2010, 11:42 AM) <{POST_SNAPBACK}>
» Pipes not fully configured. Set 'treant_coltsfoot_id' to your pipe number.
» Pipes not fully configured. Set 'treant_faeleaf_id' to your pipe number.
» Pipes not fully configured. Set 'treant_myrtle_id' to your pipe number.


this keeps on coming out, but how do I set treant_cotsfoot_id to 249921 for example?

Thanks in advance


TCONFIG SETPIPE <#>


TCONFIG should be something you have done before ?
Sylphas2010-06-11 17:00:39
PIPELIST should work too.
Unknown2010-06-11 19:08:32
QUOTE (Sylphas @ Jun 11 2010, 05:00 PM) <{POST_SNAPBACK}>
PIPELIST should work too.


I think he means the problem is that he doesn't have PIPELIST. It's also annoying for me when I run out of herbs to supply those pipes, and that message just keeps repeating during battles. Any time I take a footstep forward it displays this.
Unknown2010-06-11 19:16:42
Go ahead and kick yourself in the butt for not keeping stocked up! Hope that helps. tongue.gif
Ssaliss2010-06-15 01:30:58
Just started with MUSH (to see what can be done, basically) and ran into a problem I'm sure there's an easy fix to. How do you use aliases with extra arguments?

Right now I've got an alias called "set" that's supposed to set a variable. The only thing it sends is "note (%1)" (I've also tested "note ("%1")") to check on any argument. I've called the alias "set", "set*", "set *", "set (*)", "set (.*)" (as a regex) and probably a few other things. What is wrong with this thing?

The alias does fire, but all that's ever displayed is "nil".
Sylphas2010-06-15 01:45:55
^set (.*)$

Note(%1)

Check Regex. Should do it.
Unknown2010-06-15 01:46:18
QUOTE (Ssaliss @ Jun 15 2010, 01:30 AM) <{POST_SNAPBACK}>
Just started with MUSH (to see what can be done, basically) and ran into a problem I'm sure there's an easy fix to. How do you use aliases with extra arguments?

Right now I've got an alias called "set" that's supposed to set a variable. The only thing it sends is "note (%1)" (I've also tested "note ("%1")") to check on any argument. I've called the alias "set", "set*", "set *", "set (*)", "set (.*)" (as a regex) and probably a few other things. What is wrong with this thing?

The alias does fire, but all that's ever displayed is "nil".


^set (.*)$
Note ("I just set something to this: %1")

Lua functions are case sensitive. (Note, not note.)
Ssaliss2010-06-15 01:47:23
Ah, that did it. Odd, thought I used that combo. And yeah, I used Note before. Thanks for the help!
Calixa2010-06-25 11:06:02
I want a simple trigger for picking up gold, since acquisitio is slow in that. Tricky part is that you can't trigger on the line itself but rather when eq is recovered. So I made a trigger that would create a oneshot trigger through code. Clever, except the trigger created through code never fires, despite the trigger it gets created in firing.

This is the line my trigger looks out for. I know it works because it colors the line yellow:

CODE
sovereigns spill from the corpse\\.$


It is set to send to script (since it will create a trigger through code) and is a regex.

This is what the trigger does:

CODE
AddTriggerEx("pickup", "You have recovered equilibrium.", "take gold", trigger_flag.OneShot , -1, 0, "", "",100,12)


I have no idea if it ever gets properly created, but I do know it never fires. I used AddTrigger() first since take gold should just get sent to world, but that didn't do the trick either. Need some help figuring out why. Or maybe there is a better method for doing this?
Unknown2010-06-25 11:09:14
Search your triggers for "pickup" to make sure the first trigger fired. Your first trigger should match both "sovereigns spill" and "sovereigns spills" to capture when "a small pile of sovereigns spills" from the corpse.
Calixa2010-06-25 11:25:23
Doh, there was indeed a trigger called pickup in the list, with a typo in the eq message, so that explains why it never fired! blush.gif Good point about the matching line as well, I'll adapt it for that.
Unknown2010-07-01 18:38:24
Aw crap, I've just got done learning how to do some basic java and Mushclient doesn't have that code selection.

Would I actually have to ditch my entire Treant defense system and find a new browser if I want to use Java coding? (not ######)


Edit: Why the heck do they cutoff J-a-v-a-s-c-r-i-p-t like it's a bad word?!