Quick CMUD alias request

... A place to ask for help on any topic whether it be starting out to player killing to IT issues.
Post Reply
Carinya
Posts: 33
Joined: Tue Aug 25, 2020 4:37 pm

Quick CMUD alias request

Post by Carinya » Wed Sep 30, 2020 8:42 am

I have the following aliases:

#alias t1 {#variable targ1 %1}
#alias r1 {channel 'fireball' @targ1}

"t1 carinya;r1" results in sending "channel 'fireball' carinya"

I'd like to modify "r1" so that it sends "channel 'fireball' h.carinya" but I'm not sure how to code this in cmud. Any ideas?

Angkar
Posts: 93
Joined: Tue Feb 13, 2018 12:43 pm

Re: Quick CMUD alias request

Post by Angkar » Wed Sep 30, 2020 8:43 am

channel 'fireball' h.@targ1

Aira
Posts: 749
Joined: Mon Feb 23, 2015 8:57 pm

Re: Quick CMUD alias request

Post by Aira » Wed Sep 30, 2020 9:53 am

#alias r1 {channel 'fireball' h.@targ1}

should work. I don't know much about Cmud, but that I can manage. :lol:

Carinya
Posts: 33
Joined: Tue Aug 25, 2020 4:37 pm

Re: Quick CMUD alias request

Post by Carinya » Wed Sep 30, 2020 10:17 am

Ok now for the sneaky followup

I'd like to be able to type "hid" and toggle r1 between @targ1 and h.@targ1, is that just some kind of if statement?

Asandra
Posts: 763
Joined: Mon May 13, 2019 11:30 am

Re: Quick CMUD alias request

Post by Asandra » Wed Sep 30, 2020 10:19 am

Weaving on 'h.target' does not cost moves. Always weave on h.target!

Reyne
Posts: 1418
Joined: Wed Mar 08, 2017 2:46 am

Re: Quick CMUD alias request

Post by Reyne » Wed Sep 30, 2020 12:17 pm

Carinya wrote:
Wed Sep 30, 2020 10:17 am
I'd like to be able to type "hid" and toggle r1 between @targ1 and h.@targ1, is that just some kind of if statement?
Can do it with an if statement, yeah. This will be pseudo-code because I am not at my home PC and I don't use CMUD but;

Create a variable which will store the current toggle setting and then run the IF statement based on that variable when you enter your alias:

Target = 1

IF Target = 1
THEN r1 = @targ1
Target = 0
ELSE
r1 = h.@targ1
Target = 1
END

So basically if your Target variable is 1, it sets your @targ1 to not use the h. and sets Target to 0. If it is 0, it sets @targ1 to use h. and sets Target to 1.

Asandra is correct that weaving on h.target does not cost moves, so there is no reason not to. I'll add that I *always* use h.target not only for weaving but for regular attacks as well. I am guessing you're going to mess up and attack without the "h." when you need to (and get stabbed) more often than you'll spam yourself haggard. Minding your MVs and not running yourself haggard fighting a rogue is something you need to watch regardless.

I wrote out the code for you anyway though because this type of toggle is useful for a lot of other things. Riding/dismounting horse, for example. I have one that changes my 'long weave' button from fireball to ice spikes and back again depending on the weather (if weather = cold then longweave = spikes, else longweave = fire). Etc.

IF Riding = TRUE
send("dismount")
Riding = FALSE
ELSE
send("ride "..HorseVariable)
Riding = TRUE
END
Last edited by Reyne on Wed Sep 30, 2020 12:28 pm, edited 3 times in total.

Meren
Posts: 278
Joined: Tue Feb 06, 2018 10:45 pm

Re: Quick CMUD alias request

Post by Meren » Wed Sep 30, 2020 12:26 pm

Anything but kill/bash should be h.@targ

It costs nothing there’s only benefits.

Post Reply