Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   updateratingdeviation(ratingd,time) not working? (https://forums.graalonline.com/forums/showthread.php?t=64558)

jake13jake 03-04-2006 09:42 PM

updateratingdeviation(ratingd,time) not working?
 
When the player connects to the server, this happens:
player.ratingd = updateratingdeviation(player.ratingd,min(player.cl ientr.hd_spar_killedtime,player.clientr.hd_spar_ki llertime));
killertime = timevar2 the last time player was killed.
killedtime = timevar2 the last time player killed someone.

I've tried doing timevar2-min(killedtime,killertime) too.

It just keeps making the player's deviation 350. Bug? Or am I in the wrong forum?

Admins 03-05-2006 04:37 AM

The input ratingd was below 350 ? It should only switch back to 350 if the specified lastpspar parameter is long time ago.
On Zone the spar ratings are working fine so I don't think that the function is bugged itself, sounds more like the specified time is bad, eventually use the max of the two values, since the last spar is probably the last time you have killed someone or was killed yourself, one of those might even be zero.

jake13jake 03-05-2006 06:30 AM

Quote:

Originally Posted by Stefan
The input ratingd was below 350 ? It should only switch back to 350 if the specified lastpspar parameter is long time ago.
On Zone the spar ratings are working fine so I don't think that the function is bugged itself, sounds more like the specified time is bad, eventually use the max of the two values, since the last spar is probably the last time you have killed someone or was killed yourself, one of those might even be zero.

hmm... well Stefan, I tested both killing and being killed. I tested it with each time value individually. It's just giving me 350 for some reason. I think it might be working in the damage NPC (I'll look at it now), but not when the player comes online.

You're right about using max vs. min though (whoops).

Hmm... this is quite interesting, it seems that ratingd is just being set to 350 when the player comes online at all. I'm guessing that it's because the internal system is detecting the last spar being at a different time. It's a good thing I make sure I have any variable I might want to use (yea, I even have one made for this already). I was really hoping on not having to use it though :(

Admins 03-05-2006 04:12 PM

? You could be a little bit more exact with your error descriptions.

jake13jake 03-05-2006 06:07 PM

Quote:

Originally Posted by Stefan
? You could be a little bit more exact with your error descriptions.

PHP Code:

  if (player.account == "jake13jake") {
    
player.chat player.ratingd SPC player.clientr.hd_spar_killedtime SPC player.clientr.hd_spar_killedtime;
  }
  
player.ratingd player.clientr.ratingd updateratingdeviation(player.clientr.ratingd,max(player.clientr.hd_spar_killedtime,player.clientr.hd_spar_killertime));;
  
player.rating  player.clientr.rating

It's because when you logon the default ratingd is set to 350 because the server only knows the last time you sparred using the default hit detection system (or that's my most educated guess). I was hoping not to have to use the player.clientr.ratingd that I made and only use the player.ratingd when you give player.ratingd clientside read access.

jake13jake 03-06-2006 09:00 PM

Is there a serveroption for making the server not update the player's rating deviation?


All times are GMT +2. The time now is 12:00 PM.

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