WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   I'd like to integrate a python script into an addon (https://www.wowinterface.com/forums/showthread.php?t=58561)

cheesewiz 01-22-21 07:45 PM

delete please
 
solved, figured out how to do it

Fizzlemizz 01-23-21 09:14 AM

In short, you don't.

The game reads information from the various SavedVariables files for addons when your character logs in. After that, the files aren't used until your character logs out or you /reload at which time all the files are overwritten with what is currently "in-game".

Because of this you can't usefully write to the files while playing.

Xrystal 01-23-21 09:49 AM

The only problem your request has is getting the data into the game automatically, as Fizzle explained this isn't possible. But it doesn't stop you from manually adding items into an addon that creates a list ( table ) that it uses to do what you want it to do.

Suggested Avenue:
a) Outside of game your python script is doing its stuff and lets you know what you need to know
b) You then manually put that information into the addon that has a section that handles storing of information for using later.
c) Another routine in the same addon, then uses that information to handle the auction house tasks


As to your numerated queries
1) You may be able to target someone nearby by name using /target in a macro, otherwise, you may have to target them manually.
2) Your addon can have a button on it that using a keybinding can call a function that starts the search functionality you want and addons are allowed to do.
3) How lightweight it will be I don't know but whether you are scanning for one or more item types you will likely be scanning the auction house to get the information you need.


How you would go about this in more detail I can't help you with as I only briefly looked at the auction house system as I don't need to customize how that part of the game works.

Seerah 01-23-21 01:18 PM

How exactly is your Python script getting this information?

Fizzlemizz 01-23-21 03:53 PM

I think we're talking about Blizzards external APIs

As far as I can tell, you can't post auctions just view current auctions.

The script could probably output to a table in a SavedVariables file but you would still have to log into the game to post anything. I've never really looked into it so...

Fizzlemizz 01-23-21 11:11 PM

As in posting a buy order?

It doesn't seem from the documentation that there is any method to alter information on the server. That has to be done in game which uses Lua, not python.

sezz 01-24-21 04:18 PM

Quote:

Originally Posted by Fizzlemizz (Post 338367)
As in posting a buy order?

It doesn't seem from the documentation that there is any method to alter information on the server. That has to be done in game which uses Lua, not python.

When the python script finds item X on server Y for a price less then Z it creates/updates a shopping list in [not yet existing addon's] SavedVariables lua -> we don't need to care about this.

So basically he has a table containing the items he wants to buy (up to a maximum price) and is looking for a solution to do so using lua by pressing a button multiple times.

(At least that's how I understand it. Sound totally possible for me, but I haven't played around with the "new" ingame AH API yet.)

cheesewiz 03-18-21 01:21 PM

problem solved, delete please.

Ketho 03-18-21 07:57 PM

Quote:

Originally Posted by cheesewiz (Post 338350)
solved, figured out how to do it


Weird how people just remove their question when they solve it


All times are GMT -6. The time now is 07:57 AM.

vBulletin © 2021, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI