|
Curtis Novice
Joined: 25 Nov 2002 Posts: 39 Location: USA
|
Posted: Wed Feb 19, 2003 4:31 pm
Demon targeting help |
I use Zmud 6.40 and would like to create a demon targeting script. Because Sorcerer's create such screen scroll it get be difficult to target the specific demons in the room. To target a demon you must type INFO HERE to view which demons are in the room. Than you want to kill demons in a certain order. Here is how the output looks once you type INFO HERE.
"death361" The Angel of Death.
"tagrak600" Tagrak, demon of blood.
"wight9448" a terrifying barrow-wight.
"storm10027" a demonic storm.
"seeker23986" a seeker demon.
"seeker28322" a seeker demon.
"seeker42520" a seeker demon.
"seeker47503" a seeker demon.
"seeker80204" a seeker demon.
I would like to create a script that automatically places all demons in a variable database. Than the database would be sorted by which demons should be killed first. Some all or none of the demons may be present at one time. Any suggestions on the best way to tackle this problem. Again I was thinking of using a database but there may be an easier way. Any help would be appreciated. |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Wed Feb 19, 2003 4:43 pm |
string list should be easier if you're not trying to compile tons of info to save, and are just interested in getting them dead. How do you know what order to kill them in? this is crucial information! "death361" is the name you can refer to a demon by? i.e. the command "kill death361" would have you attack the angel of death? Assuming the quotes are the names, and the order is the order in "info here" this is a place to get started:
#alias gatherinfo {
#t+ demoninfo
info here
#wait
#t- demoninfo
kill %item(@demons, 1)
}
#tr "demoninfo" {^"(%w%d)"} {#additem demons %1} "" {disable}
#tr {you have killed} {#if (@demons) {kill %pop(demons, 1)}}
the first trigger constructs a string list in the order the demons appear. The second one deletes a demon from the list when he's killed, and moves on to the next (you'll need to fix the pattern for this for your standard death message). The alias turns on the "demoninfo" trigger long enough to get the information from the "info here" command, then turns it back off, and gets you started with your fiend vanquishing.
--note: you might want to build in some way to turn the second trigger on and off, or find a way to have it only fire on demon deaths.
--------
moon.icebound.net:9000 |
|
|
|
Curtis Novice
Joined: 25 Nov 2002 Posts: 39 Location: USA
|
Posted: Thu Feb 20, 2003 3:09 pm |
Thanks for the help. The only other thing that I would like to do with script is sort the demons in a certain order. For example, I want to kill the Wight demon first, the Seeker demons 2nd. Not sure of the best way to accomplish this. Otherwise, I think I can write this script with the advice you gave me.
|
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Feb 20, 2003 3:22 pm |
You might be able to %sort that list easily depending on what kind of demons you have.
#VAR demons %sort(@demons,1)
Might return a good enough solution based on what you posted.
Ton Diening |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Thu Feb 20, 2003 5:40 pm |
%sort might put the storm demon's ahead of the seeker demons in the killing order . A second option would be to make a string list that holds the killing order:
#var order {wight|seeker|death|tagrak|storm}
and in the script, replace the commands
kill %item(@demons, 1)
kill %pop(demons, 1)
with the call to this alias
#al killinorder {
#forall @order {
#var order_i %i
#var num_i 0
#forall @demons {
#add num_i 1
#if (%pos(@order_i, %i)) {
kill %i
#delnitem demons @num_i
#abort 1
}}}}
hehe, this alias got a little more complicated than i originally intended. If its not working right, here's what i'm trying to do. We loop through order, and have to check if the member in order is a substring of a member in demons, we try to kill that member of demons, delete that member of demons, and abort. Indexing the two loops is the only thing we need to order_i and num_i variables so if you want to clean them out right before the call to abort it wouldn't bother anything.
--------
moon.icebound.net:9000 |
|
|
|
Curtis Novice
Joined: 25 Nov 2002 Posts: 39 Location: USA
|
Posted: Thu Feb 20, 2003 6:09 pm |
Excellent. Exactly what I was looking for. Should have been more specific in my original post. This even allows me to vary the order of demons if I decide to change it in the future.
|
|
|
|
Curtis Novice
Joined: 25 Nov 2002 Posts: 39 Location: USA
|
Posted: Tue Oct 07, 2003 7:16 pm |
I had this alias working well than I accidently deleted the alias and can't seem to get it working properly again. Here is the text I am getting when I execute the alias.
#var order {twine|imp|possession|pestilence} was loaded
#var demons {possession|imp|pestilence|twine} was loaded
The text read.
kill twine (this worked because it sorted twine and targeted first)
Variable:order_i twine
Variable:order_i twine
Variable:order_i twine
Variable:order_i twine
Any help would be appreciated. |
|
|
|
|
|