Page 1 of 1

CMUD Scripts

Posted: Mon Jul 07, 2014 5:31 pm
by Caolin
I wanted to write something more elegant than #ALIAS r {ride horse}, #ALIAS r2 {ride horse}, so I spent a little time updating some scripts. Much of these may depend on what you prefer to type, but I really liked how the loop commands, numbered commands, and the score/stat substitutions turned out. It took an especially long time figuring out how to match the colors in the stat command. I'll try to update these as I continue to work on them, and will update this post with the revision dates. Mail me if you have any questions.

PS: Just copy and paste into your command prompt. These may or may not work for ZMUD.

Note: For the loop commands, such as gg. You would type gg # then cmud would get coins 1.corpse, get coins 2.corpse, until you reach #.corpse. The null check was added, because otherwise, you could go into an infinite loop. I added this since all.corpse didn't seem to be an approvable action. The "numbered commands" don't loop. lic 2 for instance would just look in 2.corpse.

Re: CMUD Scripts

Posted: Mon Jul 07, 2014 5:32 pm
by Caolin
#CLASS General

//Variable Initialization

#VAR container 0
#VAR myhorse 0
#VAR tempcount 0
#VAR tempend 0
#VAR mastermob 0
#VAR killstats ""

//Missed combat color line

#TRIGGER {but miss.} {#CO grey}

//Basic commands

#ALIAS cb {change mood brave}
#ALIAS cw {change mood wimpy}
#ALIAS cz {change mood berserk}
#ALIAS trt {track trolloc}
#ALIAS cal {call}
#ALIAS ti {time}
#ALIAS gl {get lantern @container}
#ALIAS hl {hold lantern}
#ALIAS hlm {get lightstick @container;hold lightstick}
#ALIAS rlm {rem lightstick;put lightstick @container}
#ALIAS setcon {#VAR container %1;#SAY @container is now your container.}

//Door check command.

#ALIAS check {
l n
#WAIT 500
l e
#WAIT 500
l s
#WAIT 500
l w
#WAIT 500
l d
#WAIT 500
l u
}

//Loop commands.

#ALIAS gg {
#VAR tempcount 1
#VAR tempend %eval(1+%1)
#IF (%null(%1)) {#VAR tempend 2}
#UNTIL (@tempcount=@tempend) {get coins %eval(@tempcount).corpse;#ADD tempcount 1}
}

#ALIAS gh {
#VAR tempcount 1
#VAR tempend %eval(1+%1)
#IF (%null(%1)) {#VAR tempend 2}
#UNTIL (@tempcount=@tempend) {get all.herb %eval(@tempcount).corpse;#ADD tempcount 1}
}

#ALIAS gp {
#VAR tempcount 1
#VAR tempend %eval(1+%1)
#IF (%null(%1)) {#VAR tempend 2}
#UNTIL (@tempcount=@tempend) {get all.parchment %eval(@tempcount).corpse;#ADD tempcount 1}
}

#ALIAS gore {
#VAR tempcount 1
#VAR tempend %eval(1+%1)
#IF (%null(%1)) {#VAR tempend 2}
#UNTIL (@tempcount=@tempend) {get all.ore %eval(@tempcount).corpse;#ADD tempcount 1}
}

#ALIAS sc {
#VAR tempcount 1
#VAR tempend %eval(1+%1)
#IF (%null(%1)) {#VAR tempend 2}
#UNTIL (@tempcount=@tempend) {scalp %eval(@tempcount).corpse;#ADD tempcount 1}
}

#ALIAS skins {
rp
draw
#VAR tempcount 1
#VAR tempend %eval(1+%1)
#IF (%null(%1)) {#VAR tempend 2}
#UNTIL (@tempcount=@tempend) {skin %eval(@tempcount).corpse;#ADD tempcount 1}
sheath
wp
}

//Various numbered commands

#ALIAS lic {#IF (%null(%1)) {look in corpse} {look in %eval(%1).corpse}}
#ALIAS y {#IF (%null(%1)) {get all corpse} {get all %eval(%1).corpse}}
#ALIAS bc {#IF (%null(%1)) {butcher corpse} {butcher %eval(%1).corpse}}
#ALIAS reap {#IF (%null(%1)) {read parchment} {read %eval(%1).parchment}}


//Horse commands.

#ALIAS j {#IF (%null(%1)) {lead horse} {lead %eval(%1).horse}}
#ALIAS r {#IF (%null(%1)) {ride horse} {ride %eval(%1).horse}}
#ALIAS jb {lead @myhorse}
#ALIAS rb {ride @myhorse}
#ALIAS sethorse {#VAR myhorse %1;#SAY Your little pony is now set to @myhorse.}

//Random often used kill aliases.
#ALIAS kb {kill bear}
#ALIAS kc {kill cat}
#ALIAS kt {kill tree}

//Mercenary Commands
#ALIAS ma {order all assist me}
#ALIAS mb {order all bash}
#ALIAS mf {order all flee}
#ALIAS mr {order all report}
#ALIAS mrdz {order all rendezvous here}
#ALIAS setmob {#VAR mastermob %1;#SAY Your mob is now set to @mastermob.}
#ALIAS om {order @mastermob %-1}
#ALIAS omb {order @mastermob bash}

//Sign off
#TRIGGER {helps you into your private chamber.$} {#ECHO %time()}

//Score-stat Manipulation

#TRIGGER {^Your height is (%d) feet, (%d) inches, weight (%d) pounds, weight carried (*) lbs, worn: (*) lbs.} {
#SUB {Your height is %ansi(cyan)%1%ansi(grey)' %ansi(cyan)%2%ansi(grey)", weight %ansi(cyan)%3 %ansi(grey)lbs, carrying %ansi(cyan)%4 %ansi(grey)lbs, worn: %ansi(cyan)%5 %ansi(grey)lbs.}
}

#TRIGGER {^Offensive Bonus: (%d) Dodge Bonus: (%d), Parry Bonus: (%d)} {
#SUB {OB: %ansi(cyan)%1 %ansi(grey)DB: %ansi(cyan)%2 %ansi(grey)PB: %ansi(cyan)%3 %ansi(grey)Defense: %ansi(cyan)%eval(%2+%3)}
}

#TRIGGER {You have died (%d) times, (%d) times to other players, (%d) times to monsters, and killed (%d) other worthy players.} {
#GAG
#VAR killstats {You have died %1 times, %2 times to other players, %3 times to monsters, and killed %4 other worthy players.}
}

#ALIAS viewkills {#ECHO Work in Progress.}

#TRIGGER {Your current Arena ranking is *.} {#GAG}

#CLASS 0

Re: CMUD Scripts

Posted: Mon Jul 07, 2014 5:34 pm
by Caolin
#CLASS Targetting

//Variable initialization.

#VAR pkrace 0
#VAR tgt 0
#VAR characterrace 0
#VAR gender 0

#TRIGGER {^~* http://www.facebook.com/home.php?sk=gro ... 55763&ap=1 ~*$} {
stat
#VAR pkrace ""
#VAR tgt ""
#ECHO Your targets have been reset.
}

#TRIGGER {^You are a (%d) year old (%w) (%w) *.} {#VAR gender %2;#VAR characterrace %3}

//General Commands

#ALIAS b {bash %1}
#ALIAS bb {backstab %1}
#ALIAs ii {
#IF (@characterrace=human) {#IF (%null(%1)) {#ECHO No target chosen.} {charge %1}}
#IF (@characterrace=trolloc) {#IF (%null(%1)) {#ECHO No target chosen.} {skewer %1}}
}

#ALIAS it {
#IF (@characterrace=human) {charge tree}
#IF (@characterrace=trolloc) {skewer tree}
}
#ALIAS ib {
#IF (@characterrace=human) {charge bear}
#IF (@characterrace=trolloc) {skewer bear}
}
#ALIAS ic {
#IF (@characterrace=human) {charge cat}
#IF (@characterrace=trolloc) {skewer cat}
}

//PKrace target commands

#ALIAS race {
#VAR pkrace %1
#SAY @pkrace is now your targetted Race.
}

#ALIAS k {kill @pkrace}
#ALIAS i {
#IF (@characterrace=human) {charge @pkrace}
#IF (@characterrace=trolloc) {skewer @pkrace}
}
#ALIAS bk {backstab @pkrace}

//Target commands

#ALIAS tt {
#VAR tgt %1
#SAY @tgt is now your target.
}

#ALIAS z {kill @tgt}
#ALIAS iz {
#IF (@characterrace=human) {charge @tgt}
#IF (@characterrace=trolloc) {skewer @tgt}
}
#ALIAS bz {backstab @tgt}

#CLASS 0

Re: CMUD Scripts

Posted: Mon Jul 07, 2014 5:35 pm
by Caolin
#CLASS channeling

#ALIAS emb {
#IF (@gender=male) {seize}
#IF (@gender=female) {embrace}
}
#ALIAS arm {channel 'agility' %1}
#ALIAS str {channel 'strength' %1}
#ALIAS lb {channel 'night vision' %1}
#ALIAS wvd {channel 'sanctuary' %1}
#ALIAS food {channel 'create food'}
#ALIAS water {channel 'create water' %1}

#ALIAS fb {channel 'immolate' %1}
#ALIAS fbk {channel 'immolate' @pkrace}
#ALIAS fbz {channel 'immolate' @tgt}

#ALIAS fs {channel 'flame strike' %1}
#ALIAS fsk {channel 'flame strike' @pkrace}
#ALIAS fsz {channel 'flame strike' @tgt}

#ALIAS tor {channel 'tornado'}

#ALIAS chill {channel 'chill' %1}
#ALIAS chillk {channel 'chill' @pkrace}
#ALIAS chillz {channel 'chill' @tgt}

#ALIAS scs {channel 'scorch' %1}
#ALIAS sck {channel 'scorch' @pkrace}
#ALIAS scz {channel 'scorch' @tgt}

#CLASS 0