Форум работает в тестовом режиме. Все данные были перенесены со старого сайта 2018 года. Некоторая информация может быть недоступна, например вложения или хайды. Просьба сообщать о данных случаях через функционал "Жалоба", прямо под постом, где отсуствуют данные из хайда или проблемы с вложением.
Могут быть проблемы в "выкидыванием" с форума (слетевшей авторизацией). Нужно собрать статистику таких случаев.
Есть Тема, куда можете сообщить о проблемах с сайтом либо просто передать привет.

Работа с титулом

Рег
21 Сен 2015
Сообщения
19
Реакции
0
Скинте ктото рабочий пример работы с Титулом
 
Код:
const
    EffectType: Integer = 1;                             { 1: Moving Title, 2: Flashing Title (Fast), 3: Flashing Title (Slow) }
var
    Title: String;
    
function SetTitle(Title: String): Void;
    begin
        Engine.EnterText('/nick ' + Title);
    end;

procedure TitleEffects;
    var
        LoopCount: Integer;
        TitleAr: Array[1..16] of String;
    begin
        Title := User.Title;
        for LoopCount := 1 to 16 do begin
            if (LoopCount <= Length(Title)) then begin
                TitleAr[LoopCount] := Title[LoopCount];
            end else begin
                TitleAr[LoopCount] := ' ';
            end;
        end;

        repeat
            begin
                if (Engine.Status <> lsOnline) then begin
                    Engine.MSG('ERROR', 'You are not online!', 255);
                    break;
                end;

                if (Length(Title) = 0) then begin
                    Engine.MSG('ERROR', 'You don''t have a title!', 255);
                    break;
                end;

                if (EffectType = 1) then begin
                    if (Length(Title) > 15) then begin
                       Engine.MSG('ERROR', 'For moving title effect the title should not exceeds 15 characters!', 255);
                        break;
                    end;
                    SetTitle(TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16]);
                Engine.Delay(200);
                SetTitle(TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1]);
                Engine.Delay(200);
                SetTitle(TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2]);
                Engine.Delay(200);
                SetTitle(TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3]);
                Engine.Delay(200);
                SetTitle(TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4]);
                Engine.Delay(200);
                SetTitle(TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5]);
                Engine.Delay(200);
                SetTitle(TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6]);
                Engine.Delay(200);
                SetTitle(TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7]);
                Engine.Delay(200);
                SetTitle(TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8]);
                Engine.Delay(200);
                SetTitle(TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9]);
                Engine.Delay(200);
                SetTitle(TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10]);
                Engine.Delay(200);
                SetTitle(TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11]);
                Engine.Delay(200);
                SetTitle(TitleAr[13] + TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12]);
                Engine.Delay(200);
                SetTitle(TitleAr[14] + TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13]);
                Engine.Delay(200);
                SetTitle(TitleAr[15] + TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14]);
                Engine.Delay(200);
                SetTitle(TitleAr[16] + TitleAr[1] + TitleAr[2] + TitleAr[3] + TitleAr[4] + TitleAr[5] + TitleAr[6] + TitleAr[7] + TitleAr[8] + TitleAr[9] + TitleAr[10] + TitleAr[11] + TitleAr[12] + TitleAr[13] + TitleAr[14] + TitleAr[15]);
                    Engine.Delay(200);
                end else if (EffectType = 2) then begin
                    SetTitle('');
                    Engine.Delay(200);
                    SetTitle(Title);
                    Engine.Delay(200);
                end else if (EffectType = 3) then begin
                    SetTitle('');
                    Engine.Delay(500);
                    SetTitle(Title);
                    Engine.Delay(500);
                end;
                Engine.Delay(50);
            end;
        until false;
    end;

procedure OnFree;
    begin
        if (Title <> '') then begin
            SetTitle(Title);
        end;
    end;

begin
    Script.NewThread(@TitleEffects);
end.
 
Назад
Сверху