Fenril Posted April 1, 2020 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 10 Reputation: 0 Joined: 11/26/13 Last Seen: September 12, 2024 Share Posted April 1, 2020 Hi all, I have two questions. 1. How to replace these special characters? 2. How to increment this achievement by speaking in the city of Prontera for example? A particular npc must be present? A particular function? This is my information : achievement_db.yml Header: Type: ACHIEVEMENT_DB Version: 1 Body: - ID: 100000 Group: "AG_CHATTING" Name: "Test Speaking" Map: "prontera" Target: - Id: 0 Count: 1 Score: 10 achievement_list.lub achievement_tbl = { [100000] = { UI_Type = 1, group = "CHATTING", major = 4, minor = 1, title = "Prontera Test", content = { summary = "Test Prontera", details = "Test Speaking in Prontera", }, resource = { [1] = { text = "Test 1", count = 150, }, [2] = { text = "Test 2", count = 300, }, [3] = { text = "Test 3", count = 600, }, [4] = { text = "Test 4", count = 1200, }, [5] = { text = "Test 5", count = 2400, }, }, reward = { title = 1000, }, score = 20, } } function main() for achieveID, achieveInfo in pairs(achievement_tbl) do result, msg = InsertAchieveInfo(achieveID, achieveInfo.title, achieveInfo.content.summary, achieveInfo.content.details, achieveInfo.score) if not result then return false, msg end if nil ~= achieveInfo.resource then for index, resource in ipairs(achieveInfo.resource) do if nil ~= resource.shortcut then shortcut = resource.shortcut else shortcut = -1 end if 0 == achieveInfo.UI_Type then result, msg = InsertAchieveResource(achieveID, resource.text, 0, shortcut) elseif 1 == achieveInfo.UI_Type then result, msg = InsertAchieveResource(achieveID, resource.text, resource.count, shortcut) end if not result then return false, msg end end end if nil ~= achieveInfo.reward then if nil ~= achieveInfo.reward.item then result, msg = InsertAchieveRewardItem(achieveID, achieveInfo.reward.item) end if nil ~= achieveInfo.reward.title then result, msg = InsertAchieveRewardTitle(achieveID, achieveInfo.reward.title) if not result then return false, msg end end if nil ~= achieveInfo.reward.buff then result, msg = InsertAchieveRewardBuff(achieveID, achieveInfo.reward.buff) if not result then return false, msg end end end result, msg = InsertAchieveUIType(achieveID, achieveInfo.UI_Type, achieveInfo.group) if not result then return false, msg end result, msg = SetAchieveIDByTab(achieveID, achieveInfo.major, achieveInfo.minor) if not result then return false, msg end end return true, "good" end Thanks for reply. Quote Link to comment Share on other sites More sharing options...
Question
Fenril
Hi all,
I have two questions.
1. How to replace these special characters?
2. How to increment this achievement by speaking in the city of Prontera for example? A particular npc must be present? A particular function?
This is my information :
achievement_db.yml
achievement_list.lub
Thanks for reply.
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.