0 Members and 1 Guest are viewing this topic.
//here is wath i added in the scripttype tsoldier = recordgodcooldown:integer;//i added this onplayerdamageif soldier[Victim].godcooldown = 0 then beginif (Soldier[Victim].GodTime <> -1) then begin Result := -99999; Exit; //i added this onjoingame soldier[ID].godcooldown := 0;//i added this in AppOnIddle if (Soldier[i].godcooldown := 100) then begin Soldier[i].godcooldown := Soldier[i].godcooldown - 1; if (Soldier[i].godcooldown = 0) then begin Soldier[i].godcooldown := -1; WriteConsole(i,'Shield can now be casted !',$CC0000);
if soldier[i].godcooldown > 0 then beginsoldier[i].godcooldown := soldier[i].godcooldown - 1;if soldier[i].godcooldown = 0 then draw(shield ready);end;
function OnPlayerDamage(Victim,Shooter:Byte; Damage:Integer):Integer;begin Result := Damage if (Victim = Shooter) then Exit; if (Soldier[Victim].GodTime > 0) then begin // 0 means god-mode Result := 0; end else begin if (soldier[shooter].level >= 55) and (Random(1,101) <= FatalHitChance) then begin FatalHit(Victim,Shooter); WriteConsole(Shooter,'Fatal Hit !',colorr); end; // i put loot ammo here, so that you can't loot from someone in god-mode if (soldier[shooter].level >= 50) and (Random(1,101) <= LootAmmoChance) then LootAmmo(Shooter); end;end;// this is in your apponidle: for i:= 1 to 32 do if GetPlayerStat(i,'Active') then begin if (Soldier[i].GodTime > 0) then begin Soldier[i].GodTime := Soldier[i].GodTime - 1; if (Soldier[i].GodTime = 0) then WriteConsole(i,'You are mortal again..',$CC0000); end else begin if (Soldier[i].godcooldown > 0) then begin // cooldown doesn't start until god-mode is over Soldier[i].godcooldown := Soldier[i].godcooldown - 1; if (Soldier[i].godcooldown = 0) then WriteConsole(i,'God shield is ready to cast !',$CC0000); end; end; end;// this goes in your OnPlayerCommand if regExpMatch('^/(god|shield)$', Text) then begin if (soldier[ID].level >= 60) then begin if (soldier[ID].godcooldown = 0) then begin soldier[ID].GodTime := 20; soldier[ID].godcooldown := 120; WriteConsole(ID,'You are invincible for 20 seconds!',$FFFFFF); end else WriteConsole(ID, 'God shield not ready. ' + inttostr(soldier[ID].godcooldown) + ' seconds remaining', Color); end else WriteConsole(ID, 'You are not lvl 60 + Or you have too wait until the spell is ready', Color); end;
function OnPlayerDamage(Victim,Shooter:Byte; Damage:Integer):Integer;begin Result := Damage if (Victim = Shooter) then Exit; if (Soldier[Victim].GodTime > 0) then begin // 0 means god-mode Result := -99999; Exit; end; if (soldier[shooter].level >= 55) and (Random(1,101) <= FatalHitChance) then begin FatalHit(Victim,Shooter); WriteConsole(Shooter,'Fatal Hit !',colorr); end; if (soldier[shooter].level >= 50) and (Random(1,101) <= LootAmmoChance) then LootAmmo(Shooter);end;// AppOnIdle part for i:= 1 to 32 do if GetPlayerStat(i,'Active') then begin if (Soldier[i].GodTime > 0) then begin Soldier[i].GodTime := Soldier[i].GodTime - 1; if (Soldier[i].GodTime = 0) then WriteConsole(i,'You are mortal again..',$CC0000); if (Soldier[i].godcooldown > 0) then begin // cooldown doesn't start until god-mode is over Soldier[i].godcooldown := Soldier[i].godcooldown - 1; if (Soldier[i].godcooldown = 0) then WriteConsole(i,'God shield is ready to cast !',$CC0000); end; end; end;// this goes in your OnPlayerCommand if regExpMatch('^/(god|shield)$', Text) then begin if (soldier[ID].level >= 60) then begin if (soldier[ID].godcooldown = 0) then begin soldier[ID].GodTime := 20; soldier[ID].godcooldown := 120; WriteConsole(ID,'You are invincible for 20 seconds!',$FFFFFF); end else WriteConsole(ID, 'God shield not ready. ' + inttostr(soldier[ID].godcooldown) + ' seconds remaining', Color); end else WriteConsole(ID, 'You are not lvl 60 + Or you have too wait until the spell is ready', Color); end;
Procedure AppOnIdle(Ticks: Integer); Var N,i, K: Byte; X, Y, Dista: Single; BeginCheckMines(); for i:= 1 to 32 do if GetPlayerStat(i,'Active') then begin if (Soldier[i].GodTime > 0) then begin Soldier[i].GodTime := Soldier[i].GodTime - 1; if (Soldier[i].GodTime = 0) then WriteConsole(i,'You are mortal again..',$CC0000); if (Soldier[i].godcooldown > 0) then begin // cooldown doesn't start until god-mode is over Soldier[i].godcooldown := Soldier[i].godcooldown - 1; if (Soldier[i].godcooldown = 0) then WriteConsole(i,'God shield is ready to cast !',$CC0000); AllDraw(i); Heal(i);end; end; end;For N := 1 To maxpsg Do Begin if sgd[n] = True Then Begin CreateBullet(sgx[n],sgy[n],0,0,0,5,sgo[n]); For K := 1 To 32 Do Begin GetPlayerXy(K,X,Y); if GetPlayerStat(K,'Team') <> sgt[n] Then if GetPlayerStat(K,'Alive') = True Then if RayCast(sgx[n],sgy[n],x,y,dista,psgrang) = True Then if dista <= psgrang Then Begin x := ((x-sgx[n]) / dista)*psgspee; y := ((y-sgy[n]) / dista)*psgspee; CreateBullet(sgx[n],sgy[n],x,y,psgpowa,psgtype,sgo[n]); sga[n]:=sga[n]-1; if sga[n] = 0 Then Begin sgd[n] := false; Writeconsole(sgo[n],'One of your sentry guns ran out of ammo.',$0000FF00); end;Break; end; end; end; end;end;
Procedure ClusterSpawnTrigger();varTeam,Heal:Boolean;i,ii:Byte;beginif (not ClusterInitialized) then Exit;if (ClusterSpecTeam = 0) then Team := false;if (ClusterRegen > 0) then Heal := false;for i := 1 to ClusterRegions do if (ClusterSpawnX[i] <> 0) AND (ClusterSpawnY[i] <> 0) thenfor ii := 1 to HighestPlayerID() do if (GetPlayerStat(ii,'Active') = true) thenif (GetPlayerStat(ii,'Alive') = true) AND (GetPlayerStat(ii,'Team') <> 5) thenif (Team) then beginif (GetPlayerStat(ii,'Team') = ClusterSpecTeam) AND (Distance(GetPlayerStat(ii,'X'),GetPlayerStat(ii,'Y'),ClusterSpawnX[i],ClusterSpawnY[i]) <= ClusterRange) then beginif (Heal) then beginif (GetPlayerStat(ii,'Health') < 150) thenif (GetPlayerStat(ii,'Health') + ClusterRegen <= 150) thenDoDamage(ii,ClusterRegen)elseDoDamage(ii,GetPlayerStat(ii,'Health') -150); end else DoDamage(ii,ClusterRegen); CreateBullet(GetPlayerStat(ii,'X'),GetPlayerStat(ii,'Y'),0,0,0,5,ii);end; end else if (Distance(GetPlayerStat(ii,'X'),GetPlayerStat(ii,'Y'),ClusterSpawnX[i],ClusterSpawnY[i]) <= ClusterRange) then beginif (Heal) then beginif (GetPlayerStat(ii,'Health') < 150) thenif (GetPlayerStat(ii,'Health') + ClusterRegen <= 150) thenDoDamage(ii,ClusterRegen)elseDoDamage(ii,GetPlayerStat(ii,'Health') -150); end else DoDamage(ii,ClusterRegen); CreateBullet(GetPlayerStat(ii,'X'),GetPlayerStat(ii,'Y'),0,0,0,5,ii); end; end;
Procedure ClusterSpawnTrigger();var Team,Heal:Boolean; i,ii:Byte;begin if (not ClusterInitialized) then Exit; if (ClusterSpecTeam = 0) then Team := false; if (ClusterRegen > 0) then Heal := false; for i := 1 to ClusterRegions do if (ClusterSpawnX[i] <> 0) AND (ClusterSpawnY[i] <> 0) then for ii := 1 to HighestPlayerID() do if (GetPlayerStat(ii,'Active') = true) then if (GetPlayerStat(ii,'Alive') = true) AND (GetPlayerStat(ii,'Team') <> 5) then if (Team) then begin if (GetPlayerStat(ii,'Team') = ClusterSpecTeam) AND (Distance(GetPlayerStat(ii,'X'),GetPlayerStat(ii,'Y'),ClusterSpawnX[i],ClusterSpawnY[i]) <= ClusterRange) then begin if (Heal) then begin if (GetPlayerStat(ii,'Health') < 150) then if (GetPlayerStat(ii,'Health') + ClusterRegen <= 150) then DoDamage(ii,ClusterRegen) else DoDamage(ii,GetPlayerStat(ii,'Health') -150); end else DoDamage(ii,ClusterRegen); CreateBullet(GetPlayerStat(ii,'X'),GetPlayerStat(ii,'Y'),0,0,0,5,ii); end; end else if (Distance(GetPlayerStat(ii,'X'),GetPlayerStat(ii,'Y'),ClusterSpawnX[i],ClusterSpawnY[i]) <= ClusterRange) then begin if (Heal) then begin if (GetPlayerStat(ii,'Health') < 150) then if (GetPlayerStat(ii,'Health') + ClusterRegen <= 150) then DoDamage(ii,ClusterRegen) else DoDamage(ii,GetPlayerStat(ii,'Health') -150); end else DoDamage(ii,ClusterRegen); CreateBullet(GetPlayerStat(ii,'X'),GetPlayerStat(ii,'Y'),0,0,0,5,ii); end; end;
for i := 0 to 20 do begin if y = 3 then begin if x = 5 then begin x := x + 1; if x > 35 then begin x := x - 1 end; end;end;
for i := 0 to 20 do begin if y = 3 then begin if x = 5 then begin x := x + 1; end; if x > 35 then begin x := x - 1 end; end;end;
if x > 0 then beginx := x - 1;WriteConsole(ID, x);end;