128 if (!source || !target)
133 warning(
"TODO: ActionStartConversation: Non-PC target \"%s\"", target->getTag().c_str());
141 warning(
"Functions::actionStartConversation(): " 142 "Object \"%s\" already in conversation with PC \"%s\"",
149 if (conversation.
empty())
155 const bool playHello = ctx.
getParams()[2].getInt() != 0;
172 if (!
object || !moveTo)
178 jumpTo(
object, moveTo->getArea(), x, y, z);
191 if (!
object || !moveTo)
195 moveTo->getPosition(x, y, z);
197 jumpTo(
object, moveTo->getArea(), x, y, z);
#define ResMan
Shortcut for accessing the sound manager.
void actionMoveToObject(Aurora::NWScript::FunctionContext &ctx)
void jumpTo(NWN::Object *object, Area *area, float x, float y, float z)
A container of Neverwinter Nights objects.
Object * getTriggerer() const
Common::UString formatTag(const Object *object)
Construct a string with the tag of this object.
A class holding an UTF-8 string.
const Common::UString & getConversation() const
Return the object's default conversation (DLG).
void jumpToLocation(Aurora::NWScript::FunctionContext &ctx)
const Common::UString & getName() const
Return the object's name.
Context of an NWScript function.
void actionJumpToObject(Aurora::NWScript::FunctionContext &ctx)
void actionOpenDoor(Aurora::NWScript::FunctionContext &ctx)
void unimplementedFunction(Aurora::NWScript::FunctionContext &ctx)
void truncate(const iterator &it)
Object * getCaller() const
Basic Neverwinter Nights type definitions.
static NWN::Object * toObject(::Aurora::NWScript::Object *object)
void playAnimation(Aurora::NWScript::FunctionContext &ctx)
void actionMoveToLocation(Aurora::NWScript::FunctionContext &ctx)
virtual void speakString(const Common::UString &string, uint32 volume)
Speak the specified string.
An NCS, BioWare's NWN Compile Script.
static Location * toLocation(Aurora::NWScript::EngineType *engineType)
void actionJumpToLocation(Aurora::NWScript::FunctionContext &ctx)
Exception that provides a stack of explanations.
void delayScript(const Common::UString &script, const Aurora::NWScript::ScriptState &state, Aurora::NWScript::Object *owner, Aurora::NWScript::Object *triggerer, uint32 delay)
const Common::UString & getTag() const
static Door * toDoor(Aurora::NWScript::Object *object)
void exceptionDispatcherWarning(const char *s,...)
Exception dispatcher that prints the exception as a warning, and adds another reason on top...
The context needed to run a Neverwinter Nights module.
Basic exceptions to throw.
static Aurora::NWScript::Object * getParamObject(const Aurora::NWScript::FunctionContext &ctx, size_t n)
const char * c_str() const
Return the (utf8 encoded) string data.
const Variable & run(Object *owner=0, Object *triggerer=0)
Run the current script, from start to finish.
void actionPlayAnimation(Aurora::NWScript::FunctionContext &ctx)
void delayCommand(Aurora::NWScript::FunctionContext &ctx)
void assignCommand(Aurora::NWScript::FunctionContext &ctx)
static Creature * toPC(Aurora::NWScript::Object *object)
bool open(Object *opener)
The opener object opens this door.
bool close(Object *closer)
The closer object closes this door.
const Common::UString & getScriptName() const
Aurora::NWScript::Object * getPCSpeaker() const
Return the PC currently speaking with this object.
bool empty() const
Is the string empty?
void actionStartConversation(Aurora::NWScript::FunctionContext &ctx)
VariableContainer * getCurrentEnvironment() const
void warning(const char *s,...)
Handling BioWare's NWN Compiled Scripts.
Basic type definitions to handle files used in BioWare's Aurora engine.
Script, NWScript bytecode.
void getPosition(float &x, float &y, float &z) const
Return the location's position.
A creature in a Neverwinter Nights area.
bool startConversation(const Common::UString &conv, Creature &pc, NWN::Object &obj, bool playHello=true)
Start a conversation.
The context handling the gameplay in Neverwinter Nights.
void jumpToObject(Aurora::NWScript::FunctionContext &ctx)
A door in a Neverwinter Nights area.
void actionSpeakString(Aurora::NWScript::FunctionContext &ctx)
NWScript utility functions.
Neverwinter Nights engine functions.
Module & getModule()
Return the module context.
void actionDoCommand(Aurora::NWScript::FunctionContext &ctx)
void actionCloseDoor(Aurora::NWScript::FunctionContext &ctx)
void executeScript(Aurora::NWScript::FunctionContext &ctx)
The global resource manager for Aurora resources.
void setEnvironment(const VariableContainer &env)
Overwrite the environment.