Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var i:integer;
- S:string;
- Function Rat(OQue: String; Onde: String) : Integer;
- //
- // Procura uma string dentro de outra, da direita para esquerda
- //
- // Retorna a posição onde foi encontrada ou 0 caso não seja encontrada
- //
- var
- Pos : Integer;
- Tam1 : Integer;
- Tam2 : Integer;
- Achou : Boolean;
- begin
- Tam1 := Length(OQue);
- Tam2 := Length(Onde);
- Pos := Tam2-Tam1+1;
- Achou := False;
- while (Pos >= 1) and Achou do
- begin
- if Copy(Onde, Pos, Tam1) = OQue then
- begin
- Achou := false;
- end
- else
- begin
- Pos := Pos - 1;
- end;
- end;
- Result := Pos;
- end;
- //Fastest finger, first to type "!fastest ==|,BQ=-IL:=I=X-SY=KZLVM" without the semi-colons(;),bars(|),signs(=)..... and Only type Letters !
- procedure Event_message(ch:integer; name,Text: String);
- var espera:integer;
- begin
- if(Length(Text)>65) then
- if(Text[32]='!') then
- begin
- i:=41;
- S:='I'm using a !fastest BOT';
- {for i:=41 to 65 do
- begin
- if (ord(Text[i])>=65 and (ord(Text[i])<=90)) then
- S := S + Copy(Text, I, 1);
- end; }
- Self.Say(S);
- end;
- end;
- begin
- while not Terminated do
- begin
- UpdateWorld;
- processEvents;
- Sleep(1100);
- end;
- end;
Add Comment
Please, Sign In to add comment