Difference between revisions of "ButtonPush(Script)"

From CoffeeMud Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{CoffeeMUDWikiBuilderTOC}}
 
{{CoffeeMUDWikiBuilderTOC}}
= Skill Use on an Item =
+
= Button Push =
  
 
This simple script can be placed on a room or an item.  When a player types the words "PRESS BUTTON", the system would normally return a HUH message, but the script cancels that message, and instead runs the scripted commands (in this specific case, transferring the player to another area).
 
This simple script can be placed on a room or an item.  When a player types the words "PRESS BUTTON", the system would normally return a HUH message, but the script cancels that message, and instead runs the scripted commands (in this specific case, transferring the player to another area).
Line 12: Line 12:
 
   mpechoaround $n A light flashes from the button and surrounds $m
 
   mpechoaround $n A light flashes from the button and surrounds $m
 
   mpalarm 1 mptransfer $n Your Area#13
 
   mpalarm 1 mptransfer $n Your Area#13
 +
  return cancel
 
~
 
~
  

Latest revision as of 14:52, 17 September 2024

CoffeeMUD
Administrator                                                  Builder                                                              Player
=CoffeeMUD Builder Information=
Basics Praetor     Player Support     Commands     Zapper Masks Advanced Races     Classes     Abilities     Socials     Scripting    
Building Behaviors     Properties     Areas     Rooms     Exits     Items     Mobs Systems Achievements     Crafting     Help Info     Ships     Planes of Existence     Quests     Triumphs    

Button Push

This simple script can be placed on a room or an item. When a player types the words "PRESS BUTTON", the system would normally return a HUH message, but the script cancels that message, and instead runs the scripted commands (in this specific case, transferring the player to another area).

  • If placed on a portable item, you may want to be more specific on the "PRESS BUTTON" command, like "PRESS FLASHLIGHT BUTTON" so that this script could be used by other items and rooms with differing nomenclature, like "PUSH BIG RED BUTTON". Otherwise, a player with a flashlight entering the room with the big red button would only activate their flashlight (or inadvertently push the big red button...depending on timing).

Press Button


cnclmsg_prog HUH p press button
  mpechoat $n A light flashes from the button and surrounds you.
  mpechoaround $n A light flashes from the button and surrounds $m
  mpalarm 1 mptransfer $n Your Area#13
  return cancel
~

Notes

.