Author Topic: Trollscript  (Read 3975 times)

0 Members and 1 Guest are viewing this topic.

Offline skrX

  • Soldier
  • **
  • Posts: 112
  • x ye.
Trollscript
« on: August 18, 2013, 05:23:14 am »
Script Name: Trollscript
Script Description: script allows to write for someone / botchat
Author: skrX
Core Version: 2.7.6

/troll ID TEXT - to write someone e.g /troll 1 asd

/copy ID - to select a random text


Enjoy! :)

« Last Edit: March 27, 2014, 10:22:02 am by skrX »

Offline Vos

  • Soldier
  • **
  • Posts: 231
    • http://kosoldat.forumer.com/index.php
Re: AdminSpeak
« Reply #1 on: August 18, 2013, 09:19:14 am »
this only triggers the /say function for me
For signatures, you are allowed only one image in your signature which may not be wider and taller than 300 and 125 pixels, and may not be over 20kB in file size. No BMPs are allowed.

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: AdminSpeak
« Reply #2 on: August 18, 2013, 03:55:57 pm »
Been using script like this for a while and I always have a good laugh how confused some players are

Im chill like that

Offline Vos

  • Soldier
  • **
  • Posts: 231
    • http://kosoldat.forumer.com/index.php
Re: AdminSpeak
« Reply #3 on: August 18, 2013, 04:49:28 pm »
for me it works awesome, i just changed /sayto to /trollplayer xD

Ah right, im going to try it out then
For signatures, you are allowed only one image in your signature which may not be wider and taller than 300 and 125 pixels, and may not be over 20kB in file size. No BMPs are allowed.

Offline skrX

  • Soldier
  • **
  • Posts: 112
  • x ye.
Re: trollscript
« Reply #4 on: March 23, 2014, 07:01:06 am »
up
« Last Edit: March 23, 2014, 07:05:24 am by skrX »

Offline Drax

  • Soldier
  • **
  • Posts: 241
Re: trollscript
« Reply #5 on: March 23, 2014, 01:49:26 pm »
it's a good thing for admins, a way to punish bad players :) good job

Offline AntyMan

  • Major(1)
  • Posts: 31
Re: Trollscript
« Reply #6 on: August 21, 2014, 03:55:43 pm »
Code: [Select]
{        _                         
     ___| | ___ ____  __
    / __| |/ / '__\ \/ /
    \__ \   <| |   >  <
    |___/_|\_\_|  /_/\_\

by skrX
}

var
  TypeArray: TStringarray;

function Explode(Source: string; const Delimiter: string): array of string;
var
  Position, DelLength, ResLength: integer;
begin
  DelLength := Length(Delimiter);
  Source := Source + Delimiter;
  repeat
    Position := Pos(Delimiter, Source);
    SetArrayLength(Result, ResLength + 1);
    Result[ResLength] := Copy(Source, 1, Position - 1);
    ResLength := ResLength + 1;
    Delete(Source, 1, Position + DelLength - 1);
  until (Position = 0);
  SetArrayLength(Result, ResLength - 1);
end;

function OnCommand(ID: byte; Text: string): boolean;
var
  randomtext: integer;
  buffer: string;
  i: integer;
begin

  Result := false;
 
  buffer := '';
  TypeArray := Explode(Text, ' ');
 
case TypeArray[0] of

'/troll','/says','chat':

if ArrayHigh(TypeArray) >= 2 then begin
for i := 2 to ArrayHigh(TypeArray) - 1 do begin
   buffer := buffer + TypeArray[i] + ' ';
end;
buffer := buffer + TypeArray[ArrayHigh(TypeArray)];
BotChat(strtoint(TypeArray[1]), buffer);

//to be able to use the commands
//OnPlayerSpeak(strtoint(TypeArray[1]), buffer);
end;
end;
end;

So it is not simpler?
Code: [Select]
if MaskCheck(LowerCase(Text),'/troll *') then begin
BotChat(strtoint(GetPiece(Text,' ',1)), Copy(Text,10,Length(Text)));
end;