Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Tips and tricks ➜ Looking for an easier way to implement a number of my aliases.

Looking for an easier way to implement a number of my aliases.

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Vanidor   USA  (23 posts)  Bio
Date Mon 23 May 2011 01:56 AM (UTC)
Message
Ok, I play on a mostly social-style MUSH. <IE there's no Mobs to kill, no stats/levels/etc>. It's a world populated with a WIDE variety of beings <Demons, Angels, Anthros, Elves.. You name it, there likely IS, or WAS one walking the streets at one time.

It's a consent based mush <So no "Vanidor73 hauls back and decks Nick_clone in the jaw, causing him to stumble and reel backwards" ... That roughly takes control of another player, without knowing if they have a way to block/stop/counter whatever you do..But anyways>.. One of my characters has a variety of weapons/implements/toys that I've currently got set up as aliases.

The problem with this is, for each weapon I currently have 3 aliases.. 1 to throw/launch the item <currently targeting *(%1)>, and one each for a hit, or a miss.
What I'd like is to work out a way to maybe script these so that most of the 'work' is done by the program... looking for verification of either a hit or a miss and then responding with the proper course of action. (Sending the contents of the Hit field on that, or the miss field (and subsequently possibly randomly selecting a new target out of the others listed in the room (who are actively in the game*)

* This world has at least 3 'flags' IC <In Character>, OOC <Out of Character>, and AFK <this one should be obvious>.. There's also an Idle timer, so even if Nick_clone is IC, he may not be at the keys and have been idle for 20min+ <I've seen people set IC who were idle up to 5 hours...Or MORE.

Anyways, If there's a way to set it up so that all I'd have to do is, for example: '* dart * ' would throw a <type of> dart at ?? ; This would throw a dart of specified type (sleep, neuro-toxin, poison, etc> at specified target <Vanidor73> ...Then look for a hit/miss/deflection and kick in the hit response, or acknowledge a miss and send that response as well as select a new random target (if the current target doesn't.. <Ie Vani_clone dives out of the way, letting the oncoming dart continue towards Bryan>

And, forgive me for over explaining and repeating myself, it's a habit I've had for too long to stop, even though it annoys the hell out of me.








Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 23 May 2011 02:54 AM (UTC)
Message
Hmmm. Examples please? Show what you hope to type, what the response is likely to be (or responses) and what you want generated for each response.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Vanidor   USA  (23 posts)  Bio
Date Reply #2 on Tue 24 May 2011 12:17 AM (UTC)
Message
*headslaps* /KNEW/ I was forgetting something.. Shows that you shouldn't try posting such things when you're being invaded by 6-11 year old cousins, or a gabby neighbor! Examples and the like Coming up. <Including one set of the aliases I'm using.

For this set-up I'll be using my characters E-disabler <Electrical-Disabler.. a little entrapping/entangling device boosted with an electrical field (for those possibly familiar with... think of the Sap Caps (version 2)from the Cartoon "Static Shock" -- Or at least something similar.

Initial alias to throw/launch the item at a target: ..IE: throw e-disabler at Vanidor73:

<aliases>
<alias
match="Throw E-Dis at *"
enabled="y"
group="Weapon - Thrown E-Disabler"
sequence="100"
>
<send>@emit/room %N throws an E-Disabler at %1.%r%xh%xx(for information on this, see +info jammer/%xwWeapon_Disabler-E%xx info.)%xn</send>
</alias>
</aliases>


Alias to go to if the initial throw scores a hit:
IE: Vanidor73, not noticing the oncoming projectile, learns of it upon having the blasted thing strike his chest! <Owie!>

<aliases>
<alias
match="T E-Disabler hit * *"
enabled="y"
group="Weapon - Thrown E-Disabler"
sequence="100"
>
<send>@emit/room %r[space(3)]The E-Disabler Pack is flung unerringly towards %1, striking solidly, its tentacles/cables coiling around %1 and immobilizing them in a secure 'cocoon' of incredibly resiliant metal, making movement all but impossible, in addition, the coils give off an electrical charge of some %2 volts, likely stunning the individual, and wreaking havoc on any unprotected electronics.%r%xh%xx(tensile strength on par with ~ 1' thick titanium plate)%xn</send>
</alias>
</aliases>


Alias used if a Miss is noted (with or without another designated backup/new {potential} target):
IE: Vandior73 catches sight of the oncoming device and dives out of the way, letting it's current trajectory carry it on towards Jaccie who just entered the square {This specifies a different target as opposed to leaving it to random chance -- Could have also targeted a non-entity like a lamppost, bench, tree, or the like}

<aliases>
<alias
match="T E-Disabler miss * * *"
enabled="y"
group="Weapon - Thrown E-Disabler"
sequence="100"
>
<send>@emit/room %r[space(3)]The thrown E-Disabler misses %1, it's intended target, only to strike %2; It's Corundium-Steel coils lashing out and sending %3 volts through the new target(s).</send>
</alias>
</aliases>

The 3 wildcards above are, respectively: 1: The initial target (who avoided being hit, 2: the 'new' target, and 3: the <obviously varied> electrical charge the unlucky b@$t@rd will receive (baring personal resistances to electricity of course).

<EoEx>

Just about each weapon 'set' has 2 variants... IE one for manually throwing/hurling/chucking at someone, and one that can be 'launched' from a wrist gauntlet <like a mini-wrist missile care of one of the various Iron Man suits of armor. <Si I have a "Weapon - Thrown E-Disabler" and a "Weapon - Launched E-Disabler" set that do similar things, merely altering how they're deployed (for when out of and in armor/costume)
..Goodie, now to try and explain what I'm looking/hoping for.

I'd like to be able to set the weapon loose..'throw/fire {weapon} at (TARGET), and have it take notice of hits/misses, and respond/react accordingly....Generate something along these lines:

Hit Y/n?

If Y: Goto "Hit_Response" (possibly have a few, selected randomly?)

If N: Goto "Miss_Response" (same as Hit_Resp); Select/aquire new (likely) target, seek Hit/Miss confirmation.

If target = Non-Character (IE inanimate object); Wall/bench/trashcan/vendor cart/etc.. Hit Y/n? = Y, goto Hit generation.

Target acquirement failure after 3 attempts, automatic "inanimate hit (IE ground)"

Hopefully this isn't getting confusing.

Also, possibly ask for a new target possibility if the old one doesn't specify the new.. <IE Vanidor73 ; sees the oncoming projectile and dives out of the way to avoid being struck/hit>; This might be better than trying to randomly select one from the list of available people in the room at the same time (as stated previously, some people may be OOC, or AFK or just idle for an extended period of time...or not near enough to be an effective target. (cf: The "Square" being used in this example is a rather large place...kinda like a baseball field...the target is the pitcher, who moves outta the way...Depending on the oncoming direction of the thing new targets are likely: 2nd baseman, center outfield | Catcher/umpire/people in the stands behind the (gr)Ump {;)}| 3rd baseman, people on THAT side of the bleachers, etc ... ... Not EVERYONE in the area is a designated target once the original is missed....And there I go again...Babbling on.

So, possibly have the script/whatever pop-up a box <or 'think' a question> asking for a new target designation (allowing time to inquire of people if they mind being the new target, etc. (Consent based game and all).

Hopefully this helps to answer all the questions.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 25 May 2011 06:10 AM (UTC)
Message
Vanidor said:

Hopefully this isn't getting confusing.


Actually yes, which is why it took me a while to respond ...


<aliases>
  <alias
   match="Throw E-Dis at *"
   enabled="y"
   group="Weapon - Thrown E-Disabler"
   sequence="100"
  >
  <send>@emit/room %N throws an E-Disabler at %1.%r%xh%xx(for information on this, see +info jammer/%xwWeapon_Disabler-E%xx info.)%xn</send>
  </alias>
</aliases>


First problem here, MUSHclient uses %<something> as wildcard substitutions (eg. %1 is wildcard 1). From all the extra % stuff I see here I gather this is some sort of MUSH substitution. So to stop unexpected behaviour you should double the %s if they are intended to be sent.

eg.


@emit/room %%N throws an E-Disabler at %1.%%r%%x ...


Quote:

Alias to go to if the initial throw scores a hit:

IE: Vanidor73, not noticing the oncoming projectile, learns of it upon having the blasted thing strike his chest! <Owie!>

<aliases>
<alias
match="T E-Disabler hit * *"
enabled="y"
group="Weapon - Thrown E-Disabler"
sequence="100"
> ...


Do you mean a trigger? An alias responds to things you type. For an auto-response to something from the game, you want a trigger, not an alias.

The stuff you want to do can be done (I think, I'm a little confused). I would start with one and get that right, learning the process along the way.

If you want to ask the player (yourself) a question and wait for a response you can use this:

http://www.gammon.com.au/scripts/doc.php?lua=utils.msgbox

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Vanidor   USA  (23 posts)  Bio
Date Reply #4 on Fri 27 May 2011 07:34 PM (UTC)
Message
...
Alright, at the moment, I have each of my characters weapons/gizmos set as (a triad) of aliases... Each weapon has an initial one to throw/launch the item <IE: throw smokebomb at *> which sends, to the world itself the command @emit/room %N throws a smokebomb at %1"

The game then takes what it's sent and issues the following:
Vanidor {the game uses %n/%N as the enactor's name <cf: the person doing it, IE "you">} throws a smokebomb at ShadowMann <*/%1 the given wildcard/target.

Then I have to watch for various poses from others around, looking for an acknowledgement from ShadowMann as to whether he gets struck with, or avoids the smokebomb (or even misses him directly but he's still within partial range of the choking mass being released).

After seeing either of these, I currently have to typw out the 'smoke hit" or "smoke miss" 'sub'-alias ..If it misses, I have to try and determine another likely target (either another player, or an inanimate; Like a bench, tree, or the ground, etc), then send the "smoke hit." alias.

Here, I'll send a 'working example' (that is, after adjusting the alias' slightly (hadda take out the %N and replace it with [name(me)], as %N it kept spitting out *alias109 (IE evidently itself)

Johnothan throws a dull, 3" diameter black sphere at Kevyn's feet.
(for information on this, see my Weapon-Smokeball info.)
{{alias used: t sball * }}

Kevyn, mostly minding his own business, doesn't notice the oncoming black sphere until it's nearly too late and swats at it in an attempt to knock it to the ground and not hurt him!
{{Response from target that both acknowledges a hit, yet attempts to deflect the thing}}

The smokebomb is flung unerringly towards kevyn, striking solidly, and begins to pour out a thick cloud of green smoke, obsuring everything easilly within a 10' radius...Likely causing confusion, disorientation and coughing.
{{t * sball hit * ; first *(%1) establishes color of the smoke, 2nd * (%2) is target being hit

The thrown smokebomb heads towards kevyn, only to miss it's mark before striking Ground and begins to pour out a thick cloud of green smoke, obsuring everything easilly within a 10' radius...Likely causing confusion, disorientation and coughing.
{{t *(%1) sball miss *(%2) *(%3) ; again 1: color 2: initial target (Kevyn) 3: New target (another person, wall, floor, etc).}}

<I HATE not being able to explain myself easily>

Trying to find out the best way to get John's weapons scripted so all I really have to do is target someone IE: throw smokeball at Johnnie" and IT'll look for a hit/miss then respond accordingly; Posibly even going so far as to select an alternate, viable target <IE someone who isn't OOc, AFK or Idle for 10+ minutes>

Hmm, that seems to work well enough.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #5 on Sat 28 May 2011 12:38 AM (UTC)

Amended on Sat 28 May 2011 12:39 AM (UTC) by Nick Gammon

Message
Quote:

hadda take out the %N and replace it with [name(me)], as %N it kept spitting out *alias109


As I said earlier you need to change %N to %%N because the % inside the send box has special significance.

As far as I understand what you are asking, you want an initial alias, and then a scripted response to the reaction?

Thus the first alias needs to "remember" stuff. eg.


<aliases>
  <alias
   match="Throw E-Dis at *"
   enabled="y"
   group="Weapon - Thrown E-Disabler"
   send_to="12"
   sequence="100"
  >
  <send>

Send "@emit/room %%N throws an E-Disabler at %1"

SetVariable ("target", "%1")  -- remember who we threw it at

</send>
  </alias>
</aliases>


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


Ah, now I see the problem with the trigger part. I gather this is just an emote:


Kevyn, mostly minding his own business, doesn't notice the oncoming black sphere until it's nearly too late and swats at it in an attempt to knock it to the ground and not hurt him!


Is that right? So he could say *anything*?

Like:


Kevyn dodges the sphere.
Kevyn screams and drops to the ground.
Kevyn is struck.
Kevyn slaps you.


So if that is right, there is no way of automating a response. But if there is a keyword there "eg. Kevyn ... is struck" then you could respond to that.

But if you are going to have to interpret his response, then I think a second alias will be required. However since the first one remembered the name, typing in the colour of the smoke could be all that is required now.


<aliases>
  <alias
   match="smoke *"
   enabled="y"
   expand_variables="y"
   group="Weapon - Thrown E-Disabler"
   send_to="12"
   sequence="100"
  >
  <send>

Send "@@emit/room The smokebomb is flung unerringly towards @target, striking solidly, and begins to pour out a thick cloud of %1 smoke."

SetVariable ("smokecolour", "%1") -- remember colour

</send>
  </alias>
</aliases>


I changed @emit to @@emit for the same reason - with expand variables checked it would have tried to look up @emit as a variable. However we have saved typing in the target's name again because the first alias remembered it.

So this approach reduces typing. But if I am right about free-format responses I don't think you can eliminate it entirely.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Vanidor   USA  (23 posts)  Bio
Date Reply #6 on Sat 28 May 2011 02:41 AM (UTC)
Message
Yes, you're correct about free-form responses. <IE the target is another player, and thus can acknowledge/deny the attack any number of ways.. From "bob doesn't WANNA be hit, so lets the thing pass through his intangiblized form" to "bob says "nope, I don't want it" etc..

For the example, I went and logged into an Alt (2nd character), but yeah I could have emitted/emoted/spoofed the response, though that's about how it will be "In Game" as well...; Sending out an action such as launching the attack at someone...Waiting for their <and other people in the immediate vicinity's response(s), seeing who does what so you can plan the next move.. This game is like a Multi-Author story...Everyone adding their own section/interpretation...'Feeding' off of what the last person/people said/did.. Similar to a Campfire Story-Round. Tell a/your section, pass the flashlight, etc.

As for the %%N and such... *headslaps* NOW I understand what you mean. It's like trying to get the game itself to put out a %, \ or ] ..you have to double it <more or less> to give the game/program something to eat, so it passes the second one through. <IE: to show off a particular color combination of %x<#4856> in the game, it has to be: %%x<#4856>, so the game doesn't try to evaluate/perform the action. <Lord and Lady I'm getting thicker and slower lately!> So I can re-edit it from [name(me)] back to %%me, and @@emit. got it.

>> As far as I understand what you are asking, you want an initial alias, and then a scripted response to the reaction?

If we're both on <or close to> the same page now, then Yes.
The initial alias being my actually starting the attack by throwing the <whatever> at someone/something...Then, dependent upon the response given by the target <or someone getting in the way...a guardian jumping in to 'take the bullet' as it were>, the script taking that and spitting out the hit or miss result <or even a combination, in the example of the guardian taking a bullet...: Tommy is the target the Disabler is heading for, RALPH, being a good bodyguard sees/senses the attack and does the "Human Shield 'O Meat" thing and blocks the strike, becoming the new target, and winding up getting wrapped up like a Birthday Present...without a pretty ribbon.

>> So if that is right, there is no way of automating a response. But if there is a keyword there "eg. Kevyn ... is struck" then you could respond to that.
>>But if you are going to have to interpret his response, then I think a second alias will be required. However since the first one remembered the name, typing in the colour of the smoke could be all that is required now.


...Perhaps a table/listing of variable acceptances/denials to match/exchange with? IE: it looks for, say.. "'* succeeds in striking' , 'is hit' 'gets struck', etc. ad infinitum... and processes that as "hit/Yes" ; Then have a similar setup for misses, registering the variously stated ways as "No" ?
Yeah, you'd still have to keep an eye out for "new formatted" ways of someone being struck/missed (likely adding them to the list)...and again, yeah, at least initially this would likely be a pain, but eventually, with the added "yes/No" variances put into it, it could easily pick out a strike or a miss...Just like the learning curve of most any program that looks/listens/watches for specific things <training just about all Text to Speech and voice command programs to learn your particular speech patterns, for example.> [[If not, no big deal, was just an idea that popped in in the middle of typing this.

Thanks for all the help so far, BTW
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #7 on Sat 28 May 2011 04:21 AM (UTC)

Amended on Sat 28 May 2011 04:22 AM (UTC) by Nick Gammon

Message
OK, well I suppose what I would do in a situation like this is have the initial alias pre-arm, so to speak, various responses. So you might do something along the lines of:



SetVariable ("success", "The smokebomb is flung unerringly towards %1, striking solidly ...")

SetVariable ("failure", "The thrown smokebomb heads towards %1, only to miss its mark  ...")


So the initial alias sets up a couple of variables which you can then choose to use later on. Then you could set up a "success" alias like this:


<aliases>
  <alias
   match="success"
   enabled="y"
   expand_variables="y"
   group="Weapon - Thrown E-Disabler"
   sequence="100"
  >
  <send>@@emit/room @success</send>
  </alias>
</aliases>


So you type "success" and it outputs the variable that your initial alias set up (ie. success of the most recent action). Then bind "success" to a function key (eg. F5) and "failure" to another (eg. F6).

So you then type the initial alias, watch their response and just hit F5 or F6, depending.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Vanidor   USA  (23 posts)  Bio
Date Reply #8 on Wed 01 Jun 2011 01:12 AM (UTC)
Message
>> So the initial alias sets up a couple of variables which you can then choose to use later on. Then you could set up a "success" alias like this:

Yes, but I'm trying to REDUCE the number of aliases I have/use for each weapon/item...I already have a success/failure alias for each weapon*. This is just basically renaming them....Though while writing this, I am thinking of adjusting things to make use of the success/fail variables you suggested...Maybe so that I can use just one set for all of the weapons, and working out a way to make it remember if it was either thrown or fired and input the proper form <Or maybe I'll try and just neuter how it's done...*sigh* my mind won't stop racing and settle on one thing <one of the main reasons I tend to over explain things and wind up being MORE confusing than less>.

* I currently have like 15 items total, 10 different types of weapons... leaving 5 that are both thrown and launched, each weapon has 3 aliases currently.. one to send it out, and 1 each to respond to a hit or a miss. so 15 * 3, for a total of 45 aliases. I'm wanting to reduce this number through the use of variables/scripts/triggers, if at all possible.

Maybe I'm just not getting what you're saying...If thats the case I'll likely have to stick with my current way of doing things, if so...Ahwell.


Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #9 on Wed 01 Jun 2011 05:17 AM (UTC)
Message
Perhaps I'm not being very clear. I am thinking of just 15 aliases, one per weapon, rather than 45.

Each one does the initial emote, and sets up, at the same time, a "success" emote variable, and a "failure" emote variable. So this has the nice feature that it is all together in one spot.

Then generic success/failure aliases (just two more) output the previously-setup message for the most recent action.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Vanidor   USA  (23 posts)  Bio
Date Reply #10 on Sun 05 Jun 2011 03:53 AM (UTC)
Message
Nick Gammon said:

Perhaps I'm not being very clear. I am thinking of just 15 aliases, one per weapon, rather than 45.

Each one does the initial emote, and sets up, at the same time, a "success" emote variable, and a "failure" emote variable. So this has the nice feature that it is all together in one spot.

Then generic success/failure aliases (just two more) output the previously-setup message for the most recent action.


*slaps self and sighs* No, re-reading what you said before, you're clear...my brain wasn't making the connections evidently <it happens a lot lately unfortunately *sigh*>

I get what you're saying now, the success and failure are more or less blanket reactions that link to each weapon, so if I throw say a hand grenade, the success link-in will spit out a/the appropriate response concerning a hand-grenade, then if/when a tranq. needle is lobbed, it'll mention that. Got it...I don;t know *WHY* I wasn't thinking clearly enough to make the connection before... So, I'll do the logically-male (yes, I know it a lot of ways that's more of an oxymoron than military-intelligence to some people...Mostly females)... and, BLAME THE HEAT! <it was around 90F ...+/- when I was reading/responding to that one.... That's my story, and I'm stickin' to it!>
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


32,566 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.