


1. Table of Contents
2. Description
3. Features
4. How to Install
5. Reserved Global Variables
6. Configuration
7. Limitations
8. Information
9. Addtional Information
10. Bit Code
11. More Achievements
12. Functions
13. Notes
14. Rules
15. Another MikuAuahDark Scripts


This LUA allows you to add a mission-like script. So it's similar of this

















1. Extract only achievements.txt to desired folder
2. Edit your code(NOT the achievements.txt) so it integrated to the script. Check achievements_int.txt for more information to link it
3. Make sure that the integrated code is loaded on server start. Add it to dofile list at server.lua
4. Run the script











(*) - This function is used internally for achievement script. Don't use it for your another scripts


Configuration variable is located at achievements.txt











This LUA Uses a bitwise system for the hook system. See Bit Code below
You can add more achievements by just using table.insert. See More Achievements below


This LUA uses a bitwise system to do some work, specially for the hook system. It only create new hook and function if the hook is not added.


Here is the format of the achievements
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
table.insert(Achievements.List,{	-- Simply use table.insert to Achievements.List table 	Name="Achievement Name", 	Desc="Achievement Description", 	Success="Message that shown when achievement is done", 	Variable="Table_name_to_use", 	CounterVariable="Variable_name_to_used_on_Variable", 	DefaultValue="Default value of CounterVariable", 	Used_Hooks=HOOK_BIT_VALUE, -- To use hook join, leave, and kill, then the value is "HOOK_KILL+HOOK_JOIN+HOOK_LEAVE"(without quotes) 	Hooks={ 		-- This is list of function to executed when specific event/hooks is triggered 		-- For example, we are using "HOOK_ATTACK and HOOK_DIE" on this achievements 		-- NOTE that the function doesn't handle return values. 		[HOOK_ATTACK]=function(aid,id)	-- The first parameter is always the achievement ID itself, to used on "Achievements.Functions.Done(aid,id)" function. The rest of the parameter is hook-specific 			-- Do something 		end, 		[HOOK_KILL]=function(aid,id,pl,wpn,x,y)	-- Remember, the first parameter always the achievement id itself. 			-- Do something 		end, 	} }





















































1. You should know it. The first place is always about feedbacks, bugs, post at comments.
2. It may need to set specific variable to allows it able to detecting if specific achievement is complete.
3. achievements_int.txt contains two example achievements. That file just used for testing only.



























Approved by Seekay
Download
4 kb, 491 Downloads