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 (11) awp (23) ban (18) ba_jail (17) bhop (19) block (18) 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 (2513) Damage (36) database (11) dead (15) death (19) deathmatch (70) deathrun (12) disconnect (18) Dissolve (11) dm (20) dod:s (11) dods (389) easy (18) effects (120) English (15) entity (21) es_tools (12) Eventscript (12) flashbang (25) français (99) french (36) fun (288) 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 (55) hegrenade (13) hl2dm (332) HP (13) info (48) information (16) IP (11) jail (26) jailbreak (11) join (23) jump (12) kick (22) kill (44) kills (22) knife (57) leveling (36) management (14) mani (14) map (25) map-management (27) maps (15) match (17) menu (106) message (20) messaging (52) mod (109) model (14) models (32) money (42) motd (13) music (29) mute (17) nades (18) name (13) noblock (35) player (40) player-management (31) player-tracking (28) popup (56) props (23) protection (27) punishment (49) 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 (41) say (11) scout (19) Script (20) script-helper (25) scriptpack (33) sdk (151) server (44) server-tools (42) shop (12) silly (31) simple (27) skins (25) slay (13) soccer (11) sound (45) sounds (92) spanish (11) spawn (63) speed (25) statistics (13) stats (48) status (11) STEAMID (24) Superhero (13) surf (31) Team (25) team-balance (14) teleport (12) text (14) TF2 (143) time (17) timer (14) tools (15) tracers (17) triggers (11) uedi (18) uses_auth (18) utility (11) vip (12) 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 (16) 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 (10) 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 (6) 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 (9) Owned|Myself (8) P3N (7) pand3mic (5) parsimba (5) Pascal257 (9) PatPeter (7) PDrop (10) Phaedrus (18) PhantOm Fury (7) phoenix131 (9) 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) Snake12 (7) 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 ... 7  Next
Author Message
User avatar
Regular
Profile

Posts: 197
Location:
Over There.
 
New postPosted: 2008-05-24, 6:58 am 
   Post subject: Trophies

Trophies v2.0
Posted by: bobdole on 2008-05-24 07:43:40.

Requirements:Description:
    Players can now claim a trophy from a dead players body, adding to their collection.

    Who can collect the most?

    A player can see the Top 10 trophy hunters by typing : 'ttop10' into chat.
    They can also see how many trophies they themselves have collected by typing : 'trophies' into chat.
    To claim a trophy, all a player has to do is bind a key to 'claim' and press their bound key whilst standing next to a trophy-marker.
    A player can now type 'trank' into chat to message their rank to the server, even if they are not currently in the top10 listing.
    A player can now also type 'tstats' to see a popup with their current trophy count, their current rank and the amount of trophies they need to overtake the person above them on the ranking ladder.
Download: Installation:
    Unzip directly into your /cstrike/ folder.
    Add "es_load trophies" to your autoexec.cfg.
    You're all done!
    Happy hunting!
Version Notes:
  • v2.0 - Big jump to 2.0, but with good cause. I have added an external config file that will obviously gain more options as the script progresses. For now, these changes have been made:

    'trophies_claimdistance' - The distance in game units that a player must be within to claim a trophy.

    'trophies_spectatorclaim' - If set to 1, dead or spectating players can claim trophies.


Last edited by bobdole on 2008-06-04, 4:17 am, edited 8 times in total.




User avatar
Guru
Guru
Profile

Posts: 1268
 
New postPosted: 2008-05-24, 7:20 am 

Looks good, +woot.

But, you don't seem to remove or clear the list_markers array after you have drawn the trophy. So, wouldn't you just be drawing the trophies over and over again needlessly?


User avatar
Regular
Profile

Posts: 197
Location:
Over There.
 
New postPosted: 2008-05-25, 12:04 am 

In answer to your query, the reason I have chosen to continuosly draw the markers is because I can therefore change the colour, making them stand out, and because if I drew them permanently, they would cause tremendous lag to the host server.
When drawing the trophy-markers, effectLib cycles through the list_markers list and places a marker accordingly. If a player is close enough to claim a trophy, that trophy-marker is then removed from the list, therefore no longer placed.

_________________
Image
ImageSo True..
GIVE THEM LIFE!


Last edited by bobdole on 2008-05-25, 2:19 am, edited 2 times in total.

User avatar
Mentat
Mentat
Profile

Posts: 4727
Location:
C:/ProgramFiles/Bonbon/Bonbon.exe
 
New postPosted: 2008-05-25, 12:08 am 

Nice work! I seem to remember something like this requested, no?

anyways, +wewt

_________________
SicmanAdrian wrote:
I don't think it is possible but maybe SuperDave could try?

abcdefghijklmnopqrstuvwxyz
"It doesn't work" doesn't help us out, help us help you, be more specific!
Remember, when posting non Python code, post in the ES 1.x discussion forum, you'll get better help!
SuperDave wrote:
It's very difficult to see errors in that script because it is some of the worst looking code I have ever seen. And I've seen bonbon's code

Please do not PM for free private scripts/help!


User avatar
Regular
Profile

Posts: 197
Location:
Over There.
 
New postPosted: 2008-05-25, 1:49 am 

I don't know about it being requested, but I've always wanted to do it, and now that I'm using Python, it was a fair sight easier than doing it in ESS.

_________________
Image
ImageSo True..
GIVE THEM LIFE!


User avatar
New User
Profile

Posts: 5
 
New postPosted: 2008-05-25, 2:39 am 

You can collect trophies when you are spectator. You can just fly around the map and collect trophies, please FIX that?


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2008-05-25, 2:46 am 

Excellent idea! I'd really love to see some screenshots :)

A few tips:
PYTHON:
            if not dict_players.has_key(steamid):

                    dict_players[steamid] = int(0)
0 is already an integer without int(...).

This:
PYTHON:
    if not len(list_markers) == 0:
Could be:
PYTHON:
    if len(list_markers) != 0:
Or:
PYTHON:
    if len(list_markers):
Or:
PYTHON:
    if list_markers:
Empty lists are False and populated lists are True.

You did a good job trying to sort this list:
PYTHON:
            i = dict_players.items()

            i.sort(sorter)

            i.reverse()
The sort method takes a reverse keyword which can save you a step:
PYTHON:
            i = dict_players.items()

            i.sort(sorter, reverse=True)
I prefer the sorted built-in function which creates a new list instead of sorting an existing list in place:
PYTHON:
    i = sorted(dict_players.items(), sorter, reverse=True)


I'd probably end up using this:
PYTHON:
    i = sorted(dict_players.items(), key=lambda x: x[1], reverse=True)

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


User avatar
Helper
Profile

Posts: 288
 
New postPosted: 2008-05-25, 9:06 am 

Whoah this is awesome!! :D goes great with zombie mod! lol

A few ideas

1) fix the spectator bug lol
2) make the trophy a glowing skull or something?


User avatar
Helper
Profile

Posts: 288
 
New postPosted: 2008-05-25, 11:28 pm 

Also, overnight all the trophies that everyone had collected seem to reset....what's up with that?


User avatar
Professor
Professor
Profile

Posts: 2376
Location:
I Come From a Land Down Under
 
New postPosted: 2008-05-26, 2:45 am 

to make the trophy a skull u will need to go to venjax emote script(no link SD?)and follow how to make your own.


User avatar
Helper
Profile

Posts: 288
 
New postPosted: 2008-05-26, 4:00 am 

can't you just change the glowing circle to a skull?


User avatar
Professor
Professor
Profile

Posts: 2376
Location:
I Come From a Land Down Under
 
New postPosted: 2008-05-26, 4:03 am 

U will need a model or material to create some thing like that


User avatar
Regular
Profile

Posts: 197
Location:
Over There.
 
New postPosted: 2008-05-26, 4:27 am 

Hey guys, thanks for posting on the thread, and yes, I have fixed that insanely obvious bug of being able to claim in spectator..sorry all for missing that. I was toying with the idea of looking through SD's CheapEmote to learn how he did the emoting, then simply replicate it with a skull model, with proper credit of course, but got caught up in the whole coding of the script.

_________________
Image
ImageSo True..
GIVE THEM LIFE!


User avatar
Helper
Profile

Posts: 288
 
New postPosted: 2008-05-26, 4:38 am 

Ah ok great, so there is a new version released that fixes the spec bug?

So you're going to work on the skull model?


User avatar
Regular
Profile

Posts: 197
Location:
Over There.
 
New postPosted: 2008-05-26, 4:46 am 

Also, teh_l33tz0r, I would have absolutely no clue as to why your trophy count would be resetting like that. I have not experienced that issue myself, and don't know quite what to make of it.

_________________
Image
ImageSo True..
GIVE THEM LIFE!


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12911
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2008-05-26, 4:47 am 

Just to mention, I'd use the original Emote as reference even though it's in ESS. It's quite honestly more stable on more servers ATM.

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


User avatar
Regular
Profile

Posts: 197
Location:
Over There.
 
New postPosted: 2008-05-26, 4:50 am 

Oh yes, I'm about to post the spec-bug fixed version, and I am thinking of changing the model yes, but that might take a while, as I am planning on adding some sort of rank command to the script as well, and that would definitely take priority.

_________________
Image
ImageSo True..
GIVE THEM LIFE!


User avatar
Helper
Profile

Posts: 288
 
New postPosted: 2008-05-26, 4:51 am 

of course, but please please fix this reset bug...i don't know how and when it's h appening but the amount of trophies people have keep restting to 0


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


Who is online

Users browsing this forum: Logifl3x 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