ScriptUO

Official ScriptUO EasyUO Scripts => Site Scripter Libraries => Endless Nights' Script Library => Topic started by: Endless Night on November 27, 2012, 10:04:06 AM

Title: ENs - Script Library
Post by: Endless Night on November 27, 2012, 10:04:06 AM
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) (http://www.scriptuo.com/index.php?topic=10609.msg89005#msg89005)
  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) (http://www.scriptuo.com/index.php?topic=10608.msg88996#msg88996)

HOW TO USE ENs SCRIPT LIBRARY IN YOUR SCRIPTS
Documentation 3 Posts Down (http://)

HOW TO CREATE YOUR OWN COMPATIBLE LIBRARY FILES
How To Documentation 4 Posts Down (http://www.scriptuo.com/index.php?topic=10609.msg89007#msg89007)

SPECIFIC SCRIPT LIBRARY FILE DOCUMENTATION
Documentation 5 Posts Down (http://www.scriptuo.com/index.php?topic=10609.msg89008#msg89008) 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!  
Title: Re: ENs - Script Library
Post by: Endless Night on November 27, 2012, 10:04:23 AM
If Needed Library Files Are Attached Here, in addition to those attached in the Post Above.



Title: Re: ENs - Script Library
Post by: Endless Night on November 27, 2012, 10:04:34 AM
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: [Select]
; Location Of EN - Sub Files:  
set %EN_SubScriptPath C:\EASYUO\EUO , #spc ,  Scripts\ENs-Script , #spc , Library

If you wanted to use a desktop folder, something like C:\Documents and Settings\Me\Desktop\ensubs, the editted line would be:  
Code: [Select]
set %EN_SubScriptPath C:\Documents  , #spc , and   , #spc , Settings\Me\desktop\ensubs



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
Title: Re: ENs - Script Library
Post by: Endless Night on November 27, 2012, 10:04:47 AM
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: [Select]
Call #curpath , ENs-Settings.txt   ; Sets up pathing for ENs Scripts

Step 3 - If you wish to Use EN's Shortcut Var names instead of paths add this line directly after above
Code: [Select]
 call %EN_SubScriptPath , \ENs-Subs-Standard.txt ENs_InitializeENsScriptingEnviroment

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
Title: Re: ENs - Script Library
Post by: Endless Night on November 27, 2012, 10:04:58 AM
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.


Title: Re: ENs - Script Library
Post by: Endless Night on November 27, 2012, 10:09:57 AM
SPECIFIC SCRIPT LIBRARY FILE DOCUMENTATION

All example code presumes you add the pathing code (steps 1-3) in post above into the top of your script. If you did not change the var %EN_Sub_<LIBRARYNAME> with the explicit path and file name of the sub you are calling.

ENs-Subs-SpellsAndRuneBook.txt: Callable Subs for all things spells and Runebook.
MoveMethod Values =recall/Chivalry/Gate
call %ENs_Subs_RuneSpell RuneBookAction  <runebookId> <MoveMethod> <runenumber>


Health Bar Subs[spoiler=healthbar] Callable Subs to manipulate and read HealthBars, Players (Party/NonParty Members) Pets Other. OpenEUO implements better bar code than is possilbe in EUO
- UO Limits you to 9 non-party HealthBars open.
- Not sure on limit of party health bars.

-Currently the code will open, move and scan health bars for party members/non party members pets or anything else that has a status_gump.
-It will record and keep track of as many targets as you care to set.
- It now Changes your char out of warmode if your in it before trying to get status bar.  It but you back into war mode after its done if you were in it.

Issues/Addons unresolved theis version
-Pet bar selection to aviod mounting attempt.
-Quest NPC, Selection of paperdoll via Event popup menu
- Mob Selection

- gosub healthbar  ADDTHISGUMP  #Contposx, #contposy
   (Adds an already opened gump to the list)
- gosub healthbar  ADDTARGET  
- gosub healthbar  ADDBYNAME  %nameof
- gosub healthbar  ADDBYType   %Type

Doesn't work if you have an item dragged on the cursor. ?? Umm

Warning
This Is debug code.. Although it works its not done yet ..  testers wanted..

Sample Code
Code: [Select]
; Sample Code (Attach subs to end)
; Scans around you and places health bars of upto 9 people onscreen
; Then Displays message containing the Health % Of the 9 people
; Try running it at the bank
set #lpc 500

; Find People
ignoreitem #charid 1
finditem XU_IS_AV_HS_ZU G_10
set %totalBars #findcnt
if %totalBars >= 9
  set %totalBars 9
for #Findindex 1 %totalBars
  Set %ID . #findindex #findid

; Add the 9 People as targets.
set %yPos 0
For %Count 1 %totalBars
  {
  gosub HealthBar ADDID %ID . %Count 25 %ypos
  set %yPos %ypos + 60
  }

Get the Targers Health.
gosub HealthBar STATUSALL
set %x
For %Count 1 %totalBars
  set %x %x , #spc , : , #spc , %HealthBarHits . %Count
display ok Health Percentages: %x
halt
[/spoiler]
Title: Re: ENs - Script Library
Post by: Endless Night on November 27, 2012, 04:56:06 PM
ENs - FlatFile Tables Emulator  
ENs-Subs-Tables.Txt

Debuggin this code gave me a serious migraine... but is dang useful. Use it as a called script, Set the path in %ENs_Subs_Tables. Example code attached.

TABLE COMMANDS
set %ENs_Subs_Tables C:\easyuo/EUO , #spc , Scripts\ENs-Scripts\ENs-Subs-Tables.Txt
call %ENs_Subs_Tables EN_Table_Create       ; %1=TableName , %2...%z Field Names
;                                        ; Creates table and sets active table.
call %ENs_Subs_Tables EN_Table_Use          ; %1=TableName (Sets active Table)
call %ENs_Subs_Tables EN_Table_Goto         ; %1=RecordNum %2=Optional TableName  - sets fields
call %ENs_Subs_Tables EN_Table_Next         ; %1=Optional TableName  - sets fields
call %ENs_Subs_Tables EN_Table_Prior        ; %1=Optional TableName  - sets fields
call %ENs_Subs_Tables EN_Table_Top          ; %1=Optional TableName  - sets fields
call %ENs_Subs_Tables EN_Table_Bottom       ; %1=Optional TableName  - sets fields
call %ENs_Subs_Tables EN_Table_isDeteled    ; %1=Optional TableName  - Returns #true/#false
call %ENs_Subs_Tables EN_Table_Detele       ; %1=Optional TableName  - Sets Deleted Flag
call %ENs_Subs_Tables EN_Table_Recall       ; %1=Optional TableName  - Undeletes Record
call %ENs_Subs_Tables EN_Table_Append       ; Adds record to end of table *1
call %ENs_Subs_Tables EN_Table_Insert       ; Inserts Record at position EN_RecordOn *1
call %ENs_Subs_Tables EN_Table_Update       ; Updates Current Record *1
;                                       *1 (Uses %EN_TableOn, EN_RecordOn)
call %ENs_Subs_Tables EN_Table_Load   ;notdone yet
call %ENs_Subs_Tables EN_Table_Save  ; notdone yet

EXPOSED VARIABLES
%EN_TableOn  %EN_RecordOn
%TableName_  RecordCnt, FieldCnt, RecordOn, Deleted , Prior , Next , Top , Bottom
%TableName_  Fieldsnames...1...z   (as defined on the table create command)


Example Code
Create a table of items equipped on paperdoll. Scroll throw table displaying the information stored.

Code: [Select]
; Initialize Pathing and Create the table
set #lpc 9000
set %ENs_Subs_Tables C:\easyuo/EUO , #spc , Scripts\ENs-Scripts\ENs-Subs-Tables.Txt
call %ENs_Subs_Tables EN_Table_Create Equipped id Property Color    ; Create table

Code: [Select]
; populate table with equipment worn information
finditem * C_, #charid    
if #findcnt > 0
  {
  set !s #scnt
  for #findindex 1 #findcnt
    {
    event property #findid
    ; Method 1
    Call %ENs_Subs_Tables EN_Table_Append #findid #property #findcol
    ; Method 2
;    set %Equipped_id        #findid
;    set %Equipped_Property  #property
;    set %Equipped_Color     #findcol
;    Call %ENs_Subs_Tables EN_Table_Append
    }
    set !t #scnt - !s
    display ok Saved %Equipped_RecordCnt Records in !t seconds
  }

Code: [Select]
display ok  Scrolling  Thu Table By Record Number $$
for !RecNo 1 %Equipped_RecordCnt
  {
  CAll %ENs_Subs_Tables EN_Table_Goto !RecNo
  display ok TableOn: %EN_TableOn  RecordOn: %Equipped_RecordOn Deleted: %Equipped_Deleted $ $ ID= %Equipped_ID Property= %Equipped_Property  $$ %Equipped_RecordOn : prior= %Equipped_Prior Next= %Equipped_Next    ; at bottom
  }

Code: [Select]
display ok  Scrolling Thu Table via TOP Next
call %ENs_Subs_Tables EN_Table_Top
repeat
  display ok TableOn: %EN_TableOn  RecordOn: %Equipped_RecordOn Deleted: %Equipped_Deleted $ $ ID= %Equipped_ID Property= %Equipped_Property  $$ %Equipped_RecordOn : prior= %Equipped_Prior Next= %Equipped_Next    ; at bottom
  call %ENs_Subs_Tables EN_Table_Next
Until #result = #false   ; at bottom

Code: [Select]
display ok Scroll Thu Table Backwards via Bottom Prior
call %ENs_Subs_Tables EN_Table_Bottom
repeat
  display ok TableOn: %EN_TableOn  RecordOn: %Equipped_RecordOn Deleted: %Equipped_Deleted $ $ ID= %Equipped_ID Property= %Equipped_Property  $$ %Equipped_RecordOn : prior= %Equipped_Prior Next= %Equipped_Next    ; at bottom
  call %ENs_Subs_Tables EN_Table_Prior
Until #result = #false   ; at bottom


Example Code 2
Relationships and filters.   Experimental .. code not yet implemented.

Code: [Select]
; Create tables and assign Data.

call %ENs_Subs_Tables EN_Table Create Food        Catagory Discription       ; Create table 'Food' with 2 fields
call %ENs_Subs_Tables EN_Table Create FoodTypes   Catagory Name    

call %ENs_Subs_Tables EN_Table Use Food   ; set active table
call %ENs_Subs_Tables EN_Table Add Cheese Cheese

call %ENs_Subs_Tables EN_Table Use FoodTypes   ; set active table
call %ENs_Subs_Tables EN_Table Add %Food_Catagory Provolone
call %ENs_Subs_Tables EN_Table Add %Food_Catagory Swiss
call %ENs_Subs_Tables EN_Table Add %Food_Catagory Cheddar
call %ENs_Subs_Tables EN_Table Add %Food_Catagory Feta

call %ENs_Subs_Tables EN_Table Use Food   ; set active table
call %ENs_Subs_Tables EN_Table Add Milk  Milk
call %ENs_Subs_Tables EN_Table Use FoodTypes  
call %ENs_Subs_Tables EN_Table Add %Food_Catagory  Soy
call %ENs_Subs_Tables EN_Table Add %Food_Catagory  Haznut
call %ENs_Subs_Tables EN_Table Add %Food_Catagory  Non-Fat
call %ENs_Subs_Tables EN_Table Add %Food_Catagory  Low-Fat
call %ENs_Subs_Tables EN_Table Add %Food_Catagory  Whole

Code: [Select]
; Get a Subset of data by setting a filter from one table to another

call %ENs_Subs_Tables EN_Table Use FoodTypes   ; set active table
call %ENs_Subs_Tables EN_Table SetFilter  Catagory = %Food_Catagory
Title: Re: ENs - Script Library
Post by: Endless Night on November 27, 2012, 05:55:06 PM
reserved
Title: Re: ENs - Script Library
Post by: Endless Night on November 27, 2012, 05:55:26 PM
reserved
Title: Re: ENs - Script Library
Post by: Endless Night on November 27, 2012, 07:10:08 PM
reserved
Title: Re: ENs - Script Library
Post by: Endless Night on November 27, 2012, 07:13:51 PM
reserved.
Title: Re: ENs - Script Library
Post by: The Ghost on November 28, 2012, 06:22:26 AM
Nice work,
                  Seen like I have lot of reading ahead of me, can't wait to see what this can do.  Thx for your work.  You need add to my to-do-list :))
Title: Re: ENs - Script Library
Post by: NObama on February 23, 2013, 07:27:59 AM
ARgH!  I hate Vista!

My filepath is here:
Code: [Select]
C:\Program Files\EUO\EN's-Script Library
My code looks like this:
Code: [Select]
; Standard En Framework Settings:  Location Of EN - Sub Files - EDIT THIS LINE OR ENTERLINE in ENs-Settings.txt
set %EN_SubScriptPath C:\Program , #spc , Files\EUO\EN's-Script , #spc , Library

I'm 'running as administrator'...and yet the script I'm trying to use just stops when I hit play.

Do I need to drop everything into C: again?  I really hate that...

EDIT:  Ok, as I run your 999 script, halfway through the setup the filepath mysteriously changes itself back to C:\EasyUO\EUO Scripts\ENs-Script Library.  I've stepped through three times, and I can't see where this happens.  Fortunately, by creating that filepath I made this work.  Weird though.
Title: Re: ENs - Script Library
Post by: Endless Night on February 23, 2013, 07:41:57 AM
ARgH!  I hate Vista!

My filepath is here:
Code: [Select]
C:\Program Files\EUO\EN's-Script Library
My code looks like this:
Code: [Select]
; Standard En Framework Settings:  Location Of EN - Sub Files - EDIT THIS LINE OR ENTERLINE in ENs-Settings.txt
set %EN_SubScriptPath C:\Program , #spc , Files\EUO\EN's-Script , #spc , Library

I'm 'running as administrator'...and yet the script I'm trying to use just stops when I hit play.

Do I need to drop everything into C: again?  I really hate that...


You probably need to show me more of your code..  to answer the question you can place the script library where ever you can access a file from EUO.  I generally make it a folder or sub folder inside the folder that holds euox.exe itself.
Title: Re: ENs - Script Library
Post by: NObama on February 23, 2013, 07:56:01 AM
I'm an idiot.  Disregard.
Title: Re: ENs - Script Library
Post by: gimlet on February 23, 2013, 10:03:15 AM
I'm an idiot.  Disregard.

The truth come out!!!!
Title: Re: ENs - Script Library
Post by: Endless Night on October 17, 2013, 08:05:48 PM
version 4
Title: Re: ENs - Script Library
Post by: Endless Night on October 26, 2013, 08:46:23 PM
Version 5.

Library files changed ... Added ENs-subs-gardening.txt and changes to Ens-subs-menus.txt, ens-subs-fastframework.txt, ens-subs-standard.txt
Title: Re: ENs - Script Library
Post by: declo on October 12, 2016, 08:58:09 AM
I am attempting to learn how to call your scripts.  IF I wanted to call your ENs-Subs-BodsAndNPCs, I would do the following?

Code: [Select]
  Call #curpath , ENs-Settings.txt 
  Call %EN_SubScriptPath , \ENs-Subs-BodsAndNPCs.txt ENs_sellItem

then to use

Code: [Select]
  Call %ENs-Subs-BodsAndNPCs SellItem abc123 John Talk ENK 5 6 End

I believe the parameters are as follows:

abc123 - vendorid
John - name
ENK - item to sell
5  - Quantity
6 -  minimal price
end - end resume

Is this correct?   :-\
Title: Re: ENs - Script Library
Post by: Endless Night on October 19, 2016, 12:13:14 PM
I am attempting to learn how to call your scripts.  IF I wanted to call your ENs-Subs-BodsAndNPCs, I would do the following?

Code: [Select]
  Call #curpath , ENs-Settings.txt 
  Call %EN_SubScriptPath , \ENs-Subs-BodsAndNPCs.txt ENs_sellItem

then to use

Code: [Select]
  Call %ENs-Subs-BodsAndNPCs SellItem abc123 John Talk ENK 5 6 End

I believe the parameters are as follows:

abc123 - vendorid
John - name
ENK - item to sell
5  - Quantity
6 -  minimal price
end - end resume

Is this correct?   :-\


Been a long time.. so did it work ???    It should be extremely simple to get running...
Title: Re: ENs - Script Library
Post by: declo on October 23, 2016, 01:10:02 PM
I am attempting to learn how to call your scripts.  IF I wanted to call your ENs-Subs-BodsAndNPCs, I would do the following?

Code: [Select]
  Call #curpath , ENs-Settings.txt 
  Call %EN_SubScriptPath , \ENs-Subs-BodsAndNPCs.txt ENs_sellItem

then to use

Code: [Select]
  Call %ENs-Subs-BodsAndNPCs SellItem abc123 John Talk ENK 5 6 End

I believe the parameters are as follows:

abc123 - vendorid
John - name
ENK - item to sell
5  - Quantity
6 -  minimal price
end - end resume

Is this correct?   :-\


Been a long time.. so did it work ???    It should be extremely simple to get running...

Did not work.  I have your files in the same diretory as Easyuo and used the following code:

Code: [Select]
set #curpath , ENs-Settings.txt
set %EN_SubScriptPath%EN_SubScriptPath , \ENs-Subs-BodsAndNPCs.txt ENs_sellItem

start:
Call %ENs-Subs-BodsAndNPCs SellItem YYJVQ Neztam Talk WZF 10 1 End
halt

Any thoughts?  I tried call & set
Title: Re: ENs - Script Library
Post by: Endless Night on February 12, 2020, 08:48:14 AM
Sry for the extremely late reply, it didn't work because you didn't set pathing correctly on one attempt and called a non existent sub on other attempt.  You also seemed to be getting call and set confused.  FYI  there is no Sub 'EN_Sellitems' in the file ENs_Subs_BondsAndNPCs.txt   (the sub name is 'sellitem'). You reference Variable %ENs-Subs-BodsAndNPCs  but at no point did you create this variable instead you reassigned %EN_subScriptPath.  Below would be the actual correct code you would need.

With Pathing Assigned
Code: [Select]
call #curpath , ENs-Settings.txt 
set %ENs-Subs-BodsAndNPCs   %EN_SubScriptPath , \ENs-Subs-BodsAndNPCs.txt
Call %ENs-Subs-BodsAndNPCs SellItem YYJVQ Neztam Talk WZF 10 1 End
halt

OR if you dont want to set pathing you can call it this way (setting pathing is preferable)
Code: [Select]
call #curpath , ENs-Settings.txt
call %EN_SubScriptPath , \ENs-Subs-BodsAndNPCs.txt      SellItem YYJVQ Neztam Talk WZF 10 1 End

Title: Re: ENs - Script Library
Post by: Endless Night on February 14, 2020, 10:45:20 AM
Version 6

- Location data added.
- who knows what else has changed been 7 years since last updated.


Title: Re: ENs - Script Library
Post by: The Ghost on February 14, 2020, 08:33:00 PM
EN's looking at your ENs-Subs-Menus,     I'm trying to set up the same  settep as your ( set %ENs_Subs_Gumps %EN_SubScriptPath , \ENs-Subs-Gumps.Txt )

set %EN_SubScriptPath D:\Users\User\Documents\UO , #spc , File\Script\ENs-Endless , #spc , Night
set %ENs-Subs-Menus %EN_SubScriptPath , \ENs-Subs-Menus.txt


Now can't seen to figure how to call the sub inside the menu file ENs-Subs-Menus.tx
I'm trying to see what can do, but can't get started right :(    Can you point me int he right direction.
Title: Re: ENs - Script Library
Post by: Endless Night on February 15, 2020, 12:14:49 PM
The ghost,  My menus system is a bit more complex for sure .. See example script below to get you started....

MenuDefinition Options (wrapped in _):   ControlBar, Status, HeartBeat, Location, ToolBarsAllowed, Mainbar1, Mainbar2, Mainbar3, Action, House, XIIXSuperStuff, Info, Antiidle, ScriptBar, ScriptTools, EliteBar, MiscTools, Gardening, Resources, Health, PlayerBar, ScriptInfo, Overseer

Play around adding different menu definition options ..

Get a copy of EN-Settings.txt here <- http://www.scriptuo.com/index.php?topic=10609.msg89005#msg89005
Reason I use EN-Settings.txt to record your custom pathing is that this way you can share the script without people needing to modify your path as they will have thier own en-settings.txt with thier custom pathing.

Code: [Select]
set %EN_ScriptName   The-Ghost-Menu-Experiement
call #curpath , ENs-Settings.txt       ; Put your custom pathing information inside here.
call %EN_SubScriptPath , \ENs-Subs-Standard.txt  ENs_SetupSubNamesAndPaths     ; see this sub for all pathing vars to subs that get set
set %EN_Script_MenuDefinition _ControlBar_Status_HeartBeat_Location

call %ENs_Subs_Menus SetProgressBox %EN_ScriptName - #CharName  ; initalize menu

set !Count 1
Repeat
  call %ENs_Subs_Menus CheckProgressMenu    noghost    ; if dont add noghost option checks if you are a ghost.
  ; do something
  set !Count !Count + 1
  call %ENs_Subs_Menus GLOBALSetStatus  Status Line - My Count: !count
  wait 1
until  %DontStop = #false
Halt


Above code will give you a fully functional menu with   Pause,  Exit , EUO-Pause, EUO-Halt, Settings, ? Buttons,  Inform  you of your current location, provide a script heartbeat so you can always see the script is functioning and provide a script status line.


Its pretty powerfull stuff, let me know what you think.


Title: Re: ENs - Script Library
Post by: The Ghost on March 02, 2020, 03:17:39 PM
Good day EN's

Does your EN's - Health Bars  can be use to heal and cure  pet.    I'm trying to find a way to scan my pet health bar to see if he is poison.
Title: Re: ENs - Script Library
Post by: Endless Night on March 03, 2020, 06:18:22 AM
Good day EN's

Does your EN's - Health Bars  can be use to heal and cure  pet.    I'm trying to find a way to scan my pet health bar to see if he is poison.

I haven't tested it yet, but looks like this should do the job.

call %ENs_Subs_HealthBars  OpenNonHumaniodBar       ; id   x y
call %ENs_Subs_HealthBars  HealthBarReadNonPartyGump