Is it possible to make Simba call a certain procedure when the user stops the script manually (i.e., they press the Stop icon or key-in the appropriate hotkeys)? It's like the onFinish method in RSBot. And, if it's not possible in Simba, is it possible in SCAR?
In SCAR, there is a procedure called ScriptTerminate. Just use it like a normal procedure, except you don't need to call it anywhere. It'll be called automatically when the script ends. I tried it in Simba before, and it didn't work, so I'm not so sure about Simba.
JPHamlett
2011-02-05 17:26:41
Yup, it's called ScriptTerminate;
Procedure ScriptTerminate;
Begin
//Code here;
End;
Edit : I was wrong and ninja'd haha
program new;
procedure wat;
begin
writeln(':]');
end;
begin
SetScriptProp(SP_OnTerminate, ['wat']);
end.
Thanks dude, that works perfectly in Simba.
**BANNED The Man
2011-02-07 02:56:57
Or
AddOnTerminate('procedure/function');