Welcome to the Builder Academy

Question Combat Triggers Sample 1, requesting some feedback

More
16 May 2017 18:05 - 16 May 2017 18:51 #6741 by Kastil
Greetings and I hope this is the correct section for this thread/topic. Newish to posting. I've created a series of combat related triggers for the MUD I'm building on. I've done limited testing myself and the appear to be working as intended, however due to the small number of players on the MUD I'm hoping to get some others to look them over and provide pointers on optimizing them or fixing them if there are any issues I don't see/haven't encountered. Thanks Kastil

Trigger 1 Goal - Have a mob that will pick a random target and damage them. Possible targets to include player(s) and pet(s) that are engaged with the mob but not NPC's that might be 'in the area'.
Code:
Trigger Intended Assignment: Mobiles Trigger Type: Fight, Numeric Arg: 5, Arg list: none Commands: *Mob does unresisted damage to random player or follower *To provide a simple plug and play template damage is based on 2 x the mobs level eval mob_damage %self.level% * 2 set entity %random.char% *Line 4 randomly selects random char in room. If statements to just affect players/pets if %entity.is_pc% %damage% %entity% %mob_damage% *Change lines 9,10,13 and 14 to something appropriate for the mobs special %send% %entity% %self.name% slashes your face with it's razor sharp claws! %echoaround% %entity% %self.name% slashes %entity.name%'s face with it's razor sharp claws! elseif !%entity.is_pc% && %entity.master% %damage% %entity% %mob_damage% %send% %entity% %self.name% slashes your face with it's razor sharp claws@n! %echoaround% %entity% %self.name% slashes %entity.name%'s face with it's razor sharp claws! end
Last edit: 16 May 2017 18:51 by thomas. Reason: added code tags

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

More
16 May 2017 18:53 #6742 by thomas
Interesting trigger. Thanks for sharing.

By the way -remember to put the code in [ code] tags :)

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

More
16 May 2017 18:55 #6743 by Kastil
Can you maybe explain how to do that, I saw the icon but was unsure where to place it... like before and after the code part or the code inside...
Thanks

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

More
20 May 2017 23:38 #6751 by thomas
You do it like this:

[ code]
code here.
Note that the space between "[" and "code" means you can see the tag but it doesn't really work.
[ /code]
Code:
code here. Here, I have removed the space.
The following user(s) said Thank You: Kastil

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

Time to create page: 0.229 seconds