Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Ratings System (https://forums.graalonline.com/forums/showthread.php?t=64272)

jake13jake 02-22-2006 12:39 AM

Ratings System
 
I need to give Classic's Spar Rating back. I don't quite understand these.

updateratingdeviation(float, float) - returns float - old deviation, time of last spar, returns new deviation
updateratings(obj) - returns object - updates an array of {rating1,ratingdeviation1, rating2,ratingdeviation2, ...}, init them at 1500 and 350

would the time of last spar be in terms of timevar2?
updateratingdeviation(player.ratingd,player.client r.spartime);

updateratings(obj)... just don't get this at all.

euhh... maybe I do now? But still, how often should rating deviation be checked?

Admins 02-22-2006 10:26 PM

Yes timevar2
You only need to update the deviation each login I guess, the minimum value for the deviation is 75, and it is raising by one each day without spar I think.

PHP Code:

newratings updateratings({winner.rating,winner.ratingd,loser.rating,loser.ratingd});
winner.rating newratings[0];
winner.ratingd newratings[1];
winner.lastspar int(timevar2);
loser.rating newratings[2];
loser.ratingd newratings[3];
loser.lastspar int(timevar2); 


jake13jake 02-23-2006 01:09 AM

Quote:

Originally Posted by Stefan
Yes timevar2
You only need to update the deviation each login I guess, the minimum value for the deviation is 75, and it is raising by one each day without spar I think.

PHP Code:

newratings updateratings({winner.rating,winner.ratingd,loser.rating,loser.ratingd});
winner.rating newratings[0];
winner.ratingd newratings[1];
winner.lastspar int(timevar2);
loser.rating newratings[2];
loser.ratingd newratings[3];
loser.lastspar int(timevar2); 


Yea, it's nice to be able to use the default ratings system this way. However, I'd really like to be able to read these vars clientside, so I can rewrite the ratings display. It's the same problem with not being able to see if a player is paused using a nickname system.

I mean, rating and ratingd are being sent to the client anyway by pressing R and when the ratings are updated. If a player is paused it is being sent to the client in the form of adding (paused) at the end of the player's nickname. Is there any particular reason you wouldn't want these vars to be readable clientside? I don't want to use player.attr[] like I have been using for (paused) because I'd rather use them for how they were intended. If not, can you SERIOUSLY make the attr[] variables accessible through RC. I'm going through hell messing with them.

Hmmm... also... is player.lastspar a default variable?

Admins 02-23-2006 02:25 AM

Can add read access to rating and ratingd.
lastspar is not a default variable

jake13jake 02-23-2006 07:08 AM

Quote:

Originally Posted by Stefan
Can add read access to rating and ratingd.
lastspar is not a default variable

Okay, can you add read access to paused (for the players array)?
hmm... why isn't there an updateAP(killerAP,killedAP)? I can't figure out the equation :'(.
I'm thinking
if (opponent AP > 20)
?100: decreases by 15
80-99: decreases by 10
60-79: decreases by 8
40-59: decreases by 6
?20-39: decreases by 4
?0-19: decreases by 2

100 doesn't really matter because we're going to make it so that saints get dropped by at least 5... might make it 10, and probably reserve 15 for if they killed someone with their one hit. when they simply hit someone, regardless of opponent AP.

Riot 02-23-2006 10:30 PM

Quote:

Originally Posted by jake13jake
Okay, can you add read access to paused (for the players array)?
hmm... why isn't there an updateAP(killerAP,killedAP)? I can't figure out the equation :'(.
I'm thinking
if (opponent AP > 20)
?100: decreases by 15
80-99: decreases by 10
60-79: decreases by 8
40-59: decreases by 6
?20-39: decreases by 4
?0-19: decreases by 2

100 doesn't really matter because we're going to make it so that saints get dropped by at least 5... might make it 10, and probably reserve 15 for if they killed someone with their one hit. when they simply hit someone, regardless of opponent AP.

Quote:

Originally Posted by newfeatures2001.txt
- new pk tag system:
when having less than 40 alignment points (showap) then
you can't increase your power; when you die then you will
get 3 hearts back when ap<20, 5 hearts when ap<40 and
full power when you die while ap>=40;
when you kill someone then your power will decreased
by (yourap/20+1)*(otherap/20);
when ap<20 then your ap will increase every 30 seconds,
when ap<40 then every 2 minutes, ..., when >=80 then
every 30 minutes (no 90 ap limit anymore)

:)

jake13jake 02-24-2006 12:55 AM

Quote:

Originally Posted by Riot
:)

Wow, those newfeatures.txts do come in handy every now and then.
Quote:

Originally Posted by Stefan
Can add read access to rating and ratingd.
lastspar is not a default variable

Yea, for players[i].paused, players[i].rating, and players[i].ratingd, I just rescripted everything assuming that they're going to exist as read-only vars.


All times are GMT +2. The time now is 12:36 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.