calvinc5 Posted June 23, 2014 Author Share Posted June 23, 2014 (edited) Alright I understand that. But I don't understand how I can start the procedure without using the eventhandler. I thought I understood what you meant with using the variables to make it work. But I still had to run a procedure to use the code in my includes so it didnt work. Was your script for the game very effective? What action were you aiming to automatize? Do you still play now a days? Thank you greatly! Edited June 24, 2014 by calvinc5 Quote Link to comment Share on other sites More sharing options...
FHannes Posted June 24, 2014 Share Posted June 24, 2014 Alright I understand that. But I don't understand how I can start the procedure without using the eventhandler. I thought I understood what you meant with using the variables to make it work. But I still had to run a procedure to use the code in my includes so it didnt work. Was your script for the game very effective? What action were you aiming to automatize? Do you still play now a days? Thank you greatly! You don't run the code in the eventhandler, you run it from the main procedure after the form closes. I really only automated simply stuff with SCAR, like mining and fishing. You can achieve a lot more bu hacking the client and building a bot from that, but it does require extensive knowledge about java bytecode and reverse engineering. I haven't played in a few months, I generally play for a while, then quit for a while and repeat Quote Link to comment Share on other sites More sharing options...
calvinc5 Posted June 24, 2014 Author Share Posted June 24, 2014 The code for the form never seems to end on its own I dont understand it. Do I need to figure out how this function works so I can call it in the onclick and make the script finish and do my code? How do I call the function? I really want to make this work but I can not seem to wrap my head around how this works. function Form1_1_SafeShowModal: Boolean; var v: TVariantArray; begin SetLength(v, 0); Result := ThreadSafeCall('Form1_1_ShowModal', v); end; - - - Updated - - - It is a very fun game it is just very repetitive. That is all interesting! Quote Link to comment Share on other sites More sharing options...
FHannes Posted June 24, 2014 Share Posted June 24, 2014 The code for the form never seems to end on its own I dont understand it. Do I need to figure out how this function works so I can call it in the onclick and make the script finish and do my code? How do I call the function? I really want to make this work but I can not seem to wrap my head around how this works. function Form1_1_SafeShowModal: Boolean; var v: TVariantArray; begin SetLength(v, 0); Result := ThreadSafeCall('Form1_1_ShowModal', v); end; - - - Updated - - - It is a very fun game it is just very repetitive. That is all interesting! You CAN'T call it in OnClick, it will crash the script or even SCAR... As I said, call the code after the form has executed. begin Form1_1_SafeInit; if Form1_1_SafeShowModal then WriteLn('Form returned modalresult ok'); FreeForm(Form1_1); <== Here end. Quote Link to comment Share on other sites More sharing options...
calvinc5 Posted June 25, 2014 Author Share Posted June 25, 2014 That's great thank you I have the script running perfectly how I wanted it Quote Link to comment Share on other sites More sharing options...