Author Topic: extra points when flag returned :)  (Read 4765 times)

0 Members and 1 Guest are viewing this topic.

Offline szmon

  • Major(1)
  • Posts: 7
extra points when flag returned :)
« on: June 02, 2007, 06:22:46 pm »
Author: szmon
Script Description: gives extra points for player who's return the flag
Core Version: 2.6.0\2.6.1

updated!(2) 4.06.2007

Code: [Select]
var
odzysk: array[1..32] of integer;
witfg: array[1..2] of byte;

procedure OnFlagGrab(ID, TeamFlag: byte; GrabbedInBase: boolean);
begin
witfg[TeamFlag] := 1;
end;

procedure OnFlagReturn(ID, TeamFlag: byte);
begin
  if witfg[TeamFlag] = 1 then begin
  if odzysk[ID] < 10 then begin
  SetScore(ID,GetPlayerStat(ID,'KILLS')+2);
  SayToPlayer(ID,'Flag Returned! 2 points for you! (max 10 extra points)');
  odzysk[ID]:= odzysk[ID] + 2;
  witfg[TeamFlag]:= 0;
  end;
  end;
end;

procedure OnMapChange(NewMap: string);
var
i: integer;
k: byte;
begin
for i := 1 to 32 do
odzysk[i] := 0;
for k := 1 to 2 do
witfg[k] := 0;
end;

procedure OnJoinGame(ID, Team: byte);
begin
odzysk[ID] := 0;
end;

forgive me my english please :)
Thanks for suggestions :)

« Last Edit: June 04, 2007, 05:20:11 am by szmon »

Offline Flacid Assassin

  • Camper
  • ***
  • Posts: 450
  • Gorby The Grunt
Re: extra points when flag returned :)
« Reply #1 on: June 02, 2007, 06:24:36 pm »
or how bout this

make 3 extra sections on the score thing one column saying Flag Grabs Flag Returns And Flag Captures

Offline Serial K!ller

  • Camper
  • ***
  • Posts: 408
    • Soldat Mods Archive
Re: extra points when flag returned :)
« Reply #2 on: June 03, 2007, 04:45:19 am »
you can just shoot the flag out of your base and return it to get the extra points...
you should check if the flag has been stolen first or the flag carrier has been killed

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: extra points when flag returned :)
« Reply #3 on: June 03, 2007, 10:19:55 pm »
you can just shoot the flag out of your base and return it to get the extra points...
you should check if the flag has been stolen first or the flag carrier has been killed
It does check if the flag has been stolen.

But the max points array has to be [1..32] not [1..10]

Offline miketh2005

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 668
  • What's the URL for www.microsoft.com?
Re: extra points when flag returned :)
« Reply #4 on: July 29, 2007, 02:29:36 pm »
what are points?
Quote from: 'Ando.' pid='12999178' dateline='1309046898'
My new password is secure as shit :)
Mate, I am not sure Shit is even secured nowadays.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: extra points when flag returned :)
« Reply #5 on: July 29, 2007, 08:24:29 pm »
shouldn't witfg be an array[1..2] of boolean?

Offline Hydro

  • Major(1)
  • Posts: 31
Re: extra points when flag returned :)
« Reply #6 on: July 31, 2007, 05:58:52 am »
Array of boolean? :OOO
Code: [Select]
witfg: boolean;

Offline recruit

  • Soldier
  • **
  • Posts: 117
Re: extra points when flag returned :)
« Reply #7 on: August 10, 2007, 08:29:44 am »
If im not mistaken a bolean is like a yes or no type of thing. help me learn so tell me if Im wrong

Date Posted: August 10, 2007, 09:14:42 AM
var
NextMapArray: array[1..32] of Boolean;
NextMapVote: Byte;
procedure ResetMapVote();
var
i: integer;
begin
   NextMapVote:=0;
   for i := 1 to 32 do begin
      NextMapArray := False;
   end;
end;
procedure NextMapV(ID: integer);
var
VotePrec: Double;
begin
   NextMapArray[ID]:=true;
   NextMapVote:=NextMapVote+1;
   command('/say Voters for Next Map: ' + inttostr(NextMapVote)+'/'+inttostr(NumPlayers));
   VotePrec:=NextMapVote/NumPlayers;
   if (VotePrec>0.6) then Begin
      Command('/say Next Map Vote Had Passed');
      Command('/nextmap');
   End;
End;
procedure OnAdminConnect(IP: string);
begin
end;
procedure OnAdminDisconnect(IP: string);
begin
end;


Date Posted: August 10, 2007, 09:29:12 AM

this is the script I combined it with
why ain't it working?

Offline Freedom

  • Major
  • *
  • Posts: 97
  • Veritas Vincit
Re: extra points when flag returned :)
« Reply #8 on: August 16, 2007, 04:13:42 am »
Very nice script ;P
Cum pare contendere anceps est, cum superiore furiosum, cum inferiore sordidum.

Offline Eldiablo

  • Major(1)
  • Posts: 22
    • Caffeine Killers Home Page
Re: extra points when flag returned :)
« Reply #9 on: August 19, 2007, 07:19:09 pm »
Excellent :D
I've always wished for something like this.

Offline miketh2005

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 668
  • What's the URL for www.microsoft.com?
Re: extra points when flag returned :)
« Reply #10 on: August 21, 2007, 11:45:02 am »
thanx
Quote from: 'Ando.' pid='12999178' dateline='1309046898'
My new password is secure as shit :)
Mate, I am not sure Shit is even secured nowadays.

Offline Anal

  • Major(1)
  • Posts: 2
Re: extra points when flag returned :)
« Reply #11 on: September 24, 2007, 08:49:19 am »
aaa how i can make this text to plick PAS??

Offline miketh2005

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 668
  • What's the URL for www.microsoft.com?
Re: extra points when flag returned :)
« Reply #12 on: December 18, 2007, 09:17:20 pm »
can u put this in a .zip plz?
Quote from: 'Ando.' pid='12999178' dateline='1309046898'
My new password is secure as shit :)
Mate, I am not sure Shit is even secured nowadays.

Offline you360

  • Major(1)
  • Posts: 3
Re: extra points when flag returned :)
« Reply #13 on: September 13, 2008, 08:39:52 am »
Where i can download ?

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: extra points when flag returned :)
« Reply #14 on: September 14, 2008, 01:20:04 am »
Atm you can't download it. Somone forgot about file  :P

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5037
Re: extra points when flag returned :)
« Reply #15 on: September 14, 2008, 01:32:30 am »
Atm you can't download it. Somone forgot about fileĀ  :P

I just stuck the code into a zip file, extract the folder within to your Scripts/ folder. I hope this helps.
There are other worlds than these

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: extra points when flag returned :)
« Reply #16 on: September 14, 2008, 04:21:39 am »
Code: [Select]
SayToPlayer(ID,'Flag Returned! 2 points for you! (max 10 extra points)');I dont reccomend using that, its like an admin PM
Use
Code: [Select]
WriteCosnsole(ID,TEXT,COLOR); instead
Also why do you need onFlagGrab?

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: extra points when flag returned :)
« Reply #17 on: September 14, 2008, 11:47:09 am »
Also why do you need onFlagGrab?
so that people dont abuse it by shooting the flag out of base and returning

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: extra points when flag returned :)
« Reply #18 on: September 14, 2008, 11:49:47 am »
Also why do you need onFlagGrab?
so that people dont abuse it by shooting the flag out of base and returning
aahh i understand, thx

Offline you360

  • Major(1)
  • Posts: 3
Re: extra points when flag returned :)
« Reply #19 on: September 15, 2008, 11:17:20 am »
Thanks u for scripts = D