DAZZLE'S UPGRADE PACK

If you haven't already done so, upgrade your game by downloading Dazzle's all-in-one upgrade pack. It comes with everything you need for today's servers. Does your blue bar freeze when joining servers? Do you lag in games? Do you get an annoying siren in Phobik's Servers? This is what you need. CLICK HERE TO DOWNLOAD.

Script idea from non-scripter

Modding questions, answers, help.....

Moderators: Warfare, Moderator, Admin

User avatar
LGM
Site Admin
Site Admin
Posts: 2102
Joined: Fri Dec 29, 2006 12:59 pm
Location: Very Northwest WA

Script idea from non-scripter

Post by LGM »

So, I've been running my server and enjoy reading the chatlog. Often lets me see who to ban, too.

Only thing is, I wish I knew what the score was in some of the games.
(I've been turning into a data junkie. Probably from work.)

Here's what I want- maybe someone would like to make it...

When the timer reaches nearly 0, a message is displayed that gives the final score.
It's done with a message that would show in a chatlog. How? I dunno, but it could be useful for data.

Any takers?
DJ Wings
Need Major Repair
Need Major Repair
Posts: 895
Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.

Re: Script idea from non-scripter

Post by DJ Wings »

There's an onGameDurationAlmostEnd() function for that. I talked with TMG about it a while ago, and the game calls it 30 seconds from the end of the round. The problem is that overriding it turns off the 30-second countdown at the end, which means you'd need a replacement for it. But you can use it to just call the ACAS users() function, which does what you want.

Code: Select all

function onGameDurationAlmostEnd()
{
  schedule(2500,0,"users");
  endGameLoop(30);
}
function endGameLoop(%time)
{
  if(%time != 0)
    schedule(1000,0,"endGameLoop", %time-1);
  centerprintall(":"@%time);
}
EDIT: Added a delay, so that the users() is called with five seconds left. A lot can happen in 25 seconds...
Never really gone, never really part of the game.
User avatar
Warfare
Moderator
Moderator
Posts: 741
Joined: Thu Dec 28, 2006 2:21 pm
Location: Austin, Texas

Re: Script idea from non-scripter

Post by Warfare »

Code: Select all

Package UserThingamabob
{
function onGameDurationAlmostEnd()
{
  schedule(2950,0,"users");
  Parent::onGameDurationAlmostEnd();
}
};
activatepackage(UserThingamabob);
This way you get the pretty countdown and all it's splendor.
User avatar
LGM
Site Admin
Site Admin
Posts: 2102
Joined: Fri Dec 29, 2006 12:59 pm
Location: Very Northwest WA

Re: Script idea from non-scripter

Post by LGM »

Thanks, guys. I'll give it a try. Didn't know it would be so simple. :thumbup:
User avatar
Dazzle
Evil Site Admin
Evil Site Admin
Posts: 1320
Joined: Fri Dec 29, 2006 6:59 am
Location: London, England

Re: Script idea from non-scripter

Post by Dazzle »

When RollerBall was created we also made a score recording script. This records the game info to a log on the server it saves the game type, players names with their individual score and the overall team score.

I have the open source for this script if its any use, i will post an example of the recorded log later when i get home.
User avatar
Dazzle
Evil Site Admin
Evil Site Admin
Posts: 1320
Joined: Fri Dec 29, 2006 6:59 am
Location: London, England

Re: Script idea from non-scripter

Post by Dazzle »

Here is an extract from the RollerBall Results.cs. Currently its set to record the scores in a separate file, but having just looked at the script I think its a matter of just changing the path to the chatlog for the result to be recorded along with the chat. This script can be used for any gametype. and is just executed from the main.cs

LGM if you want it for your server just email me.

Code: Select all

|GAMETYPE:| RollerBall
___ BOTH TEAMS TIED ---
|BLUETEAM POINTS:| 0 |GREENTEAM POINTS:| 0

MTF-DarkPirhana|TEAM:| BlueTeam |SCORE:| 1
kill bot IL IS|TEAM:| GreenTeam |SCORE:| 2

----------------------------------
----------------------------------
|GAMETYPE:| RollerBall
___ BOTH TEAMS TIED ---
|BLUETEAM POINTS:| 0 |GREENTEAM POINTS:| 0

MTF-DarkPirhana|TEAM:| BlueTeam |SCORE:| 2
kill bot IL IS|TEAM:| GreenTeam |SCORE:| 2

----------------------------------
----------------------------------
|GAMETYPE:| RollerBall
___ BLUETEAM WON ---
|BLUETEAM POINTS:| 6 |GREENTEAM POINTS:| 0

Å££åhteef™|TEAM:| BlueTeam |SCORE:| 9
MTF-Goomba|TEAM:| GreenTeam |SCORE:| 0

----------------------------------
----------------------------------
|GAMETYPE:| RollerBall
___ BLUETEAM WON ---
|BLUETEAM POINTS:| 5 |GREENTEAM POINTS:| 2

Matt|TEAM:| BlueTeam |SCORE:| 5
kyle man IL|TEAM:| GreenTeam |SCORE:| 0
Nevaeh|TEAM:| GreenTeam |SCORE:| 3
Alucard -ect-|TEAM:| BlueTeam |SCORE:| 0

----------------------------------
----------------------------------
|GAMETYPE:| RollerBall
___ BLUETEAM WON ---
|BLUETEAM POINTS:| 9 |GREENTEAM POINTS:| 1

Jerry|TEAM:| BlueTeam |SCORE:| 7
Batman|TEAM:| GreenTeam |SCORE:| 1
MasterKABlaster|TEAM:| BlueTeam |SCORE:| 6

----------------------------------
----------------------------------
|GAMETYPE:| RollerBall
___ BLUETEAM WON ---
|BLUETEAM POINTS:| 5 |GREENTEAM POINTS:| 0

Jerry|TEAM:| BlueTeam |SCORE:| 14
Batman|TEAM:| GreenTeam |SCORE:| 2

----------------------------------
----------------------------------
|GAMETYPE:| RollerBall
___ GREENTEAM WON ---
|BLUETEAM POINTS:| 1 |GREENTEAM POINTS:| 2

Jerry|TEAM:| BlueTeam |SCORE:| 14
MasterKABlaster|TEAM:| BlueTeam |SCORE:| 5
wookie|TEAM:| GreenTeam |SCORE:| 0

----------------------------------
----------------------------------
|GAMETYPE:| RollerBall
___ BLUETEAM WON ---
|BLUETEAM POINTS:| 4 |GREENTEAM POINTS:| 1

Jerry|TEAM:| BlueTeam |SCORE:| 17
Batman|TEAM:| GreenTeam |SCORE:| 2
wookie|TEAM:| GreenTeam |SCORE:| 1
timtom|TEAM:| BlueTeam |SCORE:| 0

----------------------------------
----------------------------------
User avatar
MusickTMG
Veteran Light
Veteran Light
Posts: 1903
Joined: Mon Jun 25, 2007 8:59 pm
Location: San Diego, California

Re: Script idea from non-scripter

Post by MusickTMG »

This would also be a good idea to use in leagues, like PSL, and the TBML.

There are always questions about what the scores were, I am sure this would sum those questions if they arise.
Musick-TMG-

:duckie: "I got a idea"
User avatar
Dazzle
Evil Site Admin
Evil Site Admin
Posts: 1320
Joined: Fri Dec 29, 2006 6:59 am
Location: London, England

Re: Script idea from non-scripter

Post by Dazzle »

I am testing a few versions of the script with LGM but in a few days will release the Score Record Script in 3 versions:

1) the original that records scores in a separate file

2) for use with Dash codes that records scores in chatlog

3) for use with ACAS v3 that records scores in chatlog
User avatar
Dazzle
Evil Site Admin
Evil Site Admin
Posts: 1320
Joined: Fri Dec 29, 2006 6:59 am
Location: London, England

Re: Script idea from non-scripter

Post by Dazzle »

Music do you use ACAS?

If you do can you post the path to the ACAS v3 chatlog and I will make a version for ACAS v3 as well.
Mr Phobik
Site Mechanic
Site Mechanic
Posts: 283
Joined: Wed Apr 30, 2008 2:35 pm
Location: Toronto, CANADA

Re: Script idea from non-scripter

Post by Mr Phobik »

:above:

Code: Select all

 ./Logs and Lists/MessagesLog.cs
Image

Who is online

Users browsing this forum: ClaudeBot [Bot] and 16 guests