Saving quickslot data to table
A little background: I looked at Paulino's code for the Pet Carousel and modified it to make a mount carousel. It was a quick and dirty conversion, and I've never been happy with it fully, since you have to edit the code each time you want to add a mount.
I've been making a few modifications, like being able to scroll forward and backward in the carousel, setting the center slot in the carousel to allow drops, but the thing that just eludes me is the ability to save the data of what is dropped into the carousel and read it back so that people could use it without having to modify code. I just CANNOT seem to wrap my head around the concept and how to write it into my plugin. I've been looking at examples from Travel Window and Wheel, which do similar things to what I want, but as is normal each author writes up the code differently, and even coupled with Lua examples I can find, I'm a bit lost. I'm a dolt when it comes to code, I've done programming before, but generally do not enjoy it much, this however I find more fun, (probably because it's a game that enjoy playing) but still frustrating. Any suggestions, code samples or pointing me to other resources is much appreciated. |
Code:
--Returns a table of the shortcuts in the quickslots. To use, lets say you had a table of quickslots called Geoff and wanted to store the shortcuts in a table called GeoffStore; Code:
GeoffStore=StoreSlots(Geoff) Code:
LoadSlots(Geoff,GeoffStore) |
Thanks, I'll give this a shot. Trying to re-write the plugin now, but probably won't have time to test it until this weekend. I'm also trying to break the code up into several Lua files to make it easier to read, so we'll see how that goes ;)
|
So, another question. If I set a quickslot to allow drops, I drop a skill in there, what saves it?
The method used currently is very manual as shown in the code below: Code:
steeddata = { }; |
So, I'm having an all new, fun problem. I've started to restructure my code and attempt to make notes in each section to get a better idea of what each block of code is doing.
Below is the code that I have currently, which should set up the quickslots (I think LOL) but when I load it into LOTRO the plugin manager shows that it is loaded but I see now window or quickslots. What could I be doing wrong? Code:
import "Turbine.UI"; |
Your mainWindow opacity appears to be 0, making th window housing all the slots to be invisible, which also makes the slots invisible.
|
Strange thing is that it's always been that way even on the original code in Paulino's Pet Carousel, the opacity of the window was set to 0 and it still shows.
Anything else that might cause it in that code? I'll change the opacity and see if it makes a difference when I can next though, thanks for looking at it and the advice, appreciate it! I'm sure I'll have plenty more questions before I'm done. Was almost ready to give up, but just can't let it go until this is working the way I want. |
If what you posted is the whole code block then the opacity might be the issue, I don't have paulinos code in front of me but I believe after initial load he fades up the mainwindow. So if you took just the code that creates the windows and slots but not the cod that fades it up, your window would be invisible.
|
Hrm, maybe this is what was missing, but I'm not sure how it ended up removed from my code. This seems to set the opacity of the window conditionally based on mouse over or the always hide attribute being set:
Code:
mainWindow.MouseEnter = function( sender, args ) |
All times are GMT -5. The time now is 12:23 PM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI