Official ScriptUO EasyUO Scripts > Endless Nights' Script Library

ENs - Script Library

(1/6) > >>

Endless Night:
ENs Script Library
Version 6  Release Date:2/2020[spoiler=Script Header]
;============================================
; EUO version tested with: As Per Revision Date
; Shard OSI / FS: OSI
; Revision Dates: 11/12, 10/13
; Public Release:  11/12
; Purpose: Fast Script Creation
;============================================
[/spoiler]

ABOUT
  The objective of ENs Script Library  is to contain all the standard code needed by most scripts in an easily accessible format.  Any custom code needed only for a particular script is held in its main file.  If that code could be used in another script then is should be placed in an existing or new Script Library file.  These sub Files collectively are currently called ENs Script Library

These Files should save time as you will no longer need to cut and paste code from one script to another and thus avoid all the errors that come from multiple scripts using many different version of the same code.  It also has the benefit of when one bit of code is updated all scripts automatically get the added power of the new code.

HOW TO SETUP ENs SCRIPT LIBRARY FILES
  Step 1 -  Setup Path Structure as per (Documentation 2 Posts Down)
  Step 2 - Download and save all script library files attached to this post and next post into the path you setup in step 1
  Step 3 - Download Elite Level Script Library Files (If you not elite skip this step)

HOW TO USE ENs SCRIPT LIBRARY IN YOUR SCRIPTS
Documentation 3 Posts Down

HOW TO CREATE YOUR OWN COMPATIBLE LIBRARY FILES
How To Documentation 4 Posts Down

SPECIFIC SCRIPT LIBRARY FILE DOCUMENTATION
Documentation 5 Posts Down and following posts. (Only need to read if you are going to use ENs Script Librarys in your code)

Feedback:
Feedback both negative and positive are defiantly more than welcomed and encouraged.  Same with feature requests .. no guaranettee will make it into the code .. but it might.


THESE ARE CALLABLE SCRIPTS ONLY ... DO not cut and paste into your script

Disclaimer/Usage License: -- See Script for full Details.
(C) 2007 All Rights Reserved JosephAJ
Commercial usage requires written permission from the author
NOTE: My scripts or any derivative of them are *not* for use in other players script/s!

Endless Night:
If Needed Library Files Are Attached Here, in addition to those attached in the Post Above.



Endless Night:
HOW TO SETUP ENs SCRIPT LIBRARY FILES

By default I place all my sub files in this location "c:\easyuo\euo scripts\ENs-Script Library".   For simplicity sake you can also use this directory in which case read no further. Just make that directory and then down load and Save the attached file ENs-setting.txt to the folder were you have euox.exe located.  (Save the sub files to the directory you made).


If you wish to use a different directory to store the Sub Files the simplist method is to make a file called ENs-settings.txt and place it in the same directory as EUOX.EXE. Inside the file add the line Set %EN_subscriptPath  <path>  as shown below (example file attached):

--- Code: ---; Location Of EN - Sub Files:  
set %EN_SubScriptPath C:\EASYUO\EUO , #spc ,  Scripts\ENs-Script , #spc , Library
--- End code ---

If you wanted to use a desktop folder, something like C:\Documents and Settings\Me\Desktop\ensubs, the editted line would be:  

--- Code: ---set %EN_SubScriptPath C:\Documents  , #spc , and   , #spc , Settings\Me\desktop\ensubs
--- End code ---




OLD METHOD: Noted for backwards compatibility only please use above method.
   This method has the disadvantage of you having to edit the Directory path every time the script is updated, and thus defeats the purpose of the framework, so I highly recommend you use the method above.

Edit the line near the top of the main script that reads below, to the new directory location (ENs-Settings Above overrides this so ENs-settings must be blank or non existant).
set %EN_SubScriptPath C:\EASYUO\EUO , #spc ,  Scripts\ENs-Scripts , #spc , Library

Endless Night:
HOW TO USE ENs SCRIPT LIBRARY IN YOUR SCRIPTS

Step 1 - Follow Download and setup instructions in the main post.

Step 2 -  Add the code below to the top of your script

--- Code: ---Call #curpath , ENs-Settings.txt   ; Sets up pathing for ENs Scripts

--- End code ---

Step 3 - If you wish to Use EN's Shortcut Var names instead of paths add this line directly after above

--- Code: ---  call %EN_SubScriptPath , \ENs-Subs-Standard.txt ENs_InitializeENsScriptingEnviroment

--- End code ---

Example file attached

This will setup these vars that will contain all the pathing needed to access these sub files. You can check the above referenced file and sub for updates to this list incase this post is out of date.

%ENs_Subs_Framework  = <Your path>\ENs-Subs-FastScriptFramework.txt
%ENs_Subs_RuneSpell    = <Your path>\ENs-Subs-SpellsAndRuneBook.txt
%ENs_Subs_Sailing         = <Your path>\ENs-Subs-Sailing.txt
%ENs_Subs_Standard     = <Your path>\ENs-Subs-Standard.txt
%ENs_Subs_Bods           = <Your path>\ENs-Subs-BodsAndNPCs.txt
%ENs_Subs_NPCs           = <Your path>\ENs-Subs-BodsAndNPCs.txt
%ENs_Subs_Menus         = <Your path>\ENs-Subs-Menus.txt
%ENs_Subs_Banking       = <Your path>\ENs-Subs-BanksAndHome.txt
%ENs_Subs_Home          = <Your path>\ENs-Subs-BanksAndHome.txt
%ENs_Subs_Pets            = <Your path>\ENs-Subs-Pets.txt
%ENs_Subs_Resource     = <Your path>\ENs-Subs-ResourceGathering.Txt
%ENs_Subs_CharSkill      = <Your path>\ENs-Subs-CharacterSkills.Txt
%ENs_Subs_LoginOut     = <Your path>\ENs-Subs-LoginOut.Txt
%ENs_Subs_Threats       = <Your path>\ENs-Subs-ThreatCheck.txt
%ENs_Subs_Crafting       = <Your path>\ENs-Subs-Crafting.txt
%ENs_Subs_HealthBars   = <Your path>\ENs-Subs-HealthBars.txt
%ENs_Subs_TMaps         = <Your path>\ENs-Subs-TreasureMaps.txt
%ENs_Subs_Tables         = <Your path>\ENs-Subs-Tables.txt

Endless Night:
HOW TO CREATE YOUR OWN COMPATIBLE LIBRARY FILES

Outline template file is attached.  Edit the SubFile Name and version, and add your code to the end of the file.
SubFile Naming convention is : <Scriptor Initials>-Subs-<SubFile Contents Description>.txt


If you wish your subfiles to be hosted in this thread and automatically detected, or to be merged into the master files above please post in this thread (with code attached) and i will get back to you.  Not all requests will be honored, the code must be suitably stable.  The code maybe adjusted, modified etc.. but all credits will always remain.  Post if you have questions.


Navigation

[0] Message Index

[#] Next page

Go to full version