EventScripts Forums
Mattie's EventScripts and Source Forums
Mattie recommends...
Premier Sponsor:Platinum Sponsor:
 
Script Categories
addon (49) admin (269) admins (14) advert (15) adverts (19) afk (15) alerts (12) ammo (23) anti (15) auth (16) automatic (12) awp (23) ban (18) ba_jail (17) bhop (19) block (19) bomb (40) bonus (23) bot (24) bot-management (19) bots (17) bunnyhop (11) Buy (21) cash (65) chat (57) cheat (11) clan (16) classes (22) color (21) colors (18) command (20) commands (18) config (22) connect (42) CS:S (16) css (2498) Damage (35) database (11) dead (15) death (19) deathmatch (70) deathrun (12) disconnect (18) Dissolve (11) dm (20) dod:s (11) dods (386) easy (17) effects (120) English (15) entity (21) es_tools (12) Eventscript (12) flashbang (25) français (99) french (36) fun (286) funny (16) Gabeee (11) gameplay (174) give (16) gravity (11) grenade (25) grenades (29) gun (14) GunGame (26) GunGame5 (11) guns (17) Hack (15) headshot (32) health (54) hegrenade (13) hl2dm (329) HP (13) info (48) information (16) jail (26) jailbreak (11) join (23) jump (12) kick (23) kill (44) kills (22) knife (57) leveling (36) management (14) mani (15) map (25) map-management (27) maps (15) match (17) menu (106) message (20) messaging (52) mod (109) model (14) models (32) money (42) motd (12) music (29) mute (18) nades (18) name (13) noblock (35) player (40) player-management (31) player-tracking (28) popup (55) props (23) protection (27) punishment (50) python (63) quake (18) radio (21) random (36) rank (35) rates (16) rcon (13) realism (21) respawn (61) restrict (36) round (20) rpg (24) rules (42) say (11) scout (19) Script (20) script-helper (25) scriptpack (33) sdk (149) server (44) server-tools (42) shop (12) silly (31) simple (27) skins (24) slay (13) soccer (11) sound (45) sounds (92) spawn (62) speed (25) statistics (13) stats (48) STEAMID (23) Superhero (13) surf (31) Team (25) team-balance (14) teleport (11) text (14) TF2 (143) time (17) timer (14) tools (15) tracers (17) triggers (11) uedi (18) uses_auth (18) utility (11) vip (11) vote (36) voting (22) war (20) wcs (24) wcs:Python (32) weapon (77) weapons (114) web (14) welcome (12) zm (24) zombie (90) zombiemod (51) zombies (11)
Script Authors
*XYZ*SaYnt (12) .:MiB:. (11) .eMko* (6) 101satoon101 (10) 3R10N (24) 4u571n91 (5) 7355608 (9) Absolute (8) Ace Rimmer (40) adminc (5) Adz (8) AgathaKnuppelkuh (8) aidden (8) ajax (5) ak_47 (6) Al3c Tr3v3lyan (6) allstareng (5) ashbash1987 (9) ATAMAH (7) aznone (5) B00M (5) BackRaw (41) BFH_RedBull (8) bigfabi (7) Bioko (7) Blade (10) bladesback (13) bobdole (11) bodzsar1 (8) bonbon (36) Brainsucker (30) cagemonkey (8) carbon-14 (10) CaskioUTF (5) cbirou (15) ChaCaLz2psy4 (5) CharlesT (5) Chrisber (5) chrismrulz (9) Chun (6) cladiron (10) clipz934 (8) Colster (21) Cookieman8 (7) craziest (10) DanielB (19) Darkness123 (8) Dave (9) dbozan99 (7) deathx9 (5) Deathyy (15) dhack (16) Di[M]aN (12) DoCky (27) Don (15) dordtcore (8) DragonFreddo (8) Drassil (5) Einlanzers (42) EmbouT (10) emilplov (7) Errant (10) Eun (6) Fantole (9) Franc1sco (9) freddukes (18) Frequency (6) Fulmine (5) GAMEREN2 (8) german9114 (13) GODJonez (38) GoodfellaDeal (5) Hansi (6) HitThePipe (7) HOLLDIDAY (9) Icetouch (6) ichthys (25) infamous1 (9) Jeff91 (45) JoeyT2006 (30) Juba_PornBorn (12) jxl180 (10) KDBFame (6) L'In20Cible (7) Largo Usagi (10) Lobe (11) loKkdoKk (7) lolo-le-haricot (7) LosNir (5) Lumpi@Work (9) M4rc3L-XCN (7) macshot (6) Matth (5) Mattie (20) MBchrono (15) McFly (20) Medda (5) Memphis-84 (10) Messiah93 (12) Mickyy (5) micmacx (6) Mitchell (5) Mordavolt (7) MrScriptaz (5) mryoung (6) Nicolous (26) ojii (31) Omega_K2 (6) Owned|Myself (8) P3N (7) pand3mic (5) parsimba (5) Pascal257 (9) PatPeter (7) PDrop (10) Phaedrus (18) PhantOm Fury (7) phoenix131 (8) pinkyyy -.- (5) pitbull0993 (7) randomknifer (9) Ratzee (6) ReaCtioN2oo9 (6) Rennnyyy (17) revolutionfighters (6) RideGuy (12) Rio (9) Roeliekt (6) runamagic (13) sandking220 (6) Sarcasm_Poisoning (10) saRs| Johnny-5 (13) Schubaal (10) sea212 (5) sega74rus (7) sgt.angel (6) sicilia (5) sicman_adrian (22) skillz92 (7) sn4k3 (18) snake38 (10) sonicsight (7) spoonman184 (8) stabby (22) stas (22) Strontium Dog (30) SumGuy14 (25) SuperDave (45) surfteam (5) TaCo (5) TanaToS (17) Tealk (6) teowow (16) TheCheeTaH (20) TheDonFather (5) theresthatguy (6) Tiny Tod (7) Totyahun (9) uedi (38) Undead (25) usernamesaretaken (15) Warren (13) westham (6) WhiteAvenger (7) Wonder (14) X-Mania (5) XE_ManUp (13) xfalcon61 (5) zSweetXz (5) [Cs]Lord_Inferno2 (11) [NATO]Hunter (28) ||Wolf|| (10)
Search

Post new topic Reply to topic
Go to page 1, 2, 3, 4, 5 ... 16  Next
Author Message
User avatar
Web Hotshot
Web Hotshot
Profile

Posts: 478
Location:
Darlington, UK

Steam Friends Name: ashbash1987
 
New postPosted: 2008-11-25, 4:26 pm 
   Post subject: [v3.0.0 RC1] Make-Your-Own Achievements

Image

Make-Your-Own Achievements v3.0.0 RC1

RequirementsInformation

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 !achievements 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!

Download:Installation of myo_achievement
  • Download *.zip, extract all to your game directory, e.g. cstrike.
  • Add es_load myo_achievement to your autoexec.cfg file.
  • Run / restart your server.
  • Edit the configuration variables in addons/eventscripts/myo_achievement/config.cfg.
  • Restart your server again.
  • Enjoy!
(Note: 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 es_load myo_basics to your autoexec.cfg to ensure myo_basics is loaded.)

Installation of MYOA Web
  • Copy the web directory from the *.zip file to where ever you want to have the MYOA Web site.
  • Edit config.inc.php to the values associated to the MySQL database you have set up.
  • Goto http://yourdomainname.com/path/to/myoa/install/install.php. Follow the steps in the install wizard.
  • Once the install wizard is complete, remove the install directory (so that no-one can reinstall the MYOA system and change the admin password etc).
  • Goto http://yourdomainname.com/path/to/myoa/admin/ and login to make sure you have access to the admin panel.
  • Done!
(Note: 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.)

MYOA Interface Reference (information for scripters)

If you are using Python, you can take advantage of the Python scripting system, and you can easily import all of the MYOA interface by doing:
PYTHON:
    es.load("myo_achievement")
    achievementManager = es.import_addon("myo_achievement")

Now you can use the achievementManager reference to do all of the achievement handling!

If you are using ES Classic, load the addon by putting the following in your script:
ES:
    es_load myo_achievement

You can then use the console commands to communicate with MYOA.

Here is a run-down of the exposed interface functions to ESPY / ESClassic:
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.]

There are also 3 events that get triggered by MYOA which you can use:
  • achievement_achieved - Fires when a player completes an achievement.
  • achievement_unachieved - 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).
  • achievement_reset - Fires when a player's progress of an achievement is reset.
The event_vars that get returned from these events are:
  • achievementgroupid (String) - ID of the achievement group.
  • achivementid (String) - ID of the achievement.
  • playerid (String) - Player ID of the player.
Here is an example script using MYOA in Python:
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)


Addons currently using MYOA

Be sure to woot if you like this, and also let me know when you create an addon using this, so I can add it to the above list :D:D

Please Note: If you want MYOA support for an addon you are already using, it would be best to contact the original addon author to ask if they would want to add MYOA achievements to it. Please do not contact me with existing script files that you wish me to modify for adding MYOA achievements to (unless I was the original author of the script :)).


Last edited by ashbash1987 on 2009-10-10, 7:16 am, edited 21 times in total.




User avatar
Newbie
Profile

Posts: 62
Location:
Romania
 
New postPosted: 2008-11-25, 4:30 pm 

what is this?

_________________
Image


User avatar
Web Hotshot
Web Hotshot
Profile

Posts: 478
Location:
Darlington, UK

Steam Friends Name: ashbash1987
 
New postPosted: 2008-11-25, 4:31 pm 

[Cs]Lord_Inferno2 wrote:
what is this?

This is an addon that allows other ES Scripters to add an achievements system to their own addons. Did I not make it clear enough in the first post :? ?

_________________
A Test ESTuts Website: http://estuts.com


User avatar
Professor
Professor
Profile

Posts: 1877
Location:
Erionville
 
New postPosted: 2008-11-25, 5:55 pm 

Woot, (He didn't read the first post)

_________________
Image

Nacht der lebenden Toten


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12890
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2008-11-25, 6:11 pm 

Very cool, +woot!

(It's fun to see the question-answer-addon progression :) )

_________________
Image
EventScripts Wiki --- #eventscripts --- Python.org --- es_install FAQ


User avatar
Guru
Guru
Profile

Posts: 1445
Location:
Toronto
 
New postPosted: 2008-11-26, 9:58 am 

This is awesome! +woot!

You might want to add to your example the events that are fired.


RideGuy


User avatar
Web Hotshot
Web Hotshot
Profile

Posts: 478
Location:
Darlington, UK

Steam Friends Name: ashbash1987
 
New postPosted: 2008-11-26, 10:07 am 

RideGuy wrote:
This is awesome! +woot!

You might want to add to your example the events that are fired.


RideGuy

:oops: :oops: Oops, forgot to mention those! I knew that I would forget something of importance.

Events that get fired:

- achievement_achieved
- achievement_unachieved
- achievement_reset

The event_vars that get returned from these events are:

- achievementgroupid - (String) ID of the achievement group.
- achivementid - (String) ID of the achievement.
- playerid - (String) Player ID of the player.

I'll modify the top post and example later.

_________________
A Test ESTuts Website: http://estuts.com


User avatar
Web Hotshot
Web Hotshot
Profile

Posts: 478
Location:
Darlington, UK

Steam Friends Name: ashbash1987
 
New postPosted: 2008-11-26, 8:06 pm 

Do I believe my eyes?!? 5 woots already?!? :shock: :shock: And it's only been around for around-about 24 hours!! I am truly amazed!!

Also, if you can think of any extra bits and bobs I can add to this, then that would be great!

_________________
A Test ESTuts Website: http://estuts.com


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12890
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2008-11-27, 12:25 am 

ashbash1987 wrote:
- achievementgroupid - (String) ID of the achievement group.
- achivementid - (String) ID of the achievement.
- playerid - (String) Player ID of the player.
If those are integers wouldn't it make more sense to use short? To mention, ESP returns all event variables as strings and console variables (event and server) can be used as strings/integers/floats as they need to be so giving the type isn't necessary.

5 woots because your addon is cool :)

_________________
Image
EventScripts Wiki --- #eventscripts --- Python.org --- es_install FAQ


User avatar
Web Hotshot
Web Hotshot
Profile

Posts: 478
Location:
Darlington, UK

Steam Friends Name: ashbash1987
 
New postPosted: 2008-11-27, 9:45 am 

achievementgroupid and achievementid are strings to make it easier for scripters to recognise (readability-wise) which achievement group and achievement got triggered. All the IDs are basically unique short names for the achievement groups and achievements.

I suppose playerid could easily be a short value though.

_________________
A Test ESTuts Website: http://estuts.com


User avatar
Professor
Professor
Profile

Posts: 1877
Location:
Erionville
 
New postPosted: 2008-11-28, 8:53 am 

This is actually pretty cool once I figure it all out I will implement it into my upcoming mod.
Really good stuff ash.

Only if I could woot twice.

_________________
Image

Nacht der lebenden Toten


User avatar
Professor
Professor
Profile

Posts: 1877
Location:
Erionville
 
New postPosted: 2008-12-01, 3:25 am 

Well I everything but my weapons to work. It may be because there are 25 possible achievements IDK.

But this is my error(This comes when I say !achievements and I choose the achievementgroup in the popup):


PYTHON:
    Popuplib: Exception when calling function "getAchievements" for popup "achievementGroupsMenu":
    Traceback (most recent call last):
      File "c:\program files\steam\steamapps\3r01n\counter-strike source\cstrike\addons\eventscripts\_libs\python\popuplib.py", line 1886, in _call_func
        f(u,c,p)
      File "c:\program files\steam\steamapps\3r01n\counter-strike source\cstrike\addons\eventscripts\myo_achievement\myo_achievement.py", line 363, in getAchievements
        playerProgress = achievement.getPlayerProgress(es.getcmduserid())
    AttributeError: 'NoneType' object has no attribute 'getPlayerProgress'



EDIT:

This is the menu its show that I have completed the achievement but it won't let me go the menu.
http://i122.photobucket.com/albums/o260 ... ev0014.jpg

_________________
Image

Nacht der lebenden Toten


Last edited by 3R10N on 2008-12-01, 4:21 am, edited 1 time in total.

User avatar
Web Hotshot
Web Hotshot
Profile

Posts: 478
Location:
Darlington, UK

Steam Friends Name: ashbash1987
 
New postPosted: 2008-12-01, 3:10 pm 

Yeh, I made a few school-boy errors. Hopefully v1.0.2 will solve it!

Changes for v1.0.2:
- Tweaked the popups.
- Attempt to remove the annoying exception.
- Tidies up the database on startup.

_________________
A Test ESTuts Website: http://estuts.com


User avatar
Professor
Professor
Profile

Posts: 1877
Location:
Erionville
 
New postPosted: 2008-12-01, 8:33 pm 

Works like a charm ashbash.

I can even see information about the achievement when I haven't achieved it.

No problems on the server or on my listen

_________________
Image

Nacht der lebenden Toten


User avatar
Web Hotshot
Web Hotshot
Profile

Posts: 478
Location:
Darlington, UK

Steam Friends Name: ashbash1987
 
New postPosted: 2008-12-01, 11:13 pm 

Hmm... that's odd. Can you post or PM me the code you are using which is MYOA-related? I haven't seen that happen before, and I wouldn't think it would be to do with limitations of number of achievements.

_________________
A Test ESTuts Website: http://estuts.com


User avatar
Professor
Professor
Profile

Posts: 1877
Location:
Erionville
 
New postPosted: 2008-12-01, 11:51 pm 

PYTHON:
    import es, playerlib



    es.load("myo_achievement")

    achievementManager = es.import_addon("myo_achievement")

       

    nold_zkillAchievements = achievementManager.AchievementGroup("NOLD Kill Achievements", "NOLD - Kills", "The achievements for killing zombies.")

    nold_zkillAchievements["nold_zkills_1"] = ("Never to late to start", "Kill 10 zombies.", 10)

    nold_zkillAchievements["nold_zkills_2"] = ("Goodnight and Goodbye", "Kill 100 zombies.", 100)

    nold_zkillAchievements["nold_zkills_3"] = ("It doesnt stop", "Kill 500 zombies.", 500)

    nold_zkillAchievements["nold_zkills_4"] = ("Trigger Happy", "Kill 1000 zombies.", 1000)

    nold_zkillAchievements["nold_zkills_5"] = ("Exceding above standards", "Kill 2000 zombies.", 2000)

    nold_zkillAchievements["nold_zkills_6"] = ("Above and Beyond", "Kill 5000 zombies.", 5000)

    nold_zkillAchievements["nold_zkills_7"] = ("Zombies? What Zombies?", "Kill 10000 zombies.", 10000)



    nold_zsurviveAchievements = achievementManager.AchievementGroup("NOLD Survival Achievements", "NOLD - Survival", "The achievements for survival waves.")

    nold_zsurviveAchievements["nold_survive_1"] = ("At least one", "Survive through the first wave", 1)

    nold_zsurviveAchievements["nold_survive_2"] = ("Forty isnt enough", "Survive through the fifth wave.", 5)

    nold_zsurviveAchievements["nold_survive_3"] = ("Big Ten", "Survive through the tenth wave.", 10)

    nold_zsurviveAchievements["nold_survive_4"] = ("Survivalist", "Survive through wave twenty.", 20)

    nold_zsurviveAchievements["nold_survive_5"] = ("When enough isnt enough", "Survive through wave twenty-five.", 25)

    nold_zsurviveAchievements["nold_survive_6"] = ("Exceding expectations", "Survive through thirty waves.", 30)

    nold_zsurviveAchievements["nold_survive_7"] = ("Better than 320", "Survive through forty waves.", 40)

    nold_zsurviveAchievements["nold_survive_8"] = ("Topping 400", "Survive through fifty waves.", 50)



    nold_zlastmanAchievements = achievementManager.AchievementGroup("NOLD Last Man Standing Achievements", "NOLD - Last Man Standing", "The achievements for being the last man standing.")

    nold_zlastmanAchievements["nold_lastman_1"] = ("Last man Standing", "Be the last man standing once.", 1)

    nold_zlastmanAchievements["nold_lastman_2"] = ("1 + 4", "Be the last man standing five times.", 5)

    nold_zlastmanAchievements["nold_lastman_3"] = ("The one and only", "Be the last man standing twenty-five times.", 25)

    nold_zlastmanAchievements["nold_lastman_4"] = ("Cant knock me down", "Be the last man standing fifty times.", 50)

    nold_zlastmanAchievements["nold_lastman_5"] = ("Foot full of lead", "Be the last man standing one-hundred times.", 100)



    nold_zweaponAchievements = achievementManager.AchievementGroup("NOLD Weapon Achievements", "NOLD - Weapons", "The achievements for your weapons.")

    nold_zweaponAchievements["nold_pistol_1"] = ("Cup full of 9mm", "Kill fifty zombies with a pistol.", 50)

    nold_zweaponAchievements["nold_pistol_2"] = ("Small, But deadly", "Kill one-hundred zombies with a pistol.", 100)

    nold_zweaponAchievements["nold_pistol_3"] = ("Ive got a sidearm", "Kill two-hundred zombies with a pistol.", 200)

    nold_zweaponAchievements["nold_pistol_4"] = ("Mini-Bruiser", "Kill five-hundred zombies with a pistol", 500)

    nold_zweaponAchievements["nold_pistol_5"] = ("PISTOL-WHIPPED", "Kill one-thousand zombies with a pistol.", 1000)



    nold_zweaponAchievements["nold_shotgun_1"] = ("Up Close and Personal", "Kill fifty zombies with a shotgun.", 50)

    nold_zweaponAchievements["nold_shotgun_2"] = ("Slugger", "Kill one-hundred zombies with a shotgun.", 100)

    nold_zweaponAchievements["nold_shotgun_3"] = ("Spread out", "Kill two-hundred zombies with a shotgun.", 200)

    nold_zweaponAchievements["nold_shotgun_4"] = ("Blow back", "Kill five-hundred zombies with a shotgun", 500)

    nold_zweaponAchievements["nold_shotgun_5"] = ("Down a gauge", "Kill one-thousand zombies with a shotgun.", 1000)



    nold_zweaponAchievements["nold_smg_1"] = ("Small and fast", "Kill fifty zombies with a SMG.", 50)

    nold_zweaponAchievements["nold_smg_2"] = ("Max is 100", "Kill one-hundred zombies with a SMG.", 100)

    nold_zweaponAchievements["nold_smg_3"] = ("Range is minor", "Kill two-hundred zombies with a SMG.", 200)

    nold_zweaponAchievements["nold_smg_4"] = ("Pistol meet Rifle", "Kill five-hundred zombies with a SMG", 500)

    nold_zweaponAchievements["nold_smg_5"] = ("Knock em down", "Kill one-thousand zombies with a SMG.", 1000)



    nold_zweaponAchievements["nold_rifle_1"] = ("Bang Bang", "Kill fifty zombies with a rifle.", 50)

    nold_zweaponAchievements["nold_rifle_2"] = ("Bigger than 90", "Kill one-hundred zombies with a rifle.", 100)

    nold_zweaponAchievements["nold_rifle_3"] = ("Automatic Death", "Kill two-hundred zombies with a rifle.", 200)

    nold_zweaponAchievements["nold_rifle_4"] = ("Shoot, aim, repeat", "Kill five-hundred zombies with a rifle", 500)

    nold_zweaponAchievements["nold_rifle_5"] = ("Pure perfection", "Kill one-thousand zombies with a rifle.", 1000)



    nold_zweaponAchievements["nold_sniper_1"] = ("Far Far Away", "Kill fifty zombies with a sniper.", 50)

    nold_zweaponAchievements["nold_sniper_2"] = ("What a distance", "Kill one-hundred zombies with a sniper.", 100)

    nold_zweaponAchievements["nold_sniper_3"] = ("Zoom Zoom Zoom", "Kill two-hundred zombies with a sniper.", 200)

    nold_zweaponAchievements["nold_sniper_4"] = ("Campers This Way", "Kill five-hundred zombies with a sniper", 500)

    nold_zweaponAchievements["nold_sniper_5"] = ("Never miss a beat", "Kill one-thousand zombies with a sniper.", 1000)



    def round_start(ev):

            es.msg('#multi', 'Say#green !achievements#default to show the achievement menu.')

           

    def player_death(ev):

            if ev['es_attackerteam'] != ev['es_userteam']:

                    if ev['es_userteam'] == '2':

                            for nold_achieved in ("nold_zkills_1", "nold_zkills_2", "nold_zkills_3", "nold_zkills_4", "nold_zkills_5", "nold_zkills_6", "nold_zkills_7"):

                                    nold_zkillAchievements[nold_achieved].stepProgressForPlayer(ev['attacker'])

                       

                            if ev['weapon'] in ("glock", "usp", "p228", "deagle", "elite", "fiveseven"):

                                    for nold_achieved in ("nold_pistol_1", "nold_pistol_2", "nold_pistol_3", "nold_pistol_4", "nold_pistol_5"):

                                            nold_zweaponAchievements[nold_achieved].stepProgressForPlayer(ev['attacker'])



                            elif ev['weapon'] in ("m3", "xm1014"):

                                    for nold_achieved in ("nold_shotgun_1", "nold_shotgun_2", "nold_shotgun_3", "nold_shotgun_4", "nold_shotgun_5"):

                                            nold_zweaponAchievements[nold_achieved].stepProgressForPlayer(ev['attacker'])

                                           

                            elif ev['weapon'] in ("tmp", "mac10", "mp5navy", "ump45", "p90"):

                                    for nold_achieved in ("nold_smg_1", "nold_smg_2", "nold_smg_3", "nold_smg_4", "nold_smg_5"):

                                            nold_zweaponAchievements[nold_achieved].stepProgressForPlayer(ev['attacker'])



                            elif ev['weapon'] in ("galil", "famas", "ak47", "m4a1", "sg552", "aug"):

                                    for nold_achieved in ("nold_rifle_1", "nold_rifle_2", "nold_rifle_3", "nold_rifle_4", "nold_rifle_5"):

                                            nold_zweaponAchievements[nold_achieved].stepProgressForPlayer(ev['attacker'])



                            elif ev['weapon'] in ("scout", "awp", "sg550", "g3sg1"):

                                    for nold_achieved in ("nold_sniper_1", "nold_sniper_2", "nold_sniper_3", "nold_sniper_4", "nold_sniper_5"):

                                            nold_zweaponAchievements[nold_achieved].stepProgressForPlayer(ev['attacker'])

                                           

                    elif ev['es_userteam'] == '3':

                            if es.getlivingplayercount(3) == 1:

                                    for nold_uid in playerlib.getUseridList('#ct,#alive'):

                                            for nold_achieved in ("nold_lastman_1", "nold_lastman_2", "nold_lastman_3", "nold_lastman_4", "nold_lastman_5"):

                                                    nold_zlastmanAchievements[nold_achieved].stepProgressForPlayer(nold_uid)

_________________
Image

Nacht der lebenden Toten


User avatar
Professor
Professor
Profile

Posts: 1877
Location:
Erionville
 
New postPosted: 2008-12-02, 12:32 am 

That is odd its working now for a real dedicated server, it may just have been my popuplib version, I will update my server.

_________________
Image

Nacht der lebenden Toten


User avatar
Web Hotshot
Web Hotshot
Profile

Posts: 478
Location:
Darlington, UK

Steam Friends Name: ashbash1987
 
New postPosted: 2008-12-02, 12:40 am 

That code you've supplied looks ok and should work fine.

Btw, I saw that your last-man-standing achievements use playerlib to get a list of players, and then you use that list (of one person) to step the progress. You can instead use the stepProgressForList() function and give it "#ct,#alive", and it will do exactly the same thing (it uses the playerlib filters directly).

_________________
A Test ESTuts Website: http://estuts.com


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 285 posts ]  Go to page 1, 2, 3, 4, 5 ... 16  Next


Who is online

Users browsing this forum: Gippo and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group