Author Topic: Inf Gather  (Read 1785 times)

0 Members and 1 Guest are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Inf Gather
« on: February 17, 2008, 02:49:57 pm »
Script Name: Infiltration Gather
Script Description: Inf-styled gather. Note that this does NOT communicate to IRC at all.
Original Author: Curt
Core Version: 2.6.3
In request from somebody on MSN
Usage:
-Players join and align the teams correctly
-All players do "!ready"
-A randomly selected map is selected and played
-The same map is played again with swapped teams
-Repeat previous 2 steps until X maps have been played (constant at the top of the script as NumMaps, default 2)
-If a team wins more than half of the rounds, they automatically win; otherwise the repeating steps continue
-Once the end of the maps have been reached, if the scores are not tied, then a team is victorious, otherwise the repeating steps continue repeating until the scores are not tied
Updates:
Feb. 17, 2008 Earlier
-Released it
Feb. 17, 2008 7:39 PM EST
-Fixed typo "Congradulations" to "Congratulations"
-Fixed typo "autpause" to "autopause"
-Changed the check for if the map ends from Timeleft <= 10 to 0

Please share how it runs, bugs, typos, ect.
« Last Edit: February 17, 2008, 07:45:36 pm by DorkeyDear »

Offline Hydro

  • Major(1)
  • Posts: 31
Re: Inf Gather
« Reply #1 on: February 17, 2008, 03:49:35 pm »
I didn't check it in game, just looked through code and I found some mistakes:

Line 122 and 136:
Code: [Select]
WriteConsole(0, 'Congradulations to ' + NamebyTeam(Win) + ' for winning the gather!', Color);"Congradulations"

Line 184:
Code: [Select]
WriteConsole(0, 'A player has left and autpause initiated. When a substitute', ErrorColor);"autpause"

I will try it soon ;)

I dont understand line 106 in procedure AppOnIdle:
Code: [Select]
if (((TimeLeft <= 10) or (AlphaScore >= ScoreLimit) or (BravoScore >= ScoreLimit)) and (Pause = false)) then beginI guess
Code: [Select]
((TimeLeft <= 10) or (AlphaScore >= ScoreLimit) or (BravoScore >= ScoreLimit)) means: if game is finished...
Don't should be TimeLeft <= 0?
« Last Edit: February 17, 2008, 04:03:12 pm by Hydro »

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Inf Gather
« Reply #2 on: February 17, 2008, 07:38:34 pm »
Line 122 and 136:
Code: [Select]
WriteConsole(0, 'Congradulations to ' + NamebyTeam(Win) + ' for winning the gather!', Color);"Congradulations"

Line 184:
Code: [Select]
WriteConsole(0, 'A player has left and autpause initiated. When a substitute', ErrorColor);"autpause"
Thanks, fixed, updated

I dont understand line 106 in procedure AppOnIdle:
Code: [Select]
if (((TimeLeft <= 10) or (AlphaScore >= ScoreLimit) or (BravoScore >= ScoreLimit)) and (Pause = false)) then beginI guess
Code: [Select]
((TimeLeft <= 10) or (AlphaScore >= ScoreLimit) or (BravoScore >= ScoreLimit)) means: if game is finished...
Don't should be TimeLeft <= 0?
I had it check if it were = 0 before but sense I thought that for many seconds it would stay at 0, I instead used 10. Then latter I added a check with the variable Pause just in case for whatever reason apponidle happens to not be called correctly on time when Timeleft = 0, so I changed = to <= and added a check with the variable Pause; its 0 now