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

Bowcraft - Demise(RunUO ML)

Only working scripts
Post Reply
MuDaCk
Apprentice
Apprentice
Posts: 393
Joined: 10.10.2006 0:03
Contact:

Bowcraft - Demise(RunUO ML)

Post by MuDaCk »

Code: Select all

Program Carpentry;

///by Igor Boldysh.
          var
 
  bowcraftTool, tinkertool,ingot,wood   : Integer;
 Trash,boxMaterial,item: Cardinal;
first,second:string;

  
procedure Init;   

 Begin  
  
  SetPauseScriptOnDisconnectStatus(true); 
    Finddistance := 30;   

    Trash:=$404AD727;
    boxMaterial :=$41485E64;
    Wood:= $1BD7;
    bowcraftTool:= $1022;
    tinkertool:= $1eb8;
    ingot:=$1bf2 ;
    item:=$14F0;  

 end;   

procedure checkSkill;
//  0 - 30: Buy it from an NPC Fletcher 8/142				Bowcraft
 //30 - 35: Shafts 1/9
 //35 - 55: Bows 15/2
 //55 - 60: Fukiya Darts 8/16
 //60 - 70: Crossbows 15/9
 //70 - 80: Composite Bows 15/23
 //80 - 90: Heavy Crossbows 15/16
 //90 - 100: Repeating Crossbows  15/30
begin
if ((GetSkillValue('Bowcraft')>=0) and(GetSkillValue('Bowcraft')<35))then
begin
first := '1';
second := '9';
item := $1BD4;        //30 - 35: Shafts 1/9
exit;
end;
if ((GetSkillValue('Bowcraft')>=35) and(GetSkillValue('Bowcraft')<60))then
begin
first := '15';
second := '2';
item := $13B2;     //35 - 55: Bows 15/2
exit;
end;
if ((GetSkillValue('Bowcraft')>=60) and(GetSkillValue('Bowcraft')<70))then
begin
first := '15';
second := '9';
item := $0F50;        //60 - 70: Crossbows 15/9
exit;
end;
if ((GetSkillValue('Bowcraft')>=70) and(GetSkillValue('Bowcraft')<80))then
begin
first := '15';
second := '23';
item := $26C2;              //70 - 80: Composite Bows 15/23
exit;
end;
if ((GetSkillValue('Bowcraft')>=80) and(GetSkillValue('Bowcraft')<90))then
begin
first := '15';
second := '16';
item := $13FD;              //80 - 90: Heavy Crossbows 15/16
exit;
end;
if ((GetSkillValue('Bowcraft')>=90) and(GetSkillValue('Bowcraft')<100))then
begin
first := '15';
second := '30';
item := $26C3;                //90 - 100: Repeating Crossbows  15/30
exit;
end;

end;
  
   procedure check; 
  
 begin  
 if (GetSkillValue('Bowcraft')<35)then
begin
if (count(wood) < 1)then 
begin
UseObject( boxMaterial );
wait(500);
grab(FindTypeEx(wood,$0000,boxMaterial,true),1);
wait(1000) 
end;
end
else
begin
if (count(wood) < 20)then 
begin
UseObject( boxMaterial );
wait(500);
grab(FindTypeEx(wood,$0000,boxMaterial,true),100);
wait(1000) 
end;
end;
if (count(ingot) < 20)then 
begin
UseObject( boxMaterial );
wait(500);
grab(FindTypeEx(ingot,$0000,boxMaterial,true),100);
wait(1000) 
end;
 end;
    
    procedure craftTools(typetool , typeitem : Integer ; first, second : String);
    begin  
      
  if (count(typeitem) < 2) then
  begin
  while (count(typeitem) < 5 )do
  begin    
 check;    

    UseObject(FindType(typetool,backpack));  
     UseObject(backpack);
WaitGump(first);
wait(500);
WaitGump(second);
  end;
  end;                         
    end; 
      
 
    
 procedure craft(tool: word);
 begin  
checkSkill;
if  (FindType(tool,backpack)<>0)then
begin
  UseObject(FindType(tool,backpack));
  wait(500);

WaitGump(first);
wait(200);
WaitGump(second);
wait(500);
end
else  UseObject(backpack);
check;
 end; 
 
 procedure trashItems;
 begin 
 if (CountEx (item,$FFFF,backpack) > 0)then 
begin
MoveItem (FindTypeEx(item,$0000,backpack,true),10,trash,0,0,0);
wait(500)
//AddToSystemJournal('trash'); 
end;
 end; 
 
Begin
init;
UseObject(backpack);
wait(500);
UseObject(boxMaterial);
wait(500);
while (GetSkillValue('Bowcraft')<GetSkillCap('Bowcraft'))  do
begin
 craft(bowcraftTool);
  craftTools(tinkertool,tinkertool,'8', '23');
  craftTools(tinkertool,bowcraftTool,'8', '142'); 
 trashItems;
 
end;
End.
  
My name is Игорёшка Image
Пишу скрипты за едуImage
Post Reply