diff --git a/src/scripts/common/SmallTalk.cpp b/src/scripts/common/SmallTalk.cpp new file mode 100644 index 00000000..c467458f --- /dev/null +++ b/src/scripts/common/SmallTalk.cpp @@ -0,0 +1,27 @@ +#include +#include + +using namespace Sapphire; + +class SmallTalk : + public Sapphire::ScriptAPI::EventScript +{ +public: + SmallTalk() : + Sapphire::ScriptAPI::EventScript( 0x000B0000 ) + { + } + + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + eventMgr().eventStart( player, actorId, eventId, Event::EventHandler::EventType::Talk, 0, 0 ); + + eventMgr().playScene( player, eventId, 0, HIDE_HOTBAR, { 0 }, + [ & ]( Entity::Player& player, const Event::SceneResult& result ) + { + eventMgr().eventFinish( player, eventId, 1 ); + } ); + } +}; + +EXPOSE_SCRIPT( SmallTalk ); \ No newline at end of file