Welcome to the Builder Academy

Question Trigger of the Day - Damage Examples

More
08 Aug 2012 19:00 #596 by Rumble
Code:
Name: 'Damage Example', VNum: [ 16], RNum: [ 16] Trigger Intended Assignment: Rooms Trigger Type: Enter , Numeric Arg: 100, Arg list: None Commands: * By Rumble of The Builder Academy tbamud.com 9091 * First put a wait in so the echo waits for the player to get into the room. wait 1 sec %echo% As %actor.name% enters the room a bolt of lightning smites %actor.himher%. * Take away 10 hitpoints %damage% %actor% 10 wait 5 sec %echo% The Gods feel sorry for %actor.name% and restore him to full health. * Restore 10 hitpoints (-# heals the actor). %damage% %actor% -10 * Another Example that damages actor to 1 hitpoint wait 2 sec %echo% hp: %actor.hitp% eval all_but_one_hitp %actor.hitp% - 1 %echo% all_but_one_hitp: %all_but_one_hitp% if %all_but_one_hitp% > 0 %damage% %actor% %all_but_one_hitp% %echo% hp: %actor.hitp% end
Code:
Name: 'Room Random heal Example', VNum: [ 51], RNum: [ 51] Trigger Intended Assignment: Rooms Trigger Type: Random , Numeric Arg: 20, Arg list: None Commands: * By Rumble of The Builder Academy tbamud.com 9091 * Fires only when a player is in the room. * Actor is not defined with trigger type random, you must define it. set actor %random.char% %damage% %actor% -10 %send% %actor% A healing breeze flows through the room. %echoaround% %actor% %actor.name% looks refreshed.
Code:
Name: 'Pentagram Entry Half Damage', VNum: [ 1600], RNum: [ 546] Trigger Intended Assignment: Rooms Trigger Type: Enter , Numeric Arg: 100, Arg list: None Commands: * By Rumble of The Builder Academy tbamud.com 9091 * Damage the actor by 1/2 of their hitpoints on entry. wait 1 s eval num_hitp %actor.hitp%/2 %damage% %actor% %num_hitp% %send% %actor% The searing heat is causing your skin to blister and burn. %echoaround% %actor% %actor.name% screams in pain as his skin begins to blister. %asound% You hear someone screaming in pain close by
Code:
Name: 'new trigger', VNum: [ 1601], RNum: [ 547] Trigger Intended Assignment: Rooms Trigger Type: Leave , Numeric Arg: 100, Arg list: None Commands: * By Rumble of The Builder Academy tbamud.com 9091 * Damage the actor by 1/2 of their hitpoints on exit. eval num_hitp %actor.hitp%/2 %damage% %actor% %num_hitp% %send% %actor% As you pass through the pentagram the pain intensifies almost to the point of unconsciounsness. Then you are through. %echoaround% %actor% %actor.name% screams in agony as he steps out of the pentagram. %asound% You hear someone screaming in pain close by.
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.162 seconds