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 - TrailMyx

Pages: 1 ... 6 7 [8] 9 10 ... 25
106
Off Topic / That's it, the comet must be coming!
« on: February 12, 2011, 11:43:39 AM »
Received this from Amazon today!

Quote from: Amazon
Hello from Amazon.com,

We are writing to you today because you purchased a pre-order copy of Duke Nukem Forever.

We are now able to offer Release-Date Delivery for this video game.  This special delivery option is available to you free of charge and has been automatically applied to your order.  Your copy of Duke Nukem Forever will arrive on 3-May-11.

Thank you for shopping at Amazon.com.

Sincerely,

Customer Service Department
Amazon.com
http://www.amazon.com

Please note: this e-mail was sent from a notification-only address that cannot accept incoming e-mail. Please do not reply to this message.

107
Site News / 60,000th post
« on: February 09, 2011, 01:46:51 PM »
Congratulations to Khameleon for that.  What does he win?  Not a thing other than my thanks.

109
Rift / Screenshots from RIFT
« on: February 05, 2011, 11:49:17 AM »
Probably not supposed to be posting these, but alas I don't listen very well.  Beautiful looking game so far.

110
Off Topic / Post your pet pics!
« on: January 29, 2011, 10:25:25 AM »
Here's my creatures...

111
Site Scripter Libraries / How do I get a script library?
« on: January 02, 2011, 09:34:33 PM »
Update! 11/5/2011
We are no longer accepting requests for scripter sections.
-----------------------------------------------------------

Ok, so one of the most common PMs I get is how to get your own script library.  Honestly, it's hard - very hard.  We look for people who are VERY active on the site and have several published scripts.  

So if you can't count your released scripts on 2 hands, and you don't have at least one script that has more than 100 downloads with constant support, you should probably not even request a section.  It's a pain to set up the rights to maintain the individual libraries for me, so we do require some pretty intensive participation.  If you have any questions, please take a look at the individuals who currently have sections.  Know that if you are participating at the above level, you probably won't even have to ask.  ;)

Hopefully this will help explain the #1 PM I get and perhaps will clean out my incoming PM inbox.  heh.

Also, having a script section is a privilege, so you must maintain it.  If for some reason you remove your scripts or violate the site rules in any way, your privilege will come under review.

112
Scripting tools / TrailMyx's CraftMenu Sub
« on: October 26, 2010, 10:34:38 PM »
Code: [Select]
---------------------------------------------------------------
-- Script Name: TrailMyx's CraftMenu control for OEUO
-- Author: TrailMyx
-- Version: v3
-- Shard OSI / FS: unk
-- Revision Date: 10/25/2010
-- Purpose: Collection of routines to help the scripter automate UO
--
--          TM_CraftMenu
--            Arg1 = expected gump size
--            Arg2 = tool findtype
--            Arg3 = receipe string
--            Example: TM_CraftMenu("530_497", "HAG", "c10-s1-m1-p1-x") -- gumpsize, tool, receipe
--              HAG = sewing kit, gump size = 530_497
--              Receipe = c10 (category) = Female Armor
--                        s1 (Selections) = leather shorts
--                        m1 = 1st material selection (normal leather)
--                        p1 = 1st page (doesn't press next page)
--                        x = close craft gump after creation
--                        l = makes last selection
--
-- Special Thanks:
--
---------------------------------------------------------------

I haven't tested these very much, but if you'd like to give these a try, feel free.

Please note these subs require tm_subs_collection9.lua

113
Scripting tools / TrailMyx's FINDITEM info for OEUO
« on: October 14, 2010, 11:15:55 PM »
These subs return information about a targeted item.  Use Alt-F1 to create the target.  Finditem information appears in the text output.

Spacebar prints the X and Y offsets of the cursor for offset gump clicking.

Please note this requires my Subs Collection

Sample results:

--------------------------------
FINDID = 1122793922, in EUO = QRFANQD
findtype = 5357 in EUO = RVH
findkind = 0
contid = 1122793922
findx = 290
findy = 764
findz = 0
findstack = 1
findrep = 0
findcol = 0
name = A Waterstained SOS
property = Weight: 1 Stone


114
OpenEUO Scripting Chat / 1100 lines into the CLAw port for OEUO
« on: September 21, 2010, 11:43:51 AM »
Only 4100 more to go!!  lol

I will finally be releasing the FULL CLAw to the general population, but you have to use OEUO to use it.  The OEUO version will be based on 0.777 which is unreleased except for Cerveza and it includes unravel scoring.

But the CLAw port has also brought out several additional scripting tools for everyone to use.  This includes file setup save/loading as well as a method to simulate scripts dependent on namespaces without having to re-architect (i.e. the CLAw).

I'll be posting the file I/O stuff soon. 

115
Scripting tools / TrailMyx's Filesystem for OEUO
« on: September 19, 2010, 06:28:11 PM »
Code: [Select]
Script Name: TrailMyx's Filesystem for OEUO
 Author: TrailMyx
 Version: v5
 Shard OSI / FS: sure, why not?
 Revision Date: 9/10/2010
 Purpose: Collection of routines to simulate the namespace functions found in
          the original EasyUO

 Functions:
      New(o) - creates a new namespace object.  You will only need one.
          OEUO example:  myns = TM_NS:New() -- create TM_NS object
          EUO example: none
      RegisterVar(nstype_in, nsname_in,kind_in, var_in) - registers a user specified variable with the filesystem
          nstype_in - "local", "global" or "lua".  "local" & "global" are used for interfacing with existing EUO namespaces as well
                as the TM_namespace manager for Lua. "lua" is used for lua-specific variables.
      Load(filename_in) - loads a specified saved file name.
      Save(filename_out) - saves a specified set of registered variables to a file.

 Special Thanks:

 Beta testers:
 Bug testers:
 
=================================================================
So after a burst of energy on the CLAw for OEUO, I decided I needed to take a few days to work on a good file saving mechanism for OEUO.  If you've used either of my advanced file system or the unpublished TM_NGFS, you'll know there exists a way to save and recall things easily in EUO.

I started to port my advanced file system directly to OEUO, but I thought it would be nice to have a couple features of the NGFS (like registration).  But after working on that a bit, I decided to move it more toward something more generally useful for Lua.

So the new file system will have the best of the worlds of both my file systems, will be able to save/recall information to and from my namespace subroutines (for maximum compatibility) and will allow you to remember data types of the data stored.  Also, you will be able to remember shallow tables to help the saving process.

116
Scripting tools / TrailMyx's Namespace Interface Routines
« on: September 10, 2010, 10:57:00 AM »
Code: [Select]
--[[-------------------------------------------------------------
 Script Name: TrailMyx's Namespace Interface Routines
 Author: TrailMyx
 Version: v7
 Shard OSI / FS: sure, why not?
 Revision Date: 9/10/2010
 Purpose: Collection of routines to simulate the namespace functions found in
          the original EasyUO

 Functions:
      New(o) - creates a new namespace object.  You will only need one.
          OEUO example:  myns = TM_NS:New() -- create TM_NS object
          EUO example: none
      Push() - pushes or "remembers" current nsname and nstype from the stack
          OEUO example:  myns:Push() -- saves nsname and nstype
          EUO example: namespace push
      Pop() - pops or "recalls" the saved nsname and nstype from the stack
          OEUO example: myns:Pop() -- recall last saved nsname and nstype
          EUO example: namespace pop
      Switch(ns_type, ns_name) - sets the current values of nsname and nstype
          OEUO example: myns:Switch("local","ns1")
          EUO example: namespace local ns1
      Exists(ns_type, ns_name) - determines if a namespace exists (true)
          OEUO example: myns:Exists("local","ns1") -- true if exists, otherwise false
          EUO example: no equivalent
      Read(item) - reads a variable from the current namespace
          OEUO example: myns:Read("var1")
          EUO example: !var1
      ReadAbs(ns_type, ns_name, item) - reads a variable from a specified namespace
          OEUO example: myns:Read("global", "ns1", "var1") -- reads "var1" from global:ns1
          EUO example: namespace copy var1 from global ns1 ; careful, overwrites current var1
      Write(item, value) - writes a value to a variable in the current namespace
          OEUO example: myns:Write("var1", 5)
          EUO example: !var = 5
      WriteAbs(ns_type, ns_name, item, value) - writes a writes a value to a variable in a specified namespace
          OEUO example: myns:Write("local", "ns1", "var1", 5)
          EUO example: namespace copy var1 to local ns1
      Clear() - clears the contents of the current namespace
          OEUO example: myns:Clear()
          EUO example: namespace clear
      CopyTo(ns_type, ns_name, item) - copies current namespace values to specified NS
          OEUO example: myns:CopyTo("local", "ns1", "var") -- copies vars starting with "var" to local:ns1
          OEUO example: myns:CopyTo("local", "ns1", "*") -- copies everything to local:ns1
          EUO example: namespace copy var* to local ns1
          EUO example: namespace copy * to local ns1 ; copy everything
      CopyFrom(ns_type, ns_name, item) - copies specific values from namespace to local namespace
          OEUO example: myns:CopyFrom("local", "ns1", "var") -- copies vars starting with "var" from local:ns1
          OEUO example: myns:CopyFrom("local", "ns1", "*") -- copies everything from local:ns1
          EUO example: namespace copy var* from local ns1
          EUO example: namespace copy * from local ns1 ; copy everything
      Match(ns_type, ns_name, item) - creates a table of items that match "item" from specified namespace
          OEUO example: tbl = myns:Match("local", "ns1", "var") -- creates table(tbl) that holds matchs {varname, value}
          EUO example: none
 Special Thanks:

 Beta testers:
 Bug testers:

---------------------------------------------------------------]]

See attached sample code commented out a the bottom.  

This collection of routines gives the scripter much of the same functionality lost when EUO moved to Lua.  Global and Local namespaces are again available.  See the syntax as described in the header.

The lookup process uses indexed tables for exceptional speed.

Note that with the CopyTo and CopyFrom, these are automatically considered wildcard arguments.  Also the argument of "*" can be used to copy EVERYTHING.  If you need to copy just one variable, then use ReadAbs() and WriteAbs()

Also notice that you can copy from local<-->global namespaces with these functions.  Very useful.

117
There's a few people that have learned how nice it is to use namespaces from within EUO to manage data.  Unfortunately, when you try and apply that concept to something similar within OEUO, you tend to find it difficult to port such code.  So I've written a group of routines that roughly mimicks the functionality of namespace operations.  Here's an example:

Code: [Select]
var = TM_NS:New()                      
var:Switch("local","ns1")              
var:Write("var1",5)                    
var:Write("var2",10)                    
var:Write("var3",20)                    
var:Write("vv3",30)      
var:Push()              
var:CopyTo("global","ns2","var") -- just copy everything starting with "var" to global:ns2
                                        
print(var:ReadAbs("global","ns2","var1"))
print(var:ReadAbs("global","ns2","var2"))
print(var:ReadAbs("global","ns2","var3"))
print(var:ReadAbs("global","ns2","vv3"))

results in:

Quote
5
10
20
nil

These routines are very fast since they employ hash table lookup for both the namespace reference as well as the individual namespace data entries.
More to come...

119
OEUO Snippets / TrailMyx's Pathfind sub for OEUO
« on: August 31, 2010, 07:40:47 PM »
Here's a port of the pathfinding sub used in my rail engine.  It's always been pretty basic, but very functional for getting out of blocked conditions in Fel.

Code: [Select]
dofile("tm_subs_collection5.lua")
function TM_Pathfind(xdest, ydest, zdest)
  local max_retry = 3
  local retry = 0
  if UO.CursKind == 0 then
    max_retry = 8
  end
  local complete = false
  while not complete do
    UO.Pathfind(xdest,ydest,zdest)
    local timer = TM_SecondTimer:New{duration = 8}
    local move_again = false
    while not move_again and not complete do
      repeat
        local tempx = math.abs(xdest - UO.CharPosX)
        local tempy = math.abs(ydest - UO.CharPosY)
        local tempz = math.abs(zdest - UO.CharPosZ)
        if (tempx > 1 or tempy > 1 or tempz > 1) and (timer:Check() == false) then
          break
        end
        if (tempx == 1 or tempy == 1) and UO.CursKind == 0 and UO.Stamina ~= UO.MaxStam then
          UO.Move(xdest, ydest, 2, 1000)
          break
        end
        if timer:Check() == true then
          retry = retry + 1
          if retry <= max_retry then
            move_again = true
            break
          end
          return true
        else
          complete = true
          break
        end
      until false
    end
  end
  return false
end
---------------------------------------------------------------
---------------------------------------------------------------
---------------------------------------------------------------
TM_Pathfind(1006,430,-63)
TM_Pathfind(1006,436,-63)
TM_Pathfind(1013,436,-63)
TM_Pathfind(1013,430,-63)
pause()

Note: requires tm_subs_collection5.lua and you need to save this file to a lua file before you run it.  I've also attached the file.

120
Code: [Select]
---------------------------------------------------------------
-- Script Name: TrailMyx's Subroutine Collection
-- Author: TrailMyx
-- Version: v8
-- Shard OSI / FS: unk
-- Revision Date: 9/29/2010
-- Purpose: Collection of routines to help the scripter automate UO
--
--          TM_SecondTimer
--            local timer = TM_SecondTimer:New{duration = 5} -- creates a 5 SECOND non-blocking countdown timer (automatically starts)
--            timer:Start(10) -- restarts existing timer with new time
--            timer:Check() -- returns true if time has expired, false otherwise
--
--          TM_msTimer
--            local timer = TM_msTimer:New{duration = 50} -- creates a 50 MILLISECOND non-blocking countdown timer (automatically starts)
--            timer:Start(500) -- restarts existing timer with new time
--            timer:Check() -- returns true if time has expired, false otherwise

--          TM_IDtoEUO(id) -- converts an OEUO numerical ID value to the classic EUO base-26 text value
--          TM_EUOtoID(str_in) -- converts the classic EUO base-26 item id into an OEUO-compatible numerical ID value
--
--          TM_ItemInfo -- includes all necessary item information as returned by UO.GetItem
--            TM_FindItemsByID(id) -- locates items by ID (either EUO or OEUO format)  Returns count and table of items
--            TM_FindItem(ids, locations, containers, dist, ignore) -- locates multiple IDS/TYPES on either ground or container, and at specific distances
--                                                                     return count(sum of items), stacks(sum of stacks), matches(table of all matching items)
--                                                                     ignore - table of items previously ignored
--
--          TM_GumpWait(c1, c2) -- waits for either gump c1 or gump c2 to pop up within 7 seconds.  Returns true on success
--          TM_GumpWaitAndSize(c1, x, y) -- waits for gump c1 that is size (x,y) within 7 seconds.  Returns true on success
--
--          TM_IgnoreItem(ignore, findid) -- maintains an "ignore" list.  This table can be passed to TM_ItemInfo
--
--          TM_OpenPaperdoll(x,y)
--          TM_OpenStatusBar(x,y)
--          TM_OpenBackPack(x,y)
---------------------------------------------------------------

This is going to be my main subs distribution file for those functions that don't have a specific location.  I will implement a version number query subroutine so that you can make sure you are using the expected version of this file.  Didn't do that yet.

Pages: 1 ... 6 7 [8] 9 10 ... 25