ButtonPush(Script)

From CoffeeMud Wiki
Revision as of 14:35, 10 October 2020 by Loki (talk | contribs) (Created page with "{{CoffeeMUDWikiBuilderTOC}} = Skill Use on an Item = This simple script can be placed on a room or an item. When a player types the words "PRESS BUTTON", the system would no...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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    

Skill Use on an Item

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.

  • 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
~

Notes

.