Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const
- Damage = 29; // Dano
- Tempo1 = 5; // Intervalo
- Tempo2 = 9; // Intervalo
- Distancia = 150; // Distancia
- Pasta = 'Config'; // Nome da Pasta de Configurações
- Cor1 = $FFFFFF; // Branco
- Cor2 = $FF0000; // Vermelho
- Cor3 = $008B00; // Verde
- TimeWeapon = 5; // Tempo para distribuição de armas
- type
- Stats = record
- Classe: integer;
- X, Y: Single;
- Intervalo: integer;
- Paralisou: Boolean;
- Paralisado: Boolean;
- WTime: Integer;
- end;
- var
- P: Array[1 .. 32] Of Stats;
- Loaded: boolean;
- procedure ActivateServer();
- begin
- Command('/loadcon scripts/'+ScriptName+'/'+(Pasta)+'/JumpersConfigurations.ini');
- Command('/loadlist scripts/'+ScriptName+'/'+(Pasta)+'/JumpersList');
- Command('/loadwep scripts/'+ScriptName+'/'+(Pasta)+'/JumpersWeapons');
- Writeln('*** JUMPERS MODE ATIVADO ***');
- Loaded := False;
- end;
- procedure AppOnIdle(Ticks: integer);
- var A, B: Byte; x, y: Single;
- begin
- If not Loaded Then
- If NumPlayers + NumBots = 0 Then begin
- Command('/loadwep scripts/'+ScriptName+'/'+(Pasta)+'/JumpersWeapons');
- Loaded := True;
- end;
- For A := 1 To 32 Do
- If GetPlayerStat(A,'Alive') Then
- If GetPlayerStat(A,'Active') Then
- If P[A].WTime > 1 Then begin
- dec(P[A].WTime,1);
- end;
- For A := 1 To 32 Do
- If GetPlayerStat(A,'Active') Then
- If GetPlayerStat(A,'Team') = 5 Then
- If P[A].Classe <> 0 Then begin
- P[A].Classe := 0;
- end;
- For A := 1 To 32 Do
- If GetPlayerStat(A,'Active') Then
- If GetPlayerStat(A,'Team') = 1 Then
- If P[A].Classe <> 1 Then begin
- P[A].Classe := 1;
- end;
- For A := 1 To 32 Do
- If GetPlayerStat(A,'Active') Then
- If GetPlayerStat(A,'Team') = 2 Then
- If P[A].Classe <> 2 Then begin
- P[A].Classe := 2;
- end;
- For A := 1 To 32 Do
- if GetPlayerStat(A,'Alive') then
- if GetPlayerStat(A,'Active') then
- If P[A].classe = 1 Then
- For B := 1 To 32 Do
- if GetPlayerStat(B,'Active') then if GetPlayerStat(B,'Alive') then
- if GetPlayerStat(A,'Team') <> GetPlayerStat(B,'Team') then
- if Round(Distance(GetPlayerStat(A,'x'),GetPlayerStat(A,'y'),GetPlayerStat(B,'x'),GetPlayerStat(B,'y'))) < Distancia Then begin
- DoDamage(B,Damage);
- end;
- For A := 1 To 32 Do
- if GetPlayerStat(A,'Alive') then
- if GetPlayerStat(A,'Active') then
- If P[A].classe = 1 Then
- for B := 1 To 32 do
- if GetPlayerStat(B,'Active') then if GetPlayerStat(B,'Alive') then
- If GetPlayerStat(B,'Health') <= Damage Then
- if GetPlayerStat(A,'Team') <> GetPlayerStat(B,'Team') then
- if Round(Distance(GetPlayerStat(A,'x'),GetPlayerStat(A,'y'),GetPlayerStat(B,'x'),GetPlayerStat(B,'y'))) < Distancia Then begin
- DoDamage(B,150);
- WriteConsole(B,'Você foi morto por'+' '+IDToName(A),Cor2);
- WriteConsole(A,'Você matou o(a)'+' '+IDToName(B),Cor3);
- SetScore(A,GetPlayerStat(A,'Kills')+1);
- SetScore(B,GetPlayerStat(B,'Deaths')+1);
- end;
- For A := 1 To 32 Do
- If GetPlayerStat(A,'Active') Then
- If GetPlayerStat(A,'Alive') Then
- If GetPlayerStat(A,'Team') = 1 Then
- If P[A].Classe = 1 Then
- If P[A].Paralisado Then
- If P[A].Intervalo > 1 Then begin
- MovePlayer(A, (P[A].X), (P[A].Y));
- dec(P[A].Intervalo,1);
- end else P[A].Paralisado := False; WriteConsole(A,'*** ESTADO NORMAL ***',Cor1);
- For A := 1 To 32 Do
- If GetPlayerStat(A,'Active') Then
- If GetPlayerStat(A,'Alive') Then
- If GetPlayerStat(A,'Team') = 2 Then
- If P[A].Classe = 2 Then
- If P[A].Paralisou Then
- If P[A].Intervalo > 1 Then begin
- dec(P[A].Intervalo,1);
- end else P[A].Paralisou := False; WriteConsole(A,'A energia elétrica da sua arma foi recarregada',Cor3);
- For A := 1 To 32 Do
- If GetPlayerStat(A,'Team') = 1 Then
- If P[A].Classe = 1 Then
- If GetPlayerStat(A,'Active') Then
- If GetPlayerStat(A,'Alive') Then begin
- If not P[A].Paralisado Then begin
- DrawText(A,'JUMPER'+chr(13)+chr(10)+'HEALTH:'+' '+Inttostr(GetPlayerStat(A,'Health')*2/3)+'%',300,Cor1,0.08,14,310);
- end else DrawText(A,'*** PARALISADO ***',100,Cor2,0.08,14,320);
- end else DrawText(A,'JUMPER'+chr(13)+chr(10)+'HEALTH:'+' '+'0%',300,Cor2,0.08,14,310);
- For A := 1 To 32 Do
- If GetPlayerStat(A,'Team') = 2 Then
- If P[A].Classe = 2 Then
- If GetPlayerStat(A,'Active') Then
- If GetPlayerStat(A,'Alive') Then begin
- If not P[A].PARALISOU Then begin
- DrawText(A,'PALADINO'+chr(13)+chr(10)+'ARMA DE CHOQUE CARREGADA!'+chr(13)+chr(10)+'HEALTH:'+' '+Inttostr(GetPlayerStat(A,'Health')*2/3)+'%',300,Cor3,0.08,14,320);
- end else DrawText(A,'PALADINO'+chr(13)+chr(10)+'ARMA DE CHOQUE CARREGANDO'+chr(13)+chr(10)+'HEALTH:'+' '+Inttostr(GetPlayerStat(A,'Health')*2/3)+'%'+chr(13)+chr(10)+Inttostr(P[A].Intervalo),300,Cor1,0.08,14,320);
- end else DrawText(A,'PALADINO'+chr(13)+chr(10)+'HEALTH:'+' '+'0%',300,Cor2,0.08,14,310);
- end;
- procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: byte);
- var Team: Integer;
- begin
- Team := GetPlayerStat(ID,'Team');
- Case Team of
- 1:begin If P[ID].WTime = 1 Then ForceWeapon(ID, 11, 255, 0); P[ID].WTime := TimeWeapon;
- end;
- 2:begin If P[ID].WTime = 1 Then ForceWeapon(ID, 5, 255, 0); P[ID].WTime := TimeWeapon;
- end;
- end;
- end;
- procedure OnJoinTeam(ID, Team: byte);
- begin
- If (Team = 1) Then begin
- P[ID].Classe := 1;
- P[ID].Paralisado := False;
- WriteConsole(ID,'Dúvidas sobre a sua classe? !classinfo',Cor2);
- P[ID].WTime := TimeWeapon;
- end;
- If (Team = 2) Then begin
- P[ID].Classe := 2;
- P[ID].Intervalo := Tempo2;
- P[ID].Paralisou := True;
- WriteConsole(ID,'Dúvidas sobre a sua classe? !classinfo',Cor2);
- P[ID].WTime := TimeWeapon;
- end;
- If (Team = 3) Then begin
- P[ID].Classe := 0;
- Command('/setteam5 '+Inttostr(ID));
- P[ID].WTime := TimeWeapon;
- end;
- If (Team = 4) Then begin
- P[ID].Classe := 0;
- Command('/setteam5 '+Inttostr(ID));
- P[ID].WTime := TimeWeapon;
- end;
- If (Team = 5) Then begin
- P[ID].Classe := 0;
- P[ID].WTime := TimeWeapon;
- end;
- end;
- procedure OnJoinGame(ID, Team: byte);
- begin
- Command('/setteam5 '+Inttostr(ID));
- P[ID].Classe := 0;
- WriteConsole(ID,'Bem-vindo a Saga Jumpers V2, by Washington',Cor1);
- end;
- procedure OnPlayerSpeak(ID: Byte; Text: string);
- begin
- Text := LowerCase(Text);
- If (Text = '!classinfo') Then begin
- Case P[ID].Classe of
- 2:begin WriteConsole(ID,'*** PALADINO ***',Cor3); WriteConsole(ID,'Não tem poderes, porém tem sua arma Eficaz contra Jumpers',$FFFFFF); WriteConsole(ID,'OBS: Sua arma pode paralisar seus inimigos com o seu poder de choque',$FFFFFF);
- end;
- 0:begin WriteConsole(ID,'*** SPECTATOR ***',Cor3); WriteConsole(ID,'It is Obvius :D',$FFFFFF);
- end;
- 1:begin WriteConsole(ID,'*** JUMPER ***',Cor3); WriteConsole(ID,'Pode se teleportar usando sua arma em seus inimigos',$FFFFFF); WriteConsole(ID,'OBS: O poder de sua arma pode atravessar as paredes',$FFFFFF);
- end;
- end;
- end;
- end;
- function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;
- begin
- If GetPlayerStat(Shooter,'Team') = 1 Then
- If P[Shooter].Classe = 1 Then begin
- MovePlayer(Shooter, (GetPlayerStat(Victim,'x')),(GetPlayerStat(Victim,'y')));
- end;
- If GetPlayerStat(Shooter,'Team') = 2 Then
- If P[Shooter].Classe = 2 Then
- If not P[Shooter].Paralisou Then
- If not P[Victim].Paralisado Then begin
- P[Victim].X := GetPlayerStat(Victim,'x');
- P[Victim].Y := GetPlayerStat(Victim,'y');
- P[Victim].Paralisado := True;
- P[Shooter].Paralisou := True;
- P[Victim].Intervalo := Tempo1;
- P[Shooter].Intervalo := Tempo2;
- end;
- If GetPlayerStat(Victim,'Team') = 1 Then Result := Damage/4;
- If GetPlayerStat(Victim,'Team') = 2 Then Result := Damage;
- If GetPlayerStat(Shooter,'Team') = 1 Then Result := 0;
- end;
- procedure OnPlayerRespawn(ID: byte);
- begin
- For ID := 1 To 32 Do begin
- P[ID].WTime := TimeWeapon;
- end;
- end;
Add Comment
Please, Sign In to add comment