perrofunk Posted May 17, 2015 Posted May 17, 2015 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. Quote
adr.bot Posted May 17, 2015 Posted May 17, 2015 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 Quote
Recommended Posts
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.