Author Topic: The OmniMod  (Read 2791 times)

0 Members and 1 Guest are viewing this topic.

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
The OmniMod
« on: June 25, 2008, 10:10:54 am »
Script Name: The OmniMod
Script Description: Gives (Or takes) the OmniMod from specified player [ID]
Original Author(s): DorkeyDear, Shantec
Core Version: The lastest one (2.6.3)
Code: Umh... http://nopaste.com/p/aQBzWqpNW ?
Additional Description:
This script is a variable form DorkeyDear's script, Infinite Predator
Basically its all the same, with some modding (and added some stuff).
What it does?! Well, with /omnimod (ID) (Damage modifier) you can give to player Infinite Predator, double (or as much as you want) damage, flamer and invincibility. It is OnCommand, so only admins can type it.
Forgot to mention, but If you'r in omnimod, others can hurt you, if they have OmniMod too.

Update:
Fixed typo, added ingame damage setting, You can now set the extra damage by typing /omnimod (ID) (Damage Modifier)
Also, removing omnimod hasn't changed at all! You can remove it by typing /omnimod (ID) (the omnimod is removed if that player has omnimod, otherwise it gives an error! )

Bumb.. also just cause i was bored i added [ code ]
Code: [Select]
//This scripts original author is DorkeyDear (Curt)
//Script modified by Shantec a.k.a Reima ( a.k.a Reima The Warper)

const
  Color = $FFFFFFFF;
  cGood = $00EE20;
  cBad = $EE2000;
  cError = $AA0000;
  //removed manual damage set, added oncommand damage set

var
  Omnio, AfterRespawn: array[1..32] of boolean;
  DmgModifier: array[1..32] of integer;

procedure AppOnIdle(Ticks: cardinal);
var
  i: byte;
begin
  for i := 1 to 32 do if AfterRespawn[i] then begin
    if Omnio[i] then begin
      GiveBonus(i, 1);
      DrawText(i, '  ', 0, $00000000, 0, 0, 0);
  Forceweapon(i,11,GetPlayerStat(i,'primary'),255);
    end;
    AfterRespawn[i] := false;
  end;
  if (Ticks mod 900) = 0 then begin
    for i := 1 to 32 do if GetPlayerStat(i, 'Active') = true then if Omnio[i] and (GetPlayerStat(i, 'Alive') = true) then begin
      GiveBonus(i, 1);
      DrawText(i, '  ', 0, $00000000, 0, 0, 0);
    end;
  end;
end;

procedure OmniOn(ID,Who: byte; dmg: integer);
begin
  Omnio[Who] := true;
  DmgModifier[who]:= dmg;
  if GetPlayerStat(Who, 'Alive') = true then begin
    GiveBonus(Who, 1);
Forceweapon(who,11,GetPlayerStat(Who,'primary'),255);
    DrawText(Who, '  ', 0, $00000000, 0, 0, 0);
  end;
  WriteConsole(Id, 'You have given ' + GetPlayerStat(Who, 'Name') + ' the OmniMod', Color);
  WriteConsole(Who, 'You have been given the OmniMod', cGood);
end;

procedure OmniOff(ID,Who: byte);
begin
Omnio[Who] := false;
DmgModifier[who]:= 1;
Forceweapon(who,255,255,255);
GiveBonus(who, 0);
WriteConsole(Id, 'You have taken the OmniMod from ' + GetPlayerStat(Who, 'Name'), Color);
WriteConsole(Who, 'The OmniMod have been taken from you', cBad);
end;

procedure OnJoinGame(ID, Team: byte);
begin
  Omnio[Id] := false;
  DmgModifier[id] := 1;
end;

function OnCommand(ID: byte; Text: string): boolean;
var
  Who: byte;
  dmg: integer;
begin
  case LowerCase(GetPiece(Text,' ',0)) of
   '/omnimod':
      try
      Who := StrtoInt(GetPiece(Text,' ',1));
  dmg := StrtoInt(GetPiece(Text,' ',2));
   if Omnio[who] = false then begin
        if not GetPlayerStat(Who, 'Active') then StrtoInt(' ');
OmniOn(ID,Who,dmg);
   end else begin
    OmniOff(ID,Who);
   end;
      except
   if Omnio[Who] = false then begin
        WriteConsole(Id, 'Invalid player, or damage-modifier', cError);
        WriteConsole(Id, 'Use it like "/omnimod (ID) (Damage modifier)', cError);
        WriteConsole(Id, 'Normal damage = 1', cError);
   end else OmniOff(ID,Who);
      end;
  end;
end;

procedure OnPlayerRespawn(Id: byte);
begin
  AfterRespawn[Id] := true;
end;

function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;
begin
 case Omnio[Victim] of
  true: if Omnio[Shooter] = false then result := 0 else result := damage;
  false: if Omnio[Shooter] = true then result := (damage * DmgModifier[shooter]) else result := damage;
 end;
end;
« Last Edit: November 19, 2008, 08:26:54 am by shantec »
Also Known As REIMA


Lol Happles (happy apples)

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: The OmniMod
« Reply #1 on: June 25, 2008, 11:57:32 am »
Why a flamer? wouldn't it be better if you just let them use the gun they want to use?

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: The OmniMod
« Reply #2 on: June 25, 2008, 12:07:36 pm »
Well, kinda true.
But when you get flamer, your primary gun will be transferred to your secondary "slot"
So it kinda lets you use the gun you want :S
Also Known As REIMA


Lol Happles (happy apples)

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: The OmniMod
« Reply #3 on: June 25, 2008, 12:50:43 pm »
Ah. That's good then. Should have put that in the origonal post though.

Offline amb2010

  • Camper
  • ***
  • Posts: 264
  • Fear the dot ...
Re: The OmniMod
« Reply #4 on: June 25, 2008, 04:21:08 pm »
Very fun to torment the people in your server gj :D and Iq that is common sense kinda..the flamer always does that...
And as the lyrics go in the United State's national anthem: "America, f**k YEAH!".

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: The OmniMod
« Reply #5 on: June 25, 2008, 05:24:52 pm »
No, it doesn't. For me it always forces a flamethrower on my primary and keeps the secondary. :|
« Last Edit: June 25, 2008, 05:28:29 pm by Iq Unlimited »

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: The OmniMod
« Reply #6 on: June 26, 2008, 09:21:15 am »
.... For me, if i pick flamegod, it forces the primary to secondary and flamer to primary o.O
Also Known As REIMA


Lol Happles (happy apples)

Offline frosty

  • Flagrunner
  • ****
  • Posts: 601
  • Uber Desert Eagle ^^
Re: The OmniMod
« Reply #7 on: June 30, 2008, 08:38:43 pm »
umm...thats normal for flamegod mode...
check out my server! click here

If at first you don't succeed, Improvise! :D

Offline a fool

  • Major
  • *
  • Posts: 98
  • Wait, what?
Re: The OmniMod
« Reply #8 on: July 02, 2008, 03:15:08 pm »
.... For me, if i pick flamegod, it forces the primary to secondary and flamer to primary o.O
or maybe it keeps your primary weapon, primary, and change the secondary weapon to the flamer but auto change to the secondary? :O
Verily!

Offline Bellamy

  • Major(1)
  • Posts: 42
Re: The OmniMod
« Reply #9 on: July 02, 2008, 03:51:13 pm »
Just to make it look nicer..

'The OmniMod have been taken for you'

You might wanna fix that.