1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Greetings Guest!!

    In order to combat SPAM on the forums, all users are required to have a minimum of 2 posts before they can submit links in any post or thread.

    Dismiss Notice

New EC exposed functions

Discussion in 'UO Enhanced Client Discussion' started by Storm, Nov 1, 2012.

  1. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    Cliloc Changes
    Exposed the following functions to LUA for Enhanced Client Custom UI:

    PlaySoundByID()


    Plays a game sound.
    Parameters

    type (int) The type of sound: ambient = 0, action =1
    id (int) The id of the sound file to play
    x (int) The x coordinate of the target location.
    y (int) The y coordinate of the target location.
    z (int) The z coordinate of the target location.
    Returns

    Nil No return value
    Example:

    PlaySoundByID( 1, 23, WindowData.PlayerLocation.x, WindowData.PlayerLocation.y, WindowData.PlayerLocation.z)


    GetDistanceFromPlayer()


    Returns the distance in tiles from the target to the player
    Parameters

    Id(int) The id of the target used to measure distance
    Returns

    distance(number) The numbers of tiles from the player
    Example

    local distanceFromPlayer = GetDistanceFromPlaye(WindowData.CurrentTarget.TargetId)


    GetTerrainType

    Returns the terrain type id on the given coordinates
    Parameters

    x(int) The x coordinate of the target location.
    y(int) The y coordinate of the target location.
    Z(int) The z coordinate of the target location.
    Returns

    type(number) The terrain type id of the tile at the given location.
    Example

    local terrainType = GetTerrainType(WindowData.PlayerLocation.x, WindowData.PlayerLocation.y, WindowData.PlayerLocation.z)
     
  2. Petra Fyde

    Petra Fyde Peerless Chatterbox
    Stratics Veteran Alumni Stratics Legend

    Joined:
    Jan 5, 2001
    Messages:
    30,881
    Likes Received:
    5,164
    But what does it do? Assuming anyone who understands it does anything with it?
     
  3. Pinco

    Pinco UOEC Modder
    Stratics Veteran Stratics Legend

    Joined:
    Jul 25, 2005
    Messages:
    5,673
    Likes Received:
    865
    well this are function that I have requested looooooooong ago, probably they understand why there were needed :p

    oh and the first 2 functions should be improved:
    - the playsound should allow to play mp3/wav
    - the getdistance should accept world/screen coordinates or the usage is really limited...
     
    #3 Pinco, Nov 2, 2012
    Last edited: Nov 2, 2012
  4. lucitus

    lucitus UOEC Modder
    Stratics Veteran

    Joined:
    May 13, 2008
    Messages:
    1,426
    Likes Received:
    45
    The functions are a usefull add, but really fixing the wrong duplicates on screen of monsters or players is more important for me.
     
  5. Storm

    Storm UO Forum Moderator
    Moderator Professional Premium Wiki Moderator Stratics Veteran Stratics Legend

    Joined:
    Mar 18, 2004
    Messages:
    7,469
    Likes Received:
    361
    its a start :)
    I have a question the range check . would this work to check range to target for this like spells or abilities?
     
  6. Pinco

    Pinco UOEC Modder
    Stratics Veteran Stratics Legend

    Joined:
    Jul 25, 2005
    Messages:
    5,673
    Likes Received:
    865
    as I said is too limited... there is no id on the ground target and there is no way to get the coordinates of the point clicked (if they add a version with x y z.
     
    #6 Pinco, Nov 2, 2012
    Last edited: Nov 2, 2012
  7. Dermott of LS

    Dermott of LS UOEC Modder
    Stratics Veteran

    Joined:
    May 12, 2008
    Messages:
    5,320
    Likes Received:
    528
    ...

    I'm not even going to pretend to know about the LUA functions... I've stated before that that portion of UI modding simply confuses the hell out of me.

    However, the comment I want to add is that seeing that in the Patch notes to me is a good sign... a small sign, but a good one. Looks like we MIGHT start seeing something from the devs on the EC which has been needed for FAAAR too long. Also got an alter that Bleak read through and "Liked" my "EC Problems" post (even if it is over 2 years old now) which was a bit of a surprise to come home (from work) to.

    Aside from emptying ore carts/stump/sheep, I've been on a rather extended "break" from UO (playing Diablo 3) but I'm keeping tabs on what's going on in UO's world. I'll be looking forward to the new dye tubs and the SOS/TMap table, but mostly still waiting on the high res update... just tired of having the game look so pixelated on my monitor when it simply could look better regardless of any arguments as to the "style".
     
  8. lucitus

    lucitus UOEC Modder
    Stratics Veteran

    Joined:
    May 13, 2008
    Messages:
    1,426
    Likes Received:
    45
    I would'nt say it is the graphics in General. With KR it was also possible to draw the same textures without this pixelation, so i dont know where the iussues with that are?
     
  9. Pinco

    Pinco UOEC Modder
    Stratics Veteran Stratics Legend

    Joined:
    Jul 25, 2005
    Messages:
    5,673
    Likes Received:
    865
    nice ad about those functions, pity that is a fake since none of them exists :lol:
     
  10. Pinco

    Pinco UOEC Modder
    Stratics Veteran Stratics Legend

    Joined:
    Jul 25, 2005
    Messages:
    5,673
    Likes Received:
    865
    a new patch and their phantomatic new functions still not existing...