Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Drabadan

Pages: [1] 2
1
Stealth Client / If someone looking for me please contact to...
« on: May 19, 2017, 10:02:26 AM »
Skype contact: Andual Yuri
email: uosoftwriter@gmail.com

For moderators: please don't delete this post, my ICQ was blocked!

2
Stealth Client / Stealth - Developer or Enduser ?
« on: November 06, 2016, 10:02:19 AM »
Greetings,

I been using EasyUO for a few years but I would like to find an alternative.  I see ScriptUO is not a EasyUO replacement option.  This is why I have searched the forums when I reviewed your post and have some questions.

"Crome's ScriptSDK which allows us to use C# as our programming language" - who makes this software?

"We almost all use Visual Studio" - is this Microsoft Visual Studio?



Thanks
eS

Developer of ScriptSDK is Crome
Yes MS Visual Studio

3
it don't work due to stealth bug
code for testing was:
Code: [Select]
procedure NumGumpTEntryTest();
begin
 ClientPrint(IntToHex(GetGumpId(GetGumpsCount-1), 8) + ' test');
 NumGumpTextEntry(GetGumpsCount-1, 0, 'Hello bitch');
end;


P.S. Tested on both 6.7.1 and latest 7.6.2 versions...

4
Stealth scripts / [StealthClient 6.7.1 C#] OSI Moongate Traveller
« on: October 04, 2016, 03:41:56 AM »
Hello everyone!

Made this little app that travels through moongate on OSI!
Hope it will be helpfull for anyone.


GitHub links to source code:
https://github.com/drabadan/DrabadanCoreLib
https://github.com/drabadan/OSIMoongateTraveller_WF

Executable:
http://www.filedropper.com/showdownload.php/release_4

5
Stealth Client / Re: [c# scriptsdk 0.9.7] how do you use edit in gumps?
« on: September 03, 2016, 11:57:51 AM »
is it another simple captcha to solve? :)

6
Stealth Client / Re: [c# scriptsdk 0.9.7] how do you use edit in gumps?
« on: September 03, 2016, 11:37:08 AM »
it compiles but idk if works, try it;

Code: [Select]
static void Main(string[] args)
        {
            var stealth = Stealth.Client;
            stealth.IncomingGump += async (sender, e) => await OnIncomingGump(sender, e);
            Console.WriteLine("Call your gump");
            Console.ReadKey();
        }

        private static async Task OnIncomingGump(object sender, IncomingGumpEventArgs e)
        {
            if (e.GumpId.Equals(0xE150888))
            {
                await Task.Run(()=> {
                    Gump g = Gump.GetGump(e.Serial);
                    foreach (var htmlItem in g.HTMLTexts)
                        Console.WriteLine($"{htmlItem.Text}");
                });
            }
        }

7
Stealth Client / Re: [c# scriptsdk 0.9.7] how do you use edit in gumps?
« on: September 03, 2016, 09:08:30 AM »
Hello,

I use the the follong code to begin parsing a gump.

Code: [Select]
            List<Gump> tmp = ScriptSDK.Gumps.Gump.ActiveGumps;
            //Gump tmp1 = ScriptSDK.Gumps.Gump(); .GetGump((uint)0x005C0198);
            List<GumpButton> button = tmp[0].Buttons;
            List<GumpTextEdit> edit = tmp[0].TextEdits;
            List<GumpHtml> html = tmp[0].HTMLTexts;
            List<GumpHtmlLocalized> htmllocal = tmp[0].HTMLLocalizedTexts;
            //System.String xxx = "123";
            //edit[0].Text = xxx;
            ScriptLogger.WriteLine(String.Format("Serial: {0}", tmp[0].Serial));
            ScriptLogger.WriteLine(String.Format("GumpType: {0}", tmp[0].GumpType));
            ScriptLogger.WriteLine(String.Format("ButtonCount: {0}", button.Count));
            ScriptLogger.WriteLine(String.Format("EditCount: {0}", edit.Count));
            ScriptLogger.WriteLine(String.Format("HtmlCount: {0}", html.Count));
            ScriptLogger.WriteLine(String.Format("HtmlLocalCount: {0}", htmllocal.Count));

            edit[0].Text = "123";

            Console.WriteLine("Finished");
            Console.ReadKey();

but edit[0].Text = "123"; is not able to enter text in my client window.
Do I have to update something and how do i do it ?
You won't see it in client, due to stealth works like packet proxy, so your graph client will never know if it sends something to server, there is only gold message on the bottom left like gump answer send to server, or smth...

Quote
another question is how to parse the html enties.
I am not a beginner and need any help parsing the 172 html gump entries into the console.
plz give me an example.

regards,
epsilon2

give us the ,gumpinfo so it will be more clear to what you want

8
Stealth Client / Re: Reliably switching between accounts automated?
« on: August 03, 2016, 09:28:39 PM »
I have concepts about almost bulletproofed but thats from user side. I had endless discussions about this with vizit0r on client side :D
well, currently he said that will make the overload for ChancheProfile(ProfileName, ShardName, CharName : String) : Integer;
so if it don't find the proper shardName or charName it won't rewrite the current indexes, like it does now. Waiting for it...

9
Stealth Client / Re: Reliably switching between accounts automated?
« on: August 03, 2016, 08:26:50 AM »
You can Disconnnect , ChangeProfile and Connect.. Its possible but very unreliable on servers with multiple shard logins\sub servers such as osi where the queue randomly changes. Freeshards you can do that very simple.
One guy in Odessa, trying to solve that... ;))
Hope he will do it asap!

10
Stealth Client / Re: Reliably switching between accounts automated?
« on: August 03, 2016, 02:10:04 AM »
you can load a lot of profiles in 1 stealth, and in every account set the different autoreconnect duration, so the first char will be 30:00 minutes, next one 30:30, 40:00 and so on. So on 1 acc all characters could collect bods. Write a script like if Connected -> collectBods -> disconnect so it will collect bods whe reconnector will connect it...
like this

11
Stealth Client / Re: Looking For Mentor?
« on: August 01, 2016, 01:06:45 AM »
Code: [Select]
type
 TWordArray : Array of Word;

function CheckArrayContainsItem(item : Word; arr : TWordArray) : Boolean;
var
 i : Integer;
begin
  Result := False;
 for i := Low(arr) to High(arr) do
   if(item = arr[i])then
    begin
      Result := True;
      break;
    end;  
end;
//For your example it will look like this:
for i := Low(Ore) to High(Ore) do
  if(FindType(Ore[i], Backpack) > 0) then
   AddToSystemJournal('Found the ore: ' + IntToStr(Ore[i]));

12
Stealth Client / Re: Looking For Mentor?
« on: August 01, 2016, 12:49:56 AM »
the type directive in pascal means that you will specify some new DataType:
Code: [Select]
type
 TMe = record
   Name : String;
   Height : Integer;
   Age : Byte;
 end;

procedure DescribeMe(Me : TMe);
begin
 AddToSystemJournal('My name is: ' + Me.Name);
 AddToSystemJournal('My height is: ' + Me.Height);
 AddToSystemJournal('My age is: ' + Me.Age);
end;

var
 Me : TMe;

begin
  Me.Name := 'IURII';
  Me.Height := 190;
  Me.Age := 29;
  DescribeMe(Me);
end.
For the gems, i would recommend to use an array; and work with array becouse constructions like
Code: [Select]
while((count(Jewel1) + count(Jewel2) + count(Jewel3) + count(Jewel4) + count(Jewel5) + count(Jewel6) + count(Jewel7) + count(Jewel8) + count(Jewel9) + count(Jewel10)) > 0) this are not the thing that should be done ever...


13
Stealth Client / Re: Looking For Mentor?
« on: July 31, 2016, 10:55:06 PM »
Hey guys, I made a easy procedure although probably could be improved so much, but I'm just making things simple atm.. keeping it easy not going over my head lol.

Code: [Select]
{mine to west}    
Procedure MineOre ( VAR x, y, z : Integer );
begin
   x:= (GetX(Self)) - 1;  
   y:= (GetY(Self));
   z:= (GetZ(Self));
end;

basically this is a target by relative in hindsight. the issue I've noticed with it'll target to the west but some mountainsides have a higher Z value, so I'm guessing I'll have to create an array of some sort 0-10 and attempt to determie where I can mine.

No you can use GetSurfaceZ() function
http://www.stealth.od.ua/Doc:Api/GetSurfaceZ
Code: [Select]
Procedure MineOre (x, y : Integer );
var
 z : ShortInt;
begin
   x:= (GetX(Self)) - 1;  
   y:= (GetY(Self));
   z:= GetSurfaceZ(x, y, WorldNum);
end;

14
Stealth Client / Re: Looking For Mentor?
« on: July 31, 2016, 09:31:21 PM »



Post Merge: July 31, 2016, 07:37:55 PM
That code posted above, does it actually work for anyone? Drbadan, do you actually use that code successfully?

Because it's taken from here ...

http://forum.uorpg.net/viewtopic.php?t=7990

So did you actually get it to work? If so, how?
it's taken from my harddisk, yes it worked very well for me.

I posted it here just for example, so the playforfun could read some.
You couldn't find the 100% working script even for the exact freeshard, becouse in pascal there is not so much options to make independent script with anonymous datasources. So every script should be tuned for yourself.

15
Stealth Client / Re: Looking For Mentor?
« on: July 31, 2016, 03:46:36 AM »
Here i have a script which has that functionality in it, so you can try read it until you will find out what's and where...
Or ask any questions...

Code: [Select]
Program Mining_BestUO_Kendal;

const
    SeekRange = 20; //радиус поиска деревьев
    Pickaxe_Type = $0E85;
    Shovel_Type = $0E85;
    Invizka_Type = $0E24;
    Invizka_Color = $0060;
    Rune_Type = $1F14;
    Knife_Type = $13F6;
    Lockpick_Type = $14FB;
    IsidasChest_Type = $0E43;
    Rock_Type = $177C;
    Food_Type = $097B;  
//==========================================================================//
    MyMaxWeight = 550;
    //HomeRune = $4029C175;
//===========================================================================//
    HomeChest = $40924E0C;
    BagOfRunes = $40C2BB44;
    ReloadBag = $40975D90;
    ResultBag = $40361CAC;
    UnlootBag = $40C2BB44;
//===========================================================================//
   ICQ_login = ;
   ICQ_password = ;
   TargetICQ_login = ;


type
    MinTile = record
        x, y, z, Tile : Word;
    end;

var
    Caves_Array : Array of Cardinal;
    MinTiles_Array : Array of MinTile;
    Ore : Array[0..3] of Word;
    Cave_Index, Idx, controlInt : Integer;
    FlagPk, FlagProceed : Boolean;
    ReloadItems_Array : Array[0..6] of Word;
    LootItems_Array : Array of Word;
    HomeRune : Cardinal;
    
{$Region Initializing}

//Initiation of ore types Array;
procedure InitOre;
  begin
    Ore[0] := $19B7;               // 1 Ore
    Ore[1] := $19BA;               // 2 Ore
    Ore[2] := $19B8;               // 3 Ore
    Ore[3] := $19B9;               // 4 Ore
    
    if CharName = 'Kraz' then HomeRune := $4029C175;
    if CharName = 'Drabadan' then HomeRune := $4044D616;
  end;
  
//Initiation of ReloadItems_Array
procedure InitReloadItems_Array;
begin
     ReloadItems_Array[0] := BM;
     ReloadItems_Array[1] := BP;
     ReloadItems_Array[2] := MR;
     ReloadItems_Array[3] := Invizka_Type;
     ReloadItems_Array[4] := Pickaxe_Type;
     ReloadItems_Array[5] := Lockpick_Type;
     ReloadItems_Array[6] := Knife_Type;        
end;
  
//Initiation of RunesToCaves;
procedure GetCaveRunes;
var
    i : Integer;
begin
    MoveOpenDoor := True;
    NewMoveXY(GetX(HomeChest), GetY(HomeChest), true, 1, true);
    Wait(1000);
    UseObject(HomeChest);
    CheckLag(30000);
    Wait(1000);
    UseObject(BagOfRunes);
    CheckLag(30000);
    Wait(1000);
    //for i := 0 to 20 do AddToSystemJournal(IntToStr(i));
    if FindType(Rune_Type, BagOfRunes) > 0 then
        begin
            //AddToSystemJournal(IntToStr(FindCount));
            SetLength(Caves_Array, FindCount);
            for i := 0 to FindCount -1 do
                begin
                     FindType(Rune_Type, BagOfRunes);                    
                     Caves_Array[i] := FindItem;
                     Ignore(FindItem);                                          
                end;
        end
    else
        AddToSystemJournal('No runes found...');
    IgnoreReset;
    AddToSystemJournal('Added ' + IntToStr(Length(Caves_Array)) + ' Caves.');        
end;  

{$Endregion}

{$Region Kernel procedures}
function ArrayHasItem(My_Array : Array of Word; Item_Type : Word) : Boolean;
var i : Integer;
begin
    Result := False;
    for i := Low(My_Array) to High(My_Array) do
        if Item_Type = My_Array[i] then Result := True;
end;
{$Region MobHandling}

function IsMob : Cardinal;
begin    
    Result := 0;
    if FindType($000E, Ground) > 0 then Result := FindItem;
end;

procedure CarveAndLoot;
var  
    Corpse : Cardinal;
begin    
    Wait(1000);
    Beep;
    if FindType($2006, Ground) > 0 then
        begin
            Corpse := FindItem;
            UseType(Knife_Type, $FFFF);
            CheckLag(30000);
            if WaitForTarget(5000) then
                TargetToObject(Corpse)
            else
                AddToSystemJournal('No knifes found!');
            CheckLag(30000);
            Wait(650);
            UseObject(Corpse);
            Wait(1000);
            CheckLag(30000);            
            while FindType($FFFF, Corpse) > 0 do
                begin
                    if not ArrayHasItem(LootItems_Array, GetType(FindItem)) then
                        begin
                            SetLength(LootItems_Array, Length(LootItems_Array)+1);
                            LootItems_Array[High(LootItems_Array)] := GetType(FindItem);
                        end;
                    MoveItem(FindItem, 0, Backpack, 0,0,0);
                    Wait(650);
                    CheckLag(30000);
                end;
            if FindType(Rock_Type, Ground) > 0 then
                begin
                    UseObject(FindItem);
                    Wait(300);
                    CheckLag(30000);
                end
            else
                ClientPrint('No rocks found...');
            if FindType(IsidasChest_Type, Ground) > 0 then
                begin
                    Corpse := FindItem;
                    UseType(Lockpick_Type, $FFFF);
                    CheckLag(30000);
                    if WaitForTarget(5000) then TargetToObject(Corpse);
                end
            else
                ClientPrint('No chests found...');
            Ignore(Corpse);
        end;
    ClientPrint('Loot finished!');  
end;

procedure KillMob(Mob : Cardinal);
var
    ctime : TDateTime;    
begin
    ctime := Now;
    while IsMob > 0 do
        begin            
            Attack(Mob);
            Wait(300);
            CheckLag(30000);
            if WaitJournalLine(ctime, 'убили', 300) then break;
        end;
    CarveAndLoot;    
end;

{$EndRegion}

function GetRuneCharges(Rune_Id : Cardinal) : Integer;
var
    CTime : TDateTime;
    s : String;
begin
    CTime := Now;
    ClickOnObject(Rune_Id);
    CheckLag(30000);
    Result := 0;
     if WaitJournalLine(CTime, '(', 2000) then
        begin
            Idx := InJournalBetweenTimes('(', CTime, Now);
            s := Journal(Idx);
            Delete(s, Pos(')',s), Length(s));
            Delete(s, 1, Pos('(', s));
            Result := StrToInt(s);
        end
    else
        Result := -1;
end;

procedure WaitLag(WaitMS : Integer);
begin
    Wait(WaitMS);
    CheckLag(60000);
end;

//Icq handling;
procedure SendMsg_ICQ(str : String);
begin
    if not ICQConnected then
        ICQConnect(ICQ_login, ICQ_password);
    if ICQConnected then
        ICQSendText(TargetICQ_Login, str)
    else
        AddToSystemJournal('No icq connection, failed to send message!');  
end;

//procedure GetTilesToMine;
procedure GetTilesToMine;
var
    x, y, i : Integer;
    TileInfo : TStaticCell;
begin
    SetLength(MinTiles_Array, 0);
    for x := (-1 * SeekRange) to SeekRange do
        for y := (-1 * SeekRange) to SeekRange do
            begin
                TileInfo := ReadStaticsXY(GetX(self)+x, GetY(self)+y, 0);
                if TileInfo.StaticCount > 0 then
                    for i := Low(TileInfo.Statics) to High(TileInfo.Statics) do
                        if (TileInfo.Statics[i].Tile >= 1339) and (TileInfo.Statics[i].Tile <= 1359) and (TileInfo.Statics[i].z = GetZ(self)) then
                            begin
                                SetLength(MinTiles_Array, Length(MinTiles_Array) + 1);
                                MinTiles_Array[High(MinTiles_Array)].Tile := TileInfo.Statics[i].Tile;
                                MinTiles_Array[High(MinTiles_Array)].x := TileInfo.Statics[i].x;
                                MinTiles_Array[High(MinTiles_Array)].y := TileInfo.Statics[i].y;
                                MinTiles_Array[High(MinTiles_Array)].z := TileInfo.Statics[i].z;
                            end;                            
            end;
        AddToSystemJournal('Found ' + IntToStr(Length(MinTiles_Array)) + ' tiles to mine.');  
end;

//Antimacro;
procedure GumpHandling;
var
    gi : TGumpInfo;
    st : TStringList;
    tResult : Integer;
begin
    Wait(RandomRange(1, 6)*1000);
    GetGumpInfo(GetGumpsCount-1, gi);
    st := TStringList.Create;
    StrBreakApart(gi.Text[High(gi.Text)], ' ', st);
    if st.Count > 0 then
        begin
            if st[1] = 'плюс' then
                tResult := StrToInt(st[0]) + StrToInt(st[2]);
            if st[1] = 'минус' then
                tResult := StrToInt(st[0]) - StrToInt(st[2]);
        end;        
    if tResult > -1 then
        begin
            Wait(1500);
            CheckLag(30000);
            AddToSystemJournal('Gump answer is: ' + IntToStr(tResult));
            NumGumpTextEntry(GetGumpsCount-1, 0, IntToStr(tResult));
            NumGumpButton(GetGumpsCount-1, gi.GumpButtons[Low(gi.GumpButtons)].return_value);
        end
    else
        AddToSystemJournal('ERROR');
    st.Free;
end;

//runing from PK;
function RunPK : Boolean;
var i : Integer;
begin
    Result := False;
    Ignore(self);
    FindDistance := 20;
    if (FindType($0190, Ground) > 1) or (FindType($0191, Ground) > 0) then
        begin
            ClickOnObject(FindItem);
            Result := True;
            Cast('Recall');
            AddToSystemJournal('Name: ' + GetName(FindItem));
            SendMsg_ICQ('PK at: ' + CharName);
            CheckLag(30000);
            if WaitForTarget(3000) then TargetToObject(HomeRune);
            UseObject(FindTypeEx($0E24, $0060, Backpack, false));            
            for i := 0 to 45 do
                begin
                    Wait(100);
                    CheckLag(30000);
                    if FindType($0F0D, Ground) > 0 then MoveItem(FindItem, 0, Backpack, 0,0,0);
                end;
        end;
end;

procedure CheckHide;
var i : Integer;
begin
    while not Hidden do
        begin
            UseSkill('Hiding');
            for i := 0 to 55 do
                begin
                    Wait(100);
                    CheckLag(30000);
                    if Hidden then break;
                end;
        end;
end;

procedure CheckMana;
var
    i : Integer;
    ctime : TDateTime;
begin
    if Mana < MaxMana/2 then        
        begin
            for i := 0 to 999 do
                begin
                    ctime := Now;
                    UseSkill('Meditation');
                    Wait(300);
                    CheckLag(30000);
                    if not WaitJournalLine(ctime, 'You lose', 5000) then break;
                end;
            while Mana < MaxMana-10 do Wait(1000);
        end
    else
        ClientPrint('Mana ok...');                      
end;

function FindGM : Boolean;
begin
    Result := False;
    if (GetDistance($00000001) < 20) and (GetDistance($00000001) > -1) then Result := True;
    FindDistance := 20;
    if FindTypeEx($FFFF, $83EA, Ground, True) > 0 then Result := True;
end;

procedure GMFound;
var i : Integer;
begin
    for i := 0 to 3 do
        begin
            SendMsg_ICQ('ЕШЕЛЬМЕ ЕШЕЛЬБЕ!!!! НАЩАЙНИКЕ ПРИШОЛь');
            Beep;
            Wait(600);
            AddToSystemJournal('ЕШЕЛЬМЕ ЕШЕЛЬБЕ!!!! НАЩАЙНИКЕ ПРИШОЛь');
        end;
    UOSay('хеллоу');
    Wait(10000);    
end;

//MinTile with Index of MinTiles_Array
procedure MinTileSpot(Idx : Integer);
var
    i, k : Integer;
    msgFizzle, msgEnd : String;
    cTime : TDateTime;    
begin
    msgFizzle := 'You put |You loosen ';
    msgEnd := 'is nothing| too far| mining in rock| cannot mine| no line| reach| not to mine|Try mining ';
    if Dist(GetX(self), GetY(self), MinTiles_Array[Idx].x, MinTiles_Array[Idx].y) > 2 then
        NewMoveXY(MinTiles_Array[Idx].x, MinTiles_Array[Idx].y, true, 1, true);
    for k := 0 to 4 do
        begin
            if IsMob > 0 then KillMob(IsMob);
            if FlagPk then exit;
            if WarMode then SetWarMode(False);
            if FindGM then GMFound;
            //if not Hidden then CheckHide;    
            if IsGump then GumpHandling;
            if RunPk then FlagPk := True;    
            if UseType(Pickaxe_Type, $FFFF) = 0 then
                UseType(Shovel_Type, $FFFF);
            CheckLag(30000);
            if not WaitForTarget(3000) then
                if UseType(Pickaxe_Type, $FFFF) = 0 then
                    UseType(Shovel_Type, $FFFF);
            CheckLag(30000);
            if not WaitForTarget(3000) then
                begin
                    ClientPrint('No pickaxes or shovels found...');
                    exit;
                end
            else
                begin
                    cTime := Now;
                    TargetToTile(MinTiles_Array[Idx].Tile, MinTiles_Array[Idx].x, MinTiles_Array[Idx].y, MinTiles_Array[Idx].z);                    
                    for i := 0 to 70 do
                        begin
                            if IsMob > 0 then KillMob(IsMob);
                            if RunPk then
                                begin
                                    FlagPk := True;
                                    break;
                                end;
                            Wait(100);
                            CheckLag(30000);
                            if (InJournalBetweenTimes(msgFizzle, cTime, Now) <> -1) then break;
                            if (InJournalBetweenTimes(msgEnd, cTime, Now) <> -1) then exit;
                        end;
                end;
        end;
    ClientPrint('Tile finished.');    
end;

//no comments
function Recall(Rune : Cardinal) : Boolean;
var i, cX, cY : Integer;
begin
    Result := False;
    cX := GetX(self);
    cY := GetY(self);
    Cast('Recall');
    CheckLag(30000);
    if WaitForTarget(3000) then TargetToObject(Rune);
    for i := 0 to 70 do
        begin
            CheckLag(30000);
            Wait(100);
            if (GetX(self) <> cX) or (GetY(self) <> cY) then
                begin
                    Result := True;
                    break;
                end;
        end;                
end;

procedure RemarkHomeRune;
begin
    if GetRuneCharges(HomeRune) < 10 then
        begin
            Cast('Mark');
            CheckLag(30000);            
            if WaitForTarget(5000) then TargetToObject(HomeRune);
            Wait(5000);
            CheckMana;
        end
    else
        ClientPrint('Rune ok...');      
end;

function CanRecall(Rune_Id : Cardinal) : Boolean;
begin
    Result := False;
    if GetRuneCharges(Rune_Id) > 10 then
        begin
            CheckMana;
            Result := True;
        end;
end;

//no comments
procedure Unload;
var
    i, tQuantity : Integer;
    tItem : Cardinal;
    ctime : TDateTime;  
begin
    SendMsg_ICQ('Unloading at: ' + CharName);
    InitReloadItems_Array;
    InitOre;
    if GetDistance(HomeChest) = -1 then
        begin
            Recall(HomeRune);
            Wait(300);
            CheckLag(30000);
            CheckMana;
            RemarkHomeRune;
        end;        
    MoveOpenDoor := True;
    NewMoveXY(GetX(HomeChest), GetY(HomeChest), true, 1, true);
    Wait(1000);
    //UOSay('BANK VISCA BARCELONA!!!');
    UseObject(HomeChest);
    Wait(1000);
    CheckLag(30000);
    for i := Low(Ore) to High(Ore) do
        while FindType(Ore[i], Backpack) > 0 do
            begin
                MoveItem(FindItem, 0, ResultBag, 0,0,0);
                Wait(650);
                CheckLag(30000);
            end;
    if Length(LootItems_Array) > 0 then
        begin
            UseObject(UnlootBag);
            CheckLag(30000);
            Wait(600);
            for i := Low(LootItems_Array) to High(LootItems_Array) do
                while FindType(LootItems_Array[i], Backpack) > 0 do
                    begin
                        MoveItem(FindItem, 0, UnlootBag, 0,0,0);
                        Wait(600);
                        CheckLag(30000);
                    end;
        end;  
    UseObject(ReloadBag);
    Wait(600);
    CheckLag(30000);
    if FindType(Food_Type, ReloadBag) > 0 then
        begin
            MoveItem(FindItem, 15, Backpack, 0,0,0);
            Wait(650);
            CheckLag(30000);
            for i := 0 to 30 do                
                begin
                    ctime := Now;
                    UseObject(FindType(Food_Type, Backpack));
                    Wait(300);
                    CheckLag(30000);
                    if WaitJournalLine(ctime, 'simply too', 1000) then break;
                end;
            MoveItem(FindType(Food_Type, Backpack), 0, ReloadBag, 0,0,0);
            Wait(650);
            CheckLag(30000);
        end;
    if FindType($0F0E, Backpack) > 0 then
        begin
            MoveItem(FindItem, 0, ReloadBag, 0,0,0);
            Wait(650);
            CheckLag(30000);
        end;
    for i := Low(ReloadItems_Array) to High(ReloadItems_Array) do
        begin
            if FindType(ReloadItems_Array[i], ReloadBag) > 0 then
                begin
                    tItem := FindItem;
                    if FindType(ReloadItems_Array[i], Backpack) <= 0 then
                        begin                            
                            MoveItem(tItem, 5, Backpack, 0,0,0);
                            Wait(1000);
                            CheckLag(30000);
                        end
                    else
                        begin
                            tQuantity := FindFullQuantity;
                            //AddToSystemJournal(IntToStr(tQuantity));
                            if tQuantity < 5 then                              
                                begin
                                    MoveItem(tItem, 5 - FindFullQuantity, Backpack, 0,0,0);
                                    Wait(1000);
                                    CheckLag(30000);
                                end;
                        end;
                end
            else
                begin
                    FlagProceed := False;
                    AddToSystemJournal('Lack of resources to proceed, halting!');
                end;
        end;    
    ClientPrint('Unload Complete!');    
    CheckMana;        
end;                              

{$Endregion}

//Main Loop
begin
    //SendMsg_ICQ('Script started at: ' + CharName);    
    IgnoreReset;
    FlagProceed := True;
    GetCaveRunes;
    Unload;  
    while not Dead and FlagProceed do
        begin
            while IsGump do CloseSimpleGump(GetGumpsCount-1);
            for Cave_Index := Low(Caves_Array) to High(Caves_Array) do  
                begin
                    CLientPrint('Rune num: ' + IntToStr(Cave_Index));
                    if not FlagProceed then break;
                    if CanRecall(Caves_Array[Cave_Index]) and FlagProceed then
                        begin
                            Recall(Caves_Array[Cave_Index]);
                            Wait(300);
                            CheckLag(30000);
                            GetTilesToMine;
                        end;
                    for Idx := 0 to Length(MinTiles_Array)-1 do
                        begin
                            CLientPrint('Tile num: ' + IntToStr(Idx));
                            if Weight >= MyMaxWeight then
                                begin
                                    controlInt := Idx;
                                    Unload;
                                    Recall(Caves_Array[Cave_Index]);
                                    WaitLag(1000);
                                    Idx := controlInt;
                                end;  
                            if not FlagProceed then break;
                            if (Idx >= Low(MinTiles_Array)) and (Idx <= High(MinTiles_Array)) then
                                 MinTileSpot(Idx)
                            else
                                begin
                                    AddToSystemJournal('Index is out of range, index value is: ' + IntToStr(Idx));
                                    break;
                                end;
                            if FlagPk then
                                begin
                                    Unload;
                                    AddToSystemJournal('PK');
                                    Wait(300000);
                                    FlagPk := False;
                                    break;                                    
                                end;                
                        end;
                    Unload;
                end;
        end;
end.

Pages: [1] 2