|
obor Wanderer
Joined: 20 Dec 2001 Posts: 56 Location: USA
|
Posted: Thu Dec 20, 2001 3:24 am
Help setting up variables and aliases |
Okay, what I would like to do is make aliases and variables and whatever for the following things I type:
stun = I wear my 2 favorite stun weapons
vamp = I use my 2 favorite vampiric weapons
def = I automatically remove my 2ndary weapon, no matter what it is, and use a shield in stance defensive
I know there is a way so that I can type something like "setvamp" and it'll prompt me for my 2 vampiric weapons, so that I can change this as I get better weapons.
I also need to be able to do the weapons switch or the shield wearing on the fly, i.e. in the middle of a fight, I might go from wearing vamp weapons, to stun weapons, to defense. So the "def" one has to remove the 2ndary weapon, no matter what it is.
I also would like to set up an alias/variable combo that allows me to define my "hitgear" versus "managear" versus "savesgear". So that I can type something like "sethit" and I'll get prompted to enter my favorite hitgear for each armor place (i.e. rings, neck, head, hands, etc), and same goes for "managear", and "savesgear". that way, if I want to wear mana gear, I can type "managear", and it'll automatically change all my gear to the best mana gear I have, which I defined using a command of some sort, such as "setmana"
I sincerely hope I made sense. I'm rather new to this stuff (obviously) and have almost 0 experience coding ANYTHING, so please excuse my ignorance. Thanks. =) |
|
|
|
obor Wanderer
Joined: 20 Dec 2001 Posts: 56 Location: USA
|
Posted: Thu Dec 20, 2001 7:28 am |
okay, figured out a bit here...at least I got the defensive one
alias name - 1st
commands - #PR @primary
alias name - 2nd
commands - #PR @secondary
alias name - def
commands - #SH defense mode activated!;std; rem @secondary; wear shield;
and it'll remove wahtever I have as my 2nd weapon, wear the shield, go stance defensive (std)...
now, for stun I do the following:
alias - stun
commands - remove shield; wear hammer; sec mace;
it works the first time only, but if I try to go "def" again, it doesn't work. *Sigh* Thought i had figured it out, obviously not. |
|
|
|
seamer Magician
Joined: 26 Feb 2001 Posts: 358 Location: Australia
|
Posted: Thu Dec 20, 2001 11:07 am |
i use a simple alias to tell zmud what my weapon is, for when i get disarmed, and i can recycle the @weap var in the status window so i can see at a glance what i'm wielding...good for muds where you need to swap weapons
its basically:
#alias {wield} {#var weap %1;wear %1}
you can try:
#alias {stun} {#var weap1 %1;#var weap2 %1;wear %1;wear %1} (this assumes you're using the same weapon for both hands)
then you just type in stun itemname
Why oh WHY did I have pass door on... |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Dec 20, 2001 7:40 pm |
#AL stun {#VAR weap1 @stun1;wear @stun1;remove @shield;#VAR weap2 @stun2;sec @stun2}
#AL vamp {#VAR weap1 @vamp1;wear @vamp1;remove @shield;#VAR vamp2 @vamp2;sec @vamp2}
#AL def {std;remove @weap2;#IF (@weap1 = @weap2) {remove @weap1;wear @weap1};wear @shield;#VAR weap2 %null}
#AL setstun {#VAR stun1 %1;#VAR stun2 %1}
#AL setvamp {#VAR vamp1 %1;#VAR vamp2 %2}
#AL setshield {#VAR shield %1}
NOTES: setstun and setvamp expect you to provide keywords for two weapons, setshield expects one keyword for your preferred shield.
std depends on you having the correct values for @weap1 and @weap2, if you change weapons directly you'll need to update the variables
If wielding a secondary weapon automatically removes the shield, you can remove the italicized commands
LightBulb |
|
|
|
obor Wanderer
Joined: 20 Dec 2001 Posts: 56 Location: USA
|
Posted: Thu Dec 20, 2001 8:34 pm |
*dances*
WORKED!
now, correct me if I'm wrong, but I can set up a trigger for getting disarmed using these variables, so it ALWAYS gets the right weapon, right?
Pattern - DISARMS you and sends your weapon flying!
Command - ~~; get @weap1; wear @weap1; sec @
weap2;
right? |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Fri Dec 21, 2001 7:57 am |
Yes, but I don't see why you would need the ~~ at the beginning of the value of the trigger, unless that's a mud-specific thing, in which case, leave it in. Also, it could have just been a simple cut-n-paste fluke, but make sure @ and weap2 are side-by-side.
Iljhar |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Dec 21, 2001 5:20 pm |
If your secondary weapon can't be disarmed you won't need to rewield it.
#TR {DISARMS you and sends your weapon flying} {get @weap1; wear @weap1}
If it can be, you'll need to pick it up off the ground
#TR {DISARMS you and sends your weapon flying} {get @weap1; wear @weap1;get @weap2; sec @weap2}
But yeah, you've got the idea.
LightBulb |
|
|
|
obor Wanderer
Joined: 20 Dec 2001 Posts: 56 Location: USA
|
Posted: Fri Dec 21, 2001 5:32 pm |
the "~~" is a mud-specific thing, I think. It cancels whatever commands I have entered and will automatically grab my primary weapon.
The @weap2 were together, it was a cut/n/paste goof.
In the DSL mud, if your primary weapon gets disarmed, you automatically switch your secondary weapon to your primary hand, hence the way it read.
*dances* It works! too cool! Now I'm in the process of doing the same thing for "managear", "savesgear" and "hitgear" so I can switch armor for when I go from fighting a mage to a barbarian.
Thanks a bunch! |
|
|
|
obor Wanderer
Joined: 20 Dec 2001 Posts: 56 Location: USA
|
Posted: Sat Dec 22, 2001 11:47 pm |
okay, so anyone have any idea why this stuff won't save?
I have the variables set up for vamp1, vamp2, stun1, stun2, shield, and a few others (whip, flaming weapons, etc)
what is weird, is that the value for each of these variables need to be reset each time I reconnect. I click "settings/save", yet when I disconnect and reconnect, lo and behold, not there, have to reenter all variable values for each weapon.
*sigh*
dunno why it's doing that....ver 4.62 didn't do it, 6.16 is doing it. *Shrugs* |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Dec 23, 2001 12:46 am |
Couldn't say, I do have persistent variables in v6.16, and I don't even use "settings/save". I do have "Autosave on exit" selected in Preferences.
Check to make sure you aren't using default values, that would cause the variable(s) to reset to the default whenever the character loads even if the default was "".
LightBulb |
|
|
|
obor Wanderer
Joined: 20 Dec 2001 Posts: 56 Location: USA
|
Posted: Sun Dec 23, 2001 2:13 am |
ugh, how annoying...I have autosave on exit checked, and I am not using the default, to my knowledge
what's weird is it is only the variables that I have set up with a value of "#PR <whatever>"
i.e.
alias name - setstun
alias command - #PR stun1; #PR stun2
woudl that be what is causing the issues? Is there anyway I can save what I enter until next I change it by typing "setstun" again? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Dec 23, 2001 9:44 pm |
I don't use the #PROMPT command myself, but if that's the only one having problems just make your "setstun" alias the same as your others. The description of the #PROMPT command sounds as though it may be assigning default values to the variables.
As for default values, I went through my variables and was surprised to learn that several of them did have defaults. I was even more baffled at what those defaults were, until I went back and looked at the syntax for #VAR and realized I'd been putting my class assignments in the wrong field. So don't assume you aren't using defaults unless you've actually checked.
LightBulb |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|