Author Topic: Need help!My script problem!  (Read 1559 times)

0 Members and 1 Guest are viewing this topic.

Offline absoulut1234

  • Major(1)
  • Posts: 30
Need help!My script problem!
« on: October 31, 2009, 06:27:21 am »
i have a question!

there is  extra point script!
------------------------------↓
var
  killcount: array[1..32] of integer;

procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
  killcount[victim] := 0;
  killcount[killer] := killcount[killer] + 1;
  //1 is the amount of points a player will earn each kill since he killed "x" enemies.
  if killcount[killer] >= 3 then
  //3 is the number of kills needed to start earning points.
  //If you set it to 3, the killer will start to gain an extra point each kill since he killed his third enemy.
   begin
    WriteConsole(Killer,'You got an extra point!',$EE81FAA1);
    SetScore(killer,GetPlayerStat(killer,'KILLS') + 1);
   end;
end;
-------------------------------------

but i want to combine   this script------→kill flagger can got an extra point↓



procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);
begin
if GetPlayerStat(Victim, 'Flagger') = True then begin // Is victim flagger?
  SetScore(Killer,GetPlayerStat(Killer,'Kills')+5); // This will add 5 points to killer's score
  WriteConsole(Killer,'You Gained 5 Extra Points for Killing Flagger',$EE81FAA1);
end;
if GetPlayerStat(Killer, 'Flagger') = True then begin // Is Killer flagger?
  SetScore(Killer,GetPlayerStat(Killer,'Kills')+3); // This will add 3 points to killer's score
  WriteConsole(Killer,'You Gained 3 Extra Points for Killing as a Flagger',$EE81FAA1);
end;
end;



how can i make them(extra ponit + kill flagger point) work?
thx!
HELP ME! ???
« Last Edit: October 31, 2009, 06:29:00 am by absoulut1234 »

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Need help!My script problem!
« Reply #1 on: October 31, 2009, 07:28:46 am »
Code: [Select]
var
 killcount: array[1..32] of integer;

procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
 killcount[victim] := 0;

 if Killer <> Victim then
 begin
  killcount[killer] := killcount[killer] + 1;

  if killcount[killer] >= 3 then
  begin
   WriteConsole(Killer,'You got an extra point!',$EE81FAA1);
   SetScore(killer,GetPlayerStat(killer,'KILLS') + 1);
  end;

  if GetPlayerStat(Victim, 'Flagger') = True then begin // Is victim flagger?
   SetScore(Killer,GetPlayerStat(Killer,'Kills')+5); // This will add 5 points to killer's score
   WriteConsole(Killer,'You Gained 5 Extra Points for Killing Flagger',$EE81FAA1);
  end
  if GetPlayerStat(Killer, 'Flagger') = True then begin // Is Killer flagger?
   SetScore(Killer,GetPlayerStat(Killer,'Kills')+3); // This will add 3 points to killer's score
   WriteConsole(Killer,'You Gained 3 Extra Points for Killing as a Flagger',$EE81FAA1);
  end;

 end;
end;

LoL?
KAWAAAAAAAIIIIIIIIII

Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!My script problem!
« Reply #2 on: October 31, 2009, 09:04:29 am »
THX(CRYING!
SO NICE

but
if i want  +  return flag can got 2points  &  flag can got 3 point
how can i do?
can you help me  make this script?PLZ!

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Need help!My script problem!
« Reply #3 on: October 31, 2009, 10:23:03 am »
What?...
KAWAAAAAAAIIIIIIIIII

Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!My script problem!
« Reply #4 on: October 31, 2009, 11:59:48 pm »
??
i want to search a script   same as EXTRA POINT

if you return the flag  you can got 2 points
if you flag    you can  got 3 points

can you help me to write this script?
 

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Need help!My script problem!
« Reply #5 on: November 01, 2009, 04:35:36 am »
Uhm? This?
Code: [Select]
var WasGrabbed: array[1..2] of boolean;

procedure OnFlagScore(ID, TeamFlag: byte);
begin
  WriteConsole(ID,'You got 3 points for scoring!',$81FAA1);
  SetScore(ID, GetPlayerStat(ID,'Kills') + 3);
end;

procedure OnFlagReturn(ID, TeamFlag: byte);
begin
  if WasGrabbed[TeamFlag] then begin
    WriteConsole(ID,'You got 2 points for returning the flag!',$81FAA1);
    SetScore(ID, GetPlayerStat(ID,'Kills') + 2);
    WasGrabbed[TeamFlag]:= false;
  end;
end;

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

procedure OnMapChange(NewMap: string);
begin
  WasGrabbed[1]:= false;
  WasGrabbed[2]:= false;
end;

Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!My script problem!
« Reply #6 on: November 01, 2009, 05:18:55 am »
yea!nice
but now i want to combine   2F that reply

------------------↓

var
 killcount: array[1..32] of integer;

procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
 killcount[victim] := 0;

 if Killer <> Victim then
 begin
  killcount[killer] := killcount[killer] + 1;

  if killcount[killer] >= 3 then
  begin
   WriteConsole(Killer,'You got an extra point!',$EE81FAA1);
   SetScore(killer,GetPlayerStat(killer,'KILLS') + 1);
  end;

  if GetPlayerStat(Victim, 'Flagger') = True then begin // Is victim flagger?
   SetScore(Killer,GetPlayerStat(Killer,'Kills')+5); // This will add 5 points to killer's score
   WriteConsole(Killer,'You Gained 5 Extra Points for Killing Flagger',$EE81FAA1);
  end
  if GetPlayerStat(Killer, 'Flagger') = True then begin // Is Killer flagger?
   SetScore(Killer,GetPlayerStat(Killer,'Kills')+3); // This will add 3 points to killer's score
   WriteConsole(Killer,'You Gained 3 Extra Points for Killing as a Flagger',$EE81FAA1);
  end;

 end;
end;




----------------
and your reply

-----------------------↓

var WasGrabbed: array[1..2] of boolean;

procedure OnFlagScore(ID, TeamFlag: byte);
begin
  WriteConsole(ID,'You got 3 points for scoring!',$81FAA1);
  SetScore(ID, GetPlayerStat(ID,'Kills') + 3);
end;

procedure OnFlagReturn(ID, TeamFlag: byte);
begin
  if WasGrabbed[TeamFlag] then begin
    WriteConsole(ID,'You got 2 points for returning the flag!',$81FAA1);
    SetScore(ID, GetPlayerStat(ID,'Kills') + 2);
    WasGrabbed[TeamFlag]:= false;
  end;
end;

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

procedure OnMapChange(NewMap: string);
begin
  WasGrabbed[1]:= false;
  WasGrabbed[2]:= false;
end;

---------------------
can you help me to combine this 2 script?? Very thank you!

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Need help!My script problem!
« Reply #7 on: November 01, 2009, 11:43:24 am »
Code: [Select]
var
 killcount: array[1..32] of integer;
 WasGrabbed: array[1..2] of boolean;

procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
 killcount[victim] := 0;

 if Killer <> Victim then
 begin
  killcount[killer] := killcount[killer] + 1;

  if killcount[killer] >= 3 then
  begin
   WriteConsole(Killer,'You got an extra point!',$EE81FAA1);
   SetScore(killer,GetPlayerStat(killer,'KILLS') + 1);
  end;

  if GetPlayerStat(Victim, 'Flagger') = True then begin // Is victim flagger?
   SetScore(Killer,GetPlayerStat(Killer,'Kills')+5); // This will add 5 points to killer's score
   WriteConsole(Killer,'You Gained 5 Extra Points for Killing Flagger',$EE81FAA1);
  end
  if GetPlayerStat(Killer, 'Flagger') = True then begin // Is Killer flagger?
   SetScore(Killer,GetPlayerStat(Killer,'Kills')+3); // This will add 3 points to killer's score
   WriteConsole(Killer,'You Gained 3 Extra Points for Killing as a Flagger',$EE81FAA1);
  end;

 end;
end;

procedure OnFlagScore(ID, TeamFlag: byte);
begin
  WriteConsole(ID,'You got 3 points for scoring!',$81FAA1);
  SetScore(ID, GetPlayerStat(ID,'Kills') + 3);
end;

procedure OnFlagReturn(ID, TeamFlag: byte);
begin
  if WasGrabbed[TeamFlag] then begin
    WriteConsole(ID,'You got 2 points for returning the flag!',$81FAA1);
    SetScore(ID, GetPlayerStat(ID,'Kills') + 2);
    WasGrabbed[TeamFlag]:= false;
  end;
end;

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

procedure OnMapChange(NewMap: string);
begin
  WasGrabbed[1]:= false;
  WasGrabbed[2]:= false;
end;

Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!My script problem!
« Reply #8 on: November 02, 2009, 06:02:23 am »
ya your script is nice!can work!
but can't combine to this script!-----→http://soldatcentral.com/index.php?page=script&f=145
sorry  can you help me combine this script?this is the LAST time!PLZ!

Offline |_ancer

  • Soldier
  • **
  • Posts: 153
  • again and again.
Re: Need help!My script problem!
« Reply #9 on: November 02, 2009, 07:22:53 am »
Probably there are two of the same procedures. So basically put the begin, end and variables under the desired procedure.
« Last Edit: November 02, 2009, 07:24:33 am by |_ancer »

Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!My script problem!
« Reply #10 on: November 02, 2009, 08:19:35 am »
?? i don't know  how  to  revise!
can you write down the correct script??please!  thank you!

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Need help!My script problem!
« Reply #11 on: November 02, 2009, 08:57:59 am »
Put them in separate folders dude :-X

Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!My script problem!
« Reply #12 on: November 03, 2009, 05:52:09 am »
how to separate???
i combine them  but can't work!

Offline SpiltCoffee

  • Veteran
  • *****
  • Posts: 1579
  • Spilt, not Split!
    • SpiltCoffee's Site
Re: Need help!My script problem!
« Reply #13 on: November 03, 2009, 06:37:48 am »
In the scripts folder, you have one folder for your script, and one folder for zop's script. Simple :D.
When life hands you High Fructose Corn Syrup, Citric Acid, Ascorbic Acid, Maltodextrin, Sodium Acid Pyrophosphate,
Magnesium Oxide, Calcium Fumarate, Yellow 5, Tocopherol and Less Than 2% Natural Flavour... make Lemonade!

Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!My script problem!
« Reply #14 on: November 03, 2009, 08:38:39 am »
but deside sever just have only one!
how can i open  two script??

Offline zop

  • Major
  • *
  • Posts: 81
Re: Need help!My script problem!
« Reply #15 on: November 03, 2009, 10:30:06 am »
You can load many scripts in one server.

http://122.116.167.31:23238:23238/galavela/?inc=player&name=%5BTomato+Bird%5D+Cibo[/size=1]

Offline absoulut1234

  • Major(1)
  • Posts: 30
Re: Need help!My script problem!
« Reply #16 on: November 04, 2009, 08:10:26 am »
i know!
but how can i load many script in sever?
put many script in SCRIPT this folder?

i try it
it say

  • ScriptCore v2.6 loaded! Found 2 scripts...



although zop's script can work
but  the   EXTRA POINTS this script    isn't work!

i don't know how to do it! help! :'(

From: November 04, 2009, 08:20:03 am
oh yea!!!
i know ! i know!!!
yes
in folder put 2 script!right!
yea it can work
and i don't need to combine them!yea hahahahahha


thank:
zop

SpiltCoffee

Gizd

|_ancer

Neosano (what...?)= =|||



yea i am so happy!
« Last Edit: November 04, 2009, 08:20:03 am by absoulut1234 »