ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Check which house(s) I own and travel to them (https://www.esoui.com/forums/showthread.php?t=7643)

Baertram 02/22/18 05:00 PM

Check which house(s) I own and travel to them
 
Hi,

Is there a way to check which house (s) I own and then put them in a list and travel to them?
Maybe via the collectibles and me Api functions but I was not successful so far.

Any hints /ideas would be helpfull. Thanks.

It's about my account houses, not other players!

Rhyono 02/22/18 05:17 PM

I don't think an easily accessible list of houses exists (since there are gaps in the numbers), so I built my own array of houses. From there, I just ran it in a loop using

Code:

local _,_,_,_,owned = GetCollectibleInfo(GetCollectibleIdForHouse(house_index))

sirinsidiator 02/23/18 03:35 AM

What about the list that is shown in the map menu? it shows all owned houses already, so the game does have some way to do that without a prebuilt list?

Ayantir 02/23/18 04:21 AM

houseId are very clean you should use them as Rhyono said.

For map, it's easily doable too. but take care some evil devs implementing hidden features already altered those functions. You can look in NOTY code if you want.

sirinsidiator 02/23/18 05:38 AM

I use it in EasyTravel and haven't had any complaints so far.

Lua Code:
  1. WORLD_MAP_HOUSES_DATA:RefreshHouseList()
  2.     local houses = WORLD_MAP_HOUSES_DATA:GetHouseList()
  3.     for i = 1, #houses do
  4.         local house = houses[i]
  5.         local name = house.houseName
  6.         self.houseByName[name] = house
  7.         self.houseAutocompleteList[zo_strlower(name)] = name
  8.     end

Lua Code:
  1. JumpHelper:JumpToHouse(house.houseId)

Baertram 02/23/18 10:23 AM

Thx will have a look at this!


All times are GMT -6. The time now is 04:28 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI