simple script ported to 3.6.
code of mainunit.
delphi Код:
Unit TitulMain;
interface
uses forms, classes, extctrls, sysutils, stdctrls;
const
Full_Title = ' Wtf is going on 0_o !?';//Titul
Char_Name = 'alexteam'; //character name
type
TMain = class (tform)
Timer : TTimer;
Button : TButton;
Edit: TEdit;
procedure ButtonClick(Sender: TObject);
procedure TimerTimer(Sender: TObject);
private
Pos_i : Integer;
Start : Boolean;
public
Constructor create(Aowner:Tcomponent); override;
end;
var
main : TMain;
Procedure Init;
procedure Free;
Procedure OnPacket;
implementation
procedure TMain.ButtonClick(Sender: TObject);
begin
Start := Not (Start);
Timer.Enabled := Start;
If Start
then Button.Caption:='Stop'
else Button.Caption:='Start';
end;
//процедура смена титула
procedure ChangeTitle(CharName,Title:String);
begin buf:=#$55;
WriteS(CharName);
WriteS(Title);
SendToServerex(CharName);
end;
procedure TMain.TimerTimer(Sender: TObject);
var i:integer;
Title:string;
begin Title:='';
for i:=1 to 16 do
if ((i+Pos_i)mod(Length(Full_Title)+1))=0
then Title:=Title+' '
else Title:=Title+Full_Title[(i+Pos_i)mod(Length(Full_Title)+1)];
Pos_i:=(Pos_i+1)mod(Length(Full_Title)+1);
Edit.Text:=Title;
ChangeTitle(Char_Name,Title);
end;
Constructor TMain.create(Aowner:Tcomponent);
begin
inherited;
Pos_i := 1;
Start := False;
Caption := 'animate titul v 1.0';
BorderStyle := bsSizeable;
Position := poDesigned;
Left :=725;
Top :=0;
Width :=300;
Height :=150;
//пример титула будет выводиться сюда
Edit := TEdit.Create(self);
Edit.Parent := self;
Edit.Left := 100;
Edit.Top := 10;
Edit.Width := 102;
//таймер
Timer := TTimer.Create(self);
Timer.Interval := 500;
Timer.Enabled := False;
Timer.onTimer := TimerTimer;
Button := TButton.Create(self);
Button.Parent := self;
Button.Caption := 'Start';
Button.Left := 10;
Button.Top := 10;
Button.onClick := ButtonClick;
end;
procedure Init;
Begin
Main := tmain.create(nil);
main.show;
End;
procedure Free;
Begin
Main.Destroy;
End;
procedure OnPacket;
Begin
End;
end.
anyway i stoped dev of 3.6 .