Welcome to the Builder Academy

Question DG-script last end tank

More
23 Jan 2019 23:02 #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: 0.268 seconds