Welcome to the Builder Academy

Question Trigger of the Day - Teleportation Service

More
28 May 2013 15:15 #2760 by Rumble
Code:
Name: 'Transfer mob', VNum: [57795], RNum: [ 3947] Trigger Intended Assignment: Objects Trigger Type: Command , Numeric Arg: 100, Arg list: * Commands: * By Fizban if %cmd% == list %send% %actor% We are currently offering trips to the following locations: %send% %actor% -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- %send% %actor% 1.) Washington D.C. %send% %actor% 2.) The Western Coastline %send% %actor% 3.) New Age Rome %send% %actor% -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- elseif %cmd% == travel if !%arg% %send% %actor% Please type list to see all possible locations I can take you to. %send% %actor% To travel to a location simply type 'travel #'. %send% %actor% For example: 'travel 3' would take you to New Age Rome. else *check if item with vnum 20200 is inside of the object if !%self.contents(20200)% %send% %actor% I am sorry but for me to send you anywhere you must put either %send% %actor% 1 power crystal inside of me for me to send you, or two for me %send% %actor% to send your entire group to its desired location. else *if it is there purge one instance of it. %purge% %self.contents(20200)% *check if there is still an instance of object 20200 inside the object if %self.contents(20200)% set people all %purge% %self.contents(20200)% else set people 1 end *small array holding the vnums of the respective destinations set destination[1] 14300 set destination[2] 10226 set destination[3] 4800 *check if their arg is one of the destinations, in this case a number from 1-3. if %%destination[%arg%]%% %send% %actor% A small ship drops out of the sky and lands near you. *evaluate %dest% to the room they are going to based on what line from the array they are going to based on their %arg% eval dest %%destination[%arg%]%% *this is based on whether there was 1 or 2 power crystals in the container switch %people% *if there was 1 this occurs and the %actor% is teleported case 1 %send% %actor% You are ushered inside the ship to begin your voyage. %echoaround% %actor% A small ship drops out of the sky and lands near %actor.name%. %echoaround% %actor% %actor.name% steps into the ship and is whisked away. %teleport% %actor% 20200 %force% %actor% look %at% 20200 %echo% Your ship will be departing shortly, please take your seat. wait 5 s %at% 20200 %echo% You feel the ship shake beneath you as it lifts off of the ground and begins its journey. wait 5 s %at% 20200 %echo% The ship slows down as it reaches its destination and begins to lower towards the ground. wait 5 s %at% 20200 %echo% Please leave the ship immediately we will be setting off again shortly. %teleport% %actor% %dest% break *if there were 2 this happens and the %actor% and anyone following them is transported by creating a door and *forcing the %actor% to walk through it. case all %echoaround% %actor% A small ship drops out of the sky and lands near %actor.name% and %actor.hisher% group. %echoaround% %actor% %actor.name% and company step into the ship and it begins its voyage. *make the door %door% %self.room.vnum% up room 20200 %force% %actor% up %force% %actor% look wait 1 *remove the door %door% %self.room.vnum% up purge %at% 20200 %echo% Your ship will be departing shortly, please take your seat. wait 5 s %at% 20200 %echo% You feel the ship shake beneath you as it lifts off of the ground and begins its journey. wait 5 s %at% 20200 %echo% %echo% The ship slows down as it reaches its destination and begins to lower towards the ground. wait 5 s %at% 20200 %echo% Please leave the ship immediately we will be setting off again shortly. *create a door leading to their destination %door% 20200 down room %dest% %force% %actor% down *remove that door as well %door% 20200 down purge break done %force% %actor% look else %send% %actor% We do not offer transportation to that location. end end end else return 0 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.162 seconds