DG-script last end tank

  • Apocmud.org
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
2 months 3 weeks ago #8291 by Apocmud.org
DG-script last end tank was created by Apocmud.org
Trying to create a mob that will only target the person who enters the room last so the strategy would be that the person who needs to tank would need to be the last person to enter the room or positioned in the group as last. I also want the mob to be immune to taunts and other aggro skills. I am not sure how to accomplish this in DG Scripts but I know it can be done. Any assistance would be much appreciated!

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #8294 by Parnassus
Replied by Parnassus on topic DG-script last end tank
First, some warnings:
My information may not be accurate and should be tested before being trusted.
I don't understand the thing about taunt and aggro skills.
Your mud may treat tanks differently than my stock mud does.

I think the things you need to remember here are :
1. The last person into the room is the first on the list.
2. Any entry trigger should wait at least 1 sec or the action may happen before the target enters the room.
3. Followers enter a room so quickly that we don't see a pause but the game itself does.

Therefore:
The mob needs to wait the usual 1 or 2 sec. By this time all followers should be in the same room as the mob. I'm not responsible for anyone who immediately leaves the room.

Do loop. For some reason I usually suggest the decapitating rabbit (tstat 1398) but the grenade trigger of the day will work with the benefit of being able to see it in the forums.

Check to make sure it's a player and not some mob that wandered in or a player pet that happens to be following.
(help char-var: is_pc - Checks if the actor is a player.)

Check to make sure that this character is a follower.
(help char-var: master - The master of the actor (as an id), or an empty return.)
You might have to play with this a bit but I think if !master the player is not in a group. In TBA it seems that it's possible to be in a group and not following but that doesn't seem to be what you're looking for.

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #8295 by Papaya Pete
Replied by Papaya Pete on topic DG-script last end tank
I remember a friend of mine tackling this a different way: he added in a few flags to show whether the mob would attack the strongest hostile in the room or the weakest. So, you could walk in and technically be the "tank," but the mob would target that weakest guy that the party was trying to power level (or the vulnerable robe-wearer who couldn't take a hit).
I'm not sure exactly how he did it exactly; it wasn't something I was thinking of putting into my mud. I'll ask him when I next get a chance, and while he did it through coding the logic could perhaps be used in scripts (though I have the feeling your logic will do the trick!).

Please Log in or Create an account to join the conversation.

  • Apocmud.org
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
2 months 4 days ago #8300 by Apocmud.org
Replied by Apocmud.org on topic DG-script last end tank
I am actually looking to do something similar as that Papaya - Having the mob keep aggroing the lowest HP player in the room and be immune to taunts, etc.

Please Log in or Create an account to join the conversation.

More
2 months 3 days ago #8301 by JTP
Replied by JTP on topic DG-script last end tank
What kind of taunts do you have ?

Please Log in or Create an account to join the conversation.

More
2 months 3 days ago #8302 by WhiskyTest
Replied by WhiskyTest on topic DG-script last end tank
"Your mother was a hamster, and your father smelt of elderberries!"

Please Log in or Create an account to join the conversation.

More
2 months 2 days ago #8303 by Parnassus
Replied by Parnassus on topic DG-script last end tank
You've now left out the last follower thing which actually makes sense because many groups (unless your mud is different) don't put the lowest person last but group players randomly depending on who types "follow" last.

We'll still need that loop although things just got a little harder. Now you're going to need some variables which attach to the mob. For each player he checks, he's going to need a variable for name for the hp (or attack power or whatever you decide to look at). Next you need to compare the hp you've just checked to the one that you checked previously. If %hp.next_in_room% < %hp.lowest% then it becomes %hp.lowest% and the player becomes %name.hp.lowest%. These are examples and are not the best way to do things. This is also not guaranteed to work.

When the loop is done, the lowest hp has now been noted, along with the name of the player.

Mob say Put 'em up, put 'em up! Which one of you first?
wait 1 second
Mob say I’ll fight you with one paw tied behind my back. I’ll fight you standing on one foot.
wait 1 second
Mob say I’ll fight you with my eyes closed...oh, sneaking up on me, eh, %name.hp.lowest%?
wait 1 second
mkill %name.hp.lowest%

Remember that this person may be the strongest in the room who has just tanked for everybody and hasn't recovered from the damage yet.

I'd also recommend a room trigger which shows Mob blocking anyone who tries to leave. If the trigger is on the mob, it won't run because the other mob is running. If you don't block exits, your mob may be doing all this work only to find that %name.hp.lowest% has already left. I think it will still work but hitting the player in another room won't look as good. Also, once the player has left, the chance of finding a mob with the player's name now pops up.

Please Log in or Create an account to join the conversation.

Time to create page: 1.271 seconds