Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Endless Night

Pages: 1 2 3 [4] 5 6 7
46
ENs - Action Template   inspired by Cerveza

Version 1h

NOTE THIS SCRIPT REQUIRES: ENs ScanBuffBar.Txt Subs...  Located HERE, the script will not function without it.

Functions As Requested By Cerveza (lightly Edited)
- menu with buttons to recast or chug/eat.
- Concept would be that some spells have a "cool down" like Spell Weaving's Gift of Life. Here's my thoughts....
           -Button is labeled Gift of Life and it's RED while the spell is in effect
           - so you cast it and the button turns red.
           - Once GoL is completed, the button turns YELLOW
           -  meaning the spell is NOT in effect and can NOT be cast.
           - Once the cool down timer is complete for the spell the button turns GREEN
              (meaning it's available to be cast again and pressing the button will cast it.)
- Same thing for Strength/Dex pots, Orange/Purple petals, Other buff spells....

The idea isn't to automate the process, but to allow the user to determine when it's appropriate to cast the spell and make it easy to cast by just pressing the button. In a PvM situation it's not that important and could be pretty much automated, but in PvP there are times that you really need to conserve mana, and then there are times you have a moment to rebuff. This would make it much easier to know when you actually can rebuff.

Maybe a countdown on the button as well?

Not Yet Complete
-Yellow Cool down button status.

REMEMBER: Feedback is important... good bad or not comment all important if you download give feedback

(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!

47
Endless Nights' Script Library / ENs - Subs - OpenEUO MoonGate Subs
« on: April 25, 2011, 08:29:23 PM »
ENs - OpenEUO MoonGate Subs V2

A bunch of subs to facitate 100% moongate movement (not gate spell Facet moongates).

This is a library file as such the code should not be included in your file just reference it at the top of your script (edit the example line below to the location you store your library files at. I store my subs under scripts/ENs-subs, you can store their as well to make it easier to use my stuff if you wish. )

Moongates/Facets are named the same as in Game, _ represents a space... so 'Ter_Mur' not 'Ter Mur'.  The Sub will return true/false depending on weather the moongate action worked. It knows if you succeeded or failed because it knowns the landing spot for all gates/facets.  You might of failed due to lag or becuase you cannot access that part of the game world with that account.

Stand near a moongate and run below for an example of its simplicity and power and speed.

Code: [Select]
dofile(getinstalldir()..'scripts/ENs-Subs/ENs_Subs_MoonGates.Lua') -- run once at top of script

 local result = EN.MoonGate.Use('Malas','Luna')   -- facet, gatename
 if result then print('success') else print('failed') end
 wait(1000)
 local result = EN.MoonGate.Use('Malas','Umbra')  
 if result then print('success') else print('failed') end

Dont care about error checking then
Code: [Select]
dofile(getinstalldir()..'scripts/ENs-Subs/ENs_Subs_MoonGates.Lua') -- run once at top of script

EN.MoonGate.Use('Malas','Luna')
wait(1000) - 1sec
EN.MoonGate.Use('Malas','Umbra')


Enjoy...

48
If you have comments about a specific script if possible please post that in the scripts actual thread. Also if its about Elite/private library scripts probably best to post their if you have access.

If you have comments about my Misc Snippets thread you have come to the correct place... or any other comments, thanks, suggestions, notes, critisms, hatemail, doodas about or related to EN, ENs Scripts then please feel free to post it here.

Many thanks
EN aka JosephAJ

49
ENs - Magencia Housing Lottery Ticket Buyer
v3 - Ultra Lazy Edition


Edit the header block (defaults below), Start the script by standing at ANY moongate.  You can only buy 1 ticket on each Facet (tram/fel)  for Northern + eastern sites .. but as many as you want for Southern Sites.  see map..  . Script will automatically moongate to fel/tram to get tickets.

Code: [Select]
set %ReturnToMoongateWhenDone #true
set %ReturnToLunaWhenDone #True

; TRAM
Set %TRAM_BuyNorthernTickets   #true
set %TRAM_BuySouthernTickets   #true
set %TRAM_BuySouthernTicketQuantity  1 ; number per house  to buy

; FEL
Set %FEL_BuyNorthernTickets   #true
set %FEL_BuySouthernTickets   #true
set %FEL_BuySouthernTicketQuantity  1 ; number per house  to buy

set %WaitTime1 7   ; increase for laggy conditions
set %WaitTime2 4

Enjoy.   Please leave a comment.

WARNING: THIS SCRIPT CONTAINS RAILS THAT FOLLOW A SPECIFIC PATH AND THUS ARE VERY OBVIOUS. PLEASE RUN ATTENDED.

50
Modded OpenEUO Interface (GUI)  by EN.
Version 12.1


Download and replace all 4 files stored in OpenEUO  GUI  subdirectory (all in attached zip)
    Menu.lua,main.lua, instances.lua, Layout.lua
Download and install the additional icons needed in GUI\Icons  subdirectory (all in attached zip)
   Saveall.ico, undo.ico, stepinto,ico, stepover.ico, stepout.ico

All Modded Lines either:
   a) start in --**EN if original line is commented out
   b) end in --**EN if a new line is added.
   c) Startin --**EN Block Begin ,  End in **EN Block End for large blocks of code
Note: No lines are modded they are either commented out or added (Added lines are sometimes modded version of line above commented out)

New Features/Addons
ABOUT BOX
- About box accessed from Help-about menu option, modded to include version of GUI mods installed.

UOXL SWAP - function on toolbar and menu. NOTE LIMITATIONS.
- Added Toolbar Icon
- Added Menu Option (under control)
- Added StatusBar caption  OnClient  x:y
- Allows USER to swap the Client the script will be run against. Prior to starting the script.
- Remembers the Client set for each tab and auto swaps when tab changes
- This works by adapting Cheffs method of inserting a line (UO.CliNr = 1 ) at top of copy of script to execute on start button press.
- When a new tab is created it is default set to the same Client as the last active tab.
- If you do a swap with the script is running nothing will happen. Stop the script and start it again it will now start in that client.
- LIMITATION: Once a script is running this function does not affect the working space of the script.
- LIMITATION: If a script while running internally (UO.CliNr = ??) changes its client space this change is not reflected in the UOVAR panel displayed, or on the Statusbar.

FAVORITES MENU
- Add A Favorite - Allows you to add scripts to the favorites menu
- Select a item in the favorites menu and it gets loaded
- Max 25 Favorite Entries
- Favorite file details are storted in gui/favorites.cfg
- To remove Favorite entries edit above file.

RE-OPEN MENU
- Stores name of last 15 files open in last open order
- stores list in gui/reopen.cfg


Auto Backup
Auto saves all open files (if changed) every 3mins with .bak extension

Script Analysis
- Script Function list - with click move to function in script.

MENU Changes/Additions
- UOXL SWAP as above
- added close all to popup menu
- Wiki  Menu Option  (11 links)
- Tutorial Menu Option  (16 links)
- Code/Librarys Menu Option (30 links)
- Favorites Menu Option As Above
- ReOpen Menu Option As Above
- Goto -- Goto function - moves to line number entered (on menu and popup menu)
- Saves All - saves all open files - code donate by Ximan / VilsonFarias
- Find and Replace Functions: Find, FindNext,  Replace   (replace all)
- Exit/close/Close all now checks for unsaved data before closing

TOOLBAR Changes/Additions
Added missing toolbar menu options from EUOX and added Control Icons.

Additional
Menu and toolbar options set to contect sensitive
Save/save as/cut/paste/delete/copy

(Reference material WebLinks to easyuo.com, Scriptuo.com, LuaUsers.Org)


UPDATE INSTRUCTIONS FOR NEW VERSIONS OF OPENEUO
 All updates todate have not included any modifications in the GUI files besides the version number. Thierfor you do not need to change anything except the version number located in the top of menu.lua.  Personally I don't even bother with that.  At some point in time this will no longer be true and you might need to download a new version once I have updated.
So For now OpenEUO runs just fine without overwritting the modded files on every update.


ALL my Normal Licensing blabla Applies... Comment welcome.

EN's AKA JosephAJ  OpenEUO Scripts/Librarys/Projects
ENs OpenEUO Buff/Debuff Bar Scanner
EN's EUO2LUA Converter
EN's OpenEUO Modded Inferface (MODGUI)

51
Off Topic / Ok im sick of cable...
« on: February 22, 2011, 01:38:38 PM »
Im sick of being ripped a new one by my sole cable provider. Where i live i seem to have  no options but Atlantic Broadband... basically for both TV and internet.... 

Anyone know of any decent alternatives to cable... the satellite companies seem to want a 2 year term which  at this point i'm not keen on.  I'm looking for internet tv options.... Are thier any real ones yet.  that let you subscribe to just the channels u want.

What is everyone else doing... ive got 2 kids so once the cable cord is cut thier might be some issues over lack of cartoon network/disney.



52
General UO Chat / Fire Beetle.
« on: November 02, 2010, 02:56:47 PM »
Stupid question probably...   

What is the easist way to resurrect a fire beetle using the mininum of skill points ? (what skills needed)

54
EN's EUO2LUA Converter
I have been working on this script since shortly after Cheffe killed EUO, prior to resurrection.  It has helped me learn alot about LUA and alot about EUO !!!

About this script:
Converts EUO script into LUA script.  The resulting script needs 'ENs_EUOCommandsLibrary.Lua'. Thier are of course limitations, not everything is convertable. The main issues that are unconvertable via automated processes at this time are:
 - gotos and goto lables.
 - execute
 - Continue
The Script output needs to be examined.. a number of commands are now obsolete or unconvertable, after conversion search for --ERROR: for known issues and examine the script in general for correctness. (Many features of EUO although converted can be better written in native LUA - the Library file just allows for automated conversion not nessacarily the best way to structure your code.. but only a human can make those decisions.)
 
How To Use:
Edit the last line of the script, repalceing the dummy filename with the filename of the script you want transalted (instructions in script). The transalted script will have the same name with the addition of .LUA

What it does
- Saves you masses of edit time.(Translates an 8500 line script in under 15 seconds.)
- Produces real lua code that will run  (exceptions below)
- Converts all EUO commands and variables except listed below.
- Converts EUO wait times to LUA wait times. (*50)
- Auto fixes split lines (+)
- Auto adjustment for code after a condtion not in a code block{}, ie a single line.  Commands applies to IF,For,While, CMPPIX,OnHotKEy (Does not fixed nested bad blocks.. ie if x=y  if x=z if x=q  set x=0 but EUO didnt function correctly on this anyway.
- Moves code pre first function definition to buttom of script
- Add comment blocks for library includes, function definitions and script body
- Correctly translates multi-return subs.
- * Vars translated as  setatom, getatom (Not as registry entries)- under assumption that this is mainly used for inter-script communication. (note no persistence)
- ERROR marks goto statments so you can manually fix (GOTO GotoLabels:).
- Removal of final (function end) returns that have no return value.
- Automatic conversion of non-numeric data to strings.

NOTES/TODO List
NO OpenEUO Equivalents Commands: Probable Obsoleteness to be determined by Cheffe
   shutDown, execute, Menu HideEUO, PLAYCD, STOPCD, #LPC, LinesPerCycle
CURRENTLY NOn-functional until Cheffe implements commands:(empty library functions created)
   EUO_Send, EUO_Sound, EUO_UOXLNew
No OpenEUO Equivalent Vars: Initializied in Library but hold no real meaning.(EUO_varname)
   #CurPath, #PathSCR, #PathLIB, #PathTMP, #PathEXE, #PathDAT, #OPTS, #OSVer, #EUOVer
ENs EUO Command Library--unCompleted functions
  #findmod, EUO_NameSpace(6 Commands), EUO_menu(37 Commands)
Other Issues yet to be addressed:
-processing of    % . !xx      % . test      56 % 78  
-concatination of strings via ,  (not working inside gosub xx dfd , fdfd ,dfd ,dfdf  also
       if "Lower" .. " " .. "Reagent" .. " " .. EUO_In( "Cost", EUO_Property) then
-- Call ... <> dofile  as parameters can be passed thierfor untranslatable.
-set !Parameters     transaltes as Parameters =        should be nil
-repeat .. until .. use of {} inside... this creates an extra end prior to the until.
-no support for if x=y 2
-Every Function is called with EUO_Result = function(), even if the function returns no value.
-Most command Executes used are to store data .. this can be replaced with file handle commands. (execute and echo )
- GOTO exception: if one goto per lable and both reside in the same space as if were - potentially convertable
-examine saving * vars in an ini file .. for reading/writing to make persistent.
- ABS not correcly converting in every scenario  if  abs ( x -y )  results in if math.abs( () x - y )
- issue with finditem translation and "C_ ," translating as "C_",..,
- Test TerminateEUO function for correctly working if UO clients still open.
-DisplayResult - results are in capitals theirfor if #DisRes = yes  .. converts to displayresult = 'yes'  never true as returns 'YES' not 'yes'

Major(Bold)/Minor Beta Testers
SuperSlayer, Dixie Wrecked, Chrome

55
OpenEUO Scripting Chat / OpenEUO, LUA Script Librarys that exist now.
« on: October 15, 2010, 10:18:13 AM »
Below is a list of LUA code librarys to make LUA scripting easier. They exist now and cover nearly all aspects of UO already.
(A repost of an EUO post, updated for Scriptuo Additions.)

Scriptuo Scripting tools  (Mainly TM's, covering Journal, runebook/spellcast, filesystem and many more )
http://www.scriptuo.com/index.php?board=130.0

TMs Menu Conversion
http://www.scriptuo.com/index.php?topic=5811.0

TMs Pathfind sub
http://www.scriptuo.com/index.php?topic=5968.0

warlocke opeuo standard lib 0.1
http://www.easyuo.com/forum/viewtopic.php?t=40412

stuby runebook
http://www.easyuo.com/forum/viewtopic.php?t=44690

stuby journal
http://www.easyuo.com/forum/viewtopic.php?t=44686

stuby datetime
http://www.easyuo.com/forum/viewtopic.php?t=44680

brelix eventmacro wrapper
http://www.easyuo.com/forum/viewtopic.php?t=43953

swift74d follow / attack
http://www.easyuo.com/forum/viewtopic.php?p=366004

boydon converter
http://www.easyuo.com/forum/viewtopic.php?t=41968

boydon waitforsysvars
http://www.easyuo.com/forum/viewtopic.php?t=43417

snicker7 fluentuo object data query
http://www.easyuo.com/forum/viewtopic.php?t=43289&start=0

josephaj buff bar scanner
http://www.easyuo.com/forum/viewtopic.php?t=44636
http://www.scriptuo.com/index.php?topic=6175.0

kal in ex kalocr
http://www.easyuo.com/forum/viewtopic.php?t=43234

kal in ex gethitbarlife
http://www.easyuo.com/forum/viewtopic.php?t=43505

kal in ex journal scanning
http://www.easyuo.com/forum/viewtopic.php?t=43488

56
Arrays arrays array.. in order to use LUA your going to have to understand arrays.  The good news is everyone already knows what an array is they just dont know it.
Imagine a shopping list of things to buy such as
milk
eggs
bacon

Believe it or not but thats a bloody array. Its an array with 3 items (or Elements). Lets call our list/array ShoppingList... now whats the 2nd element/item  eggs .. or shoppinglist[2]

What that carnt be an array .. thats 2 dam easy. Lets turn that into lua  first we create our shopping list emtpy then add elements, then lets print the second item
Code: [Select]
shoppinglist = {}
shoppinglist[1] = 'milk'
shoppinglist[2] = 'eggs'
shoppinglist[3] = 'bacon'

print('2nd item: '..shoppinglist[2])

This can also written in lua be done in a simplular way... Note the  {} start and end of an array definition
Code: [Select]
shoppinglist = { 'Milk' , 'eggs', 'bacon'}
print('2nd item: '..shoppinglist[2])


_____________________________________________________________________
Now lets all be clever clogs... the word Bacon is an array ???!!!!!  You what you say... well it is .. tell me the 3rd letter of the word bacon....  3rd umm letter or did you mean element... well its c either way.  In lua to get an element of a string (array of characters) you have to use a speacil command.
Code: [Select]
print('3rd element of bacon: '..string.sub(shoppinglist[3], 3,3))

_____________________________________________________________________
Ok interesting... but what is a Table.. a table is an array of arrays... ow jimmy now where going crazy.. but wait you already know what an array of arrays is... its your dam schedule...

Monday
   mow lawn
   take out garbage
tue
  pay the bills ow lord
  start on fixing the roof
wed
  drink beer

In Lua
Code: [Select]
MySchedule = {}    -- make an empty table/array
MySchedule[1] = { 'Monday' , 'mow lawn', 'take out garbage' }
MySchedule[2] = { 'tue' ,'pay the bills ow lord',' start on fixing the roof' }
MySchedule[3] = { 'wed','drink beer' }

You could also represent this as
Quote
MySchedule = { { 'Monday' , 'mow lawn', 'take out garbage' } , { 'tue' ,'pay the bills ow lord',' start on fixing the roof' } , { 'wed','drink beer' } }

Now tell me the second thing to do on tue and the 1st thing to do on the third day
Code: [Select]
print('Whats the 2nd item to do on TUe: '..MySchedule[2][3]) -- note 2nd thing is 3rd element in array
print('Whats the 1st item to do on the third day: '..MySchedule[3][2])


_____________________________________________________________________

Now thats arrays/list and tables  (arrays or arrays/lists of lists)  Simplified maybe but the gist of it..
Now to apply to some serious code....

scanitems(visible)   makes a array of Variables of all items found
each element of the array .. contains an list of varialbes that apply to that item found (id id,name, position)
to get each element of the talbe we use UO.getitem(INDEX/element number) and it returns all the values...

Code: [Select]
itemsfoundcount = UO.ScanItems(true) -- visible
local nID,nType,nKind,nContID,nX,nY,nZ,nStack,nRep,nCol = UO.GetItem(5)
print('The fifth item found ID is: ..nID)
 

_____________________________________________________________________
Please leave a comment to let me know if this was usfull or rocket science.

58
Scripting Chat / Location x/y Database/Table
« on: September 21, 2010, 12:55:00 PM »
I am wondering if anyone has a location database/table of UO spots or knows of where one exists...  towns, Dungeons. etc

Ie Luna is   ?? < X > ??   , ?? < y > ??


59
As some of you may know I just got back from an Almost 3 month stay in Europe.  I basically rented a car for this entire Time.   I was extremely lucky to get a Free Upgrade to a nicer than reserved as they didnt have the one I reserved (and they ran out of other automatics). They upgraded me to a brand new 2010 Ford MPV  (multiple people vehicle). It had 0.5miles on the clock.

Very nice little (by us standards) but spacious.  http://www.ford.co.uk/Cars/S-MAX/Overview
Now I did almost 5k milage on this thing and it averaged 44-55mpg  (its not a hybrid but was Deisel)

The point of this message and my question is why is ford not selling this or comparible models to this in the US .. the only 7 seater suv type vehicle for sells in the states get 14-20mpg   !!!! thats a massvie difference  http://www.fordvehicles.com/suvs/explorer/

Interesting the prices are almost idential for the 2 vehicles  20k pounds sterling is approx 30k USD.

This is not the first time i have observed this my Mothers 10year old ford in the UK averages 45mpg .. they actually sell a model of hers in the states that gets average 18mpg when she purchased hers.  the latest models in the states get24-35.. and latest in the uk upto 75mpg  (no hybrids)


It is really bizare... the only explanation i can come up with is that in the UK gassoline costs about $7 a gallon so people are more insistent on feul economy and the US car industry gets kick backs from the gassoline bisness by some means.


What do you think ?

Pages: 1 2 3 [4] 5 6 7