|
Strakc Apprentice
Joined: 31 Jan 2006 Posts: 106 Location: Virginia Beach, Virginia
|
Posted: Fri Oct 13, 2006 5:47 am
Alias help |
Is it possible to make an alias, with a default and arguments? so like say I make an alias, we'll call it HEAL. Now what I want it to do is if its sent by itself, if will check a list of things your afflicted, and based on this list cure the highest prioty. However if you use HEAL (affliction) it should heal that affliction right then and there, is it possible to do this?
|
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Fri Oct 13, 2006 6:19 am |
#alias {heal} {#if (%ismember(%-1,@afflictionlist)) {} {~heal %-1}}
|
|
|
|
Strakc Apprentice
Joined: 31 Jan 2006 Posts: 106 Location: Virginia Beach, Virginia
|
Posted: Fri Oct 13, 2006 6:29 am |
How does that work exactly?
|
|
|
|
rajasetan Beginner
Joined: 14 Sep 2006 Posts: 11 Location: Jakarta, Indonesia
|
Posted: Fri Oct 13, 2006 3:07 pm |
Try something like (UNTESTED)
#ALIAS heal {#IF (%-1 == "") {#FORALL @affliction {#IF (%ismember(%i, @afflicted)) {~heal %i}}} {~heal %-1}}
How it's suppose to work:
first, it checks if there are any arguments after the heal.
If there are, then it will go over the @affliction list (You need to make this list, with the highest priority affliction on top) to check if you are afflicted with that affliction (here it's called @afflicted, change this to a stringlist where you keep the list of things you're afflicted with) and will heal that affliction.
If there is anything after heal, then it heals that affliction. |
|
|
|
|
|
|
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
|
|