Shuttleu
2011-08-13 17:31:20
Hello SRL
i have come to announce my SRL Player Remote which is based off of this
This will allow you to add, remove or edit players during runtime
The remote is in two separate parts
First there is the Form, for this you will need to move the sex file into your extensions folder, from here there will be a menu called "SRL Remote"
This will allow you to edit the scripts player properties
If you are running more than one script then a form will popup first asking you which script instance you would like to edit
for developers there are three things they need to know about
in order to use the remote you must call SetupSRLRemote
you can do so by using
ScriptName is simply the name of the script so "Vine Vanquisher"
Integers, Booleans and Strings are each arrays from the player array (Players[0].Integers[0], Players[0].Strings[0] etc.) and must be fileld in a particular way (string, int, string, int)
first you put a one or two word description of what the variable is for, then you put the variable index
so for example, lets say i have this in my setup
this is the same for the strings and booleans
and lastly we have StringValues
now this is because strings are different in scripts because you want the user to choose certain ones, otherwise the script might not work, so that is what this is for
so lets say for Strings i put
so you can put
So in total the setup could look like
this is all you need to do to set up the SRL Player Remote
Now to make your script use the remote add this line somewhere it will get called frequently
and one last thing , there is a Integer which you can use to let the user know which instance the script is
RemoteInstance;
You can put this in your progress reports or put it somewhere so your user knows which instance it is
Well i think i have rambled on long enough so i shall give you the files (please not there may be bugs as i havent been able to fully test it but it should work)
Place remote.simba into Includes/SRL/SRL/Misc
and to use the remote in your script simply include the file
and SRLRemote.sex into your extensions folder
~shut
EDIT: Just remembered you probably want to see some images



i have come to announce my SRL Player Remote which is based off of this
This will allow you to add, remove or edit players during runtime
The remote is in two separate parts
First there is the Form, for this you will need to move the sex file into your extensions folder, from here there will be a menu called "SRL Remote"
This will allow you to edit the scripts player properties
If you are running more than one script then a form will popup first asking you which script instance you would like to edit
for developers there are three things they need to know about
SetupSRLRemote
SRLRemote
RemoteInstancein order to use the remote you must call SetupSRLRemote
you can do so by using
procedure SetupSRLRemote(ScriptName: string; Integers, Booleans, Strings: TVariantArray; StringValues: array of array of string); now dont worry if you dont understand these, i will explainScriptName is simply the name of the script so "Vine Vanquisher"
Integers, Booleans and Strings are each arrays from the player array (Players[0].Integers[0], Players[0].Strings[0] etc.) and must be fileld in a particular way (string, int, string, int)
first you put a one or two word description of what the variable is for, then you put the variable index
so for example, lets say i have this in my setup
Players[0].Integers[0]:= 5; //Loads
Players[0].Integers[2]:= 45; //Time till break
you would put this as ['loads', 0, 'time till break', 2]as you can see the name matches up with the indexthis is the same for the strings and booleans
and lastly we have StringValues
now this is because strings are different in scripts because you want the user to choose certain ones, otherwise the script might not work, so that is what this is for
so lets say for Strings i put
['Location', 0, 'Tan Type', 1]using StringValues you define what options the user can choose for the stringsso you can put
[['Al Kharid', 'Lumby', 'Draynor'], ['Soft', 'Hard', 'Snake', 'Dragon']]So in total the setup could look like
SetupSRLRemote('Ultimate Tanner', ['Loads', 2], [], ['Location', 1, 'Hide Type', 0], [['Al Kharid', 'Lumby', 'Fally'], ['Soft', 'Hard', 'Dragon', 'Snake']]);this is all you need to do to set up the SRL Player Remote
Now to make your script use the remote add this line somewhere it will get called frequently
SRLRemote;and one last thing , there is a Integer which you can use to let the user know which instance the script is
RemoteInstance;
You can put this in your progress reports or put it somewhere so your user knows which instance it is
Well i think i have rambled on long enough so i shall give you the files (please not there may be bugs as i havent been able to fully test it but it should work)
Place remote.simba into Includes/SRL/SRL/Misc
and to use the remote in your script simply include the file
and SRLRemote.sex into your extensions folder
~shut
EDIT: Just remembered you probably want to see some images


