Скриптинг  Форум посвещенный созданию скриптов для L2PacketHack  
	
	
	
	
	
	
	
	
	
	
	
	
		
		 
	
	
	
	
	 
 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#1  
	
 
	
			
            
			
			Местный
			
			
		
			
			
			
				 
				Регистрация: 05.11.2008
				
				
				
					Сообщений: 168
				
				 
	Сказал Спасибо: 35
	
		
			
				Имеет 139 спасибок в 66 сообщенях
			
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
				ItemPainter по идее QaK 
			 
			Скрипт для рисования аденой и другими предметами. 
Вобщем увидел в теме Рисую аденой:
	Цитата:
	
	
		
			
				никому не надо пока готовое, хотябы 60% рабочее, кто-нить не выложит.  
	 
	
 (Это коммент QaK так что идея его)
История версий 
Оффтоп 
	Код:
	ver 0,1
-Графический интерфейс
-Возможность выбора предмета для каждого из 5 цветов
-Загрузка картинки с помощью диалога
-Масштаб от 1:1 до 10:1
ver 0,2
-Выбор направления (теперь не рисует только на север)
-Мелкие исправления и доработки 
  
	delphi Код:
	Program  ItemPainter;
//------------------------------------------------------------------ 
//Скрипт для рисования предметами пока только для с4 и интерлюдии 
//В Name ввдите ник 
//Нарисуйте картинку в любом графическом редакторе. 
//В поле "Путь к фалу" введите путь к этому файлу и нажмите Load 
//Черный,красный,зеленый,голубой,желтый цвета пикселей можно привязать к отдельному предмету 
//Выберите цвет в боксе color, затем предмет в боксе Item (предметов должно быть>1 чтобы они появились в списке) 
//scale - масштаб отступа между предметами от 1:1 до 10:1 
//Самый оптимальный масштаб 5:1 
//Направление - согласно компасу в игре 
const 
Name='Perforator' ;
interlude=true ;
max =80 ;
MaxDistance=240 ; //Максимальное расстояние на которое можно выбросить предмет 
var 
bmp:TBitMap; //Картинка 
ItemBase:  array[1 ..3 ,1 ..max ] of  integer ; //Массив предметов заполняется процедурой CreateItemBase 
SelectedItems: array[1 ..3 ,1 ..5 ] of  integer ; //Массив Object ID предметов [i,j] i=1 - OID,2-ID,3 - Count; j - # цвета 
currentx,currenty,StartX,StartY,StartZ,MyX,MyY,MyZ,NextX,NextY,ItemOID:integer ;
//Теущие координаты x и y;координаты начала отчета x,y,z; Мои координаты x y обнавляются при Validate Position 
ready:boolean ;
timer : TTimer;
FormMain:TForm;
Stats : TMemo;
Panel1 : TPanel;
GroupBox1,GroupBox2 : TGroupBox;
ComboBoxColor,ComboBoxScale,ComboboxItem,ComboBoxDirection:TComboBox;
Label1,Label2,Label3,Label4:TLabel;
Path:TEdit;
LoadedImage:TImage;
LoadButton,StartButton,StopButton:TButton;
ItemsName,StringList:TStringList ;
//...................................... 
//...................................... 
//...................................... 
//ComboBoxItem 
procedure  ComboBoxItem_Click( Sender: TComboBox) ;
var  i,count,index:integer ;
begin 
count:=0 ;
if  SelectedItems[2 ,ComboBoxColor.ItemIndex +1 ]=ItemBase[2 ,ComboBoxItem.ItemIndex +1 ] then  exit ;
for  i:=1  to  5  do  if  SelectedItems[2 ,i]=ItemBase[2 ,ComboBoxItem.ItemIndex +1 ] then  inc ( count) ;
if  Count>0  then  begin 
stats.lines .add ( 'Ошибка! Нельзя добавлять одинаковые предметы в разные цвета.' ) ;
exit ;
end ;
SelectedItems[1 ,ComboBoxColor.ItemIndex +1 ]:=ItemBase[1 ,ComboBoxItem.ItemIndex +1 ];
SelectedItems[2 ,ComboBoxColor.ItemIndex +1 ]:=ItemBase[2 ,ComboBoxItem.ItemIndex +1 ];
SelectedItems[3 ,ComboBoxColor.ItemIndex +1 ]:=ItemBase[3 ,ComboBoxItem.ItemIndex +1 ];
index:=ComboBoxItem.ItemIndex ;
for  i:=0  to  StringList.Count -1  do  if  Pos ( ' - ' +ComboBoxColor.Items .Strings [ComboBoxColor.ItemIndex ],ComboBoxItem.Items .Strings [i]) >0  then 
ComboBoxItem.Items .Strings [i]:=StringList.Strings [i];
ComboBoxItem.Items .Strings [index]:=ComboBoxItem.Items .Strings [ComboBoxItem.ItemIndex ]+' - ' +ComboBoxColor.Items .Strings [ComboBoxColor.ItemIndex ];
ComboBoxItem.ItemIndex :=index;
end ;
//---------------------------------------- 
procedure  StartButton_Click( Sender: TButton) ;
//Event : OnClick 
begin 
if  bmp=NIL  then  stats.lines .add ( 'Картинка не загружена!' )  else 
begin 
stats.lines .add ( 'Старт!' ) ;
StartButton.enabled :=false ;
currentx:=-1 ;
currenty:=0 ;
buf:=#$AA;
WriteD( 0 ) ;
SendToServerEx( Name) ;
end ;
end ;
//...................................... 
//ButtonStopEnchant 
procedure  StopButton_Click( Sender: TButton) ;
//Event : OnClick 
begin 
StartButton.enabled :=true ;
stats.lines .add ( 'Стоп!' ) ;
timer.enabled :=false ;
ready:=false ;
end ;
procedure  bmpload;
begin 
  bmpfree;
  bmp:=TBitMap.Create ;
  try 
  bmp.LoadFromFile ( path.text ) ;
  except 
  bmp.Free ;
  stats.lines .add ( 'Ошибка загрузки файла!' ) ;
  exit ;
  end ;
  stats.lines .add ( 'Картинка успешно загружена!' ) ;
  LoadedImage.Picture .assign ( bmp) ;
end ;
procedure  LoadButton_Click( Sender: TButton) ;
var  openDialog : TOpenDialog ;
begin 
  openDialog := TOpenDialog .Create ( NIL ) ;
  openDialog.Filter  := 'Bitmap files|*.bmp' ;
  openDialog.FilterIndex  := 1 ;
  openDialog.DefaultExt :='bmp' ;
  openDialog.Options :=ofNoChangeDir+ofFileMustExist+ofPathMustExist;
  if  openDialog.Execute  then  path.text :=openDialog.FileName  else  begin 
  openDialog.Free ;
  exit ;
  end ;
  openDialog.Free ;
  bmpload;
end ;
procedure  Path_key( Sender: TEdit; Key: Char ) ;
begin 
if  ord ( key) =13  then  begin 
bmpload;
end ;
end ;
procedure  Free_FormMain;
//Освобождаем ресурсы ... 
begin 
  TRY 
    if  FormMain<>NIL then  begin 
       FormMain.Free ;
       FormMain:=NIL ;
    end ;
  FINALLY 
  END ;
end ;
function  Create_FormMain : TForm;
//Создаем форму и соотв. компоненты на ней ... 
Var 
  Yes : boolean ;
begin 
  Yes := FALSE ;
  Result := TForm.Create ( nil ) ;
  TRY 
    //------------------------ 
    //Свойства формы 
    Result.Caption      := 'Item Painter v 0.2 by ArchDevil' ;
    Result.Left         := 397 ;
    Result.Top          := 233 ;
    Result.Width        := 350 ;
    Result.Height       := 230 ;
    Result.FormStyle    := fsNormal;
    Result.Position     := poDesigned;
    Result.BorderStyle  := bsSizeable;
    Result.BorderWidth  := 0 ;
    Result.WindowState  := wsNormal;
    Result.Color        := clBtnFace;
    Result.Font .Name    := 'Tahoma' ;
    Result.Font .Size    := 8 ;
    Result.Font .Color   := clWindowText;
    Result.Font .CharSet := 1 ;
    //...................................... 
    //...................................... 
    //Stats 
    Stats := TMemo.Create ( Result) ;
    Stats.Parent  := Result;
    Stats.Left     := 0 ;
    Stats.Top      := 160 ;
    Stats.Width    := 350 ;
    Stats.Height   := 70 ;
    Stats.Visible  := TRUE ;
    Stats.Tag      := 0 ;
    Stats.Enabled   := TRUE ;
    Stats.Hint      := '' ;
    Stats.ShowHint  := FALSE ;
    Stats.Font .Name   := 'Tahoma' ;
    Stats.Font .Size   := 8 ;
    Stats.Font .Color  := clWindowText;
    Stats.Color          := clWindow;
    Stats.TabOrder       := 0 ;
    Stats.TabStop        := TRUE ;
    Stats.Align          := alBottom;
    Stats.WordWrap       := TRUE ;
    Stats.Alignment      := taLeftJustify;
    Stats.WantTabs       := FALSE ;
    Stats.WantReturns    := TRUE ;
    Stats.HideSelection  := TRUE ;
    Stats.MaxLength      := 0 ;
    Stats.OEMConvert     := FALSE ;
    Stats.ReadOnly       := FALSE ;
    Stats.ScrollBars     := ssNone;
    //...................................... 
    //...................................... 
    //Panel1 
    Panel1 := TPanel.Create ( Result) ;
    Panel1.Parent  := Result;
    Panel1.Left     := 0 ;
    Panel1.Top      := 0 ;
    Panel1.Width    := 350 ;
    Panel1.Height   := 160 ;
    Panel1.Visible  := TRUE ;
    Panel1.Tag      := 0 ;
    Panel1.Enabled   := TRUE ;
    Panel1.Hint      := '' ;
    Panel1.ShowHint  := FALSE ;
    Panel1.Caption     := '' ;
    Panel1.Align       := alClient;
    Panel1.Color       := clBtnFace;
    Panel1.Font .Name   := 'Tahoma' ;
    Panel1.Font .Size   := 8 ;
    Panel1.Font .Color  := clWindowText;
    Panel1.Font .CharSet  := 1 ;
    Panel1.BevelWidth    := 1 ;
    Panel1.BorderWidth   := 0 ;
    Panel1.BevelInner    := bvNone;
    Panel1.BevelOuter    := bvRaised;
    Panel1.TabOrder      := 2 ;
    Panel1.TabStop       := FALSE ;
    Panel1.AutoSize      := FALSE ;
    //...................................... 
    //...................................... 
    //GroupBox1 
    GroupBox1 := TGroupBox.Create ( Result) ;
    GroupBox1.Parent  := Panel1;
    GroupBox1.Left     := 1 ;
    GroupBox1.Top      := 1 ;
    GroupBox1.Width    := 160 ;
    GroupBox1.Height   := 160 ;
    GroupBox1.Visible  := TRUE ;
    GroupBox1.Tag      := 0 ;
    GroupBox1.Enabled   := TRUE ;
    GroupBox1.Hint      := '' ;
    GroupBox1.ShowHint  := FALSE ;
    GroupBox1.Caption     := 'Рисунок' ;
    GroupBox1.Align       := alLeft;
    GroupBox1.Color       := clBtnFace;
    GroupBox1.Font .Name   := 'Tahoma' ;
    GroupBox1.Font .Size   := 8 ;
    GroupBox1.Font .Color  := clWindowText;
    GroupBox1.Font .CharSet  := 1 ;
    GroupBox1.TabOrder      := 0 ;
    GroupBox1.TabStop       := FALSE ;
        //...................................... 
    //...................................... 
    //GroupBox2 
    GroupBox2 := TGroupBox.Create ( Result) ;
    GroupBox2.Parent  := Panel1;
    GroupBox2.Left     := 1 ;
    GroupBox2.Top      := 1 ;
    GroupBox2.Width    := 180 ;
    GroupBox2.Height   := 160 ;
    GroupBox2.Visible  := TRUE ;
    GroupBox2.Tag      := 0 ;
    GroupBox2.Enabled   := TRUE ;
    GroupBox2.Hint      := '' ;
    GroupBox2.ShowHint  := FALSE ;
    GroupBox2.Caption     := 'Настройки' ;
    GroupBox2.Align       := alLeft;
    GroupBox2.Color       := clBtnFace;
    GroupBox2.Font .Name   := 'Tahoma' ;
    GroupBox2.Font .Size   := 8 ;
    GroupBox2.Font .Color  := clWindowText;
    GroupBox2.Font .CharSet  := 1 ;
    GroupBox2.TabOrder      := 0 ;
    GroupBox2.TabStop       := FALSE ;
    //...................................... 
    //...................................... 
    //ComboBoxColor 
    ComboBoxColor := TComboBox.Create ( Result) ;
    ComboBoxColor.Parent  := GroupBox2;
    ComboBoxColor.Left     := 38 ;
    ComboBoxColor.Top      := 19 ;
    ComboBoxColor.Width    := 70 ;
    ComboBoxColor.Height   := 21 ;
    ComboBoxColor.Visible  := TRUE ;
    ComboBoxColor.Tag      := 0 ;
    ComboBoxColor.Enabled   := TRUE ;
    ComboBoxColor.Hint      := 'Выбери из списка цвет соответствующий предмету ниже' ;
    ComboBoxColor.ShowHint  := TRUE ;
    ComboBoxColor.Text        := 'ComboBoxColor' ;
    ComboBoxColor.Font .Name   := 'Tahoma' ;
    ComboBoxColor.Font .Size   := 8 ;
    ComboBoxColor.Font .Color  := clWindowText;
    ComboBoxColor.Color           := clWindow;
    ComboBoxColor.TabOrder        := 1 ;
    ComboBoxColor.TabStop         := TRUE ;
    ComboBoxColor.Sorted          := FALSE ;
    ComboBoxColor.ItemHeight      := 13 ;
    ComboBoxColor.Items .ADD ( 'Черный' ) ;
    ComboBoxColor.Items .ADD ( 'Красный' ) ;
    ComboBoxColor.Items .ADD ( 'Зеленый' ) ;
    ComboBoxColor.Items .ADD ( 'Синий' ) ;
    ComboBoxColor.Items .ADD ( 'Желтый' ) ;
    ComboBoxColor.ItemIndex  := 0 ;
    //...................................... 
    //...................................... 
    //ComboBoxScale 
    ComboBoxScale := TComboBox.Create ( Result) ;
    ComboBoxScale.Parent  := GroupBox2;
    ComboBoxScale.Left     := 128 ;
    ComboBoxScale.Top      := 19 ;
    ComboBoxScale.Width    := 45 ;
    ComboBoxScale.Height   := 21 ;
    ComboBoxScale.Visible  := TRUE ;
    ComboBoxScale.Tag      := 0 ;
    ComboBoxScale.Enabled   := TRUE ;
    ComboBoxScale.Hint      := 'Выбери из списка масштаб' ;
    ComboBoxScale.ShowHint  := TRUE ;
    ComboBoxScale.Text        := 'ComboBoxScale' ;
    ComboBoxScale.Font .Name   := 'Tahoma' ;
    ComboBoxScale.Font .Size   := 8 ;
    ComboBoxScale.Font .Color  := clWindowText;
    ComboBoxScale.Color           := clWindow;
    ComboBoxScale.TabOrder        := 1 ;
    ComboBoxScale.TabStop         := TRUE ;
    ComboBoxScale.Sorted          := FALSE ;
    ComboBoxScale.ItemHeight      := 13 ;
    ComboBoxScale.Items .ADD ( '1:1' ) ;
    ComboBoxScale.Items .ADD ( '2:1' ) ;
    ComboBoxScale.Items .ADD ( '3:1' ) ;
    ComboBoxScale.Items .ADD ( '4:1' ) ;
    ComboBoxScale.Items .ADD ( '5:1' ) ;
    ComboBoxScale.Items .ADD ( '6:1' ) ;
    ComboBoxScale.Items .ADD ( '7:1' ) ;
    ComboBoxScale.Items .ADD ( '8:1' ) ;
    ComboBoxScale.Items .ADD ( '9:1' ) ;
    ComboBoxScale.Items .ADD ( '10:1' ) ;
    ComboBoxScale.ItemIndex  := 4 ;
    //...................................... 
    //...................................... 
    //ComboBoxDirection 
    ComboBoxDirection := TComboBox.Create ( Result) ;
    ComboBoxDirection.Parent  := GroupBox2;
    ComboBoxDirection.Left     := 38 ;
    ComboBoxDirection.Top      := 67 ;
    ComboBoxDirection.Width    := 135 ;
    ComboBoxDirection.Height   := 21 ;
    ComboBoxDirection.Visible  := TRUE ;
    ComboBoxDirection.Tag      := 0 ;
    ComboBoxDirection.Enabled   := TRUE ;
    ComboBoxDirection.Text        := 'ComboBoxDirection' ;
    ComboBoxDirection.Font .Name   := 'Tahoma' ;
    ComboBoxDirection.Font .Size   := 8 ;
    ComboBoxDirection.Font .Color  := clWindowText;
    ComboBoxDirection.Color           := clWindow;
    ComboBoxDirection.TabOrder        := 1 ;
    ComboBoxDirection.TabStop         := TRUE ;
    ComboBoxDirection.Sorted          := FALSE ;
    ComboBoxDirection.ItemHeight      := 13 ;
    ComboBoxDirection.Items .ADD ( 'Север' ) ;
    ComboBoxDirection.Items .ADD ( 'Северо-Восток' ) ;
    ComboBoxDirection.Items .ADD ( 'Восток' ) ;
    ComboBoxDirection.Items .ADD ( 'Юго-Восток' ) ;
    ComboBoxDirection.Items .ADD ( 'Юг' ) ;
    ComboBoxDirection.Items .ADD ( 'Юго-Запад' ) ;
    ComboBoxDirection.Items .ADD ( 'Запад' ) ;
    ComboBoxDirection.Items .ADD ( 'Северо-Запад' ) ;
    ComboBoxDirection.ItemIndex           := 0 ;
    //...................................... 
    //...................................... 
    //ComboBoxItem 
    ComboBoxItem := TComboBox.Create ( Result) ;
    ComboBoxItem.Parent  := GroupBox2;
    ComboBoxItem.Left     := 38 ;
    ComboBoxItem.Top      := 43 ;
    ComboBoxItem.Width    := 135 ;
    ComboBoxItem.Height   := 21 ;
    ComboBoxItem.Visible  := TRUE ;
    ComboBoxItem.Tag      := 0 ;
    ComboBoxItem.Enabled   := TRUE ;
    ComboBoxItem.Hint      := 'Выбери из списка затачиваемый предмет' ;
    ComboBoxItem.ShowHint  := TRUE ;
    ComboBoxItem.Text        := 'ComboBoxItem' ;
    ComboBoxItem.Font .Name   := 'Tahoma' ;
    ComboBoxItem.Font .Size   := 8 ;
    ComboBoxItem.Font .Color  := clWindowText;
    ComboBoxItem.Color           := clWindow;
    ComboBoxItem.TabOrder        := 1 ;
    ComboBoxItem.TabStop         := TRUE ;
    ComboBoxItem.ItemIndex           := -1 ;
    ComboBoxItem.Sorted          := FALSE ;
    ComboBoxItem.ItemHeight      := 13 ;
    ComboBoxItem.OnClick      := @ComboBoxItem_Click;
    //...................................... 
    //...................................... 
    //Label1 
    Label1 := TLabel.Create ( Result) ;
    Label1.Parent  := GroupBox2;
    Label1.Left     := 6 ;
    Label1.Top      := 23 ;
    Label1.Width    := 58 ;
    Label1.Height   := 13 ;
    Label1.Visible  := TRUE ;
    Label1.Tag      := 0 ;
    Label1.Enabled   := TRUE ;
    Label1.Hint      := '' ;
    Label1.ShowHint  := FALSE ;
    Label1.Caption      := 'Цвет:' ;
    Label1.Transparent  := TRUE ;
    Label1.WordWrap     := FALSE ;
    Label1.Alignment    := taLeftJustify;
    Label1.Layout       := tlTop;
    Label1.AutoSize     := TRUE ;
    Label1.Align        := alNone;
    Label1.Font .Name    := 'Tahoma' ;
    Label1.Font .Size    := 8 ;
    Label1.Font .Color   := clWindowText;
    Label1.Color        := clBtnFace;
    //...................................... 
    //...................................... 
    //Label2 
    Label2 := TLabel.Create ( Result) ;
    Label2.Parent  := GroupBox2;
    Label2.Left     := 6 ;
    Label2.Top      := 47 ;
    Label2.Width    := 58 ;
    Label2.Height   := 13 ;
    Label2.Visible  := TRUE ;
    Label2.Tag      := 0 ;
    Label2.Enabled   := TRUE ;
    Label2.Hint      := '' ;
    Label2.ShowHint  := FALSE ;
    Label2.Caption      := 'Итем:' ;
    Label2.Transparent  := TRUE ;
    Label2.WordWrap     := FALSE ;
    Label2.Alignment    := taLeftJustify;
    Label2.Layout       := tlTop;
    Label2.AutoSize     := TRUE ;
    Label2.Align        := alNone;
    Label2.Font .Name    := 'Tahoma' ;
    Label2.Font .Size    := 8 ;
    Label2.Font .Color   := clWindowText;
    Label2.Color        := clBtnFace;
    //...................................... 
    //...................................... 
    //Label3 
    Label3 := TLabel.Create ( Result) ;
    Label3.Parent  := GroupBox2;
    Label3.Left     := 114 ;
    Label3.Top      := 23 ;
    Label3.Width    := 58 ;
    Label3.Height   := 13 ;
    Label3.Visible  := TRUE ;
    Label3.Tag      := 0 ;
    Label3.Enabled   := TRUE ;
    Label3.Hint      := '' ;
    Label3.ShowHint  := FALSE ;
    Label3.Caption      := 'М:' ;
    Label3.Transparent  := TRUE ;
    Label3.WordWrap     := FALSE ;
    Label3.Alignment    := taLeftJustify;
    Label3.Layout       := tlTop;
    Label3.AutoSize     := TRUE ;
    Label3.Align        := alNone;
    Label3.Font .Name    := 'Tahoma' ;
    Label3.Font .Size    := 8 ;
    Label3.Font .Color   := clWindowText;
    Label3.Color        := clBtnFace;
    //...................................... 
    //...................................... 
    //Label4 
    Label4 := TLabel.Create ( Result) ;
    Label4.Parent  := GroupBox2;
    Label4.Left     := 6 ;
    Label4.Top      := 71 ;
    Label4.Width    := 58 ;
    Label4.Height   := 13 ;
    Label4.Visible  := TRUE ;
    Label4.Tag      := 0 ;
    Label4.Enabled   := TRUE ;
    Label4.Hint      := '' ;
    Label4.ShowHint  := FALSE ;
    Label4.Caption      := 'Напр.:' ;
    Label4.Transparent  := TRUE ;
    Label4.WordWrap     := FALSE ;
    Label4.Alignment    := taLeftJustify;
    Label4.Layout       := tlTop;
    Label4.AutoSize     := TRUE ;
    Label4.Align        := alNone;
    Label4.Font .Name    := 'Tahoma' ;
    Label4.Font .Size    := 8 ;
    Label4.Font .Color   := clWindowText;
    Label4.Color        := clBtnFace;
    //...................................... 
    //...................................... 
    //Path 
    Path := TEdit.Create ( Result) ;
    Path.Parent  := GroupBox1;
    Path.Left     := 5 ;
    Path.Top      := 103 ;
    Path.Width    := 117 ;
    Path.Height   := 20 ;
    Path.Visible  := TRUE ;
    Path.Tag      := 0 ;
    Path.Enabled   := TRUE ;
    Path.Hint      := 'Введи путь к файлу BMP' ;
    Path.ShowHint  := TRUE ;
    Path.Text        := '' ;
    Path.Font .Name   := 'Tahoma' ;
    Path.Font .Size   := 7 ;
    Path.Font .Color  := clWindowText;
    Path.Color         := clWindow;
    Path.TabOrder      := 5 ;
    Path.TabStop       := TRUE ;
    Path.ReadOnly      := FALSE ;
    Path.MaxLength     := 0 ;
    Path.AutoSize      := TRUE ;
    Path.OnKeyPress    := @Path_Key;
    //...................................... 
    //...................................... 
    //LoadImage 
    LoadedImage:= TImage.Create ( Result) ;
    LoadedImage.Parent :=GroupBox1;
    LoadedImage.Left  :=5 ;
    LoadedImage.Top  := 16 ;
    LoadedImage.Width  := 150 ;
    LoadedImage.Height  := 90 ;
    LoadedImage.Visible  := TRUE ;
    LoadedImage.Tag  := 0 ;
    LoadedImage.Enabled  := TRUE ;
    LoadedImage.Hint  := '' ;
    LoadedImage.ShowHint  := FALSE ;
    LoadedImage.Center  := TRUE ;
    LoadedImage.Proportional  := TRUE ;
    //...................................... 
    //...................................... 
    //LoadButton 
    LoadButton := TButton.Create ( Result) ;
    LoadButton.Parent  := GroupBox1;
    LoadButton.Left     := 124 ;
    LoadButton.Top      := 102 ;
    LoadButton.Width    := 32 ;
    LoadButton.Height   := 21 ;
    LoadButton.Visible  := TRUE ;
    LoadButton.Tag      := 0 ;
    LoadButton.Enabled   := TRUE ;
    LoadButton.Hint      := '' ;
    LoadButton.ShowHint  := FALSE ;
    LoadButton.Caption     := '...' ;
    LoadButton.Font .Name   := 'Tahoma' ;
    LoadButton.Font .Size   := 8 ;
    LoadButton.Font .Color  := clWindowText;
    LoadButton.Font .CharSet  := 1 ;
    LoadButton.TabOrder      := 2 ;
    LoadButton.TabStop       := TRUE ;
    LoadButton.Cancel        := FALSE ;
    LoadButton.ModalResult   := 0 ;
    LoadButton.OnClick      := @LoadButton_Click;
    //...................................... 
    //...................................... 
    //StartButton 
    StartButton := TButton.Create ( Result) ;
    StartButton.Parent  := GroupBox2;
    StartButton.Left     := 6 ;
    StartButton.Top      := 102 ;
    StartButton.Width    := 80 ;
    StartButton.Height   := 21 ;
    StartButton.Visible  := TRUE ;
    StartButton.Tag      := 0 ;
    StartButton.Enabled   := TRUE ;
    StartButton.Hint      := '' ;
    StartButton.ShowHint  := FALSE ;
    StartButton.Caption     := 'Старт' ;
    StartButton.Font .Name   := 'Tahoma' ;
    StartButton.Font .Size   := 8 ;
    StartButton.Font .Color  := clWindowText;
    StartButton.Font .CharSet  := 1 ;
    StartButton.TabOrder      := 2 ;
    StartButton.TabStop       := TRUE ;
    StartButton.Cancel        := FALSE ;
    StartButton.ModalResult   := 0 ;
    StartButton.OnClick      := @StartButton_Click;
    //...................................... 
    //...................................... 
    //StopButton 
    StopButton := TButton.Create ( Result) ;
    StopButton.Parent  := GroupBox2;
    StopButton.Left     := 96 ;
    StopButton.Top      := 102 ;
    StopButton.Width    := 80 ;
    StopButton.Height   := 21 ;
    StopButton.Visible  := TRUE ;
    StopButton.Tag      := 0 ;
    StopButton.Enabled   := TRUE ;
    StopButton.Hint      := '' ;
    StopButton.ShowHint  := FALSE ;
    StopButton.Caption     := 'Стоп' ;
    StopButton.Font .Name   := 'Tahoma' ;
    StopButton.Font .Size   := 8 ;
    StopButton.Font .Color  := clWindowText;
    StopButton.Font .CharSet  := 1 ;
    StopButton.TabOrder      := 3 ;
    StopButton.TabStop       := TRUE ;
    StopButton.Cancel        := FALSE ;
    StopButton.ModalResult   := 0 ;
    StopButton.OnClick      := @StopButton_Click;
    //...................................... 
    Yes := TRUE ;
  FINALLY 
    if  not  Yes then  begin 
       //Освобождаем ресурсы, если неудачно ... 
       if  Result<>NIL then  begin 
          Result.Free ;
          Result:=NIL ;
       end ;
    end ;
  END ;
  Result.Show ;
end ;
procedure  Init; //Вызывается при включении скрипта 
begin 
  FormMain:=Create_FormMain;
  stats.Lines .Add ( 'Скрипт: Рисование предметами by ArchDevil!' ) ;
  timer:=TTimer.Create ( nil ) ;
  timer.OnTimer :=@OnTimer;
  timer.enabled :=false ;
  timer.interval :=700 ; //время задержки 
  ready:=false ;
  StringList:=TStringList .Create ;
  ItemsName:=TStringList .Create ;
  try 
    ItemsName.LoadFromFile ( 'itemsid.ini' ) ;
  except 
    stats.Lines .Add ( 'itemsid.ini не найден!' ) ;
    exit ;
  end ;
  buf:=hstr( '0F' ) ;
  SendToServerEx( Name) ;
end ;
procedure  bmpfree;
begin 
  try 
   if  bmp<>NIL then 
   begin 
   bmp.Free ;
   bmp:=NIL ;
   end ;
  finally 
  end ;
end ;
procedure  Free;
var  i:integer ;
begin 
Free_FormMain; bmpfree;
StringList.Clear ; ItemsName.Clear ;
timer.Free ;
if  LoadedImage<>NIL then  LoadedImage:=NIL ;
currentx:=0 ; currenty:=0 ; StartX:=0 ; StartY:=0 ;
StartZ:=0 ; MyX:=0 ; MyY:=0 ; ItemOID:=0 ;
ready:=false ;
for  i:=1  to  5  do  begin 
SelectedItems[1 ,i]:=0 ;
SelectedItems[2 ,i]:=0 ;
SelectedItems[3 ,i]:=0 ;
end ;
end ;
//CreateItemBase и InventoryUpdate Взял со скрипта NLObP на заточку 
//--------------------------------------------- 
procedure  CreateItemBase;
var 
  i, j, ListCount : integer ;
begin 
  for  i:=1  to  max  do  begin 
    //очищаем масив 
    ItemBase[1 ,i]:=0 ;     //OID 
    ItemBase[2 ,i]:=0 ;    //ID 
    ItemBase[3 ,i]:=0 ;   //kol-vo 
  end ;
  j:=4 ;
  ListCount:=ReadH( j) ;
  j:=8 ;
  for  i:=1  to  ListCount do  begin 
    ItemBase[1 ,i]:=ReadD( j) ;
    ItemBase[2 ,i]:=ReadD( j) ;
    ItemBase[3 ,i]:=ReadD( j) ;
    if  interlude then  inc ( j,24 )  else  inc ( j,16 ) ;
  end ;
  StringList.Clear ;
  try 
    for  i:=1  to  ListCount do  begin 
      try 
        StringList.Add ( ItemsName.Values [IntToStr( ItemBase[2 ,i]) ]) ; //записываем название вещей из инвентаря 
      except ;
      end 
    end ;
  except ;
    exit ;
  end ;
    with  ComboBoxItem do 
    begin 
      Items.Clear ;
      Items.Assign ( StringList) ;
      ItemIndex:=0 ;
    end ;
end ;
//...................................... 
//****************************************************************************** 
procedure  InventoryUpdate; //пакет 27, обновляет базу ObjectID по ItemID 
var 
  i, ii, j, OID, ID, Count, ListCount, UpdType: integer ;
  add : boolean ;
begin 
  add:=false ;
  ListCount:=ReadH( 2 ) ;
  j:=4 ;
  for  ii:=1  to  ListCount do  begin 
    add:=false ;
    UpdType:=ReadH( j) ;
    ReadH( j) ;               //ItemType1 
    OID:=ReadD( j) ;     //ObjectID 
    ID:=ReadD( j) ;     //ItemID 
    Count:=ReadD( j) ; //кол-во 
    case  UpdType of 
      1 : begin 
         for  i:=1  to  max  do  begin 
           if  ( ItemBase[1 ,i]=0 )  and  ( add=false )  then  begin 
             ItemBase[1 ,i]:=OID;
             ItemBase[2 ,i]:=ID;
             ItemBase[3 ,i]:=Count;
             add:=true ;
           end ;
         end ;
      end ;
      2 : begin 
         for  i:=1  to  max  do  begin 
           if  ItemBase[1 ,i]=OID then  begin 
             ItemBase[3 ,i]:=Count;
           end ;
         end ;
      end ;
      3 : begin 
         for  i:=1  to  max  do  begin 
           if  ItemBase[1 ,i]=OID then  begin 
             ItemBase[1 ,i]:=0 ;
             ItemBase[2 ,i]:=0 ;
             ItemBase[3 ,i]:=0 ;
           end ;
         end ;
      end ;
    end ;
    if  interlude then  inc ( j,22 )  else  inc ( j,14 ) ;
  end ;
end ;
//------------------------------------ 
function  GetCount( OID:integer )  : integer ;
var 
  i : integer ;
begin 
  for  i:=1  to  max  do  begin 
    if  ItemBase[1 ,i]=OID then  begin 
      result:=ItemBase[3 ,i]; // count 
      exit ;
    end ;
  end ;
  result:=0 ;
end ;
//-------------------------------------------- 
function  delta( x1, y1, x2, y2:extended ) :integer ; //возвращает растоянием между 2 точками 
var 
  dx,dy,summa: extended ;
begin 
  dx:=x2-x1;
  dy:=y2-y1;
  summa:=dx*dx+dy*dy;
  if  summa=0  then  result:=0  else  result:=Round ( sqrt ( summa) ) ;
end ;
//-------------------------------------------- 
procedure  OnTimer( Sender: TObject ) ;
//==================== 
procedure  GetNextCoords;
begin 
case  ComboBoxDirection.ItemIndex  of 
0 : begin 
     NextX:=StartX+currentx*( ComboBoxScale.ItemIndex +1 ) ;
     NextY:=StartY+currenty*( ComboBoxScale.ItemIndex +1 ) ;
   end ;
1 : begin 
     NextX:=StartX+currentx*( ComboBoxScale.ItemIndex +1 ) -currenty*( ComboBoxScale.ItemIndex +1 ) ;
     NextY:=StartY+currenty*( ComboBoxScale.ItemIndex +1 ) +currentx*( ComboBoxScale.ItemIndex +1 ) ;
   end ;
2 : begin 
     NextX:=StartX-currenty*( ComboBoxScale.ItemIndex +1 ) ;
     NextY:=StartY+currentx*( ComboBoxScale.ItemIndex +1 ) ;
   end ;
3 : begin 
     NextX:=StartX-currentx*( ComboBoxScale.ItemIndex +1 ) -currenty*( ComboBoxScale.ItemIndex +1 ) ;
     NextY:=StartY-currenty*( ComboBoxScale.ItemIndex +1 ) +currentx*( ComboBoxScale.ItemIndex +1 ) ;
   end ;
4 : begin 
     NextX:=StartX-currentx*( ComboBoxScale.ItemIndex +1 ) ;
     NextY:=StartY-currenty*( ComboBoxScale.ItemIndex +1 ) ;
   end ;
5 : begin 
     NextX:=StartX-currentx*( ComboBoxScale.ItemIndex +1 ) +currenty*( ComboBoxScale.ItemIndex +1 ) ;
     NextY:=StartY-currenty*( ComboBoxScale.ItemIndex +1 ) -currentx*( ComboBoxScale.ItemIndex +1 ) ;
   end ;
6 : begin 
     NextX:=StartX+currenty*( ComboBoxScale.ItemIndex +1 ) ;
     NextY:=StartY-currentx*( ComboBoxScale.ItemIndex +1 ) ;
   end ;
7 : begin 
     NextX:=StartX+currentx*( ComboBoxScale.ItemIndex +1 ) +currenty*( ComboBoxScale.ItemIndex +1 ) ;
     NextY:=StartY+currenty*( ComboBoxScale.ItemIndex +1 ) -currentx*( ComboBoxScale.ItemIndex +1 ) ;
   end ;
 end ;
end ;
//==================== 
begin 
ItemOID:=0 ;
repeat 
if  currentx=bmp.width -1  then 
begin 
inc ( currenty) ;
currentx:=0 ;
end  else  inc ( currentx) ;
if  currenty=bmp.height  then 
begin 
timer.enabled :=false ;
stats.lines .add ( 'Остановлено! Рисунок нарисован!' ) ;
StartButton.enabled :=true ;
exit ;
end ;
case  bmp.Canvas .pixels [currentx,currenty] of  //матрица пикселей 
clBlack: if  ( SelectedItems[1 ,1 ]>0 )  and  ( GetCount( SelectedItems[1 ,1 ]) >0 )  then  ItemOID:=SelectedItems[1 ,1 ];
clRed:   if  ( SelectedItems[1 ,2 ]>0 )  and  ( GetCount( SelectedItems[1 ,2 ]) >0 )  then  ItemOID:=SelectedItems[1 ,2 ];
clGreen: if  ( SelectedItems[1 ,3 ]>0 )  and  ( GetCount( SelectedItems[1 ,3 ]) >0 )  then  ItemOID:=SelectedItems[1 ,3 ];
clBlue:  if  ( SelectedItems[1 ,4 ]>0 )  and  ( GetCount( SelectedItems[1 ,4 ]) >0 )  then  ItemOID:=SelectedItems[1 ,4 ];
clYellow:if  ( SelectedItems[1 ,5 ]>0 )  and  ( GetCount( SelectedItems[1 ,5 ]) >0 )  then  ItemOID:=SelectedItems[1 ,5 ];
end ;
until  ItemOID<>0 ;
if  ItemOID=0  then  exit ;
stats.lines .add ( 'Текущий элемент матрицы: x=' +inttostr ( currentx) +', y=' +inttostr ( currenty) +'.' ) ;
GetNextCoords;
if  delta( MyX,MyY,NextX,NextY) >MaxDistance then  begin   //расстояние между точками 
buf:=#$01 ;
WriteD( NextX) ;
writeD( NextY) ;
WriteD( MyZ) ;
WriteD( MyX) ;
WriteD( MyY) ;
WriteD( MyZ) ;
WriteD( 1 ) ;
SendToServerEx( Name) ;
timer.enabled :=false ; //Отключаем на время передвижения 
ready:=true ;
exit ;
end ;
buf:=#$12 ;
WriteD( ItemOID) ;
WriteD( 1 ) ;
WriteD( NextX) ;
WriteD( NextY) ;
WriteD( MyZ) ;
SendToServerEx( Name) ;
end ;
//-------------------------------------------- 
begin 
if  FromClient and  ( ConnectName=Name)  then 
case  pck[1 ] of 
     #$48 : begin 
             MyX:=ReadD( 2 ) ; // постоянно считываем координаты чара 
             MyY:=ReadD( 6 ) ;
             if  ready and  ( delta( Myx,Myy,NextX,NextY) <MaxDistance/2 )  then  begin  //Меньше 100 можно включать таймер 
             buf:=#$12 ; //Выкидываем предмет который не выкинули когда дельта привышала 240 
             WriteD( ItemOID) ;
             WriteD( 1 ) ;
             WriteD( NextX) ;
             WriteD( NextY) ;
             WriteD( MyZ) ;
             SendToServerEx( Name) ;
             ready:=false ;
             timer.enabled :=true ;
             end ;
           end ;
end ;
if  FromServer and  ( ConnectName=Name)  then 
case  pck[1 ] of 
    #$1B: CreateItemBase; //создание базы предметов 
     //...................................... 
    #$27 : InventoryUpdate; //Обновление базы 
    #$64 : if  ( StartButton.enabled =false )  and  ( timer.enabled =false )  and  ( ReadD( 6 ) =3 )  then 
          begin 
            StartX:=ReadD( 14 ) ; //Считываются только 1 раз 
            StartY:=ReadD( 22 ) ;
            StartZ:=ReadD( 30 ) ;
            MyX:=StartX;
            MyY:=StartY;
            MyZ:=StartZ;
            timer.enabled :=true ;//Вот теперь включаем таймер 
          end ;
end ;
end .
 Все работает как часы, единственное что он стопориться если ему мешает препятствие или большая разница в координатах Z так что рисовать лучше на более-менее ровной поверхности.
Скрипт для Gracia 
ЗДЕСЬ 
Вот для примера эту картинку 
скрипт нарисовал так:
Еще одна картинка нарисованная этим скриптом:
			
				Последний раз редактировалось Fer123, 17.05.2009 в 19:18 .
				Причина: обновление версии скрипта
				 
			
		
		
	
	 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	
		
			
				
					За это сообщение Fer123 нажился 24 спасибками от: 
				
				
				
			 
			 AD! , 
Anton5 , 
bistriy , 
bot-psih , 
Breadfan , 
catchy , 
dmitry501 , 
dyh9l , 
Grinch , 
He3eMHou , 
HellFire , 
Insane* , 
Johnson , 
mavi , 
MyGarant.net , 
NLObP , 
NoFear , 
QaK , 
RazdoR , 
safalkon , 
TAMBIK , 
Tekymse , 
TrueLegitPlayer , 
xkor   
	
  
	
		 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#11  
	
 
	
			
            
			
			Новичок
			
			
		
			
			
			
				 
				Регистрация: 15.01.2009
				
				
				
					Сообщений: 7
				
				 
	Сказал Спасибо: 1
	
		
			Имеет 1 спасибку в 1 сообщении
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
			
	Цитата:
	
	
		
			
				
					Сообщение от 
Fer123 
					QaK bistriy 
			
		 
	 
	
 Это ты такой умный а я просто непонимаю ! С моим мозгомизвините в 29 лет уже трудно понять у тебя Fer123 молодые мозги лет 18 тебе да ? Ты понимаешь лучше моего.  ВОт если можешь обработай этот скрипт и впиши в него подробные обьяснения. Куда что вставляеться , откуда береться , что каждая переменная обозначает ?
 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	 
	
		 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#12  
	
 
	
			
            
			
			Рыцарь
			
			
		
			
				
			
			
			
				 
				Регистрация: 28.09.2007
				
				
				
					Сообщений: 1,558
				
				 
	Сказал Спасибо: 71
	
		
			
				Имеет 351 спасибок в 244 сообщенях
			
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
			bistriy , если не понимаешь - кури матчасть, т.е. учебник по паскалю для начинающих, или даже лучше дельфу для начинающих. Если весь код коментировать - это застрелиться проще, есть алгоритм, есть его реализация в виде программы, ну, можно, допустим, в описании переменных подписать, что какая значит, а не весь код коментить. А так - зная основы программирования - код можно понять.
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
	 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	 
	
		 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#13  
	
 
	
			
            
			
			Новичок
			
			
		
			
			
			
				 
				Регистрация: 15.01.2009
				
				
				
					Сообщений: 7
				
				 
	Сказал Спасибо: 1
	
		
			Имеет 1 спасибку в 1 сообщении
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
				 
			
	Цитата:
	
	
		
			
				
					Сообщение от 
QaK 
					bistriy , если не понимаешь - кури матчасть, т.е. учебник по паскалю для начинающих, или даже лучше дельфу для начинающих. Если весь код коментировать - это застрелиться проще, есть алгоритм, есть его реализация в виде программы, ну, можно, допустим, в описании переменных подписать, что какая значит, а не весь код коментить. А так - зная основы программирования - код можно понять.
			
		 
	 
	
 Я просил хоть немного начать обьяснять суть кода а не давать советы.
Я в советах асс. А вот в кодах нешарю. Вкурил ?
Добавлено через 4 минуты 
Вот мое добавление .
Как нарисовать в окне формы картинку:
1. Добавить в функцию function Create_FormMain : TForm;
	delphi Код:
	КОд:
 //Image1 
    Image1:= TImage.Create ( Result) ;
    Image1.Parent :=Result;
    Image1.Left  :=10 ;
    Image1.Top  := 20 ;
    Image1.Width  := 160 ;
    Image1.Height  := 160 ;
    Image1.Visible  := TRUE ;
    Image1.Tag  := 0 ;
    Image1.Enabled  := TRUE ;
    Image1.Hint  := '' ;
    Image1.ShowHint  := FALSE ;
    Image1.AutoSize  := TRUE ;
2 .Добавить в процедуру procedure  LoadButton_Click( Sender: TButton) ;
Код:
  Image1.Picture .LoadFromFile ( path.text ) ;
  Image11;  // Процедура сдвига формы рисует картинку на форме. 
3 . ДОбавить код:
Procedure  Image11; // сдвигаю форму чтобы нарисовалась картинка. 
begin 
FormMain.Width  := FormMain.Width  + 1 ;
FormMain.Width  := FormMain.Width  - 1 ;
    //------------------------------------------- 
end ;
 			
				Последний раз редактировалось QaK, 02.03.2009 в 13:22 .
				Причина: Добавлено сообщение
				 
			
		
		
	
	 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	 
	
		 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#14  
	
 
	
			
            
			
			Рыцарь
			
			
		
			
				
			
			
			
				 
				Регистрация: 28.09.2007
				
				
				
					Сообщений: 1,558
				
				 
	Сказал Спасибо: 71
	
		
			
				Имеет 351 спасибок в 244 сообщенях
			
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
			
	Цитата:
	
	
		
			
				
					Сообщение от 
bistriy 
					Procedure Image11; // сдвигаю форму чтобы нарисовалась картинка.
			
		 
	 
	
 это нафига? что еще за бред? с каких пор нужно двигать формочку, чтоб картинка нарисовалась?
 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	 
	
		 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#15  
	
 
	
			
            
			
			Местный
			
			
		
			
			
			
				 
				Регистрация: 05.11.2008
				
				
				
					Сообщений: 168
				
				 
	Сказал Спасибо: 35
	
		
			
				Имеет 139 спасибок в 66 сообщенях
			
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
			Скрипт обновил в первом посте.
-Исправил проверку пакета #$64 который приходит после /loc так как оказывается вторые 4 байта (тип системного сообщения) меняется взависимости от территории.
-Добавил в форму загружаемую картинку спс bistriy. Кстате форму действительно не надо двигать 
-Переписал процедуру клика по комбобоксу Item, чтоб более понятней было.
-теперь правильно выгружаю bmp файл
И написал кое-какие коменты для переменных
safalkon 
Скачай заново скрипт теперь все будет работать
			
				Последний раз редактировалось Fer123, 02.03.2009 в 21:57 .
				
				 
			
		
		
	
	 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	
		
			
				
					За это сообщение Fer123 нажился 3 спасибками от: 
				
				
				
			 
			 
	
  
	
		 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#16  
	
 
	
			
            
			
			Новичок
			
			
		
			
			
			
				 
				Регистрация: 15.01.2009
				
				
				
					Сообщений: 7
				
				 
	Сказал Спасибо: 1
	
		
			Имеет 1 спасибку в 1 сообщении
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
			Дополнение к скрипту:
		
	
		
		
		
		
		
		
		
		
		
	
	 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	 
	
		 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#17  
	
 
	
			
            
			
			Рыцарь
			
			
		
			
				
			
			
			
				 
				Регистрация: 28.09.2007
				
				
				
					Сообщений: 1,558
				
				 
	Сказал Спасибо: 71
	
		
			
				Имеет 351 спасибок в 244 сообщенях
			
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
			bistriy , 
	Цитата:
	
	
		
			
				
					Сообщение от 
Fer123 
					if delta(MyX,MyY,StartX+currentx*(ComboBoxScale.ItemI  ndex+1),StartY+currenty*(ComboBoxScale.ItemIndex+1  ))>240
			
		 
	 
	
  попробуй цифру поменьше воткнуть, не 240.
 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	 
	
		 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#18  
	
 
	
			
            
			
			Новичок
			
			
		
			
			
			
				 
				Регистрация: 15.01.2009
				
				
				
					Сообщений: 7
				
				 
	Сказал Спасибо: 1
	
		
			Имеет 1 спасибку в 1 сообщении
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
				 
			
	Цитата:
	
	
		
			
				
					Сообщение от 
QaK 
					bistriy , 
			
		 
	 
	
 Сам себе воткни ))
Тут ненужная строчка её можно удалить вабще я думаю.
240 - это ограничение от изменения которого размер нарисованной картинки никак не зависит. Просто это ограничение на расстояние на которое будет бежать бот а когда он кидает адену происходит следующее если он не может кинуть на это расстояние адену приходит сообщение с сервера вы не можете кинуть адену так далеко ((( и бот адену не кидает а переходит к следую щей точки.
 Идея такая нужно доделать скрипт так :
1. Если приходит сообщение с сервера вы не можете кинуть адену так далеко , бот не кидает адену а сначала бежит в точку куда нужно кинуть адену а потом повторяет последнее действие тоесть кидает адену в эту точку и рисует дальше по порядку точки аденой.
Кто может сделать такую поправку в скрипте ?
Это очень нужно потому что я хочу выложить слово например Lineage 2 в масштабе 10:1  а у бота неполучаеться это сделать и рисуеться только цифра 2 , бот вабще добегает до конца слова и встаёт. Рисует только цифру 2 при таком масштабе (((
 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	 
	
		 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#19  
	
 
	
			
            
			
			Рыцарь
			
			
		
			
				
			
			
			
				 
				Регистрация: 28.09.2007
				
				
				
					Сообщений: 1,558
				
				 
	Сказал Спасибо: 71
	
		
			
				Имеет 351 спасибок в 244 сообщенях
			
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
			bistriy , хамить заканчивай.  Если совсем ничего в программировании не понимаешь и код чужой разобрать не можешь, так нефиг умничать
	delphi Код:
	if  delta( MyX,MyY,StartX+currentx*( ComboBoxScale.ItemIndex +1 ) ,StartY+currenty*( ComboBoxScale.ItemIndex +1 ) ) >240  then  begin   //расстояние между точками 
buf:=#$01 ;
WriteD( StartX+currentx*( ComboBoxScale.ItemIndex +1 ) ) ;
writeD( StartY+currenty*( ComboBoxScale.ItemIndex +1 ) ) ;
WriteD( StartZ) ;
WriteD( MyX) ;
WriteD( MyY) ;
WriteD( StartZ) ;
WriteD( 1 ) ;
SendToServerEx( Name) ;
timer.enabled :=false ; //Отключаем на время передвижения 
ready:=true ;
exit ;
 дословно код: если расстояние до точки выброса адены больше чем 240, тогда топаем в эту точку. Эспешиал фор ю, как говорится, а почему не срабатывает - это другая история.
 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	 
	
		 	
	 
 
	
	
		
	
		
	
				
			
			 
		
			 
			#20  
	
 
	
			
            
			
			Местный
			
			
		
			
			
			
				 
				Регистрация: 05.11.2008
				
				
				
					Сообщений: 168
				
				 
	Сказал Спасибо: 35
	
		
			
				Имеет 139 спасибок в 66 сообщенях
			
		
	
				
				
				
				    
			 					
		
	 
	
	
	
		
		
			
			
			bistriy 
		
	
		
		
		
		
		
		
		
		
		
		
						
				Последний раз редактировалось Fer123, 03.03.2009 в 17:52 .
				
				 
			
		
		
	
	 
 
	
		 
	
	
	
		
		
		
		
		
			 
 
 
	 
	
		 	
	 
 
		
 
	
		
 
  
	
		
	
		 
 
 
	
		
		Вы не можете  создавать темы
		Вы не можете  отвечать на сообщения
		Вы не можете  прикреплять файлы
		Вы не можете  редактировать сообщения
		HTML код Выкл. 
	  
 
	 
	
		
	 
 
Часовой пояс GMT +4, время: 10:37 .
		 	
	 
 
	
	
	
	vBulletin style designed by 
MSC Team .
Powered by vBulletin® Version 3.6.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd. Перевод: 
zCarot 
	
 
 
 
 
Вы хотите чувствовать себя в безопасности? чоп  Белган обеспечит её!