Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!

Members: 0
Guests: 15
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Smaug Snippets » Alias Snippet
Forum Rules | Mark all | Recent Posts

Alias Snippet
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jul 25, 2003, 9:42 am   Last edited Nov 25, 2007, 7:19 pm by Samson
Go to the top of the page
Go to the bottom of the page

Wonko

GroupMembers
Posts8
JoinedJul 24, 2003

I installed the Alias snippet found here at smaugmuds.org, but what is the syntax for it?
The help file says it's:
alias ,
but what if i wanted to do a shortcut for, say, casting magic missile on a mob. Is it possible to put a variable in the alias so you could just type something like "mm goblin" or something like that- instead of having to make an alias for every mob you wanted to cast magic missile on-? or would i have to modify the code substantially? Thanks
       
Post is unread #2 Jul 25, 2003, 12:39 pm
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

Aliases work like this:

If you wanted to make an alias to make 'cast 'magic missile' ' shorter, you'd do:

alias mm cast 'magic missile'


Now if you wanted to cast the spell via the alias, you'd do:
mm goblin


-- X
       
Post is unread #3 Jul 25, 2003, 12:41 pm
Go to the top of the page
Go to the bottom of the page

Cam

GroupAFKMud Team
Posts61
JoinedJan 1, 2002

Well, with what you are asking, there's no real variable there. What you just requested was a normal alias. The way the aliases work is that they can be "daisy-chained" onto the end, so typing an alias doesn't send an enter command. So do to what you just asked, all you need to do is type:

alias mm cast 'magic missile'mm (mob name)


And there you have a working alias that adapts to whatever you want to cast it on ;) Anway, hope that helps with what you are asking.
       
Post is unread #4 Jul 25, 2003, 12:42 pm
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

*snickers*
Cam's a slow typer *eg*
       
Post is unread #5 Jul 25, 2003, 2:05 pm
Go to the top of the page
Go to the bottom of the page

Cam

GroupAFKMud Team
Posts61
JoinedJan 1, 2002

Bah, I'm at work and was on break so my attention wasn't quite fully focused on that reply ;P It was lucky to get posted before I had to go back. ;)
       
Post is unread #6 Jul 25, 2003, 2:07 pm
Go to the top of the page
Go to the bottom of the page

Wonko

GroupMembers
Posts8
JoinedJul 24, 2003

really? Okay, thanks Xorith and Cam, i didn't know that the aliases could be 'daisy-chained' like that- that's a big help.


Edit: I logged into my mud and found a mob, and used an alias to try and cast acid blast on it, but it just said 'huh?' - any idea why?


Edit 2: I tried making an alias that said "cast 'acid blast' giant". and i used it when a giant was in the room, but it just said 'huh' again- is my code messed up? I can make aliases, and type alias to see the aliases i made, i just cant use them for fighting (i can make an alias to sleep!)- what's with that?
       
Post is unread #7 Jul 27, 2003, 12:12 pm
Go to the top of the page
Go to the bottom of the page

Wonko

GroupMembers
Posts8
JoinedJul 24, 2003

Lol, i'm an idiot- i gave up on the alsherok alias code, so i started to unistall it, following the install directions backwards, when i realized i had missed a whole section of installation- i reinstalled it, triple-checking my self twice, and it works correctly now. Thanks for all the help Cam and Xorith.
       
Pages:<< prev 1 next >>