Script Name: Text Scroller
Script Description: Draws text that scrolls across the screen
Original Author: Curt (DorkeyDear)
Core Version: 2.6.1b
Code: procedure DrawScrollText(ID: byte; Text: string; Offset, Delay, Times,X,Y: integer; Color: longint; Scale: Single);
begin
if Offset <> 0 then Text := Copy(Text,Offset + 1,Length(Text)) + Copy(Text,1,Offset);
while Times >= 1 do begin
DrawText(ID,Text,Delay + 150,Color,Scale,X,Y);
Text := Copy(Text,2,Length(Text)) + Text[1];
Sleep(Delay);
Times := Times - 1;
end;
end;
Called: This is called using the ThreadFunc procedure only once
Example: procedure ActivateServer();
var
Text: string;
begin
Text := 'This scrolls! - '
ThreadFunc([0,Text,200,Length(Text) * 10,8,400,RGB(255,255,255),0.1],'DrawScrollText');
end;
Future changes: Having a option for scrolling left / right; Having a separator input
Notes: The argument Times referes to the number of times the text scrolls over 1 characters, not the number of times it loops. If you want to get the number of times it should loop, do Length(Text) * Num wheres as Num is the number of times it loops and Text is the text to be scrolled.