Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Если не тяжело Выложите скриптик на Кеги..

тут можно задать вопрос по скриптингу
Post Reply
N1k3
Posts: 4
Joined: 08.08.2008 9:14
Location: ---
Contact:

Если не тяжело Выложите скриптик на Кеги..

Post by N1k3 »

Оч нужен, заманало вручную пилить хочу automakekegs
---
N1k3
Posts: 4
Joined: 08.08.2008 9:14
Location: ---
Contact:

Re: Если не тяжело Выложите скриптик на Кеги..

Post by N1k3 »

01:25:04:537 [Rab2]: Compiling
01:25:04:626 [Rab2]: Compiled succesfully
01:25:05:151 [Rab2]: ====== * CreatedKeg script [by Ragnes] * ======
01:25:06:153 [Rab2]: ????? ??: 10 ?????, ??????!!
01:25:06:655 [Rab2]: Character Golova Disconnected.
Что это может быть?

Code: Select all

Program MakingKegs;
Const
{--------------------}
Order = 5; // поставьть нужное число кегов и все )
{--------------------}
woodType = $1BDD;
metalType = $1BF2;
glassType = $1BF5;
jointingplaneType = $1030;
tinkerType = $1EB9;
stavesType = $1EB2;
stavesgump = '7858';
lidType = $1DB8;
lidgump = '7608';
hoopsType = $10E1;
hoopsgump = '4321';
openkegType = $0E7F;
openkegGump = '3711';
tapType = $1004;
tapgump = '4100';
bottleType = $0F0E;
bottlegump = '3854';
kegType = $1940;
keggump = '10';
{$Include 'all.inc'}

procedure FullDisconnect; 
begin 
SetARStatus(false); 
Disconnect; 
end; 

procedure functionscarpenter(itemType:Word;itemCnt:Integer;itemGump:String);
var wood,jointingplane : Cardinal;
Begin
 wait(500);
WaitConnection(3000);
 CheckSave;
 While Count(itemType) < itemCnt do begin
 WaitConnection(3000);
 CheckSave;
 FindType(woodType,ground);
 if FindCount > 0 then begin
wood := finditem;
FindType(jointingplaneType,ground);
if FindCount > 0 then begin
 jointingplane := finditem;
 wait(500);
 UseObject(jointingplane);
 WaitGump(itemGump);
 WaitTargetObject(wood);
 WaitJournalLine(Now,'create|made|destroy|fail|already', 30000);
end else begin
FullDisconnect;
end;
 end else begin
 FullDisconnect;
 end;
 end;
End;

procedure functionstinman(itemType,ressursType:Word;itemCnt:Integer;itemGump:String);
var ressurs,tinker : Cardinal;
Begin
wait(500);
 WaitConnection(3000);
 CheckSave;
 While Count(itemType) < itemCnt do begin
WaitConnection(3000);
 CheckSave;
 FindType(ressursType,ground);
 if FindCount > 0 then begin
ressurs := finditem;
FindType(tinkerType,ground);
if FindCount > 0 then begin
 tinker := finditem;
 wait(500);
UseObject(tinker);
 WaitTargetObject(ressurs);
 WaitGump(itemGump);
 WaitJournalLine(Now,'create|made|destroy|fail|already', 30000);
end else begin
FullDisconnect;
end;
 end else begin
 FullDisconnect;
 end;
 end;
End;

procedure making(materialType:Word;materialGump:String);
var material : Cardinal;
Begin
 wait(500);
 WaitConnection(3000);
 CheckSave;
 FindType(materialType,ground);
if FindCount > 0 then begin
material := finditem;
wait(500);
UseObject(material);
WaitGump(materialGump);
WaitJournalLine(Now,'create|made|destroy|fail|already', 30000);
 end else begin
 FullDisconnect;
 end;
End;

procedure makingkeg(materialType:Word;materialGump:String);
var material : Cardinal;
Begin
 wait(500);
 WaitConnection(3000);
CheckSave;
 FindType(materialType,backpack);
 if FindCount > 0 then begin
material := finditem;
wait(500);
UseObject(material);
WaitGump(materialGump);
WaitJournalLine(Now,'create|made|destroy|fail|already', 30000);
 end else begin
 FullDisconnect;
 end;
End;

procedure DropCreatItem(creatitem:Word);
Begin
 FindType(creatitem,backpack);
 if FindCount > 0 then begin
 Drophere(finditem);
wait(800);
end;
End;

BEGIN
wait(500);
WaitConnection(3000);
CheckSave;
SetArStatus(true);
AddToSystemJournal('====== * CreatedKeg script [by Ragnes] * ======');
wait(1000);
AddToSystemJournal('Заказ на: '+IntToStr(Order)+' кегов, принят!!');
While CountGround(kegType) <> Order do begin
{ * Делаем open_kegs * }
if (CountGround(stavesType) >= 3) then begin
repeat
wait(500);
WaitConnection(3000);
CheckSave;
FindType(stavesType,ground);
Grab(finditem, 1);
wait(800);
until (Count(stavesType) >=3);
end else begin
functionscarpenter(stavesType,3,stavesgump);
wait(250);
end;
{ * --------------------------------- * }
if (CountGround(lidType) >= 2) then begin
repeat
 wait(500);
WaitConnection(3000);
CheckSave;
FindType(lidType,ground);
Grab(finditem, 1);
wait(800);
until (Count(lidType) >= 2);
end else begin
functionscarpenter(lidType,2,lidgump);
wait(250);
end;
{ * --------------------------------- * }
if (CountGround(hoopsType) >= 1) then begin
repeat
wait(500);
WaitConnection(3000);
CheckSave;
FindType(hoopsType,ground);
Grab(finditem, 1);
wait(800);
until (Count(hoopsType) >= 1);
end else begin
functionstinman(hoopsType,metalType,1,hoopsgump);
wait(250);
end;
{ * --------------------------------- * }
making(jointingplaneType,openkeggump);
{ * --------------------------------- * }
if (CountGround(tapType) >= 1) then begin
repeat
wait(500);
WaitConnection(3000);
CheckSave;
FindType(tapType,ground);
Grab(finditem, 1);
wait(800);
until (Count(tapType) >= 1);
end else begin
functionstinman(tapType,metalType,1,tapgump);
wait(250);
end;
{ * --------------------------------- * }
if (CountGround(bottleType) >= 10) then begin
repeat
wait(500);
WaitConnection(3000);
CheckSave;
FindType(bottleType,ground);
Grab(finditem, 10);
wait(800);
until (Count(bottleType) >= 10);
end else begin
functionstinman(bottleType,glassType,10,bottlegump);
wait(250);
end;
{ * --------------------------------- * }
makingkeg(openkegType,keggump);
{ * --------------------------------- * }
DropCreatItem(kegType);
Hungry(1,-1);
 end;
 FullDisconnect;
END.
---
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Если не тяжело Выложите скриптик на Кеги..

Post by Vizit0r »

"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
N1k3
Posts: 4
Joined: 08.08.2008 9:14
Location: ---
Contact:

Re: Если не тяжело Выложите скриптик на Кеги..

Post by N1k3 »

procedure functionscarpenter(itemType:Word;itemCnt:Integer;itemGump:String);
var wood,jointingplane : Cardinal;
Begin
AddToSystemJournal('1');
wait(500);
WaitConnection(3000);
AddToSystemJournal('3')
CheckSave;
While Count(itemType) < itemCnt do begin
AddToSystemJournal('4');
WaitConnection(3000);
AddToSystemJournal('5')
CheckSave;
AddToSystemJournal('6')
FindType(woodType,ground);
AddToSystemJournal('7')
if FindCount > 0 then begin
AddToSystemJournal('8')
wood := finditem;
AddToSystemJournal('9')
FindType(jointingplaneType,ground);
AddToSystemJournal('10')
if FindCount > 0 then begin
AddToSystemJournal('11')
jointingplane := finditem;
AddToSystemJournal('12')
wait(500);
AddToSystemJournal('13')
UseObject(jointingplane);
AddToSystemJournal('14')
WaitGump(itemGump);
AddToSystemJournal('15')
WaitTargetObject(wood);
AddToSystemJournal('16')
WaitJournalLine(Now,'create|made|destroy|fail|already', 30000);
end else begin

Code: Select all

12:35:41:696 [dm5]: Character Standard Connected.
12:35:45:565 [dm5]: Compiling
12:35:45:577 [dm5]: Compiled succesfully
12:35:46:112 [dm5]: ====== * CreatedKeg script [by Ragnes] * ======
12:35:47:114 [dm5]: Заказ на: 5 кегов, принят!!
12:35:47:117 [dm5]: 1
12:35:47:620 [dm5]: 3
12:35:47:625 [dm5]: 4
12:35:47:628 [dm5]: 5
12:35:47:630 [dm5]: 6
12:35:47:632 [dm5]: 7
12:35:47:634 [dm5]: 8
12:35:47:636 [dm5]: 9
12:35:47:669 [dm5]: 10
12:35:47:676 [dm5]: Character Standard Disconnected.
12:35:47:689 [dm5]: 4
---
Post Reply