Jump to content
×
×
  • Create New...
  • 0

Achievementsystem Problem


Undead2014

Question

Hello,I install this system http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/3548446-release-achievementsystem.html

and I have this problem:

 
locale/romania/quest/achievementsystem.lua:5: unexpected symbol near `quest'
 
the quest(LUA):
 
-- Achievementsystem
-- Copyright (c) 2014 Yiv
-- Create: 2014/11/02 (YYYY/MM/DD)

quest achievementsystem begin
	state start begin
		when login or enter begin
			achievement.init()
			set_state(initalised)
		end
	end
	state initalised begin
		when login begin
			achievement.clientCommunication("shop", "q", q.getcurrentquestindex())
			achievement.login()
			achievement.initMob()
		end
		
		when button or info begin
			cmdchat("cqc_start")
			local itemPosition = input(cmdchat("cqc_get"))
			cmdchat("cqc_end")
			achievement.buyItem(tonumber(itemPosition))
		end
		
		when levelup begin
			local achievementInfo = achievement.getNextLevelAchievementInfo()
			if type(achievementInfo) ~= 'table' then return end
			achievement.clientCommunication("level_info", pc.get_level())
			if pc.get_level() >= achievementInfo[1] then
				achievement.increasePoints(achievementInfo[2])
				achievement.nextLevelAchievement()
			end
		end
		
		when kill with not npc.is_pc() begin
			local npcRace = npc.get_race()
			local achievementInfo = achievement.getMobAchievementInfo(npcRace)
			local npcInfo = achievement.getf(string.format("npc_info_%d", npcRace)) + 1
			if table.getn(achievementInfo) < npcInfo then return end
			achievementInfo = achievementInfo[npcInfo]
			local npcKills = achievement.getf(string.format("npc_kills_%d", npcRace)) + 1
			achievement.setf(string.format("npc_kills_%d", npcRace), npcKills)
			achievement.clientCommunication("mob_info", npcRace, npcKills)
			if npcKills >= achievementInfo[1] then
				achievement.increasePoints(achievementInfo[2])
				achievement.setf(string.format("npc_info_%d", npcRace), npcInfo)
			end
		end
	end
end

 

Link to comment
  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.