Skip to main content

parse_dialogue_to_lua

Function parse_dialogue_to_lua 

Source
pub fn parse_dialogue_to_lua(content: &str) -> Result<String>
Expand description

Parse dialog data from a .s2s file and generate a Lua table as a string.

Dialog files have this structure:

page=<name>
title=<NPC Name>
text=start
<dialog text>
text=end
button=<target>,<button text>
trade=start
sell=<item_id>,<count>
buy=<item_id>,<count>
trade=end