Added Assistant Droid Script
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
# SWC-Scripts
|
# SWC-Scripts
|
||||||
|
|
||||||
Collection of my SWC LISP scripts. New ones added as I make them
|
Collection of my SWC LISP scripts. New ones added as I make them
|
||||||
|
|
||||||
|
- Assistant Droid
|
||||||
|
> A "friendly" droid companion for your ship. It can provide information about ETAs and destinations to friendly players. It will refuse to answer any questions from enemies.
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
(defvar ship (get-entity 7315656 2))
|
||||||
|
|
||||||
|
(defun start
|
||||||
|
(cond
|
||||||
|
[
|
||||||
|
(is-owner? character)
|
||||||
|
(say (concat "Welcome back, Master." ))
|
||||||
|
]
|
||||||
|
[
|
||||||
|
(is-ally? character)
|
||||||
|
(say (concat "Hello, " (get-race character) "! Welcome to " ship "!"))
|
||||||
|
(add-response "Who is in charge?" pilot)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
(if (is-ally? character)
|
||||||
|
(add-response "I need assistance from your master." contact-owner)
|
||||||
|
(add-response "Where are we?" location)
|
||||||
|
(add-response "Where are we going?" destination)
|
||||||
|
)
|
||||||
|
(if (is-enemy? character)
|
||||||
|
(describe "The droid doesn't react as you approach. It stands staring into the void.")
|
||||||
|
(add-response "Hello?" enemy-info)
|
||||||
|
)
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
(defun pilot
|
||||||
|
(cond
|
||||||
|
[
|
||||||
|
(is-owner? character)
|
||||||
|
(say (concat "You are, Master " (get-name character) "."))
|
||||||
|
]
|
||||||
|
[#t
|
||||||
|
(say (concat "I am owned by " (get-owner self) "."))
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defun location
|
||||||
|
(describe "The droid pauses a moment. Reading data from the ship's computer.")
|
||||||
|
(cond
|
||||||
|
[
|
||||||
|
(is-traveling? self)
|
||||||
|
(say "We are currently traveling. Allow me to retrieve our travel information...")
|
||||||
|
(destination)
|
||||||
|
]
|
||||||
|
[#t (say (concat "We are currently " (get-current-system)))]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defun destination
|
||||||
|
(cond
|
||||||
|
[
|
||||||
|
(is-traveling? self)
|
||||||
|
(say (concat "We are currently " (get-destination self)))
|
||||||
|
(say (concat "Our expected travel time is " (get-eta self)))
|
||||||
|
]
|
||||||
|
[#t (say "We aren't currently traveling") ]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(defun enemy-info
|
||||||
|
(say (concat "You are entitled to the following information per IFF policy:"))
|
||||||
|
(say (concat "You are aboard the " ship "."))
|
||||||
|
(say "You may find your access to the ship restricted. I am unable to assist you with access.")
|
||||||
|
)
|
||||||
|
|
||||||
|
(defun contact-owner
|
||||||
|
(send-message self (get-owner self) (concat "Master, " (get-name character) " has requested your assistance aboard " ship ". Location follows: " (get-location self)))
|
||||||
|
(say (concat "I have contacted Master " (get-owner self)" requesting their assistance. Coordinates have been sent along with your information."))
|
||||||
|
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user