LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   Lua Programming Help (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=50)
-   -   New Warden functions (https://www.lotrointerface.com/forums/showthread.php?t=1634)

MrJackdaw 10-02-2011 01:19 AM

New Warden functions
 
I managed to access the new warden functions yesterday and thought it may be useful to show the code here;

First, set the player and playerattributes;
Code:

Player = Turbine.Gameplay.LocalPlayer.GetInstance()
PlayerAttributes=Player:GetClassAttributes()

Then the listener;
Code:

PlayerAttributes.GambitChanged=function() 
*What you want to happen*
end

PlayerAttributes:GetGambitCount() returns the count of current gambits
PlayerAttributes:GetGambit(i) returns which gambit (fist,shield,spear) is in slot i
PlayerAttributes:GetGambit(PlayerAttributes:GetGam bitCount()) returns the last used gambit - will throw an error if it is zero.

Have fun!

Garan 10-04-2011 04:53 PM

There are also a pair of new events:
MaxGambitCountChanged
GambitChanged

which I think were fired for the Player object, but might have been on the Attributes - I haven't played with it much but they might be useful.


All times are GMT -5. The time now is 06:31 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI