1.3 KiB
1.3 KiB
Function: StartDialogConversation(conversation, type, spawn, player, text, mp3, key1, key2, language, can_close)
Description: Begin a conversation with the Player from the Source Spawn with the previously established conversation options.
Parameters:
conversation
(Conversation) - Conversation object representingconversation
.type
(int32) - Integer valuetype
.item
(Item) - Item object representingitem
.player
(Spawn) - Spawn object representingplayer
.text
(string) - Stringtext
.mp3
(int32) - Integer valuemp3
.key1
(int32) - Integer valuekey1
.key2
(int32) - Integer valuekey2
.language
(int32) - Integer valuelanguage
.can_close
(bool) - Boolean flagcan_close
.
Returns: None.
Example:
-- From ItemScripts/abixieeye.lua
function examined(Item, Player)
local LnLAccept = GetRuleFlagFloat("R_World", "LoreAndLegendAccept")
if LnLAccept > 0 and not HasQuest(Player, LoreAndLegendBixie) and not HasCompletedQuest(Player, LoreAndLegendBixie) then
OfferQuest(nil, Player, LoreAndLegendBixie)
else
conversation = CreateConversation()
if HasQuest(Player, LoreAndLegendBixie) and GetQuestStepProgress(Player, LoreAndLegendBixie, 4)==0 then
AddConversationOption(conversation, "Begin to study...", "Step_Complete")
end