Jump to content

Undead2014

Inactive Member
  • Posts

    28
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by Undead2014

  1. 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

     

×
×
  • Create New...

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.