Welcome to the Builder Academy

Question Trigger of the Day - Ladders

More
09 Apr 2013 02:15 #1880 by Fizban
I wrote the following for a builder on Luminari MUD who wanted ladders in their zones to take the place of up/down exits.
Code:
Name: 'Ladders', VNum: [ 6908], RNum: [ 919] Trigger Intended Assignment: Rooms Trigger Type: Command , Numeric Arg: 100, Arg list: climb Commands: *Check what room the script is attached to. Then set the direction the ladder goes in and what room it leads to. switch %self.vnum% case 6918 set dir up set exit 6903 break case 6903 set dir down set exit 6918 break case 6911 set dir up set exit 6920 break case 6920 set dir down set exit 6911 break case 6937 set dir up set exit 6942 break case 6942 *This room has more than one ladder in it, as such it is required that they either climb 'up' or 'down'. if %arg.mudcommand% == up set dir up set exit 6947 elseif %arg.mudcommand% == down set dir down set exit 6937 else %send% %actor% Which direction would you like to climb\? halt end break case 6947 *Same as the previous room. if %arg.mudcommand% == up set dir up set exit 6948 elseif %arg.mudcommand% == down set dir down set exit 6942 else %send% %actor% Which direction would you like to climb\? halt end break case 6948 set dir down set exit 6947 break case 6901 set dir down set exit 6923 set root 1 break case 6923 set dir up set exit 6901 set root 1 break default %send% %actor% This script shouldn't be attached to this room. Please let an immortal know that it is. halt break done *We've now decided where they should be sent and what direction that is from their current location. Now check if they have any followers and teleport them and any followers they may have to the destination room. set people %self.people% while %people% set next %people.next_in_room% if %people% == %actor% || %people.master% == %actor% set target %people% *Check if they are in a room with a root, if not they climb a vine ladder. if %root% == 1 %send% %target% You climb %dir% the tree's root. %echoaround% %target% %target.name% climbs %dir% the tree's root. else %send% %target% You climb %dir% the vine ladder. %echoaround% %target% %target.name% climbs %dir% the vine ladder. end %teleport% %target% %exit% %force% %target% look end set people %next% done

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

More
09 Apr 2013 09:43 #1883 by Rumble
Replied by Rumble on topic Trigger of the Day - Ladders
Nice trigger, thanks for sharing.

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.159 seconds