|
Foma Newbie
Joined: 11 Feb 2002 Posts: 7
|
Posted: Thu Feb 21, 2002 9:01 pm
script idea help |
Im trying to make a script that will automatically target my aliases at a person when they attack me. My problem isnt setting up the script (yet) its trying to figure out where to anchor the trigger to. There are lots of ways for a person to begin combat and lots of diffrent combat messages.
To start combat for example i might get:
Person backstabs you!
Person attacks you!
Person bashes you!
Person trips you!
Along with many many many others.
And during combat i get messages like:
Person tickles you with weapon.
Person slices you with weapon.
Person nicks you with weapon.
Person cuts you with weapon.
And many many more of these. It would be probly impossible for me to figure out all the messages and add them seperately. There are probably like a hundred total, some of which i probably dont even know of.
Then I had the idea that maybe i could have it set when they enter the room. But, sometimes the people are invisible and it takes a while before i see them.
So anyone got any ideas where i could start this from or should i just give up on the trigger concept and turn it into a button or alias or somesuch?
An example of full combat would be something like this:
Person backstabs you!
Person stings you with weapon.
hp: (-10) 200
You sting Person with your weapon.
Person cuts you with weapon.
hp: (-15) 185
You slice Person with your weapon.
And if they happened to be invisible Person would be replaced with Someone but you cant do anything to 'someone' you have to use their actual name.
Any ideas? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Feb 21, 2002 9:09 pm |
What is the hp: (-10) 200? Your prompt? If so, what does the (-10) mean, the hp you loose? Then I'm guessing that this only appear when you are fighting, and thus could be used to determine when you are fighting. Then a trigger of:
#TRIGGER {(%w) * with *.$hp: ~(%d~) %d} {#VAR target %1} "" {prompt}
should work because although it is a bit generic, it should only fire when you are fighting, and thus capture whoever is attacking you. If however, I'm assuming wrong, then please correct me.
Kjata |
|
|
|
track_xyj Newbie
Joined: 20 Feb 2002 Posts: 8 Location: USA
|
Posted: Thu Feb 21, 2002 9:16 pm |
How could you figure out the name of "Someone" when you are before the screen? Look at him to know his real name? or just "id here"?
I think it could be like this
#trigger {(%x)(%s)(%x)(%s)you with weapon} {#if (%1="Someone") {#t+ b;id here};kill %1} {a}
Class b is always disabled unless you begin to id here to find out who is Someone.
#trigger {^Someone (%x)} {kill %1;#t- b} {b} |
|
|
|
Foma Newbie
Joined: 11 Feb 2002 Posts: 7
|
Posted: Thu Feb 21, 2002 9:30 pm |
the hp: (-10) 200 thing isnt my prompt but more like a 'fight prompt' it displays after every hit in combat -10 being damage taken 200 being the hps i have left
you can only determine the name of 'someone' by looking at the person, but you have to type 'look name' which pretty much makes you figure it out through a process of elimination by looking at every single person that would be able to attack you
i'll give the first example a try and see if i can get it to work |
|
|
|
Foma Newbie
Joined: 11 Feb 2002 Posts: 7
|
Posted: Thu Feb 21, 2002 9:33 pm |
I also forgot to note that weapon stood for diffrent weapons, so its more like:
Person stings you with knife.
Person stings you with sword.
Person cuts you with axe.
etc etc |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Feb 21, 2002 9:34 pm |
Just noticed that the part of the pattern that is ~(%d~) won't work because the number has a negative sign. Try changing it to ~(%n~) instead, which should match.
Kjata |
|
|
|
Foma Newbie
Joined: 11 Feb 2002 Posts: 7
|
Posted: Thu Feb 21, 2002 9:41 pm |
Thanks for the help, i got it to target visible people good. Any ideas on the 'someone' part? Im guessing there isnt any way to do it since you gotta look at each specific person to determine who it is if you dont already know, and considering you can only enter 5 commands at a time without getting stalled out it would be impossible to look at each one
|
|
|
|
track_xyj Newbie
Joined: 20 Feb 2002 Posts: 8 Location: USA
|
Posted: Thu Feb 21, 2002 9:45 pm |
Ye, run away.
Technically you should link who -i output to a database, then do while look at every name in database. As you said, 5 commands got you stalled? My mud general has 150+ ppls. So run away or just quit. There is seldom any chance for a robot against pker. |
|
|
|
Foma Newbie
Joined: 11 Feb 2002 Posts: 7
|
Posted: Thu Feb 21, 2002 9:52 pm |
well the mud i play on isnt quite that large, there would typically only be about 8 or 9 people on average that could attack me invisible, but our mud lacks a who -i command, i doubt ill be running away, too big an ego for that but I usually know who the someone is without having to look, i just wish i could figure out how to make zmud figure it out as easily so i could automate a few of the alias changes
Thanks for all the help, im sure i'll figure something out, maybe add in a way for me to do it easily manually |
|
|
|
|
|