Question about targetted hunting/bashing.

Is it possible to create an alias that both sets a target and alters the match text of a trigger?

Let's just say I had an alias like this one:

Alias: huntx *
Send to: World
Send Line 1: settarget x %1
Send Line 2: [bash alias]

And I had a trigger like this one (relying off the info here command for the matched output):

Trigger Line: *"Serpent*"*
Send to: World
Send Line 1: [bash alias]

Could I add code to the alias so that it changes the trigger's match text from 'Serpent' to whatever else I decided to hunt: rats, grubs, etc., while still retaining the quotes and asterisks? In other words, I'd set a target critter and be able to hunt just that for as long as I felt like in an area, then I could switch to another target critter any time I felt like, and would auto-bash only on that one type of mob, with just one trigger and one alias.

Comments

  • Are you asking about the HTML5 client? or Mudlet? Or something else?
  • TarkentonTarkenton Traitor Bear
    Looks like Mush to me.
    image
  • Yeah, MUSH. Sorry for not specifying.
  • Store the target in a Mushclient variable, then make the trigger match on that variable (and use the 'expand variables' checkbox on the right-hand side).

    Alias action text (send to script):
    Send("settarget x %1")
    Send("bashalias")
    SetVariable("target", "%1")

    Trigger match text (check the 'expand variables' checkbox):

    Just be careful, though, or you might end up hitting something later on (e.g. orcs in Acknor vs orcs in Shallach). I suggest making another alias to turn the trigger on or off, but if you're not sure about how to do that, just set your target to gibberish once you're done hunting.
  • Already have a working toggle alias to switch all my hunting triggers on/off :D
Sign In or Register to comment.