09.02.2010, 16:31
|
#118
|
Рыцарь
Регистрация: 07.03.2009
Сообщений: 9,139
Сказал Спасибо: 70
Имеет 2,820 спасибок в 1,735 сообщенях
|
Оффтоп
delphi Код:
Program kamikadze;
var
Recipe : TL2RecipeItem;
Ingridient_Coal, Ingridient_Leather, Ingridient_Cord : Tl2InvItem;
Function CheckIngridients:boolean;
begin
result := Recipe <> nil;
result := result and (Ingridient_Coal <> nil) and (Ingridient_Coal.count > 4);
result := result and (Ingridient_Leather <> nil) and (Ingridient_Leather.count > 4);
result := result and (Ingridient_Cord <> nil) and (Ingridient_Cord.count > 4);
end;
Begin
//Находим ингридиенты. их несколько.
Ingridient_Coal := engine.GetInvItem(1870);
Ingridient_Leather := engine.GetInvItem(1882);
Ingridient_Cord := engine.GetInvItem(1884);
engine.stand; //встаем. чтобы использовать скилл.
engine.UseSkill(1321); //1321=Dwarven Craft открываем книгу рецептов.
engine.sit; //садимся.
Recipe := Engine.GetRecipe(2148);//Находим рецепт. у него айди 2148
while true do //Крутимся вечно в цикле.
begin
if not CheckIngridients then //проверка на ингридиенты
begin
print('Не найдены\недостаточно ингдидиентов либо отсуствует рецепт.');
Exit; //вылетаем с цикла.
end;
if engine.CharData.CurrentMP > 30 then //если мп хватает чтобы скрафтить
Recipe.Execute; //Крафтим.
engine.sleep(5000); //ждем 5 сек перед повторением цикла.
end;
end.
__________________
L2Ext - project closed.
|
|
|