Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: Replicating the binoculars bug?

  1. #11
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Use libcod to monitor who a player is spectating, then force the player to spectate the NEXT available player using something like this:

    {ill post some code later today}
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  2. #12
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Ok, that wasnt "today". Here is script anyway:
    Code:
    preventbotspec()
    {
    	while(true)
    	{
    		if(isdefined(self.pers["team"]) && self.pers["team"] == "spectator")
    		{
    			cl = self getspectatorclient();
    			if(isdefined(cl) && cl != self)
    			{
    				if(cl.isbot)
    				{
    					players = getentarray("player", "classname");
    					found = false;
    					tospec = -1;
    					for(i = 0; i < players.size; i++)
    					{
    						if(players[i] == self)
    							continue;
    						if(tospec == -1 && !players[i].isbot)
    							tospec = players[i] getentitynumber();
    						if(!found)
    						{
    							if(players[i] == cl)
    								found = true;
    						}
    						else if(!players[i].isbot)
    						{
    							tospec = i;
    							break;
    						}
    					}
    					self.spectatorclient = tospec;
    				}
    			}
    		}
    		wait .05;
    	}
    }
    requires libcod, untested code
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. The Following 2 Users Say Thank You to IzNoGoD For This Useful Post:

    filthy_freak_ (3rd May 2014),kung foo man (3rd May 2014)

  4. #13
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by IzNoGoD View Post
    Ok, that wasnt "today". Here is script anyway:
    Thanks, it's working nicely, a few problems though;

    Stops working after the first time it skips to a real player, +attack no longer works. Can't change spectators at all because of this.
    Also not sure if this would work changing spectators backwards but that might be something I can fix.
    Last edited by filthy_freak_; 3rd May 2014 at 14:29.

  5. #14
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Maybe set spectateclient to undefined or something in the next frame, i dunno, never really messed with spectating
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  6. The Following User Says Thank You to IzNoGoD For This Useful Post:

    filthy_freak_ (3rd May 2014)

  7. #15
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by IzNoGoD View Post
    Maybe set spectateclient to undefined
    Yup that seems to have fixed it, thanks! I should be able to work the rest out.

  8. #16
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    How do the bots dont have ping 999 in your ss?

  9. #17
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by Ni3ls View Post
    How do the bots dont have ping 999 in your ss?
    They're randomly generated.

  10. #18
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Could you explain that a bit? The latency in the ss is not the same as real ping?

  11. #19
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by Ni3ls View Post
    Could you explain that a bit? The latency in the ss is not the same as real ping?
    Bots latency aren't real. Real player latency are real.

  12. #20
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    You need to add a chatterbot, too :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •