Author Topic: Savage's Servers  (Read 8174 times)

0 Members and 2 Guests are viewing this topic.

Offline Savage

  • Soldier
  • **
  • Posts: 155
Savage's Servers
« on: September 27, 2016, 07:19:57 am »
Run Mode - 51.68.213.93:23080
« Last Edit: December 18, 2018, 09:56:04 am by Savage »

Offline machina

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1117
  • The world isn't nice. Why should I be...?
Re: Savage's Hide 'n Seek Server
« Reply #1 on: September 27, 2016, 09:36:39 am »
I'm going to test one today this evening. Hopefully, there's someone to play with ;)

Offline Slasher

  • Soldier
  • **
  • Posts: 106
  • Peace
Re: Savage's Hide 'n Seek Server
« Reply #2 on: September 27, 2016, 12:48:28 pm »
Good Sav! I'm love HNS xD
Make love, not war.

Offline Savage

  • Soldier
  • **
  • Posts: 155
Re: Savage's Servers
« Reply #3 on: October 08, 2016, 10:46:55 am »
Added Missile Tag and Knife Volleyball

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Savage's Servers
« Reply #4 on: October 08, 2016, 11:08:07 am »
I can't download the map from your missile tag server. Fileport is responsive, so it's not firewall, perhaps check the map file naming (extension must be lowercase, map file must be named exactly as it appears in mapslist)
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline No-Mercy

  • Major
  • *
  • Posts: 55
Re: Savage's Servers
« Reply #5 on: October 08, 2016, 07:50:22 pm »
In your server missile is more hard to avoid, maybe because it follow your head instead of shoes!? Tought.

Offline Savage

  • Soldier
  • **
  • Posts: 155
Re: Savage's Servers
« Reply #6 on: October 10, 2016, 06:12:51 am »
I can't download the map from your missile tag server. Fileport is responsive, so it's not firewall, perhaps check the map file naming (extension must be lowercase, map file must be named exactly as it appears in mapslist)

Seems like it worked for You after this post xD

In your server missile is more hard to avoid, maybe because it follow your head instead of shoes!? Tought.

Some ppl found it more enjoyable, honestly to make the missile braking etc would require more brainstorming to myself, and the missile is following the shoes...
This script is one year old, today i would make everything different. I have currently more important scripts to do like HnS, if you know how to programme here you go
Code: [Select]
const
posmsg = $00FF00;
negmsg = $FF0000;
neumsg = $F0E68C;
minplayers = 2;
timerstart = 10;
botname = 'Missile Bot';
maxpoints = 3;
maxtop = 1000;
//Missile
mstartspeed = 150; //Start speed/s (max mmaxspace*60)
mincspeed = 0.05; //Increasing the speed per tick
mmaxspace = 15;
mdamage = 100;

var
target,mid,total,bravop,gear: byte;
i,timer: integer;
swapt,gstart,endgame: boolean;
alphap: array[1..32] of byte;
mx,my,tx,ty,xd,yd,dist,sine,cosine,mspeed,mspace: single;
topspeedf,topplayersf: TStringList;
playerafk: array[1..32] of boolean;

procedure SpawnMissileBot;
var
NewPlayer: TNewPlayer;
begin
NewPlayer := TNewPlayer.Create;
try
NewPlayer.Name := botname;
NewPlayer.Team := 3;
NewPlayer.Dummy := True;
Players.Add(NewPlayer, TJoinSilent);
finally
NewPlayer.Free;
end;
end;

procedure GiveWep(ID,PWep,SWep: Byte);
var
NewPrimary,NewSecondary: TNewWeapon;
begin
NewPrimary := TNewWeapon.Create();
NewSecondary := TNewWeapon.Create();
try
NewPrimary.WType := PWep;
NewSecondary.WType := SWep;
Players[ID].ForceWeapon(NewPrimary, NewSecondary);
finally
NewPrimary.Free();
NewSecondary.Free();
end;
end;

procedure TopSpeed(ID: Byte; Speed: Single);
var
newspeed: string;
oldspeedsingle,newspeedsingle: single;
begin
newspeed := formatfloat('0.00',Speed);
if File.Exists('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-speed.txt') and File.Exists('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-players.txt') then begin
topspeedf := File.CreateStringListFromFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-speed.txt');
topplayersf := File.CreateStringListFromFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-players.txt');
if (topspeedf.Count=maxtop) then begin
oldspeedsingle := strtofloat(topspeedf[topspeedf.Count-1]);
newspeedsingle := strtofloat(newspeed);
if (oldspeedsingle>newspeedsingle) then begin
Players.WriteConsole('+'+inttostr(maxtop)+'/'+inttostr(maxtop)+': '+Players[ID].Name+': '+newspeed,posmsg);
topspeedf.Free;
topplayersf.Free;
end else
begin
topspeedf[topspeedf.Count-1] := newspeed;
topplayersf[topplayersf.Count-1] := Players[ID].Name;
oldspeedsingle := strtofloat(topspeedf[0]);
newspeedsingle := strtofloat(topspeedf[topspeedf.Count-1]);
if oldspeedsingle<=newspeedsingle then
Players.WriteConsole('1/'+inttostr(topspeedf.Count)+': '+Players[ID].Name+': '+newspeed,posmsg);
for i := (topspeedf.Count-1) downto 1 do
begin
oldspeedsingle := strtofloat(topspeedf[i-1]);
newspeedsingle := strtofloat(topspeedf[i]);
if oldspeedsingle<=newspeedsingle then begin
topspeedf.Exchange(i-1,i);
topplayersf.Exchange(i-1,i);
end else
begin
Players.WriteConsole(inttostr(i+1)+'/'+inttostr(topspeedf.Count)+': '+Players[ID].Name+': '+newspeed,posmsg);
break;
end;
end;
topspeedf.SaveToFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-speed.txt');
topspeedf.Free;
topplayersf.SaveToFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-players.txt');
topplayersf.Free;
end;
end else
begin
topspeedf.Append(newspeed);
topplayersf.Append(Players[ID].Name);
oldspeedsingle := strtofloat(topspeedf[0]);
newspeedsingle := strtofloat(topspeedf[topspeedf.Count-1]);
if oldspeedsingle<=newspeedsingle then
Players.WriteConsole('1/'+inttostr(topspeedf.Count)+': '+Players[ID].Name+': '+newspeed,posmsg);
for i := (topspeedf.Count-1) downto 1 do
begin
oldspeedsingle := strtofloat(topspeedf[i-1]);
newspeedsingle := strtofloat(topspeedf[i]);
if oldspeedsingle<=newspeedsingle then begin
topspeedf.Exchange(i-1,i);
topplayersf.Exchange(i-1,i);
end else
begin
Players.WriteConsole(inttostr(i+1)+'/'+inttostr(topspeedf.Count)+': '+Players[ID].Name+': '+newspeed,posmsg);
break;
end;
end;
topspeedf.SaveToFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-speed.txt');
topspeedf.Free;
topplayersf.SaveToFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-players.txt');
topplayersf.Free;
end;
end else
begin
topspeedf := File.CreateStringList();
topspeedf.Append(newspeed);
      topspeedf.SaveToFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-speed.txt');
   topspeedf.Free;
   topplayersf := File.CreateStringList();
  topplayersf.Append(Players[ID].Name);
topplayersf.SaveToFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-players.txt');
topplayersf.Free;
Players.WriteConsole('1/1: '+Players[ID].Name+': '+newspeed,posmsg);
end;
end;

procedure OnMChange(Next: string);
begin
if gstart then begin
mspeed := mstartspeed;
for i := 1 to 32 do
if (Players[i].Active) and (Players[i].Team=3) then begin
mx := Players[i].X;
my := Players[i].Y;
end;
end;
end;

procedure Clock(Ticks: Integer);
begin
if Ticks mod 60 = 0 then begin
if timer>-1 then begin
timer := timer-1;
if timer>-1 then
Players.BigText(2,'Starting game '+inttostr(timer)+'s',150,neumsg,0.05,5,380);
if timer=0 then begin
bravop := 0;
for i := 1 to 32 do
if (Players[i].Active) and (Players[i].Team=2) then
bravop := bravop+1;
if bravop>=minplayers then begin
if Game.Teams[3].Count=0 then
SpawnMissileBot;
swapt := true;
total := 0;
for i := 1 to 32 do
if Players[i].Active then begin
if Players[i].Team=2 then
Players[i].Team := 1;
if Players[i].Team=1 then begin
total := total+1;
alphap[total] := i;
end;
if Players[i].Team=3 then begin
mid := i;
mx := Players[i].X;
my := Players[i].Y;
end;
end;
swapt := false;
target := alphap[Random(1,total+1)];
Players.WriteConsole('Player ['+Players[target].Name+'] has became a target',neumsg);
mspeed := mstartspeed;
gstart := true;
end else
Players.WriteConsole('Game start failed - need '+inttostr(minplayers-bravop)+' more '+iif(minplayers-bravop = 1,'player','players'),negmsg);
end;
end;

if gstart then
Players.BigText(2,'Target: '+Players[target].Name,150,neumsg,0.05,320,380);
end;

if (gstart) and (timer=-1) then begin
if mspeed<=mmaxspace*60-mincspeed then
mspeed := mspeed+mincspeed
else
mspeed := mmaxspace*60;
gear := Trunc(60/mspeed*mmaxspace);
if Ticks mod gear = 0 then begin
tx := Players[target].X;
      ty := Players[target].Y;
  dist := Distance(mx,my,tx,ty);
mspace := gear*mspeed/60;
if dist<=mspace then begin
mx := tx;
my := ty;
end else
begin
xd := mx-tx;
  yd := my-ty;
   cosine := xd/dist;
   sine := yd/dist;
  mx := mx+mspace*cosine*-1;
my := my+mspace*sine*-1;
end;
end;
if gear>14 then begin
if Ticks mod 15 = 0 then
Map.CreateBullet(mx,my,mspeed/60*cosine,mspeed/60*sine,mdamage,5,Players[mid]);
end else
if Ticks mod gear = 0 then
Map.CreateBullet(mx,my,mspeed/60*cosine,mspeed/60*sine,mdamage,5,Players[mid]);
Players.BigText(3,'Missile Speed: '+formatfloat('0.00',mspeed),150,neumsg,0.05,320,400);
end;
end;

procedure OnJoinATeam(Player: TActivePlayer; Team: TTeam);
begin
if not swapt then begin
Player.Team:=2;
Player.WriteConsole('Wait in bravo if you want to play',negmsg);
end else
if Player.ID=target then
GiveWep(target,6,11)
else
GiveWep(Player.ID,11,11);
end;

procedure OnJoinBTeam(Player: TActivePlayer; Team: TTeam);
var
a: byte;
begin
if playerafk[Player.ID] then begin
playerafk[Player.ID]:=false;
Player.WriteConsole('AFK disabled',neumsg);
end;

if gstart then begin
total := 0;
for i := 1 to 32 do
if (Players[i].Team=1) and (Players[i].Alive) then
total := total+1;
if (total=minplayers-1) then begin
gstart := false;
endgame := true;
for a := 1 to 32 do
if (Players[a].Team=5) and (Players[a].Active) and (playerafk[a]=false) then
Players[a].Team := 2;
for a := 1 to 32 do
if (Players[a].Team=1) and (Players[a].Alive) then begin
Players[a].Team := 2;
Players[a].Kills := Players[a].Kills+1;
TopSpeed(a,mspeed);
if Players[a].Kills<maxpoints then
Players.WriteConsole('Player ['+Players[a].Name+'] has now '+inttostr(Players[a].Kills)+'/'+inttostr(maxpoints)+' points',posmsg)
else
if Players[a].Kills=maxpoints then begin
Players.WriteConsole('Player ['+Players[a].Name+'] has now '+inttostr(Players[a].Kills)+'/'+inttostr(maxpoints)+' points and won the round!',posmsg);
Map.Nextmap;
end;
end;
endgame := false;
timer := timerstart;
end;
end;

if (gstart=false) and (endgame=false) then begin
bravop := 0;
for i := 1 to 32 do
if (Players[i].Active) and (Players[i].Team=2) then
bravop := bravop+1;
if bravop<minplayers then
Players.WriteConsole('Need '+inttostr(minplayers-bravop)+' more '+iif(minplayers-bravop = 1,'player','players'),neumsg)
else
if timer<1 then begin
timer := timerstart;
Players.WriteConsole('Minimum players reached - countdown started',posmsg);
end;
end;

if (gstart) and (Player.ID=target) then begin
total := 0;
for i := 1 to 32 do
if (Players[i].Team=1) and (Players[i].Active) then begin
total := total+1;
alphap[total] := i;
end;
target := alphap[Random(1,total+1)];
GiveWep(target,6,11);
Players.BigText(2,'Target: '+Players[target].Name,150,neumsg,0.05,320,380);
end;
end;

procedure OnJoinSTeam(Player: TActivePlayer; Team: TTeam);
var
a: byte;
startok: boolean;
begin
if gstart then begin
total := 0;
for i := 1 to 32 do
if (Players[i].Team=1) and (Players[i].Active) then
total := total+1;
if (total=minplayers-1) then begin
gstart := false;
endgame := true;
for a := 1 to 32 do
if (Players[a].Active) and (((Player.ID<>a) and (playerafk[a]=false) and (Players[a].Team=5)) or (Players[a].Team=2)) then begin
if Players[a].Team=5 then
Players[a].Team := 2;
if startok=false then
startok := true;
end;
for a := 1 to 32 do
if (Players[a].Team=1) and (Players[a].Active) then begin
Players[a].Team := 2;
Players[a].Kills := Players[a].Kills+1;
TopSpeed(a,mspeed);
if Players[a].Kills<maxpoints then
Players.WriteConsole('Player ['+Players[a].Name+'] has now '+inttostr(Players[a].Kills)+'/'+inttostr(maxpoints)+' points',posmsg)
else
if Players[a].Kills=maxpoints then begin
Players.WriteConsole('Player ['+Players[a].Name+'] has now '+inttostr(Players[a].Kills)+'/'+inttostr(maxpoints)+' points and won the round!',posmsg);
Map.Nextmap;
end;
end;
endgame := false;
if startok then
timer := timerstart
else
Players.WriteConsole('Game stopped - last player joined to spectators',negmsg);
end;
end;

if (gstart) and (Player.ID=target) then begin
total := 0;
for i := 1 to 32 do
if (Players[i].Team=1) and (Players[i].Active) then begin
total := total+1;
alphap[total] := i;
end;
target := alphap[Random(1,total+1)];
GiveWep(target,6,11);
Players.BigText(2,'Target: '+Players[target].Name,150,neumsg,0.05,320,380);
end;
end;

procedure OnLeave(Player: TActivePlayer; Kicked: Boolean);
var
a: byte;
startok: boolean;
begin
Player.Alive := false;
playerafk[Player.ID] := false;

if gstart then begin
total := 0;
for i := 1 to 32 do
if (Players[i].Team=1) and (Players[i].Alive) then
total := total+1;
if (total=minplayers-1) then begin
gstart := false;
endgame := true;
for a := 1 to 32 do
if (Players[a].Active) and (((Player.ID<>a) and (playerafk[a]=false) and (Players[a].Team=5)) or (Players[a].Team=2)) then begin
if Players[a].Team=5 then
Players[a].Team := 2;
if startok=false then
startok := true;
end;
for a := 1 to 32 do
if (Players[a].Team=1) and (Players[a].Alive) then begin
Players[a].Team := 2;
Players[a].Kills := Players[a].Kills+1;
TopSpeed(a,mspeed);
if Players[a].Kills<maxpoints then
Players.WriteConsole('Player ['+Players[a].Name+'] has now '+inttostr(Players[a].Kills)+'/'+inttostr(maxpoints)+' points',posmsg)
else
if Players[a].Kills=maxpoints then begin
Players.WriteConsole('Player ['+Players[a].Name+'] has now '+inttostr(Players[a].Kills)+'/'+inttostr(maxpoints)+' points and won the round!',posmsg);
Map.Nextmap;
end;
end;
endgame := false;
if startok then
timer := timerstart
else
Players.WriteConsole('Game stopped - last player has left the game',negmsg);
end;
end;

if (gstart) and (Player.ID=target) then begin
total := 0;
for i := 1 to 32 do
if (Players[i].Team=1) and (Players[i].Alive) then begin
total := total+1;
alphap[total] := i;
end;
target := alphap[Random(1,total+1)];
GiveWep(target,6,11);
Players.BigText(2,'Target: '+Players[target].Name,150,neumsg,0.05,320,380);
end;

if Player.ID=mid then begin
SpawnMissileBot;
for i := 1 to 32 do
if (Players[i].Active) and (Players[i].Team=3) then
mid := i;
end;
end;

function OnDamage(Shooter, Victim: TActivePlayer; Damage: Single; BulletId: Byte): Single;
begin
if (Shooter.Team=3) and (Victim.ID=target) then
Result := Damage
else
Result := 0;

if (Shooter.Team=1) and (Victim.Team=1) then begin
if Shooter.ID=target then
target := Victim.ID
else
if Victim.ID=target then
target := Shooter.ID;
Players.BigText(2,'Target: '+Players[target].Name,150,neumsg,0.05,320,380);
if Shooter.ID=target then begin
GiveWep(target,6,11)
GiveWep(Victim.ID,11,11);
end;
if Victim.ID=target then begin
GiveWep(target,6,11)
GiveWep(Shooter.ID,11,11);
end;
end;
end;

procedure OnKill(Killer, Victim: TActivePlayer; BulletId: Byte);
var
a: byte;
begin
if (Killer.Team=3) and (Victim.Team=1) then begin
total := 0;
for i := 1 to 32 do
if (Players[i].Team=1) and (Players[i].Active) then
total := total+1;
if total=minplayers then begin
gstart := false;
endgame := true;
for a := 1 to 32 do
if (Players[a].Team=5) and (Players[a].Active) and (playerafk[a]=false) then
Players[a].Team := 2;
Victim.Team := 2;
for a := 1 to 32 do
if (Players[a].Team=1) and (Players[a].Active) then begin
Players[a].Team := 2;
Players[a].Kills := Players[a].Kills+1;
TopSpeed(a,mspeed);
if Players[a].Kills<maxpoints then
Players.WriteConsole('Player ['+Players[a].Name+'] has now '+inttostr(Players[a].Kills)+'/'+inttostr(maxpoints)+' points',posmsg)
else
if Players[a].Kills=maxpoints then begin
Players.WriteConsole('Player ['+Players[a].Name+'] has now '+inttostr(Players[a].Kills)+'/'+inttostr(maxpoints)+' points and won the round!',posmsg);
Map.Nextmap;
end;
end;
endgame := false;
timer := timerstart;
end;
if total>minplayers then
Victim.Team := 5;
end;
end;

procedure OnWepChange(Player: TActivePlayer; Primary, Secondary: TPlayerWeapon);
begin
if Player.Team=1 then begin
if Secondary.WType=255 then
if Player.ID=target then
GiveWep(target,6,11)
else
GiveWep(Player.ID,11,11);

if (Player.ID=target) and (Primary.WType<>255) and (Primary.WType<>6) then
GiveWep(target,6,11);

if (Player.ID<>target) and (Primary.WType<>255) and (Primary.WType<>11) then
GiveWep(Player.ID,11,11);
end;
end;

procedure OnSpeak(Player: TActivePlayer; Text: string);
begin
if Text = '!top' then
if File.Exists('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-speed.txt') and File.Exists('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-players.txt') then begin
topspeedf := File.CreateStringListFromFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-speed.txt');
topplayersf := File.CreateStringListFromFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-players.txt');
Players.WriteConsole('Top Speeds for ['+Game.CurrentMap+'], total: '+inttostr(topspeedf.Count),neumsg);
for i := 0 to 9 do begin
if i=0 then
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],$FFD700)
else
if i=1 then
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],$C0C0C0)
else
if i=2 then
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],$CD7F32)
else
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],posmsg);
if topspeedf.Count-1=i then
break;
end;
topspeedf.Free;
topplayersf.Free;
end else
Players.WriteConsole('No records for this map',negmsg);

if Copy(Text,1,5) = '!top ' then
if Copy(Text,6,length(Text))<>'' then begin
if File.Exists('scripts/'+Script.Name+'/data/'+Copy(Text,6,length(Text))+'-speed.txt') and File.Exists('scripts/'+Script.Name+'/data/'+Copy(Text,6,length(Text))+'-players.txt') then begin
topspeedf := File.CreateStringListFromFile('scripts/'+Script.Name+'/data/'+Copy(Text,6,length(Text))+'-speed.txt');
topplayersf := File.CreateStringListFromFile('scripts/'+Script.Name+'/data/'+Copy(Text,6,length(Text))+'-players.txt');
Players.WriteConsole('Top Speeds for ['+Copy(Text,6,length(Text))+'], total: '+inttostr(topspeedf.Count),neumsg);
for i := 0 to 9 do begin
if i=0 then
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],$FFD700)
else
if i=1 then
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],$C0C0C0)
else
if i=2 then
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],$CD7F32)
else
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],posmsg);
if topspeedf.Count-1=i then
break;
end;
topspeedf.Free;
topplayersf.Free;
end else
Players.WriteConsole('No records for this map',negmsg);
end;

if Text = '!mypos' then
if File.Exists('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-speed.txt') and File.Exists('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-players.txt') then begin
topspeedf := File.CreateStringListFromFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-speed.txt');
topplayersf := File.CreateStringListFromFile('scripts/'+Script.Name+'/data/'+Game.CurrentMap+'-players.txt');
if topplayersf.IndexOf(Player.Name)<>-1 then begin
Players.WriteConsole('Player ['+Player.Name+'] highest position for ['+Game.CurrentMap+']',neumsg);
for i := 0 to topplayersf.Count-1 do
if topplayersf[i]=Player.Name then begin
if i=0 then
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],$FFD700)
else
if i=1 then
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],$C0C0C0)
else
if i=2 then
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],$CD7F32)
else
Players.WriteConsole(inttostr(i+1)+': '+topplayersf[i]+': '+topspeedf[i],posmsg);
break;
end;
end else
Players.WriteConsole('Position not found for player ['+Player.Name+']',negmsg);
topspeedf.Free;
topplayersf.Free;
end else
Players.WriteConsole('No records for this map',negmsg);

if Text = '!eafk' then
if Player.Team=5 then begin
playerafk[Player.ID] := true;
Player.WriteConsole('AFK enabled',neumsg);
end else
Player.WriteConsole('Join to spectators to enable AFK',negmsg);

if Text = '!dafk' then begin
playerafk[Player.ID] := false;
Player.WriteConsole('AFK disabled',neumsg);
end;
end;

var
a: byte;

begin
Game.TickThreshold := 1;
timer := -1;

Map.OnAfterMapChange := @OnMChange;
Game.OnClockTick := @Clock;
Game.Teams[1].OnJoin := @OnJoinATeam;
Game.Teams[2].OnJoin := @OnJoinBTeam;
Game.Teams[5].OnJoin := @OnJoinSTeam;
Game.OnLeave := @OnLeave;
for a := 1 to 32 do begin
Players[a].OnDamage := @OnDamage;
Players[a].OnKill := @OnKill;
Players[a].OnWeaponChange := @OnWepChange;
Players[a].OnSpeak := @OnSpeak;
end;

for a := 1 to 32 do
if (Players[a].Team=1) or (Players[a].Team=2) and (Players[a].Active) then
Players[a].Team := 2;
Players.WriteConsole('[*] '+Script.Name+' compiled successfully',posmsg);
WriteLn('[*] '+Script.Name+' compiled successfully');
end.

Here's the code for making the missile
Code: [Select]
if (gstart) and (timer=-1) then begin
if mspeed<=mmaxspace*60-mincspeed then
mspeed := mspeed+mincspeed
else
mspeed := mmaxspace*60;
gear := Trunc(60/mspeed*mmaxspace);
if Ticks mod gear = 0 then begin
tx := Players[target].X;
      ty := Players[target].Y;
  dist := Distance(mx,my,tx,ty);
mspace := gear*mspeed/60;
if dist<=mspace then begin
mx := tx;
my := ty;
end else
begin
xd := mx-tx;
  yd := my-ty;
   cosine := xd/dist;
   sine := yd/dist;
  mx := mx+mspace*cosine*-1;
my := my+mspace*sine*-1;
end;
end;
if gear>14 then begin
if Ticks mod 15 = 0 then
Map.CreateBullet(mx,my,mspeed/60*cosine,mspeed/60*sine,mdamage,5,Players[mid]);
end else
if Ticks mod gear = 0 then
Map.CreateBullet(mx,my,mspeed/60*cosine,mspeed/60*sine,mdamage,5,Players[mid]);
Players.BigText(3,'Missile Speed: '+formatfloat('0.00',mspeed),150,neumsg,0.05,320,400);
end;

Coding convention is a little bit bad and please don't reply to me guidelines...

Offline Savage

  • Soldier
  • **
  • Posts: 155
Re: Savage's Servers
« Reply #7 on: October 18, 2016, 05:29:50 am »
Moved all servers to Zabijaka.pl