Difference between revisions of "User:AdminSR1/Scripting Protecting Plug-in Files"
Jump to navigation
Jump to search
User:AdminSR1/Scripting Protecting Plug-in Files (edit)
Revision as of 01:32, 2 October 2018
, 01:32, 2 October 2018no edit summary
imported>CraftySentinel |
imported>CraftySentinel |
||
Line 1: | Line 1: | ||
[[Category:Scripting_Guides]] | |||
This script will allow you to only allow access to an esp plug-in file if requirements are met. | |||
==Usage== | |||
There are many reasons why you may want to protect a plug-in file from only allowing authoirsed users to test said file or if you want to use said file for personal use. This method can also be used to prevent piracy. | |||
==Preperations== | |||
First lets make a quest to handle our script so that it will run as soon as the player loads into the game. | |||
To do this go to the <b>Object Window</b> and under the <b>Character tab</b>, open the <b>Quests</b> sub menu. Then right click on any quest and click <b>New</b>. Give this quest an ID and insure that <b>Allow Repeated Stages</b> is checked on the <b>Quest Data</b> menu. Then lets make a new stage under the <b>bQuest Stages</b> menu and call it stage 10. Make sure that <b>Run On Start</b> is checked. The close the <b>Quest Window</b> and reopen the same quest we just made. This will give us access to the stage fragments. Lets go over to the <b>Scripts</b> tab on the far right end of the quest window and make a new script by pressing <b>Add</b> followed by <b>[New Script]</b>. | |||
Once you have clicked on <b>[New Script]</b> name it what you would like and click <b>OK</b>. Now please refer to the <u>Script</u> part of this tutorial. | |||
==Script== | ==Script== | ||
This is an example script. It can be used to prevent access to a plugin file by displaying a series of messages and menus that will either let the player into the game with the plug-in or take them back to the main menu where they can uninstall the plug-in file. | This is an example script. It can be used to prevent access to a plugin file by displaying a series of messages and menus that will either let the player into the game with the plug-in or take them back to the main menu where they can uninstall the plug-in file. | ||
Line 25: | Line 40: | ||
Message Property FailMessage01 Auto Const | Message Property FailMessage01 Auto Const | ||
{Message To Show If User | {Message To Show If User Does Not Meet Requirements} | ||
Message Property WarningMessage01 Auto Const | Message Property WarningMessage01 Auto Const | ||
Line 81: | Line 96: | ||
</source> | </source> | ||
==Finishing== | |||
After you have finished with your script and it has successfully compiled, go back to that stage we created earlier and under the <b>kmyQuest</b> tab just above the fragments window, select the script you just made. Then in the fragment type <b>kmyQuest.Start()</b> . This will insure that the script will start when the player loads into the save game. | |||
And you are done! You now have a plug-in file that will only load if the user mets your requirements. |