Jump to content
  • 0

AG_CHATTING Achievement


Fenril

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  11/26/13
  • Last Seen:  

Hi all,

I have two questions.

1. How to replace these special characters?
image.thumb.png.0bddff321b6a979aa0c17b8a0e3ee83f.png

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.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...