You last visited: Today at 17:33
Advertisement
L2 Phx Auto Enchant Script Help!
Discussion on L2 Phx Auto Enchant Script Help! within the Lin2 Exploits, Hacks, Bots, Tools & Macros forum part of the Lineage 2 category.
03/17/2011, 17:41
#1
elite*gold: 0
Join Date: Oct 2008
Posts: 3
Received Thanks: 0
L2 Phx Auto Enchant Script Help!
Hi guys, well ill explain my problem. i wanna use this script
PHP Code:
//Автоматизация заточки предметов до необходимого уровня by NLObP
//version 0.3 от 23.06.2008г.
program Enchant ;
{********************************************************************************
Возможности скрипта :
--------------------
0.1
+ Панель управления ;
+ Затачиваем по очереди все предметы с ItemID пока не переломаем
или не заточим , один предмет всегда остаётся ;
0.2
+ исправлен выбор названий предметов из инвентаря ;
+ небольшая правка кода ;
0.3
+ Проверено на theAbyss ( все предметы инвентаря чара видит );
+ исправлена ошибка кода выбора скроллов ;
+ исправлена ошибка подсчета суммы предметов ;
====================================================================
Работа скрипта проверялась на локальном Интерлюда сервере
====================================================================
Необходимо затариться оружием , заточками и валерьянкой .
Name = 'NLObP' ; //Вписать сюда имя чара
//установить константу в зависимости от типа игры (С4 или Интерлюд)
interlude = true ; //Interlude - true, C4 - false
Скрипт распространяется как есть , и я не несу ответственности за то , что
ВЫ натворили у себя , его используя .
MyICQ 402988808
********************************************************************************}
//............................................
//Список констант
const
Name = 'NLObP' ; //Вписать сюда имя чара
//установить константу в зависимости от типа игры (С4 или Интерлюд)
interlude = true ; //Interlude - true, C4 - false
//-------------------------
max = 250 ; //количество слотов в инвентаре чара
//............................................
//Список переменных
var
ScrollID , ScrollOID : integer ; //ScrollID скролла заточки
ItemID , ItemOID : integer ; //ItemIDID затачиваемого предмета
MaxEnchLvl : integer ; //уровень заточки который требуется достичь
ItemBase : array[ 1..4 , 1. . max ] of integer ; //ItemOID, ItemID, Kol-vo, ItemLvl
add : boolean ;
timer : TTimer ;
ItemCount , CurEnchLvl : integer ;
SocialID : integer ; // вспомогательная
ItemsName , StringList : TStringList ; //названия предметов, имена продавцов
FormMain : TForm ; //Создаваемая форма
Splitter1 : TSplitter ;
Splitter2 : TSplitter ;
Stats : TMemo ;
Msg : TMemo ;
Panel1 : TPanel ;
GroupBox2 : TGroupBox ;
Label2 : TLabel ;
Label4 : TLabel ;
Label12 : TLabel ;
Label13 : TLabel ;
CheckBoxItem : TCheckBox ;
ComboBoxItem : TComboBox ;
ButtonStartEnchant : TButton ;
ButtonStopEnchant : TButton ;
CheckBoxScroll : TCheckBox ;
ComboBoxScroll : TComboBox ;
EditItemVal : TEdit ;
EditScrollVal : TEdit ;
EditScrollOID : TEdit ;
EditItemOID : TEdit ;
Label1 : TLabel ;
Label3 : TLabel ;
Edit1 : TEdit ;
Edit2 : TEdit ;
//............................................
//*************************************
//Обработчики событий для элементов управления на форме
//......................................
//CheckBoxItem
procedure CheckBoxItem_Click ( Sender : TCheckBox );
//Event : OnClick
begin
if CheckBoxItem . Checked
then begin
ItemOID := ItemBase [ 1 , ComboBoxItem . ItemIndex + 1 ];
ItemID := ItemBase [ 2 , ComboBoxItem . ItemIndex + 1 ];
//проверка
// EditItemOID.Text:=Inttostr(ItemID);
// EditItemVal.text:=inttostr(ItemOID);
ComboBoxItem . Enabled := false ; //выключаем
end else begin
ItemID := 0 ; //отмена
ItemOID := 0 ;
ComboBoxItem . Enabled := true ; //включаем
//Пакет RequestItemList
buf := hstr ( '0F' );
SendToServerEx ( Name );
end ;
end ;
//......................................
//......................................
//ComboBoxItem
procedure ComboBoxItem_Click ( Sender : TComboBox );
//Event : OnClick
begin
ItemID := ExtractIDValues ( ComboBoxItem . Items . Strings [ ComboBoxItem . ItemIndex ]);
EditItemOID . Text := Inttostr ( ItemID );
EditItemVal . text := inttostr ( sumitem ( ItemID ));
end ;
//......................................
//......................................
//CheckBoxScroll
procedure CheckBoxScroll_Click ( Sender : TCheckBox );
//Event : OnClick
begin
if CheckBoxScroll . Checked
then begin
ScrollOID := ItemBase [ 1 , ComboBoxScroll . ItemIndex + 1 ];
ScrollID := ItemBase [ 2 , ComboBoxScroll . ItemIndex + 1 ];
//проверка
// EditScrollOID.Text:=Inttostr(ScrollID);
// EditScrollVal.text:=inttostr(ScrollOID);
ComboBoxScroll . Enabled := false ; //выключаем
end else begin
ScrollID := 0 ; //отмена
ScrollOID := 0 ;
ComboBoxScroll . Enabled := true ; //включаем
//Пакет RequestItemList
buf := hstr ( '0F' );
SendToServerEx ( Name );
end ;
end ;
//......................................
//......................................
//ComboBoxScroll
procedure ComboBoxScroll_Click ( Sender : TComboBox );
//Event : OnClick
begin
ScrollID := ExtractIDValues ( ComboBoxScroll . Items . Strings [ ComboBoxScroll . ItemIndex ]);
EditScrollOID . Text := Inttostr ( ScrollID );
EditScrollVal . text := inttostr ( sumitem ( ScrollID ));
end ;
//......................................
//......................................
//ButtonStartEnchant
procedure ButtonStartEnchant_Click ( Sender : TButton );
//Event : OnClick
begin
CurEnchLvl := 0 ;
Edit2 . text := inttostr ( CurEnchLvl );
msg . Lines . Add ( 'Команда Старт!!!' );
timer . enabled := true ;
end ;
//......................................
//......................................
//ButtonStopEnchant
procedure ButtonStopEnchant_Click ( Sender : TButton );
//Event : OnClick
begin
msg . Lines . Add ( 'Команда Стоп!!!' );
timer . enabled := false ;
end ;
//......................................
//......................................
procedure Edit1_Exit ( Sender : TEdit );
//Event : OnExit
begin
// MyHPID:=ExtractIDValues(ComboBoxHPotion.Items.Strings[ComboBoxHPotion.ItemIndex]);
// EditHPotionVal.Text:=Inttostr(FindItem(MyHPID));
// EditHPotionOID.text:=inttostr(ItemBase2[1,1]);
end ;
//......................................
//*************************************
procedure Free_FormMain ;
//Освобождаем ресурсы ...
begin
TRY
if FormMain <> NIL then begin
FormMain . Free ;
FormMain := NIL ;
end ;
FINALLY
END ;
end ; //Free_FormMain
//========================
//========================
function Create_FormMain : TForm ;
//Создаем форму и соотв. компоненты на ней ...
Var
Yes : boolean ;
begin
Yes := FALSE ;
Result := TForm . Create ( nil );
TRY
//------------------------
//Свойства формы
Result . Caption := 'Enchant by NLObP v.0.3' ;
Result . Left := 397 ;
Result . Top := 233 ;
Result . Width := 581 ;
Result . Height := 205 ;
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 ;
//------------------------
//......................................
//Splitter1
Splitter1 := TSplitter . Create ( Result );
Splitter1 . Parent := Result ;
Splitter1 . Align := alBottom ;
Splitter1 . Color := clBtnFace ;
Splitter1 . Left := 0 ;
Splitter1 . Top := 103 ;
Splitter1 . Width := 573 ;
Splitter1 . Height := 3 ;
Splitter1 . Visible := TRUE ;
Splitter1 . Tag := 0 ;
//......................................
//......................................
//Splitter2
Splitter2 := TSplitter . Create ( Result );
Splitter2 . Parent := Result ;
Splitter2 . Align := alRight ;
Splitter2 . Color := clBtnFace ;
Splitter2 . Left := 442 ;
Splitter2 . Top := 0 ;
Splitter2 . Width := 1 ;
Splitter2 . Height := 103 ;
Splitter2 . Visible := TRUE ;
Splitter2 . Tag := 0 ;
//......................................
//......................................
//Stats
Stats := TMemo . Create ( Result );
Stats . Parent := Result ;
Stats . Left := 443 ;
Stats . Top := 0 ;
Stats . Width := 130 ;
Stats . Height := 103 ;
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 := alRight ;
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 ;
//......................................
//......................................
//Msg
Msg := TMemo . Create ( Result );
Msg . Parent := Result ;
Msg . Left := 0 ;
Msg . Top := 106 ;
Msg . Width := 573 ;
Msg . Height := 65 ;
Msg . Visible := TRUE ;
Msg . Tag := 0 ;
Msg . Enabled := TRUE ;
Msg . Hint := '' ;
Msg . ShowHint := FALSE ;
Msg . Font . Name := 'Tahoma' ;
Msg . Font . Size := 8 ;
Msg . Font . Color := clWindowText ;
Msg . Color := clWindow ;
Msg . TabOrder := 1 ;
Msg . TabStop := TRUE ;
Msg . Align := alBottom ;
Msg . WordWrap := TRUE ;
Msg . Alignment := taLeftJustify ;
Msg . WantTabs := FALSE ;
Msg . WantReturns := TRUE ;
Msg . HideSelection := TRUE ;
Msg . MaxLength := 0 ;
Msg . OEMConvert := FALSE ;
Msg . ReadOnly := FALSE ;
Msg . ScrollBars := ssNone ;
//......................................
//......................................
//Panel1
Panel1 := TPanel . Create ( Result );
Panel1 . Parent := Result ;
Panel1 . Left := 0 ;
Panel1 . Top := 0 ;
Panel1 . Width := 442 ;
Panel1 . Height := 103 ;
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 ;
//......................................
//......................................
//GroupBox2
GroupBox2 := TGroupBox . Create ( Result );
GroupBox2 . Parent := Panel1 ;
GroupBox2 . Left := 1 ;
GroupBox2 . Top := 1 ;
GroupBox2 . Width := 440 ;
GroupBox2 . Height := 101 ;
GroupBox2 . Visible := TRUE ;
GroupBox2 . Tag := 0 ;
GroupBox2 . Enabled := TRUE ;
GroupBox2 . Hint := '' ;
GroupBox2 . ShowHint := FALSE ;
GroupBox2 . Caption := 'Настройки' ;
GroupBox2 . Align := alClient ;
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 ;
//......................................
//......................................
//Label1
Label1 := TLabel . Create ( Result );
Label1 . Parent := GroupBox2 ;
Label1 . Left := 10 ;
Label1 . Top := 70 ;
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 ;
//......................................
//......................................
//Label1
Label3 := TLabel . Create ( Result );
Label3 . Parent := GroupBox2 ;
Label3 . Left := 170 ;
Label3 . Top := 70 ;
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 ;
//......................................
//......................................
//Edit1
Edit1 := TEdit . Create ( Result );
Edit1 . Parent := GroupBox2 ;
Edit1 . Left := 90 ;
Edit1 . Top := 67 ;
Edit1 . Width := 60 ;
Edit1 . Height := 21 ;
Edit1 . Visible := TRUE ;
Edit1 . Tag := 0 ;
Edit1 . Enabled := TRUE ;
Edit1 . Hint := 'Введи желаемый уровень заточки' ;
Edit1 . ShowHint := TRUE ;
Edit1 . Text := '20' ;
Edit1 . Font . Name := 'Tahoma' ;
Edit1 . Font . Size := 8 ;
Edit1 . Font . Color := clWindowText ;
Edit1 . Color := clWindow ;
Edit1 . TabOrder := 5 ;
Edit1 . TabStop := TRUE ;
Edit1 . ReadOnly := FALSE ;
Edit1 . MaxLength := 0 ;
Edit1 . AutoSize := TRUE ;
Edit1 . OnExit := @ Edit1_Exit ;
//......................................
//......................................
//Edit2
Edit2 := TEdit . Create ( Result );
Edit2 . Parent := GroupBox2 ;
Edit2 . Left := 199 ;
Edit2 . Top := 67 ;
Edit2 . Width := 60 ;
Edit2 . Height := 21 ;
Edit2 . Visible := TRUE ;
Edit2 . Tag := 0 ;
Edit2 . Enabled := TRUE ;
Edit2 . Hint := 'Какого уровня смогли достичь' ;
Edit2 . ShowHint := TRUE ;
Edit2 . Text := '0' ;
Edit2 . Font . Name := 'Tahoma' ;
Edit2 . Font . Size := 8 ;
Edit2 . Font . Color := clWindowText ;
Edit2 . Color := clWindow ;
Edit2 . TabOrder := 5 ;
Edit2 . TabStop := FALSE ;
Edit2 . ReadOnly := TRUE ;
Edit2 . MaxLength := 0 ;
Edit2 . AutoSize := TRUE ;
//......................................
//......................................
//Label2
Label2 := TLabel . Create ( Result );
Label2 . Parent := GroupBox2 ;
Label2 . Left := 416 ;
Label2 . Top := 19 ;
Label2 . Width := 18 ;
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 ;
//......................................
//......................................
//Label4
Label4 := TLabel . Create ( Result );
Label4 . Parent := GroupBox2 ;
Label4 . Left := 416 ;
Label4 . Top := 43 ;
Label4 . Width := 18 ;
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 ;
//......................................
//......................................
//Label12
Label12 := TLabel . Create ( Result );
Label12 . Parent := GroupBox2 ;
Label12 . Left := 273 ;
Label12 . Top := 3 ;
Label12 . Width := 33 ;
Label12 . Height := 13 ;
Label12 . Visible := TRUE ;
Label12 . Tag := 0 ;
Label12 . Enabled := TRUE ;
Label12 . Hint := '' ;
Label12 . ShowHint := FALSE ;
Label12 . Caption := 'ItemID' ;
Label12 . Transparent := TRUE ;
Label12 . WordWrap := FALSE ;
Label12 . Alignment := taLeftJustify ;
Label12 . Layout := tlTop ;
Label12 . AutoSize := TRUE ;
Label12 . Align := alNone ;
Label12 . Font . Name := 'Tahoma' ;
Label12 . Font . Size := 8 ;
Label12 . Font . Color := clWindowText ;
Label12 . Color := clBtnFace ;
//......................................
//......................................
//Label13
Label13 := TLabel . Create ( Result );
Label13 . Parent := GroupBox2 ;
Label13 . Left := 349 ;
Label13 . Top := 3 ;
Label13 . Width := 35 ;
Label13 . Height := 13 ;
Label13 . Visible := TRUE ;
Label13 . Tag := 0 ;
Label13 . Enabled := TRUE ;
Label13 . Hint := '' ;
Label13 . ShowHint := FALSE ;
Label13 . Caption := 'Кол-во' ;
Label13 . Transparent := TRUE ;
Label13 . WordWrap := FALSE ;
Label13 . Alignment := taLeftJustify ;
Label13 . Layout := tlTop ;
Label13 . AutoSize := TRUE ;
Label13 . Align := alNone ;
Label13 . Font . Name := 'Tahoma' ;
Label13 . Font . Size := 8 ;
Label13 . Font . Color := clWindowText ;
Label13 . Color := clBtnFace ;
//......................................
//......................................
//CheckBoxItem
CheckBoxItem := TCheckBox . Create ( Result );
CheckBoxItem . Parent := GroupBox2 ;
CheckBoxItem . Left := 18 ;
CheckBoxItem . Top := 18 ;
CheckBoxItem . Width := 66 ;
CheckBoxItem . Height := 17 ;
CheckBoxItem . Visible := TRUE ;
CheckBoxItem . Tag := 0 ;
CheckBoxItem . Enabled := TRUE ;
CheckBoxItem . Hint := 'Поставить галочку если выбрали предмет' ;
CheckBoxItem . ShowHint := TRUE ;
CheckBoxItem . Caption := 'Предмет' ;
CheckBoxItem . Font . Name := 'Tahoma' ;
CheckBoxItem . Font . Size := 8 ;
CheckBoxItem . Font . Color := clWindowText ;
CheckBoxItem . Color := clBtnFace ;
CheckBoxItem . TabOrder := 0 ;
CheckBoxItem . TabStop := TRUE ;
CheckBoxItem . Checked := FALSE ;
CheckBoxItem . AllowGrayed := FALSE ;
CheckBoxItem . State := cbUnchecked ;
CheckBoxItem . OnClick := @ CheckBoxItem_Click ;
//......................................
//......................................
//ComboBoxItem
ComboBoxItem := TComboBox . Create ( Result );
ComboBoxItem . Parent := GroupBox2 ;
ComboBoxItem . Left := 90 ;
ComboBoxItem . Top := 16 ;
ComboBoxItem . Width := 169 ;
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 ;
//......................................
//......................................
//ButtonStartEnchant
ButtonStartEnchant := TButton . Create ( Result );
ButtonStartEnchant . Parent := GroupBox2 ;
ButtonStartEnchant . Left := 265 ;
ButtonStartEnchant . Top := 67 ;
ButtonStartEnchant . Width := 75 ;
ButtonStartEnchant . Height := 25 ;
ButtonStartEnchant . Visible := TRUE ;
ButtonStartEnchant . Tag := 0 ;
ButtonStartEnchant . Enabled := TRUE ;
ButtonStartEnchant . Hint := '' ;
ButtonStartEnchant . ShowHint := FALSE ;
ButtonStartEnchant . Caption := 'Start' ;
ButtonStartEnchant . Font . Name := 'Tahoma' ;
ButtonStartEnchant . Font . Size := 8 ;
ButtonStartEnchant . Font . Color := clWindowText ;
ButtonStartEnchant . Font . CharSet := 1 ;
ButtonStartEnchant . TabOrder := 2 ;
ButtonStartEnchant . TabStop := TRUE ;
ButtonStartEnchant . Cancel := FALSE ;
ButtonStartEnchant . ModalResult := 0 ;
ButtonStartEnchant . OnClick := @ ButtonStartEnchant_Click ;
//......................................
//......................................
//ButtonStopEnchant
ButtonStopEnchant := TButton . Create ( Result );
ButtonStopEnchant . Parent := GroupBox2 ;
ButtonStopEnchant . Left := 341 ;
ButtonStopEnchant . Top := 67 ;
ButtonStopEnchant . Width := 75 ;
ButtonStopEnchant . Height := 25 ;
ButtonStopEnchant . Visible := TRUE ;
ButtonStopEnchant . Tag := 0 ;
ButtonStopEnchant . Enabled := TRUE ;
ButtonStopEnchant . Hint := '' ;
ButtonStopEnchant . ShowHint := FALSE ;
ButtonStopEnchant . Caption := 'Stop' ;
ButtonStopEnchant . Font . Name := 'Tahoma' ;
ButtonStopEnchant . Font . Size := 8 ;
ButtonStopEnchant . Font . Color := clWindowText ;
ButtonStopEnchant . Font . CharSet := 1 ;
ButtonStopEnchant . TabOrder := 3 ;
ButtonStopEnchant . TabStop := TRUE ;
ButtonStopEnchant . Cancel := FALSE ;
ButtonStopEnchant . ModalResult := 0 ;
ButtonStopEnchant . OnClick := @ ButtonStopEnchant_Click ;
//......................................
//......................................
//CheckBoxScroll
CheckBoxScroll := TCheckBox . Create ( Result );
CheckBoxScroll . Parent := GroupBox2 ;
CheckBoxScroll . Left := 18 ;
CheckBoxScroll . Top := 41 ;
CheckBoxScroll . Width := 66 ;
CheckBoxScroll . Height := 23 ;
CheckBoxScroll . Visible := TRUE ;
CheckBoxScroll . Tag := 0 ;
CheckBoxScroll . Enabled := TRUE ;
CheckBoxScroll . Hint := 'Поставить галочку если выбрали скролл заточки' ;
CheckBoxScroll . ShowHint := TRUE ;
CheckBoxScroll . Caption := 'Заточка' ;
CheckBoxScroll . Font . Name := 'Tahoma' ;
CheckBoxScroll . Font . Size := 8 ;
CheckBoxScroll . Font . Color := clWindowText ;
CheckBoxScroll . Color := clBtnFace ;
CheckBoxScroll . TabOrder := 4 ;
CheckBoxScroll . TabStop := TRUE ;
CheckBoxScroll . Checked := FALSE ;
CheckBoxScroll . AllowGrayed := FALSE ;
CheckBoxScroll . State := cbUnchecked ;
CheckBoxScroll . OnClick := @ CheckBoxScroll_Click ;
//......................................
//......................................
//ComboBoxScroll
ComboBoxScroll := TComboBox . Create ( Result );
ComboBoxScroll . Parent := GroupBox2 ;
ComboBoxScroll . Left := 90 ;
ComboBoxScroll . Top := 40 ;
ComboBoxScroll . Width := 169 ;
ComboBoxScroll . Height := 21 ;
ComboBoxScroll . Visible := TRUE ;
ComboBoxScroll . Tag := 0 ;
ComboBoxScroll . Enabled := TRUE ;
ComboBoxScroll . Hint := 'Выбери из списка скролл заточки' ;
ComboBoxScroll . ShowHint := TRUE ;
ComboBoxScroll . Text := 'ComboBoxScroll' ;
ComboBoxScroll . Font . Name := 'Tahoma' ;
ComboBoxScroll . Font . Size := 8 ;
ComboBoxScroll . Font . Color := clWindowText ;
ComboBoxScroll . Color := clWindow ;
ComboBoxScroll . TabOrder := 5 ;
ComboBoxScroll . TabStop := TRUE ;
ComboBoxScroll . ItemIndex := - 1 ;
ComboBoxScroll . Sorted := FALSE ;
ComboBoxScroll . ItemHeight := 13 ;
ComboBoxScroll . OnClick := @ ComboBoxScroll_Click ;
//......................................
//......................................
//EditItemVal
EditItemVal := TEdit . Create ( Result );
EditItemVal . Parent := GroupBox2 ;
EditItemVal . Left := 341 ;
EditItemVal . Top := 16 ;
EditItemVal . Width := 72 ;
EditItemVal . Height := 21 ;
EditItemVal . Visible := TRUE ;
EditItemVal . Tag := 0 ;
EditItemVal . Enabled := TRUE ;
EditItemVal . Hint := '' ;
EditItemVal . ShowHint := FALSE ;
EditItemVal . Text := '0' ;
EditItemVal . Font . Name := 'Tahoma' ;
EditItemVal . Font . Size := 8 ;
EditItemVal . Font . Color := clWindowText ;
EditItemVal . Color := clWindow ;
EditItemVal . TabOrder := 6 ;
EditItemVal . TabStop := TRUE ;
EditItemVal . ReadOnly := TRUE ;
EditItemVal . MaxLength := 0 ;
EditItemVal . AutoSize := TRUE ;
//......................................
//......................................
//EditScrollVal
EditScrollVal := TEdit . Create ( Result );
EditScrollVal . Parent := GroupBox2 ;
EditScrollVal . Left := 341 ;
EditScrollVal . Top := 40 ;
EditScrollVal . Width := 72 ;
EditScrollVal . Height := 21 ;
EditScrollVal . Visible := TRUE ;
EditScrollVal . Tag := 0 ;
EditScrollVal . Enabled := TRUE ;
EditScrollVal . Hint := '' ;
EditScrollVal . ShowHint := FALSE ;
EditScrollVal . Text := '0' ;
EditScrollVal . Font . Name := 'Tahoma' ;
EditScrollVal . Font . Size := 8 ;
EditScrollVal . Font . Color := clWindowText ;
EditScrollVal . Color := clWindow ;
EditScrollVal . TabOrder := 7 ;
EditScrollVal . TabStop := TRUE ;
EditScrollVal . ReadOnly := TRUE ;
EditScrollVal . MaxLength := 0 ;
EditScrollVal . AutoSize := TRUE ;
//......................................
//......................................
//EditScrollOID
EditScrollOID := TEdit . Create ( Result );
EditScrollOID . Parent := GroupBox2 ;
EditScrollOID . Left := 263 ;
EditScrollOID . Top := 40 ;
EditScrollOID . Width := 72 ;
EditScrollOID . Height := 21 ;
EditScrollOID . Visible := TRUE ;
EditScrollOID . Tag := 0 ;
EditScrollOID . Enabled := TRUE ;
EditScrollOID . Hint := '' ;
EditScrollOID . ShowHint := FALSE ;
EditScrollOID . Text := '0' ;
EditScrollOID . Font . Name := 'Tahoma' ;
EditScrollOID . Font . Size := 8 ;
EditScrollOID . Font . Color := clWindowText ;
EditScrollOID . Color := clWindow ;
EditScrollOID . TabOrder := 8 ;
EditScrollOID . TabStop := TRUE ;
EditScrollOID . ReadOnly := TRUE ;
EditScrollOID . MaxLength := 0 ;
EditScrollOID . AutoSize := TRUE ;
//......................................
//......................................
//EditItemOID
EditItemOID := TEdit . Create ( Result );
EditItemOID . Parent := GroupBox2 ;
EditItemOID . Left := 264 ;
EditItemOID . Top := 16 ;
EditItemOID . Width := 72 ;
EditItemOID . Height := 21 ;
EditItemOID . Visible := TRUE ;
EditItemOID . Tag := 0 ;
EditItemOID . Enabled := TRUE ;
EditItemOID . Hint := '' ;
EditItemOID . ShowHint := FALSE ;
EditItemOID . Text := '0' ;
EditItemOID . Font . Name := 'Tahoma' ;
EditItemOID . Font . Size := 8 ;
EditItemOID . Font . Color := clWindowText ;
EditItemOID . Color := clWindow ;
EditItemOID . TabOrder := 9 ;
EditItemOID . TabStop := TRUE ;
EditItemOID . ReadOnly := TRUE ;
EditItemOID . MaxLength := 0 ;
EditItemOID . AutoSize := TRUE ;
//......................................
Yes := TRUE ;
FINALLY
if not Yes then begin
//Освобождаем ресурсы, если неудачно ...
if Result <> NIL then begin
Result . Free ;
Result := NIL ;
end ;
end ;
END ;
msg . Lines . Add ( 'Автоматизация заточки by NLObP!' );
Result . Show ;
end ; //Create_FormMain
//========================
//========================
procedure Init ; //Вызывается при включении скрипта
var
i : integer ;
begin
FormMain := Create_FormMain ;
//Enchant:=false;
CurEnchLvl := 0 ;
timer := TTimer . Create ( nil );
timer . OnTimer :=@ OnTimer ;
timer . enabled := false ;
timer . interval := 2000 ; //800 время задержки, уже самый минимум
add := false ;
//Пакет RequestItemList
buf := hstr ( '0F' );
SendToServerEx ( Name );
StringList := TStringList . Create ;
ItemsName := TStringList . Create ;
try
ItemsName . LoadFromFile ( 'itemsid.ini' );
except
msg . Lines . Add ( 'itemsid.ini не найден!' );
exit;
end ;
end ;
//......................................
//******************************************************************************
procedure Free ; //Вызывается при выключении скрипта
begin
// ItemBase:=nil; //нельзя так делать с массивом
timer . Free ;
StringList . Clear ;
ItemsName . Clear ;
//достаточно освободить форму
Free_FormMain ;
end ;
//......................................
//******************************************************************************
procedure Say ( msg : string );
begin
buf := hstr ( '4A 00 00 00 00' );
WriteD ( 2 );
WriteS ( Name );
WriteS ( msg );
SendToClientEx ( Name );
end ;
//......................................
//***************************************************************
procedure CreateItemBase ; //пакет 1B, Создает базу ObjectID по ItemID
//1B=ItemListPacket:w(window)w(ListCount)w(itemType1)h(ObjectID)i(ItemID)d(count)w(itemType2)w(CustType1)w(isEquipped)d(BodyPart)w(EnchantLevel)w(CustType2)d(Augment)d(--)
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
ItemBase [ 4 , i ]:= 0 ; //lvl
end ;
j := 4 ; //смещение для ListCount
ListCount := ReadH ( j ); //количество итемов не должно превышать max!
//if ListCount>maxitems then msg.Lines.Add('Внимание! Не все вещи влезли в массив. ListCount>Max='+IntToStr(ListCount)+'/'+IntToStr(maxitems));
j := 8 ; //смещение для ObjectID
//Пробегаем по Инвентарю и сохраняем ObjectID соответствующие необходимым ItemID
for i := 1 to ListCount do begin
itemBase [ 1 , i ]:= ReadD ( j ); //OID
itemBase [ 2 , i ]:= ReadD ( j ); //ItemID
itemBase [ 3 , i ]:= ReadD ( j ); //кол-во
inc ( j , 10 );
itemBase [ 4 , i ]:= ReadH ( j ); //EnchantLevel
//msg.Lines.Add('i='+inttostr(i)+' ItemOID='+IntToStr(ItemBase[1,i])+' ItemID='+IntToStr(ItemBase[2,i])+' ItemKol='+IntToStr(ItemBase[3,i])+' ItemLVL='+IntToStr(ItemBase[4,i]));
if interlude then inc ( j , 12 ) else inc ( j , 8 );
//msg.Lines.Add('j='+inttostr(j));
end ;
//вносим изменения в чекбоксы
StringList . Clear ;
try
for i := 1 to ListCount do begin
try
StringList . Add ( ItemsName [ ItemBase [ 2 , i ]- 1 ]); //записываем название вещей из инвентаря
except ;
msg . Lines . Add ( 'Пропускаем! Нет ItemID=' + inttostr ( ItemBase [ 2 , i ])+ ' в itemsid.ini' );
end
//StringList.Add(ItemsName.Values[IntToStr(ItemBase[2,i])]); //записываем название вещей из инвентаря
end ;
except ;
msg . Lines . Add ( 'ошибка в CreateItemBase->StringList.Add()' );
msg . Lines . Add ( inttostr ( ItemBase [ 2 , i ]));
exit;
end ;
if not CheckBoxItem . Checked then begin //наполняем комбобокс
with ComboBoxItem do
begin
Items . Clear ;
Items . Assign ( StringList );
ItemIndex := 0 ;
end ;
end ;
if not CheckBoxScroll . Checked then begin //наполняем комбобокс
with ComboBoxScroll do
begin
Items . Clear ;
Items . Assign ( StringList );
ItemIndex := 0 ;
end ;
end ;
end ;
//......................................
//******************************************************************************
//27=InventoryUpdate:w(count)w(1add2mod3remove)w(itemType1)d(ObjectID)i(ItemId)d(Count)w(itemType2)w(cusType1)w(isEquipped)d(BodyPart)w(EnchantLevel)w(cusType2)-(8)
procedure UpdateItemBase ; //пакет 27, Создает базу ObjectID по ItemID
var
i , ii , j , ItemOID , ItemID , ItemCount , ListCount , UpdType , Itemlvl : integer ;
add : boolean ;
begin
add := false ;
ListCount := ReadH ( 2 ); //количество итемов
//Пробегаем по Инвентарю и сохраняем пары ObjectID - lvl
j := 4 ; //смещение для действия с предметом 1-добавлен 2-изменен 3-удален
for ii := 1 to ListCount do begin
UpdType := ReadH ( j );
inc ( j , 2 );
ItemOID := ReadD ( j ); //ObjectID
ItemID := ReadD ( j ); //ItemID
itemCount := ReadD ( j ); //кол-во
inc ( j , 10 );
Itemlvl := ReadH ( j );
case UpdType of
//добавлен
1 : begin
for ii := 1 to max do begin
if ( ItemBase [ 1 , i ]= 0 ) and ( add = false ) then begin
ItemBase [ 1 , i ]:= ItemOID ;
ItemBase [ 2 , i ]:= ItemID ;
ItemBase [ 3 , i ]:= ItemCount ;
ItemBase [ 4 , i ]:= Itemlvl ;
msg . Lines . Add ( 'Добавили предмет!' );
msg . Lines . Add ( 'i=' + inttostr ( i )+ ' ItemOID=' + IntToStr ( ItemBase [ 1 , i ])+ ' ItemID=' + IntToStr ( ItemBase [ 2 , i ])+ ' ItemKol=' + IntToStr ( ItemBase [ 3 , i ])+ ' ItemLVL=' + IntToStr ( ItemBase [ 4 , i ]));
add := true ;
end ;
end ;
end ;
//изменен
2 : begin
for i := 1 to max do begin
if ItemBase [ 1 , ii ]= ItemOID then begin
ItemBase [ 3 , i ]:= ItemCount ;
ItemBase [ 4 , i ]:= Itemlvl ;
msg . Lines . Add ( 'Изменяем параметры предмета!' );
msg . Lines . Add ( 'i=' + inttostr ( i )+ ' ItemOID=' + IntToStr ( ItemBase [ 1 , i ])+ ' ItemID=' + IntToStr ( ItemBase [ 2 , i ])+ ' ItemKol=' + IntToStr ( ItemBase [ 3 , i ])+ ' ItemLVL=' + IntToStr ( ItemBase [ 4 , i ]));
end ;
end ;
end ;
//удален
3 : begin
for i := 1 to max do begin
if ItemBase [ 1 , i ]= ItemOID then begin
msg . Lines . Add ( 'Удаляем предмет!' );
msg . Lines . Add ( 'i=' + inttostr ( i )+ ' ItemOID=' + IntToStr ( ItemBase [ 1 , i ])+ ' ItemID=' + IntToStr ( ItemBase [ 2 , i ])+ ' ItemKol=' + IntToStr ( ItemBase [ 3 , i ])+ ' ItemLVL=' + IntToStr ( ItemBase [ 4 , i ]));
ItemBase [ 1 , i ]:= 0 ;
ItemBase [ 2 , i ]:= 0 ;
ItemBase [ 3 , i ]:= 0 ;
ItemBase [ 4 , i ]:= 0 ;
end ;
end ;
end ;
end ;
if interlude then inc ( j , 11 ) else inc ( j , 3 );
//msg.Lines.Add('j='+inttostr(j));
end ;
end ;
//......................................
//******************************************************************************
//находим в инвентаре предмет с ItemID и возвращаем его ObjectID
function GetItem ( item : integer ; lvl : integer ) : integer ;
var
i : integer ;
begin
for i := 1 to max do begin
//находим подходящий предмет по ItemID
if ( ItemBase [ 2 , i ]= item ) and ( ItemBase [ 4 , i ]= lvl ) then begin
//если нашли, то возвращаем ObjectID предмета
result := ItemBase [ 1 , i ];
ItemCount := ItemBase [ 3 , i ];
//Itemlvl:=ItemBase[4,i];
//msg.Lines.Add('<item='+inttostr(item)+' lvl='+inttostr(lvl)+'> i='+inttostr(i)+' ItemOID='+IntToStr(ItemBase[1,i])+' ItemID='+IntToStr(ItemBase[2,i])+' ItemKol='+IntToStr(ItemBase[3,i])+' ItemLVL='+IntToStr(ItemBase[4,i]));
exit;
end ;
end ;
//ничего не нашли
result := 0 ;
end ;
//......................................
//******************************************************************************
procedure UseItem ( ObjectID : integer );
begin
buf := #$14;
WriteD ( ObjectID );
WriteD ( 0 );
SendToServerEx ( Name );
end ;
//......................................
//******************************************************************************
function SumItem ( Item : integer ): integer ;
var
sum , i : integer ;
begin
result := 0 ;
//находим подходящий предмет по ItemID
for i := 1 to max do begin
if ( ItemBase [ 2 , i ]= item ) then begin
msg . Lines . Add ( 'Нашли предмет ItemOID=' + inttostr ( ItemBase [ 1 , i ])+ ' ItemID=' + inttostr ( ItemBase [ 2 , i ])+ ' ItemCol=' + inttostr ( ItemBase [ 3 , i ])+ ' EnchantLvl=' + inttostr ( ItemBase [ 4 , i ]));
msg . Lines . Add ( 'i=' + inttostr ( i ));
result := result + ItemBase [ 3 , i ];
//inc(result);
end ;
end ;
end ;
//......................................
//******************************************************************************
procedure RequestEnchantItem ( ObjectID : integer );
begin
buf := #$58;
WriteD ( ObjectID );
SendToServerEx ( Name );
//*********** использовать чит с петом ************************
{ buf := #$8B;
WriteD ( ObjectID );
writed ( 1 );
SendToServerEx ( Name );
} //***********
end ;
//......................................
//***************************************************************
function ExtractIDValues ( sData : string ): integer ;
var
s : string ;
i , j : integer ;
begin
i := 0 ;
s := sData ;
i := pos ( '=' , s );
if i >= 0 then
s := copy ( s , 1 , i - 1 );
try
result := strtoint ( s );
except
result := 0 ;
end ;
end ;
//............................................
//******************************************************************************
procedure OnTimer ( Sender : TObject );
var
Item , scrl : integer ;
begin
EditItemVal . text := inttostr ( sumitem ( ItemID ));
EditScrollVal . text := inttostr ( sumitem ( ScrollID ));
if ( CurEnchLvl >= strtoint ( Edit1 . Text )) then begin
msg . Lines . Add ( 'Нечего точить! Прервано!' );
timer . enabled := false ;
exit;
end ;
if ( sumitem ( ItemID )<= 1 ) then begin
msg . Lines . Add ( 'Последняя вещь! Прервано!' );
timer . enabled := false ;
exit;
end ;
Scrl := GetItem ( ScrollID , 0 );
if scrl = 0 then begin
msg . Lines . Add ( 'Нет заточки! Прервано!' );
timer . enabled := false ;
exit;
end ;
//ищем подходящий предмет для заточки
Item := GetItem ( ItemID , CurEnchLvl );
if Item = 0 then begin
inc ( CurEnchLvl );
Edit2 . text := inttostr ( CurEnchLvl );
end else begin
//************************************************
UseItem ( Scrl );
delay ( 100 );
RequestEnchantItem ( Item );
delay ( 100 );
//************************************************
msg . Lines . Add ( 'Пробуем улучшить ItemID=' + IntToStr ( Item ));
end ;
end ;
//......................................
//******************************************************************************
// вызывается при приходе каждого пакета, если скрипт включен
//******************************************************************************
begin
//****************************************************************************
//не обрабатываем пустые пакеты
if pck = '' then exit;
//......................................
//****************************************************************************
if FromServer then
case pck [ 1 ] of
//......................................
//Пакет ItemList
#$1B: CreateItemBase; //создание базы предметов
//......................................
//если удалили предметы, стираем в базе предметов пары ObjectID - ItemID
#$27: UpdateItemBase; //Обновление базы, если принят пакет на удаление предмета
end ;
end .
I haven't got idea how to use it, i think than i have to change this:
//............................................
//Список констант
const
Name='NLObP'-------->HERE MY CHAR NAME; //Вписать сюда имя чара
//установить константу в зависимости от типа игры (С4 или Интерлюд)
interlude=true; //Interlude - true, C4 - false
//-------------------------
max=250; //количество слотов в инвентаре чара
//............................................
//Список переменных
var
ScrollID, ScrollOID:integer;---------> HERE THE SCROLL ID (EAS = 960 on interlude servers) //ScrollID скролла заточки
ItemID,ItemOID:integer;--------->HERE THE ITEM ID //ItemIDID затачиваемого предмета
MaxEnchLvl:integer;---------->HERE THE MAX ENCHANT LVL THAN I WANT, I WANT 25 BECAUSE ITS THE MAX ENCHANT ON THE SERVER //уровень заточки который требуется достичь
ItemBase: array[1..4,1..max] of integer; -----------> HERE "0"?? //ItemOID, ItemID, Kol-vo, ItemLvl
i think that, but when i put the 960 on the script windows on l2phx and then i press test init i got a RED UNDERLINE on the 960, i try everything..
if somebody have a guide of l2 phx scripting plz give me a link, or at least how to use this!..
THANKS
. srry for my english
Similar Threads
L2Net Enchant script????!!!?!
03/30/2011 - Lineage 2 - 11 Replies
im looking for an enchant script which enchants my weap to +4 with normal scroll, and then to +16 with a blessed scroll.
If any1 can help me please
Enchant Gracia (script for L2phx)
06/23/2010 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 20 Replies
This is script for L2phx by NLObP v0.9
Possibilities of script:
-Control panel;
-We sharpen in turn all of objects with ITEMID while will not break
in two or will not immure, one object always remains;
It is necessary bye a weapon, sharpening and valerian.
Name='NLObP'; //Type here char name
Script enchant skills/weapon
11/21/2009 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 2 Replies
Do u guys know any script or macro to auto enchant skills or weapons?
Plz i need that
Regards Cien
L2 Enchant Script
01/22/2009 - Lin2 Exploits, Hacks, Bots, Tools & Macros - 1 Replies
I didn`t know what to do with it (i`m not even NOOB Rank at hacking)... i found it on another forum searching for L2Phx Enchant Script.
If i made a mistake,i`m sorry,but if it`s a script for L2phx and u know what to do whit it .... can u pls teach me what to do whit this.
edited
Auto enchant?
05/29/2007 - Lineage 2 - 7 Replies
Hello
atm im playing on a interlude private server(l2-darkkingdom.de).
on the pvp/pk server they have save enchant 21 at weps and 31 at armor.
now its very boring to enchant 12 items to +31 ^^ coze i want very high enchanted items (hihi)
is there a way to auto-enchant it up to 31?
best regards
Darkdome
All times are GMT +2. The time now is 17:33 .