Welcome to the Builder Academy

Question Trigger of the Day - Mob Death

More
26 Jul 2012 12:34 #448 by Rumble
Code:
Name: 'Phoenix Rising - 211', VNum: [ 203], RNum: [ 202] Trigger Intended Assignment: Mobiles Trigger Type: Death , Numeric Arg: 100, Arg list: None Commands: * By Rumble of The Builder Academy tbamud.com 9091 * You can't use waits in a mob death trig. * Phoenix turns into ashes when it dies and is reborn 3 times. * O219 is !TAKE and must always be in the room to count the deaths. emote shrieks in pain and bursts into flames. * Phoenix triggers 212 to count the deaths. Make it a unique command. phoenix2 * Damage everyone in the room from the fire. set room_var %self.room% %echo% The phoenix is completely enveloped in flames and explodes, burning everyone in the room. * Target the first char set target_char %room_var.people% * Loop through everyone in the room. while %target_char% * Set the next target before this one perhaps dies. set tmp_target %target_char.next_in_room% * Dish out the damage. if %target_char.is_pc% %send% %target_char% The fire burns you. %damage% %target_char% 10 end * Find next target set target_char %tmp_target% * Loop back done * Can't purge it (yet it is on the todo list) so teleport it to 0. %teleport% %self% 0 * This prevents a death cry. return 0
Code:
Name: 'Phoenix Rising - 219', VNum: [ 212], RNum: [ 208] Trigger Intended Assignment: Objects Trigger Type: Command , Numeric Arg: 4, Arg list: phoenix2 Commands: * By Rumble of The Builder Academy tbamud.com 9091 * Numeric Arg: 4 means obj has to be in the room. * Add 1 to the total deaths eval phoenix_deaths %phoenix_deaths% + 1 wait 3 sec * Rebirth for only the first 3 times. if %phoenix_deaths% <= 2 * It comes back! %load% mob 211 %echo% A baby phoenix pokes its head out of the pile of ashes. else * Reward on the last kill! %load% obj 184 eval phoenix_deaths 0 %echo% Something in the pile of ashes glimmers brightly. end * Remember the count for the next time this trig fires global phoenix_deaths
If this was helpful please vote or leave a review for TBA.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

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

Time to create page: 0.156 seconds