Jump to content

Recommended Posts

Posted

Hi, I got this script. When my character is dead, I press play it goes to city and buff and then it goes back to the spot. But I need that the script check and re-check if my character is dead (I mean, if it is alive continue checking, not to stop the script) and... is there a way to make a "loop" the script?

begin

begin

    if User.Dead then begin
    
        Print('Dead. Pressing to village.');
        Delay(1000);
        Engine.FaceControl(0,false);
        Engine.GoHome;
        Delay(11000);
    end;
end;
    Engine.BypassToServer('_bbshome');
    Delay(1000);
    Engine.BypassToServer('_bbsgetfav');
    Delay(1000);
    Engine.BypassToServer('_bbsbuffer');
    Delay(1000);
    Engine.BypassToServer('_bbsbufferbypass_cast 159 x x');
    Delay(1000);
    Engine.BypassToServer('_bbsgetfav');
    Delay(1000);
    Engine.BypassToServer('_bbshome');
    Delay(1000);
    Engine.BypassToServer('_friendlist_0_');
    Delay(1000);
    Engine.BypassToServer('_dropItemsByName_ crafted leather');
    Delay(1000);
    Engine.BypassToServer('_dropMonstersByItem_1894');
    Delay(1000);
    Engine.BypassToServer('_dropMonstersByItem_1894_2');
    Delay(1000);
    Engine.BypassToServer('_dropMonsterDetailsByItem_22643');
    Delay(1000);
    Engine.BypassToServer('_dropMonsterDetailsByItem_22643_3');
    Delay(1000);

end.
Posted
function deadCheck: Boolean;
begin
Result := false;
    if User.Dead then begin
        Result := true;
        Print('Dead. Pressing to village.');
        Delay(1000);
        Engine.FaceControl(0,false);
        Engine.GoHome;
        Delay(10000);
    end;
end;


begin
while true do begin
    Engine.BypassToServer('_bbshome');
    Delay(1000);
    Engine.BypassToServer('_bbsgetfav');
    Delay(1000);
    Engine.BypassToServer('_bbsbuffer');
    Delay(1000);
    Engine.BypassToServer('_bbsbufferbypass_cast 159 x x');
    Delay(1000);
    Engine.BypassToServer('_bbsgetfav');
    Delay(1000);
    Engine.BypassToServer('_bbshome');
    Delay(1000);
    Engine.BypassToServer('_friendlist_0_');
    Delay(1000);
    Engine.BypassToServer('_dropItemsByName_ crafted leather');
    Delay(1000);
    Engine.BypassToServer('_dropMonstersByItem_1894');
    Delay(1000);
    Engine.BypassToServer('_dropMonstersByItem_1894_2');
    Delay(1000);
    Engine.BypassToServer('_dropMonsterDetailsByItem_22643');
    Delay(1000);
    Engine.BypassToServer('_dropMonsterDetailsByItem_22643_3');
    Delay(1000);
    while not deadCheck do delay(1000);
  end;
end.

try this mabe this what you whant :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...