StartConversation(Conversation: Conversation, Spawn: Spawn, Spawn: Player, String: Text, String: MP3String, Int32: Key1, Int32: Key2, Int8: Language, Int8: CanClose)
Pre-Requisite(s)
- Needs previously created ConversationOption LUA Pointer with CreateConversation()
- Needs previously added AddConversationOption(..) to display selections for Player.
Parameter(s)
ConversationOption: Conversation - LUA Pointer for ConversationOption
Spawn: Spawn - Spawn that will be displaying the conversation.
Spawn: Player - Player that will be provided the conversation.
String: Text - "Say" bubble text that will be displayed along with the conversation options.
String: MP3String (OPTIONAL) - MP3 file with directory tree, eg. voiceover/english/../filename.mp3
Int32: Key1 (OPTIONAL) - First part of the 64-bit encryption key for the MP3 file.
Int32: Key2 (OPTIONAL) - Second part of the 64-bit encryption key for the MP3 file.
Int8: Language (OPTIONAL) - Require a Language, default is Common Tongue.
Return(s)
- None
Example(s)
– Taken from SpawnScripts/FarJourneyFreeport/HelmsmanNyles.lua
function hailed(NPC, Spawn)
local conversation = CreateConversation()
AddConversationOption(conversation, "Yes", "leave") – “Yes” is the selection for Player, “leave” is the function it calls
AddConversationOption(conversation, "No")
if GetClass(Spawn)>0 then
AddConversationOption(conversation, "Wait, I'm just a commoner.\n\n[CLASSIC CLASS CHANGE TO COMMONER].","Commoner")
end
StartConversation(conversation, NPC, Spawn, "Head for land?\n[Leave The Far Journey?]")
end
function leave(NPC, Spawn)
– determine next action when Player selects “Yes”
end
Result
Additional Notes