Addon Details

Watch - Add Favorite


Make-Your-Own Achievements ScreenShot

1 out of 1 users claim this version works for them.
Does this version work for you?
46
w00ts
w00t!2

Make-Your-Own Achievements - Version v3.0.0 RC2

posted on 2008-11-25 15:49:44
by ashbash1987



Description

[color=blue][size=18][b]Information[/b][/size][/color] This is a new achievements addon, which allows all other ES scripters to add achievements to their addons! This is an all-in-one achievements manager, with a very easy-to-use script interface, and also automatically provides a simple UI for people to see what achievements they have got! Just say [b]!achievements[/b] to bring up a popup with all of the current achievements on the server, and also quickly see how many you have finished, and what progress they are at. This addon really does allow you to "Make-Your-Own Achievements" :) :)! This package also comes with some basic achievements to get you started!

Installation

[color=blue][size=18][b]Installation of myo_achievement[/b][/size][/color][list][*]Download *.zip, extract all to your game directory, e.g. [b]cstrike[/b]. [*]Add [b]es_load myo_achievement[/b] to your [b]autoexec.cfg[/b] file. [*]Run / restart your server. [*]Edit the configuration variables in [b]addons/eventscripts/myo_achievement/config.cfg[/b]. [*]Restart your server again. [*]Enjoy![/list] [i]([b]Note[/b]: myo_basics comes with this package. Ensure that both myo_achievement and myo_basics are present in the /addons/eventscripts/ folder if you want to use myo_basics, and add [b]es_load myo_basics[/b] to your autoexec.cfg to ensure myo_basics is loaded.)[/i] [color=blue][size=18][b]Installation of MYOA Web[/b][/size][/color][list][*]Copy the web directory from the *.zip file to where ever you want to have the MYOA Web site. [*]Edit [b]config.inc.php[/b] to the values associated to the MySQL database you have set up. [*]Goto http://yourdomainname.com/path/to/myoa[b]/install/install.php[/b]. Follow the steps in the install wizard. [*]Once the install wizard is complete, remove the [b]install[/b] directory (so that no-one can reinstall the MYOA system and change the admin password etc). [*]Goto http://yourdomainname.com/path/to/myoa[b]/admin/[/b] and login to make sure you have access to the admin panel. [*]Done![/list] [i]([b]Note[/b]: If you are using the MySQL via PHP (WGET) method of storage, you will also need to setup the list of servers to work with, so that the PHP page can correctly identify and RCON to your game server(s). To do this, go to your admin page.)[/i] [color=blue][size=18][b]MYOA Interface Reference[/b] [i](information for scripters)[/i][/size][/color] [b]If you are using [color=red]Python[/color][/b], you can take advantage of the Python scripting system, and you can easily import all of the MYOA interface by doing: [syntax="python"]es.load("myo_achievement") achievementManager = es.import_addon("myo_achievement")[/syntax] Now you can use the achievementManager reference to do all of the achievement handling! [b]If you are using [color=green]ES Classic[/color][/b], load the addon by putting the following in your script: [syntax="es"]es_load myo_achievement[/syntax] You can then use the console commands to communicate with MYOA. Here is a run-down of the exposed interface functions to ESPY / ESClassic: [syntax="python"]#Adds an achievement group to the achievement manager, and returns the AchievementGroup reference. PY: achievementManager.AddAchievementGroup(groupid, groupname, groupdescription) ES: myoa_add_group groupid groupname groupdescription #Returns the Achievement reference according to achievementID, if available. PY: achievementGroup[achievementid] ES: -- #Creates and sets an Achievement to the AchievementGroup. PY: achievementGroup[achievementid] = (achievementname, achievementdescription, totalprogress = 1) ES: myoa_add_achievement groupid achievementid achievementname achievementdescription [totalprogress = 1] #Returns a dictionary of achievements in this achievementGroup. PY: achievementGroup.GetAchievements() ES: -- #Steps the progress for the player of given playerid. PY: achievement.stepProgressForPlayer(playerid, stepamount = 1) ES: myoa_step_progress_player groupid achievementid playerid [stepamount = 1] #Steps the progress for players that are filtered by playerfilter (used as playerlib filter). PY: achievement.stepProgressForList(playerfilter, stepamount = 1) ES: myoa_step_progress_list groupid achievementid listfilter [stepamount = 1] #Steps the progress for all active players on the server. PY: achievement.stepProgressForAllActive(stepamount = 1) ES: myoa_step_progress_all groupid achievementid [stepamount = 1] #Finishes the progress for the player of given playerid. PY: achievement.completeProgressForPlayer(playerid) ES: myoa_complete_progress_player groupid achievementid playerid #Finishes the progress for players that are filtered by playerfilter (used as playerlib filter). PY: achievement.completeProgressForList(playerfilter) ES: myoa_complete_progress_list groupid achievementid listfilter #Finishes the progress for all active players on the server. PY: achievement.completeProgressForAllActive() ES: myoa_complete_progress_all groupid achievementid #Resets the progress for the player of given playerid. PY: achievement.resetProgressForPlayer(playerid) ES: myoa_reset_progress_player groupid achievementid playerid #Resets the progress for players that are filtered by playerfilter (used as playerlib filter). PY: achievement.resetProgressForList(playerfilter) ES: myoa_reset_progress_list groupid achievementid listfilter #Resets the progress for all active players on the server. PY: achievement.resetProgressForAllActive() ES: myoa_reset_progress_all groupid achievementid #Returns the current progress for the player of given playerid. PY: achievement.getPlayerProgress(playerid) ES: myoa_get_player_progress groupid achievementid playerid [Get the value of 'myoa_player_progress' after running for the returned value.] #Returns True if the player of given playerid has finished the achievement. PY: achievement.isPlayerCompleted(playerid) ES: myoa_is_player_completed groupid achievementid playerid [Get the value of 'myoa_player_complete' after running for the returned value.][/syntax] There are also 3 events that get triggered by MYOA which you can use:[list][*][b]achievement_achieved[/b] - Fires when a player completes an achievement. [*][b]achievement_unachieved[/b] - Fires when a player un-completes an achievement (i.e. did complete it, but then does something to warrant negative achievement progress, and therefore un-completing it). [*][b]achievement_reset[/b] - Fires when a player's progress of an achievement is reset.[/list] The event_vars that get returned from these events are:[list][*][b]achievementgroupid[/b] (String) - ID of the achievement group. [*][b]achivementid[/b] (String) - ID of the achievement. [*][b]playerid[/b] (String) - Player ID of the player.[/list] Here is an example script using MYOA in Python: [syntax="python"]# == EXAMPLE ADDON =================== import es #This loads and imports the myo_achievement addon into achievementManager. es.load("myo_achievement") achievementManager = es.import_addon("myo_achievement") myAchievementGroup = achievementManager.AddAchievementGroup("testGroup", "Test Achievement Group", "This is a test achievement group.") myAchievementGroup["spawnAchievement"] = ("Spawn Achievement", "Spawn 10 times.", 10) myAchievementGroup["sayAchievement"] = ("Text Achievement", "Say 20 things.", 20) def player_spawn(ev): myAchievementGroup["spawnAchievement"].stepProgressForPlayer(ev["userid"]) def player_say(ev): myAchievementGroup["sayAchievement"].stepProgressForPlayer(ev["userid"]) def achievement_achieved(ev): if ev["achievementgroupid"] == "testGroup": es.tell(ev["playerid"], "You have completed the %s achievement!" % myAchievementGroup[ev["achievementid"]].name)[/syntax]

Version Notes For v3.0.0 RC2

Updated on: 2009-11-29 07:04:58 EST by ashbash1987 (View Zip Contents)
v3.0.0 RC2: - Loads of minor bugs fixed.

( Previous Versions )

Request a new feature

featurelist.org: http://featurelist.org/myoa