Welcome to the Builder Academy

Question Trigger of the Day - Shotgun

More
25 Oct 2013 00:46 #4438 by Rumble
Code:
Name: 'Rumble's Shotgun', VNum: [ 45], RNum: [ 45] Trigger Intended Assignment: Objects Trigger Type: Random , Numeric Arg: 100, Arg list: None Commands: * By Rumble of The Builder Academy tbamud.com 9091 * If the object is being wielded. if %self.worn_by% * This is a random trigger so actor has to be defined. eval actor %self.worn_by% * If the person wielding the object is fighting. if %actor.fighting% * Count the shots. eval shotgun_rounds %shotgun_rounds% + 1 * Remember the count for the next time this trig fires. global shotgun_rounds * This double barrel shotgun, only has 2 rounds. if %shotgun_rounds% > 2 * Detaching trig since gun is out of ammo. detach 1361 %self.id% halt end * We also have to define the victim. eval victim %actor.fighting% * Send the messages and do the damage. %echoaround% %actor.name% %actor.name% points %self.shortdesc% at %victim.name% and pulls the trigger. %send% %actor% You point %self.shortdesc% at %victim.name% and pull the trigger. %damage% %victim% 10 end end
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.173 seconds