It is currently 29 Mar 2024, 08:28

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Scriptz pleaseee
PostPosted: 08 Apr 2015, 20:09 
Offline
Новичок

Joined: 03 Apr 2015, 17:37
Posts: 3
Can anyone post some scripts for mining and etc...

pleaseeeee


Top
 Profile  
 
 Post subject: Re: Scriptz pleaseee
PostPosted: 09 Apr 2015, 08:57 
Offline
Бывалый игрок
User avatar

Joined: 20 Apr 2014, 18:38
Posts: 400
Code:
program Mining;
{$Include 'all.inc'}
type
region = record
minX:word;
minY:word;
maxX:word;
maxY:word;
end;
const
Ore1 = $19B7; // 1 Ore
Ore2 = $19BA; // 2 Ore
Ore3 = $19B8; // 3 Ore
Ore4 = $19B9; // 4 Ore
Sunduk_ore = $401493CF; // Sunduk of ore
xs = 2462; // cordinata x sunduka
ys = 942; // coordinata y sunduka
var
flag1 : Boolean;
X0,Y0,Z0: word;
Tile0: TStaticCell;
W0: Byte;
MinTile:array [0..3] of word;
start_p: TFoundTile;
i,j:word;
RegArr: array [0..0] of region;
sum:word;
arr_sum:word;
rs:word;
tfta:TFoundTilesArray;
k:word;
temp:TFoundTilesArray;
res_arr:TFoundTilesArray;



procedure init;
begin
start_p.X:=GetX(Self);
start_p.Y:=GetY(Self);
MinTile[0]:=1341;
MinTile[1]:=1340;
MinTile[2]:=1339;
MinTile[3]:=1342;
RegArr[0].minX:=start_p.X-10;
RegArr[0].minY:=start_p.Y-10;
RegArr[0].maxX:=start_p.X+10;
RegArr[0].maxY:=start_p.Y+10;
end;
procedure cancel;
begin
CloseMenu;
CancelMenu;
If TargetPresent Then CancelTarget;
end;

procedure Wait_Target(time_ms:Cardinal);
var
TempTime,SumTime:Cardinal;
begin
SumTime:=0;
repeat
checksave;
wait(500);
TempTime:=Timer;
SumTime:=SumTime+(Timer-TempTime);
until ((targetpresent) or (dead) or (not connected) or (SumTime>time_ms));
end;
function sqr(a:LongInt):LongInt;
begin
result:=a*a;
end;
function vector_length(c_1,c_2:TFoundTile):LongInt;
begin
result:=Round(sqrt(sqr(c_1.X-c_2.X)+sqr(c_1.Y-c_2.Y)));
end;
procedure QuickSort(var item:TFoundTilesArray; count:integer; point:TFoundTile);
var
temp_index,temp_value, tempo,i,j:LongInt;
t_c:TFoundTile;
begin
t_c:=point;
temp_index:=0;
temp_value:=vector_length(t_c,item[temp_index]);
for i:=0 to count-2 do
begin
for j:=i to count-1 do
begin
tempo:=vector_length(t_c,item[j]);
if tempo<temp_value then
begin
temp_index:=j;
temp_value:=tempo;
end;
end;
t_c:=item[temp_index];
item[temp_index]:=item[i];
item[i]:=t_c;
temp_value:=vector_length(item[i],item[i+1]);
end;
i:=0;
end;
procedure poisk_ore;
begin
SetArStatus(true);
init;
sum:=0;
arr_sum:=0;
rs:=0;
j:=0 ;
for i:=0 to 3 do
begin
rs:=GetStaticTilesArray(RegArr[j].minX,RegArr[j].minY,RegArr[j].maxX,RegArr[j].maxY,0,MinTile[i],tfta);
if rs > 0 then
for k:=0 to rs-1 do temp[arr_sum+k]:=tfta[k];
arr_sum:=arr_sum+rs;
end;
QuickSort(temp,arr_sum,start_p);
for k:=0 to arr_sum-1 do res_arr[sum+k]:=temp[k];
sum:=sum+arr_sum;
end;
Procedure DoitBaby(f_tile:TFoundTile);
var
ctime : TDateTime;
begin
AddToSystemJournal('146');
cancel;
repeat
UseObject(findtype($0E85,backpack));
Wait_Target(5000);
TargetToTile(f_tile.Tile,f_tile.X,f_tile.Y,f_tile.Z);
ctime := Now;
repeat
wait(2000);
until (InJournalBetweenTimes('There is nothing|You loosen|You stop|You cannot|You put|You have|destroyed|Try mining', ctime, Now)>= 0)or dead;
until (InJournalBetweenTimes('There is nothing|Try mining|You have|heavy', ctime, Now)>= 0)or dead;
end;

function DischargeSunduk : Boolean;
var tmpcnt : Integer;
tmpid, tmpstack : Cardinal;
tmpconnect : TDateTime;
begin
addtosystemjournal('Пришли на разгрузку');
Result := true;
tmpconnect := ConnectedTime;
if Dead then
begin
Result := false;
exit;
end;
UseObject(Sunduk_ore);
checksave;
// Переместим руду
tmpcnt := 0;
repeat
tmpid := Findtype(Ore1,backpack);
if tmpid = 0 then tmpid := Findtype(Ore2,backpack);
if tmpid = 0 then tmpid := Findtype(Ore3,backpack);
if tmpid = 0 then tmpid := Findtype(Ore4,backpack);
if tmpid = 0 then break;
tmpcnt := tmpcnt + 1;
if tmpcnt > 10 then
begin
addtosystemjournal('Ошибка: не могу переместить руду!');
Result := false;
exit;
end;
repeat
tmpstack := FindtypeEx(Ore1,GetColor(tmpid),Sunduk_ore,False);
if tmpstack = 0 then tmpstack := FindtypeEx(Ore2,GetColor(tmpid),Sunduk_ore,False);
if tmpstack = 0 then tmpstack := FindtypeEx(Ore3,GetColor(tmpid),Sunduk_ore,False);
if tmpstack = 0 then tmpstack := FindtypeEx(Ore4,GetColor(tmpid),Sunduk_ore,False);
if GetQuantity(tmpstack) >= 65000 then Ignore(tmpstack);
until (tmpstack = 0) OR (GetQuantity(tmpstack) < 65000);
// Если не найден в сундуке - тогда просто в контейнер
if tmpstack = 0 then tmpstack := Sunduk_ore;
MoveItem(tmpid,GetQuantity(tmpid),tmpstack,0,0,0);
wait(1000);
CheckSave;
until tmpid = 0;
IgnoreReset;

end;



//START

begin

W0:=WorldNum;
while not dead do
begin
X0:=GetX(Self);
Y0:=GetY(Self);
Z0:=GetZ(Self);
Tile0:=ReadStaticsXY(X0,Y0,W0);
poisk_ore;
NewMoveXY(X0-1,Y0,false,0,false);
j:=sum-1;
i:=0;
while (i<j)and(Not Dead) do
begin
X0:=GetX(Self);
Y0:=GetY(Self);

NewMoveXY(res_arr[i].X,res_arr[i].Y,false,1,false);
if (x0=res_arr[i].x) and (y0=res_arr[i].y) then
NewMoveXY(X0-1,Y0,false,0,false);
X0:=GetX(Self);
Y0:=GetY(Self);
if (x0=res_arr[i].x) and (y0=res_arr[i].y) then
NewMoveXY(X0+1,Y0,false,0,false);
X0:=GetX(Self);
Y0:=GetY(Self);
if (x0=res_arr[i].x) and (y0=res_arr[i].y) then
NewMoveXY(X0,Y0-1,false,0,false);
X0:=GetX(Self);
Y0:=GetY(Self);
if (x0=res_arr[i].x) and (y0=res_arr[i].y) then
NewMoveXY(X0,Y0+1,false,0,false);
DoitBaby(res_arr[i]);
i:=i+1;
AddToSystemJournal('ves'+inttostr(weight)+'maxves= '+inttostr(maxweight));



if (weight>=(maxweight-20)) then
begin
NewMoveXY(xs,ys,false,1,true);

repeat
if Dead then break;
flag1 := DischargeSunduk;
wait(100);
until flag1 = true;
end;
end;
end;
end.


Stelth client

And,please use the search.

_________________
Image
If god wants to hurt us He fulfills our desires
icq 363817998


Top
 Profile  
 
 Post subject: Re: Scriptz pleaseee
PostPosted: 09 Apr 2015, 08:59 
Offline
Бывалый игрок
User avatar

Joined: 20 Apr 2014, 18:38
Posts: 400
viewtopic.php?f=28&t=6989
For EasyUO

_________________
Image
If god wants to hurt us He fulfills our desires
icq 363817998


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group