|
mudnoob Newbie
Joined: 02 Mar 2009 Posts: 4
|
Posted: Mon Mar 02, 2009 11:16 pm
Tank detector script: Any suggestions? |
Hey guys,
I'm a long time zMUD customer, but have never really used it for much beyond the basics. It's amazing what some of you are able to do, so I thought I'd venture in for some help.
Essentially, what I want is a "tank detector". I play a healer, and sometimes in epic battles with 10 or more players it's tough to determine who is being hit (besides the main tank). What I'd like is for some some kind of a warning, like: "Bob is being hit!", preferably output to another window. When I'm killing stuff, I manually put in the names of my compatriots into variables. Obviously, I only care about the players I've put in my variables (of course, I'd be open to any suggestions to improve the system as a whole :)
Like I said, I suck at zMUD, so I haven't been able to figure out how to do this in an efficient manner, without causing myself a ton of spam. The fight output looks like this:
Code: |
a soul's punch misses a Gorlaug butcher.
a soul's punch misses a Gorlaug butcher.
a soul's punch misses a Gorlaug butcher.
Your pound misses a Gorlaug butcher.
a Gorlaug butcher's punch hits you dealing 10 damage.
a Gorlaug butcher's punch misses you.
a soul's punch misses a Gorlaug butcher.
a soul's punch annihilates a Gorlaug butcher dealing 53 damage!
a soul's punch misses a Gorlaug butcher.
Your pound misses a Gorlaug butcher.
Your pound annihilates a Gorlaug butcher dealing 52 damage!
a Gorlaug butcher's punch misses you.
a Gorlaug butcher's punch misses you.
|
Any help would be much appreciated, as well as any suggestions on how to make an even better system. First this, then I need to figure out the mapper.
Thanks in advance. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Mar 03, 2009 2:48 am |
It shouldn't be too difficult as long as it's easy to tell what's an attack and what isn't - if they're all in the format "mobname's attackname hittype targetname [dealing xx damage]" then it's not too hard. Trouble comes when you start getting more than one word for the hittype (I remember someone posting a script for a MUD where they include stars and hyphens and all sorts, too) - dealing with all those different cases can be annoying.
The basic concept will just be - make a trigger that detects things hitting other things. Make a list of your friends - if they're the ones being hit, print a line somewhere. It's just a matter of how complex step 1 will be.
A thought just occurred to me, too:
Perhaps it'd be better for you to write a script that'll combine lines that're the same - I assume, say, that all three of those "a soul's punch" lines happened all at once? That makes it very easy, especially if there's a brief pause after each round - I assume there is, after the soul attacks, then you do, then the butcher does?
I'm not going to code anything until I'm sure about what's going on (especially because I'm not quite sure how I'd go about doing it yet) but this is the sort of output I'm envisioning:
Code: |
a soul punches a Gorlaug butcher (3 miss)
You pound a Gorlaug butcher (1 miss).
a Gorlaug butcher punches you (1 hit, 1 miss - 10 damage)
a soul punches a Gorlaug butcher (1 hit, 2 miss - 53 damage)
You pound a Gorlaug butcher (1 hit, 1 miss - 52 damage)
a Gorlaug butcher punches you (2 miss) |
Would this help you any? Another possibility if mobs change targets in the same round would be to have something like this:
Code: |
a Gorlaug butcher's punch hits you dealing 10 damage.
a Gorlaug butcher's punch hits you dealing 15 damage.
a Gorlaug butcher's punch hits Bob dealing 15 damage.
a Gorlaug butcher's punch misses Bob. |
Code: |
a Gorlaug butcher | punch | 3 hits, 1 miss | 25 damage to you, 15 damage to Bob |
The inspiration for this comes from this, by the way, which gives this lovely output (look in the middle of the screen, where it says [3 hits], [2 hits]). Before I installed MSBT those 3 health gains from Blood Aura and the 3 mana gains from Replenish would all be spamming me individually, like this. In big fights, it filled up the screen with "+46 mana", which sucked. It does the same thing if I'm laying down some big AOE attacks - instead of putting up individual damage numbers for each mob, it aggregates them into "25066 [12 hit, 5 miss, 2 crit]" or whatever. Not that I ever miss with spells on trash mobs :P |
|
|
|
mudnoob Newbie
Joined: 02 Mar 2009 Posts: 4
|
Posted: Tue Mar 03, 2009 3:05 am |
Fang Xianfu wrote: |
The basic concept will just be - make a trigger that detects things hitting other things. Make a list of your friends - if they're the ones being hit, print a line somewhere. It's just a matter of how complex step 1 will be. |
Thanks for the prompt response. This is what I did, but what happens is, every time someone gets hit, the message is sent and the trigger is fired, which results in nearly the same amount of spam (okay, slightly less). I'd like it to just show the message once, so I know they're taking damage.
Quote: |
Perhaps it'd be better for you to write a script that'll combine lines that're the same - I assume, say, that all three of those "a soul's punch" lines happened all at once? That makes it very easy, especially if there's a brief pause after each round - I assume there is, after the soul attacks, then you do, then the butcher does? |
Each person gets to attack in each round, then there's the pause. In my little snippet, the soul gets to attack, I get to attack, the enemy attacks, then the round ends and there's a brief pause. Each person gets their attacks consecutively. (I actually think I merged two rounds in the snippet. Here's the correction:)
Code: |
a soul's punch misses a Gorlaug butcher.
a soul's punch misses a Gorlaug butcher.
a soul's punch misses a Gorlaug butcher.
Your pound misses a Gorlaug butcher.
a Gorlaug butcher's punch hits you dealing 10 damage.
a Gorlaug butcher's punch misses you.
(new round)
a soul's punch misses a Gorlaug butcher.
a soul's punch annihilates a Gorlaug butcher dealing 53 damage!
a soul's punch misses a Gorlaug butcher.
Your pound misses a Gorlaug butcher.
Your pound annihilates a Gorlaug butcher dealing 52 damage!
a Gorlaug butcher's punch misses you.
a Gorlaug butcher's punch misses you. |
Obviously, this is a lot simpler than when there are 10 people attacking 10 other people, with redirects, people fleeing, rescues etc. In that situation, the rounds are huge.
Quote: |
I'm not going to code anything until I'm sure about what's going on (especially because I'm not quite sure how I'd go about doing it yet) but this is the sort of output I'm envisioning:
Code: |
a soul punches a Gorlaug butcher (3 miss)
You pound a Gorlaug butcher (1 miss).
a Gorlaug butcher punches you (1 hit, 1 miss - 10 damage)
a soul punches a Gorlaug butcher (1 hit, 2 miss - 53 damage)
You pound a Gorlaug butcher (1 hit, 1 miss - 52 damage)
a Gorlaug butcher punches you (2 miss) |
|
Hmm. That's interesting. The amount of damage strings is intimidating, but it would probably be cool.
Quote: |
Would this help you any? Another possibility if mobs change targets in the same round would be to have something like this: |
Foretunately, on our mud you can't change targets within a round.
Thanks. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Mar 03, 2009 3:24 am |
I'd probably use some of the stuff talked about in this thread, with some colouring, to keep everything pretty. But if 10 people are attacking 10 other people and rounds come fast, that's not going to be much help - you're still going to get spammed, there'll just be less of it, with only one line per person per round. I dunno how useful that'd be to you.
Back on topic: if you have a trigger that works on hits, then you've done the hard work for me, which is excellent. All you need now is a system to stop reports for a particular person for an amount of time, which will mean changing your current #say OMG %1 IS GETTING ATTACKED line to:
#if (!%db(@DontReport,%1)) {#say OMG %1 IS GETTING ATTACKED;#addkey DontReport %1 1;#alarm +5 {#delkey DontReport %1}}
I'm fairly sure that's the proper way to do this in zMUD, but I don't have it installed any more and can't check. The idea, anyway, is that there's a list of players you don't want to report for - when you make a report for that player, you add them to the list. 5 seconds later, they're removed from the list and can be reported for again. You can adjust the timing however you like. |
|
|
|
mudnoob Newbie
Joined: 02 Mar 2009 Posts: 4
|
Posted: Tue Mar 03, 2009 3:47 am |
Wow, that sounds awesome, and exactly what I need. I'll have to wait until tomorrow to actually try it out, but I appreciate the help. The stuff some of you guys are able to do amazes me.
|
|
|
|
mudnoob Newbie
Joined: 02 Mar 2009 Posts: 4
|
Posted: Wed Mar 04, 2009 4:40 pm |
Thanks Fang, this does exactly what I need it to do.
Much appreciated. |
|
|
|
|
|
|
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
|
|