Author Topic: Map Ratings  (Read 4111 times)

0 Members and 1 Guest are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Map Ratings
« on: June 01, 2008, 08:13:12 pm »
Script Name: Map Ratings
Script Description: Allows people to rate maps. This can be used to have the public help you filture through a large quantity of maps, keeping the good ones and throwing away the bad ones.
Original Author: Curt (DorkeyDear)
Core Version: 2.6.3

Commands:
!rate <num> -- rates the current map with a number between 0 and 5
!rating -- gets the number of ratings and average rating for the current map
(admin) /clear <map> -- clears all ratings for a map; after deleting a map off of a server, you can clear the ratings of it easily.
« Last Edit: June 14, 2008, 01:00:03 pm by DorkeyDear »

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Map Ratings
« Reply #1 on: June 01, 2008, 09:18:40 pm »
Just what I needed  ;)

I have tested with only one player and it works a treat.
I see you didn't bother with the player names or dates... But that seems to have worked out better

You are definitely my favourite scripter.

On my server I use a basic/bot chat scripts I wrote and your !nextmap script and now this !rate script.

Well Done

Edit -- BTW your post says !rating.. in the script it's !ratings... Please remove extra s
Not much but I just tested with others and we all constantly wrote !rating instead of !ratings
« Last Edit: June 01, 2008, 09:24:59 pm by Frenchie »
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Map Ratings
« Reply #2 on: June 02, 2008, 05:17:08 am »
!rating and !ratings both work now.

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Map Ratings
« Reply #3 on: June 02, 2008, 08:49:10 am »
hey thats a nice script.. i could add this to my climb servers linked to the online stats :o
anyway, does it prevent people with the same nick from rating the same map twice? same IP?

Offline rumpel

  • Camper
  • ***
  • Posts: 410
Re: Map Ratings
« Reply #4 on: June 02, 2008, 12:44:09 pm »
maybe some infos that you can rate the map and whats the highest score (5) etc :<

Date Posted: June 02, 2008, 12:27:28 pm
eh if someone enters a - or , number the script crashs and gives this:
(19:43:18) [GKaliasMel-C] !ratings
(19:43:18) 
  • [Error] Ratings -> (OnPlayerSpeak): '281.168.157.156' is not a valid integer value

and dont show the rating
banned.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Map Ratings
« Reply #5 on: June 02, 2008, 02:30:19 pm »
eh if someone enters a - or , number the script crashs and gives this:
(19:43:18) [GKaliasMel-C] !ratings
(19:43:18) 
  • [Error] Ratings -> (OnPlayerSpeak): '281.168.157.156' is not a valid integer value

and dont show the rating

like "!rate -" or "!rate ,"?

Offline amb2010

  • Camper
  • ***
  • Posts: 264
  • Fear the dot ...
Re: Map Ratings
« Reply #6 on: June 02, 2008, 03:57:44 pm »
Im guessing he means like -5 or 1,000 also very nice script
And as the lyrics go in the United State's national anthem: "America, f**k YEAH!".

Offline rumpel

  • Camper
  • ***
  • Posts: 410
Re: Map Ratings
« Reply #7 on: June 03, 2008, 08:51:00 am »
yes like both,.. someone typed -3,333333 and fecked up the script with it ./
banned.

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: Map Ratings
« Reply #8 on: June 03, 2008, 09:00:56 am »
People will do everything to abuse bugs :(

Offline rumpel

  • Camper
  • ***
  • Posts: 410
Re: Map Ratings
« Reply #9 on: June 03, 2008, 09:18:33 am »
yeah :( just destroying the fun :/
banned.

Offline spkka

  • Camper
  • ***
  • Posts: 469
Re: Map Ratings
« Reply #10 on: June 03, 2008, 07:07:51 pm »
already told you on IRC but add it so most popular maps will be loaded first when the map changes or what ever. would be a nice extra feature to toggle on or off in my opinion!

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Map Ratings
« Reply #11 on: June 04, 2008, 02:56:47 am »
you could just use regexp  ::)
Code: [Select]
function GetValue(Num: string): byte;
begin
  if RegExpMatch('^[0-9]*$',Num) then
    Result := StrtoInt(Num)
  else if RegExpMatch('^(awful|horrible|bad|good|great|awesome)$',Num) then
    case LowerCase(Num) of
      'awful': Result := 0;
      'horrible': Result := 1;
      'bad': Result := 2;
      'good': Result := 3;
      'great': Result := 4;
      'awesome': Result := 5;
    end;

  if Result > 5 then Result := 5;
end;

Offline Sir Jeremy

  • Flagrunner
  • ****
  • Posts: 691
  • Eurolicous!
Re: Map Ratings
« Reply #12 on: June 04, 2008, 10:54:26 pm »
Lol that's pretty cool map raters mhm ;) Let's see how People Will like that.

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: Map Ratings
« Reply #13 on: June 05, 2008, 03:17:09 am »
People will do everything to abuse bugs :(
that is bad

 i quite like this script
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Map Ratings
« Reply #14 on: June 05, 2008, 05:08:45 am »
I think I fixed it...
You may need to clear your list.txt file.

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Map Ratings
« Reply #15 on: June 05, 2008, 05:48:08 am »
The updated ver. now has only !ratings again

Edit:
Plus it only saves 1 rating from each ip.. (regardless if different map)
« Last Edit: June 05, 2008, 06:18:57 am by Frenchie »
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Map Ratings
« Reply #16 on: June 07, 2008, 10:09:43 am »
Updated again...

Date Posted: June 05, 2008, 02:13:56 pm
Updated again...
I changed the separator character to be @, and all line breaks are removed. Seems to fix a bug afaik.

Offline Frenchie

  • Camper
  • ***
  • Posts: 358
  • SoldatHQ
Re: Map Ratings
« Reply #17 on: June 09, 2008, 12:18:43 am »
Hey

I quickly tested the new version on a windows server and it screwed up.
I logged in
rated a map
/nextmap
rated a map

and list.txt popped out like this
127.0.0.1|ctf_Kampf|4127.0.0.1|ctf_B2b|3
Soldat Lobby Avec Players -New Release! - Updated AGAIN!


Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Map Ratings
« Reply #18 on: June 14, 2008, 01:00:14 pm »
Removed script due to it being a real pain....

Offline rumpel

  • Camper
  • ***
  • Posts: 410
Re: Map Ratings
« Reply #19 on: June 15, 2008, 08:25:20 am »
:(
banned.