1. What is the predefined MouseSpeed?
2. how the function AddOnTerminate works?
Thanks![]()
1. What is the predefined MouseSpeed?
2. how the function AddOnTerminate works?
Thanks![]()
1. I have no clue, totally forgot.
2. Whenever the script terminates, it will call that method. Use it like so:
Simba Code:procedure printMe;
begin
WriteLn('Printed!');
end;
...
AddOnTerminate('printMe');
Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
{ MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }
When posting a bug, please post debug! Help us, help you!
I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.
SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.
When he says terminated, he means in any manner. Naturally, script exception, force shutdown (stop button at least). I also don't know the mouse speed...
My Outdated ScriptsEdgeville Log Cutter | Edgeville AIO Jewelry | AIO Pickpocketer | Urn Activator | Slayer Tower | Slaying KuradalMy Working Scripts: Tutorials:Function Pointers and Why You Should Care! | Forms and Saving Settings | The Magic Behind Programming Tutorial | Recursive Recursion![]()
That only works when the script is terminated properly right? When an error occurs that function is not called?
Where should I place the addonterminate in the script?
I found at srl.simba I guess it is 15
Place the AddOnTerminate as early on in your program as you can that is also helpful. It only needs to be called once (for each method you want it to act on) per run.
IE: typical use is to have a method that frees all DTMs and call the AddOnTerminate on that. But no sense in having it possibly run before the DTMs are created so something along these lines:
Simba Code:procedure DeclareDTMs;
begin
DTMa:= DtmFromString('fhdwuiafghiaoh');
DTMb:= DtmFromString('fhdwwfafwauiafghiaoh');
DTMc:= DtmFromString('fhdwuiafghiagawgwagasoh');
end;
procedure FreeMyDTMs;
begin
Free(DTMa);
Free(DTMb);
Free(DTMc);
end;
begin
SetupSRL;
DeclareDTMs;
AddOnTerminate('FreeMyDTMs');//Notice the name of the method is in quotation marks.
repeat
dostuff;
until(ReasonToEnd);
end.
My Outdated ScriptsEdgeville Log Cutter | Edgeville AIO Jewelry | AIO Pickpocketer | Urn Activator | Slayer Tower | Slaying KuradalMy Working Scripts: Tutorials:Function Pointers and Why You Should Care! | Forms and Saving Settings | The Magic Behind Programming Tutorial | Recursive Recursion![]()
If the script errors out, then the AddOnTerminate method will not be called. Only if the script completes, or is manually turned off, with that be called.
Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
{ MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }
When posting a bug, please post debug! Help us, help you!
I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.
SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.
There are currently 1 users browsing this thread. (0 members and 1 guests)