Author Topic: [Fun] Player Cloning Script  (Read 2770 times)

0 Members and 1 Guest are viewing this topic.

Offline rayanaga

  • Soldier
  • **
  • Posts: 143
  • ~Fur flying~
    • Kryonex
[Fun] Player Cloning Script
« on: August 28, 2008, 03:16:02 pm »
Script Name: Player Cloning Script
Script Description:

A useless but humorous script that clones player on your server and adds them as bots!

I made this one in like 15 minutes just to get a kick of what it would be like to fight yourself. ;D

All you need to do is unzip the scripts into your scripts/ directory and add temp.bot to your bots/ directory. Make sure temp.bot is CHMODDED to 0777!

Script Screenshots:
Spawning a Clone
Clones Copying your chat
Even more Clones
The CLONE WARS

Original Author(s): Rayanaga
Core Version: 2.6.3
Code:

Code: [Select]
//Player Cloner Script
//Fight with your clones!
const
BOTFILE = 'bots/temp.bot';
CLONECHAT = true;

procedure ActivateServer();
begin
if FileExists(BOTFILE) = false then WriteLn('[*] WARNING!!!! ' + BOTFILE + ' DOES NOT EXIST!');
end;

procedure OnPlayerSpeak(ID: Byte; Text: string);
var
username,data,ending: String;
i: integer;
begin
if (CLONECHAT = true) and (Text <> '!clone') then
begin
for i:=1 to 32 do
begin
if (GetPlayerStat(i,'Active') = true) and (IDToName(i) = IDToName(ID)) then
BotChat(i,Text);
end;
end;

if Text = '!clone' then
begin
data := IDToName(ID);
username := ReadINI(BOTFILE,'BOT','Name','*ERROR*');
ending := GetPiece(ReadFile(BOTFILE),username,1);
WriteFile(BOTFILE,'[BOT]' + chr(13)+chr(10) + 'Name=' + data + ending);
Command('/addbot' + GetPlayerStat(ID,'Team') + ' temp');
end;

if Text = '!kickclones' then
begin
for i:=1 to 32 do
begin
if (GetPlayerStat(i,'Active') = true) and (IDToName(i) = IDToName(ID)) and (GetPlayerStat(ID,'Human') = false) then
Command('/kick ' + inttostr(i));
end;
end;
end;

Feel free to flame, comment, glorify(:)), or edit the script.
[kY] Kryonex - Your local zombie fanatics.
http://www.kryonex.com/

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: [Fun] Player Cloning Script
« Reply #1 on: August 28, 2008, 06:43:37 pm »
quite funny ^^
thinking about adding some mod with clones to my server, got some idea already. maybe you can make it into a snippet /function

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: [Fun] Player Cloning Script
« Reply #2 on: August 28, 2008, 06:46:32 pm »
heh
nice.

Just one thing that always bugs me...
Code: [Select]
if FileExists(BOTFILE) = false then WriteLn('[*] WARNING!!!! ' + BOTFILE + ' DOES NOT EXIST!');
please oh plllleeeeaaase make it:
Quote
if not FileExists(BOTFILE) then ...
and in other places... just get rid of all "= true"s... they hurt my soul.

Offline rayanaga

  • Soldier
  • **
  • Posts: 143
  • ~Fur flying~
    • Kryonex
Re: [Fun] Player Cloning Script
« Reply #3 on: August 28, 2008, 07:04:06 pm »
Ah yes, the =true is very unnecessary. It works without it.  ::)

*smacks self for adding it*
[kY] Kryonex - Your local zombie fanatics.
http://www.kryonex.com/

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: [Fun] Player Cloning Script
« Reply #4 on: August 28, 2008, 07:06:04 pm »
Also, FileExists won't work on every OS until next server verison, so it'd be better to do if ReadFile(...) <> '' then ...

Offline UnknownSniper

  • Camper
  • ***
  • Posts: 428
  • Southern by the Grace of God
Re: [Fun] Player Cloning Script
« Reply #5 on: August 28, 2008, 08:05:47 pm »
Fun mini-game with this would be making non-reg users Remote admin(for 0 ping) and make a bunch of clones of them and try to find which is the real one. [retard]
I had a job and a piece of land
My sweet wife was my best friend
But I traded that for Cocaine and a whore
-Jamey Johnson


Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: [Fun] Player Cloning Script
« Reply #6 on: August 29, 2008, 05:21:26 am »
"Wheres Waldo" gamemode, lol

Offline blackdevil0742

  • Veteran
  • *****
  • Posts: 1061
  • Don't Panic
Re: [Fun] Player Cloning Script
« Reply #7 on: August 29, 2008, 05:27:28 am »
That would be awesome :)

OBEY!!!

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: [Fun] Player Cloning Script
« Reply #8 on: August 29, 2008, 06:12:06 am »
Fun mini-game with this would be making non-reg users Remote admin(for 0 ping) and make a bunch of clones of them and try to find which is the real one. [retard]
you only get 0 ping if you are actually hosting the server

Offline rayanaga

  • Soldier
  • **
  • Posts: 143
  • ~Fur flying~
    • Kryonex
Re: [Fun] Player Cloning Script
« Reply #9 on: August 29, 2008, 08:08:03 am »
"Wheres Waldo" gamemode, lol

When I was playing my friend, we all wore the same gostek and cloned like 12 copies of me and 12 copies of my friend.

If you killed the human version, you won!
[kY] Kryonex - Your local zombie fanatics.
http://www.kryonex.com/

Offline UnknownSniper

  • Camper
  • ***
  • Posts: 428
  • Southern by the Grace of God
Re: [Fun] Player Cloning Script
« Reply #10 on: August 29, 2008, 11:21:42 am »
Fun mini-game with this would be making non-reg users Remote admin(for 0 ping) and make a bunch of clones of them and try to find which is the real one. [retard]
you only get 0 ping if you are actually hosting the server

Oh, well I wouldn't really know. Thanks for the correction. =p
I had a job and a piece of land
My sweet wife was my best friend
But I traded that for Cocaine and a whore
-Jamey Johnson


Offline Irlandec

  • Soldier
  • **
  • Posts: 176
Re: [Fun] Player Cloning Script
« Reply #11 on: August 29, 2008, 01:08:50 pm »
Funny! Nice work , pal :)

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: [Fun] Player Cloning Script
« Reply #12 on: August 30, 2008, 05:01:23 am »
Great, but i upgraded it :
- /clone <id> <1/0> to enabled/disable cloning for player
- clones on respawn get same weapons that player choosen

If original autor want, i can paste it :)

Oh, i forgot :
- clones are kicked when original leaves


[edit]
I found some errors :
- !kickclones doesn't work
- clones are orange
« Last Edit: August 30, 2008, 05:58:53 am by Gizd »

Offline rayanaga

  • Soldier
  • **
  • Posts: 143
  • ~Fur flying~
    • Kryonex
Re: [Fun] Player Cloning Script
« Reply #13 on: August 30, 2008, 06:15:22 am »
Go ahead and post our version.

I'd love to see it. ;D
[kY] Kryonex - Your local zombie fanatics.
http://www.kryonex.com/

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: [Fun] Player Cloning Script
« Reply #14 on: August 30, 2008, 06:47:34 am »
http://rafb.net/p/lKbBUs18.html

There are still errors i written coz i don't know how to fix themĀ  :P
« Last Edit: August 30, 2008, 06:50:44 am by Gizd »

Offline you360

  • Major(1)
  • Posts: 3
Re: [Fun] Player Cloning Script
« Reply #15 on: September 15, 2008, 11:18:58 am »
Can you add a clone limit ?
because someone crashed my server
Nice script