Get an Epic Experience with Premium

RVAPI_Range (RV)

Development Tools Login to Add Favorites
  • 0 Likes
  • Warhammer Online
  • 11 Monthly Downloads
  • Supports: 1.4.0
  • 10,933 Total Downloads
  • Updated 11/24/2010
  • Created 12/06/2009
  • 20 Favorites
  • Project Site
  • Comments
  • Release Type: Release
  • License: MIT License
  • Newest File: v2.03 Release
or
Support development! **
Donate

About RVAPI_Range (RV)

Range finder API. Based on your current abilities and map points.


Globals

RVAPI_Range.Ranges

  • MIN_RANGE: default minimum range
  • MAX_RANGE: default maximum range

RVAPI_Range.RangeType

  • RANGE_TYPE_MAP: output type based on the map information
  • RANGE_TYPE_SPELLS: output type based on the spells information

RVAPI_Range.DelayType*

  • DELAY_EXACT_TIME: ???
  • DELAY_DIFFERENCE_DETECTED: ???

API Functions v2.0

Function name: API_RegisterTarget()
Description: registers target name for tracking distances
Input:

  • CallbackOwner -
  • CallbackFunction -
  • TargetName - target name
  • Delay - delay for an updates
  • DelayType - can be one of the following: DELAY_EXACT_TIME, DELAY_DIFFERENCE_DETECTED
  • UserData - alias for the third party addons data. You can link your additional data (like user number in the group etc.) to this specific target name

Output: nothing

Function name: API_UnregisterTarget()
Description: unregisters target from the "Range API"
Input:

  • CallbackOwner -
  • CallbackFunction -
  • TargetName - target name

Output: nothing

API Functions v1.02

Function name: API_GetRange()
Description: returns MIN and MAX range for the selected friendly/hostile target
Input:

  • targetType - this could be three possible values: GameData.TargetTypes.TARGET_ALLY, GameData.TargetTypes.TARGET_ENEMY and GameData.TargetTypes.TARGET_PET

Output: array of two values

  • RangeMin: minimum range value
  • RangeMax: maximum range value

API Usage Example v2.0

-- : Lets look for some Mailboxes around us and update our records every one second
RVAPI_Range.API_RegisterTarget(MyAddon, MyAddon.OnTargetRangeUpdated, "Mailbox", 1, RVAPI_Range.DelayType.DELAY_EXACT_TIME, nil)


-- : Self: equals to the MyAddon
-- : Distances: array of the found distances. For instance you can find up to three "Mailboxes" in the Altdorf city
-- : RangeType: API is telling us which type of the information we got. This could be one of the following: RANGE_TYPE_MAP, RANGE_TYPE_SPELLS
-- : UserData: alias information related to this target. Defined by the third party addons.
function MyAddon.OnTargetRangeUpdated(Self, Distances, RangeType, UserData)

    -- : show the first found range in the debug window
    d(Distances[1].RangeMin..":"..Distances[1].RangeMax)
end
v2.03 Release 1. RVAPI_Range should gather distances information on-demand now

Comments

Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Infinite Crisis NA

Get Your Preferred Access Code!