Open the skill frame:
Code: Select all
/script SkillLevelUpFrame:Show();
One can set options of a frame like:
Code: Select all
/script SkillLevelUpFrame:SetAnchor("LEFT","LEFT","UIParent" ,0,200);
Code: Select all
SkillLevelUpFrameMax_OnClick()
Code: Select all
/script SkillLevelUpFrame:Show();
Code: Select all
/script SkillLevelUpFrame:SetAnchor("LEFT","LEFT","UIParent" ,0,200);
Code: Select all
SkillLevelUpFrameMax_OnClick()
Code: Select all
gSkillFrame = {};
DF_MAXLINE_SKILLBOOK = 5;
DF_MAXPAGESKILL_SKILLBOOK = 10;
DF_SkillType_Common = 1;
DF_SkillType_MainJob = 2;
DF_SkillType_SubJob = 3;
DF_SkillType_SP = 4;
DF_SkillType_Pet = 5;
StaticPopupDialogs["SET_SPELLPOINT"] = {
text = DF_STR_SKILLBOOK_ADDSKILLLV,
button1 = ACCEPT,
button2 = CANCEL,
OnAccept =
function(this)
gSkillFrame.frame:Enable();
SetSpellPoint( gSkillFrame.type, gSkillFrame.SelectID )
end,
OnCancel =
function( this )
--local text = StaticPopup_GetEditText( this );
--AddFriend( text );
gSkillFrame.frame:Enable();
end,
OnShow =
function(this)
gSkillFrame.frame:Disable();
end,
timeout = 0,
hideOnEscape = 1
};
function OnLoad_SkillBook( this )
gSkillFrame.frame = this;
gSkillFrame.type = 1;
gSkillFrame.page = 1;
gSkillFrame.tab = nil;
gSkillFrame.Select = nil;
gSkillFrame.SelectID = 0;
gSkillFrame.index = nil;
--gSkillFrame.unlearn = false; --§Þ¯à ¥¼²ß±o
this:RegisterEvent( "SKILL_UPDATE" );
this:RegisterEvent( "TP_EXP_UPDATE" );
this:RegisterEvent( "VARIABLES_LOADED" );
this:RegisterEvent( "PLAYER_INVENTORY_CHANGED" );
this:RegisterEvent( "PLAYER_LEVEL_UP" );
end
DF_SkillBook_Tab_Format = "interface\\SkillBook\\tab_skill_%s" ;
------------------------------------------------------------------------
function SkillBook_ResetTab()
local VocID, VocName = GetVocInfo();
local VocSubID, VocSubName = GetVocSubInfo();
local ClassToken, SubClassToken = UnitClassToken( "player" );
if ( not ClassToken ) then
return;
end
local tabTypes = {};
--¤½¥Î§Þ¯Ã
table.insert( tabTypes, DF_SkillType_Common );
--¥D¾
table.insert( tabTypes, DF_SkillType_MainJob );
--°Æ¾
if( VocSubID ~= -1 )then
table.insert( tabTypes, DF_SkillType_SubJob );
end
--±MÄÃ
table.insert( tabTypes, DF_SkillType_SP );
--Ãdª«
if( GetNumSkill( DF_SkillType_Pet ) > 0 )then
table.insert( tabTypes, DF_SkillType_Pet );
end
local tabObj;
for i=1,5,1 do
tabObj = getglobal( gSkillFrame.frame:GetName() .. "Tab" .. i );
SkillTab_SetActiveState( tabObj, false );
tabObj:SetID( i );
if( tabTypes[i] )then
tabObj:Show();
tabObj.type = tabTypes[i];
if( tabObj.type == DF_SkillType_Common )then
PanelTemplates_IconTabInit( tabObj, string.format( DF_SkillBook_Tab_Format , "common" ) , TEXT("SKILLBOOK_TAB_NORMAL") );
elseif( tabObj.type == DF_SkillType_MainJob )then
PanelTemplates_IconTabInit( tabObj, string.format( DF_SkillBook_Tab_Format , ClassToken ) , VocName );
elseif( tabObj.type == DF_SkillType_SubJob )then
PanelTemplates_IconTabInit( tabObj, string.format( DF_SkillBook_Tab_Format , SubClassToken ) , VocSubName );
elseif( tabObj.type == DF_SkillType_SP )then
PanelTemplates_IconTabInit( tabObj, string.format( DF_SkillBook_Tab_Format , ClassToken ) .. "_sole" , string.format( CLASS_ONLY , VocName ) );
elseif( tabObj.type == DF_SkillType_Pet )then
PanelTemplates_IconTabInit( tabObj, string.format( DF_SkillBook_Tab_Format , "pet" ), TEXT("SKILLBOOK_TAB_PET") );
end
else
tabObj.type = -1;
tabObj:Hide();
end
end
PanelTemplates_SetNumTabs( gSkillFrame.frame, table.getn( tabTypes ) );
-- Àˬd¬O§_¦³°Æ¾, ¨Ã³]©w¶ñ
if( gSkillFrame.tab == nil or
gSkillFrame.tab.type == -1 or
gSkillFrame.type ~= gSkillFrame.tab.type ) then
gSkillFrame.tab = getglobal( gSkillFrame.frame:GetName() .. "Tab" .. 1 );
gSkillFrame.type = gSkillFrame.tab.type;
end
PanelTemplates_SetTab( gSkillFrame.frame, gSkillFrame.tab:GetID() );
end
------------------------------------------------------------------------
function OnShow_Lua_SkillBook( this )
Lua_Reset_SkillBook( this );
CharacterSkillPointButton:Hide();
end
------------------------------------------------------------------------
function OnEvent_Lua_SkillBook( this, event )
if( event == "SKILL_UPDATE" ) then
Lua_Reset_SkillBook( this );
elseif( event == "TP_EXP_UPDATE" ) then
Lua_Reset_SkillBook( this );
elseif( event == "VARIABLES_LOADED" ) then
Lua_Reset_SkillBook( this );
elseif( event == "PLAYER_INVENTORY_CHANGED" ) then
Lua_Reset_SkillBook( this );
elseif( event == "EXCHANGECLASS_SUCCESS" ) then
gSkillFrame.tab = nil;
Lua_Reset_SkillBook( this );
elseif ( event == "PLAYER_LEVEL_UP" ) then
if ( not this:IsVisible() ) then
CharacterSkillPointButton:Show();
end
end
end
------------------------------------------------------------------------
function OnClick_Lua_SkillButton( ButtonID )
-- ScrollBar ¤¸¥ó¨Ã¤£¦s¦b,À³¸ÓµLªk°õ¦æ
local _Scroll = getglobal( gSkillFrame.frame:GetName() .. "ScrollBar" );
--local iPos = UIScrollBar_GetValue( _Scroll );
--local iIndex = ( iPos * 2 ) + ID;
local iIndex = ( gSkillFrame.page - 1 ) * DF_MAXPAGESKILL_SKILLBOOK + ButtonID;
--link
if( IsShiftKeyDown() ) then
link = GetSkillHyperLink( gSkillFrame.type, iIndex );
ChatEdit_AddItemLink( link );
return;
end
UseSkill( gSkillFrame.type, iIndex );
end
------------------------------------------------------------------------
function OnDoubleClick_SkillInfoButton( this, key, ButtonID )
local _UpButton = getglobal( gSkillFrame.frame:GetName() .. "UpButton" );
local Select = getglobal( this:GetName() .. "Select" );
local Highlight = getglobal( this:GetName() .. "Highlight" );
local iIndex = ( gSkillFrame.page - 1 ) * DF_MAXPAGESKILL_SKILLBOOK + ButtonID;
if( gSkillFrame.Select ) then
gSkillFrame.Select:Hide();
_UpButton:Hide();
end
gSkillFrame.SelectID = iIndex;
if( not this:GetParent().bLearned )then --§Þ¯à ¥¼²ß±o
SendSystemChat( SKILLBOOK_SKILL_UNLEARN );
return;
end
Select:Show();
Highlight:Hide();
gSkillFrame.Select = Select;
if( gSkillFrame.type == 3 ) then -- °Æ¾µLªk°tÂI
SendSystemChat( SKILLBOOK_SUB_JOD_CANT_LEVELUP );
return;
end
if( this:GetParent().EnableToLV ~= 1 ) then
SendSystemChat( SKILL_LUAMSG_REACH_PLV_LIMIT );
return;
end
-- Àˬd³Ñ¾lÂI¼Æ
local _Point = GetTpExp();
local _SkillName, _SkillLV, _IconPath, _Mode, _PLV, _PPoint, _PTotalPoint, _bLearned = GetSkillDetail( gSkillFrame.type, gSkillFrame.index );
_Point = _Point + _PPoint ;
if( _Point < _PTotalPoint )then
_UpButton:Hide();
SendSystemChat( SKILL_LUAMSG_NOTPPOINT );
return;
end
_UpButton:Show();
SkillBook_SetSkillPoint();
end
------------------------------------------------------------------------
function OnClick_Lua_SkillInfoButton( this, key, ButtonID )
local _UpButton = getglobal( gSkillFrame.frame:GetName() .. "UpButton" );
local Select = getglobal( this:GetName() .. "Select" );
local Highlight = getglobal( this:GetName() .. "Highlight" );
local iIndex = ( gSkillFrame.page - 1 ) * DF_MAXPAGESKILL_SKILLBOOK + ButtonID;
if( iIndex == gSkillFrame.SelectID )then
return;
end
if( gSkillFrame.Select ) then
gSkillFrame.Select:Hide();
_UpButton:Hide();
end
gSkillFrame.SelectID = iIndex;
--link
if( IsShiftKeyDown() ) then
link = GetSkillHyperLink( gSkillFrame.type, iIndex );
ChatEdit_AddItemLink( link );
return;
end
if( not this:GetParent().bLearned )then --§Þ¯à ¥¼²ß±o
SendSystemChat( SKILLBOOK_SKILL_UNLEARN );
return;
end
Select:Show();
Highlight:Hide();
gSkillFrame.Select = Select;
if( gSkillFrame.type == 3 ) then -- °Æ¾µLªk°tÂI
SendSystemChat( SKILLBOOK_SUB_JOD_CANT_LEVELUP );
return;
end
if( this:GetParent().EnableToLV ~= 1 ) then
--SendSystemChat( SKILL_LUAMSG_REACH_PLV_LIMIT );
return;
end
-- Àˬd³Ñ¾lÂI¼Æ
local _Point = GetTpExp();
local _SkillName, _SkillLV, _IconPath, _Mode, _PLV, _PPoint, _PTotalPoint, _bLearned = GetSkillDetail( gSkillFrame.type, gSkillFrame.index );
_Point = _Point + _PPoint ;
if( _Point < _PTotalPoint )then
_UpButton:Hide();
SendSystemChat( SKILL_LUAMSG_NOTPPOINT );
return;
end
_UpButton:Show();
end
------------------------------------------------------------------------
function SkillBook_SetSkillPoint()
local _Point = GetTpExp();
local _SkillName, _SkillLV, _IconPath, _Mode, _PLV, _PPoint, _PTotalPoint = GetSkillDetail( gSkillFrame.type, gSkillFrame.SelectID );
local _PointToLV = _PTotalPoint - _PPoint;
if( _Point ~= 0 ) then
if( _PointToLV <= _Point ) then
-- Level up
--local string = "§A½T©w±N" .. _SkillName .. " ( Rank ".. _SkillLV .. " ) " .. "´£¤É¦Ü«Â¤Oµ¥¯Å " .. ( _PLV + 1 ) .. "¡H" .. "¦¹¦¸¤É¯Å±Nªá¶O " .. _PointToLV .. " TP";
--local string = string.format( SKILLBOOK_STR_SETSKILLPOINT, _SkillName, _SkillLV, _PLV, _PointToLV );
--StaticPopupDialogs["SET_SPELLPOINT"].text = string
--StaticPopup_Show( "SET_SPELLPOINT" );
--SetSpellPoint( gSkillFrame.type, gSkillFrame.SelectID );
SkillLevelUpFrame_Open( gSkillFrame.type, gSkillFrame.SelectID );
else
-- Set Point
--local string = "§A½T©w±N " .. _Point .. " TP °t¸m¨ì " .. _SkillName .. " ( Rank ".. _SkillLV .. " )";
--local string = string.format( SKILLBOOK_STR_SETSKILLPOINT2, _Point, _SkillName, _SkillLV );
--StaticPopupDialogs["SET_SPELLPOINT"].text = string
--StaticPopup_Show( "SET_SPELLPOINT" );
--SetSpellPoint( gSkillFrame.type, gSkillFrame.SelectID );
SkillLevelUpFrame_Open( gSkillFrame.type, gSkillFrame.SelectID );
end
end
end
------------------------------------------------------------------------
function Lua_Reset_SkillBook( this )
if( not this:IsVisible() )then
return;
end
local _FrameName = this:GetName();
local _PageBar = getglobal( _FrameName .. "PageBar" );
local _LeftPage = getglobal( _PageBar:GetName() .. "LeftPage" );
local _RightPage = getglobal( _PageBar:GetName() .. "RightPage" );
local _Page = getglobal( _PageBar:GetName() .. "Page" );
local _TotalPowerPoint = getglobal( _FrameName .. "TotalValue" );
local _UpButton = getglobal( gSkillFrame.frame:GetName() .. "UpButton" );
local _PointFlashButton = getglobal( _FrameName .. "PointFlashButton" );
if( gSkillFrame.Select ~= nil ) then
gSkillFrame.Select:Hide();
_UpButton:Hide();
gSkillFrame.Select = nil;
gSkillFrame.SelectID = nil;
end
SkillBook_ResetTab();
local powerPoint = GetTpExp();
_TotalPowerPoint:SetText( powerPoint );
if ( powerPoint == 0 ) then
_PointFlashButton:Hide();
else
_PointFlashButton:Show();
end
local _TotalSkill = GetNumSkill( gSkillFrame.type );
-- ³]©w _ScrollSlider ³Ì¤j¶q
local _TotalPage = math.floor( ( _TotalSkill / DF_MAXPAGESKILL_SKILLBOOK ) );
if( math.mod( _TotalSkill , DF_MAXPAGESKILL_SKILLBOOK ) ~= 0 ) then
_TotalPage = _TotalPage + 1;
end
if( _TotalPage > 1 ) then
_PageBar:Show();
else
_PageBar:Hide();
end
if( gSkillFrame.page > _TotalPage ) then
gSkillFrame.page = 1;
end
if( gSkillFrame.page == 1 ) then
_LeftPage:Hide();
else
_LeftPage:Show();
end
if( gSkillFrame.page == _TotalPage ) then
_RightPage:Hide();
else
_RightPage:Show();
end
_Page:SetText( gSkillFrame.page .. " / " .. _TotalPage );
-- Àˬd¤ÎÂ×¥¿ pos ¥¿½T¦ì¸m
-- ¨ú±o¸Ó¶±§Þ¯à ¼Æ¶q
local _Begin = ( gSkillFrame.page - 1 ) * DF_MAXPAGESKILL_SKILLBOOK;
local _End = _Begin + ( DF_MAXLINE_SKILLBOOK * 2 ) - 1;
for i = _Begin, _End, 1 do
local _Index = i - _Begin + 1;
local _ButtonName = _FrameName .. "_SkillButton_" .. _Index;
local _Button = getglobal( _ButtonName );
--local _NextValueTitle = getglobal( _ButtonName .. "PointStatusBar" .. "Next" );
local _NextValueBar = getglobal( _ButtonName .. "PointStatusBar" );
local _SkillName, _SkillLV, _IconPath, _Mode, _PLV, _PPoint, _PTotalPoint, _EnableToLV, _bLearned = GetSkillDetail( gSkillFrame.type, ( i + 1 ) );
if( _SkillName ) then
if( _bLearned )then
local duration, remaining = GetSkillCooldown( gSkillFrame.type, ( i + 1 ) );
SkillBook_SetSkillButton( _Button, _IconPath, _SkillName, _SkillLV, _PLV, _PPoint, _PTotalPoint, _Mode, _EnableToLV, duration, remaining, _bLearned );
else
SkillBook_SetSkillButton( _Button, _IconPath, _SkillName, _SkillLV, nil, nil, nil, nil, nil, 0, 0, _bLearned );
end
else
SkillBook_SetSkillButton( _Button, nil, nil, nil, nil, nil, nil, nil, nil, 0, 0, nil );
end
end
end
------------------------------------------------------------------------
function SkillBook_SetSkillButton( _Button, _IconPath, _SkillName, _Lv, _Plv, _Point, _TotalPoint, _Mode, _EnableToLV, _duration, _remaining, _bLearned )
-- ³]©w«ö¶s¸ê®Æ
--local _SkillButton = getglobal( _ButtonName .. "_SkillButton" );
local _ButtonName = _Button:GetName();
local _SkillInfoName = _ButtonName .. "_SkillInfo";
local _ItemButton = getglobal( _ButtonName .. "ItemButton" );
local _Name = getglobal( _SkillInfoName .. "_Name" );
local _LV = getglobal( _SkillInfoName .. "_LV" );
local _PowerLV = getglobal( _ButtonName .. "PowerLV" );
local _StatusBar = getglobal( _ButtonName .. "PointStatusBar" );
local _NextValue = getglobal( _ButtonName .. "PointStatusBar" .. "NextValue" );
local _NextValueTitle = getglobal( _ButtonName .. "PointStatusBar" .. "Next" );
local _PowerIcon = getglobal( _ButtonName .. "Icon" );
if( _SkillName ) then
_NextValueTitle:Show();
_Button:Enable();
else
_NextValueTitle:Hide();
_Button:Disable();
end
--local Percent = nil;
local Remain = nil;
if( _EnableToLV == 0 and _Plv == 0 and _Point == 0 and _TotalPoint == 0 )then
_EnableToLV = nil;
_Plv = nil;
_Point = nil;
_TotalPoint = nil;
end
if( _TotalPoint ) then
--Percent = _Point / _TotalPoint;
Remain = _TotalPoint - _Point;
end
SetItemButtonTexture( _ItemButton, _IconPath );
CooldownFrame_SetTime( getglobal(_ItemButton:GetName().."Cooldown"), _duration, _remaining);
getglobal( _ButtonName .. "PointStatusBar" .. "StatusText" ):Hide();
--if( Percent ) then
-- _StatusBar:SetValue( Percent );
--else
-- _StatusBar:SetValue( 0 );
--end
if( Remain ) then
_NextValue:SetText(( _TotalPoint - _Point ));
else
_NextValue:SetText( "" );
end
if( _Lv and _Lv > 0 ) then
_LV:SetText( "Rank " .. _Lv );
_LV:SetColor( 0.9, 0.9, 0.4 );
else
_LV:SetText( "" );
end
if( _Plv ) then
_PowerLV:SetText( _Plv );
_NextValueTitle:Show();
_PowerIcon:Show();
else
_NextValueTitle:Hide();
_PowerLV:SetText( "" );
_PowerIcon:Hide();
end
if( _EnableToLV ) then
_StatusBar:Show();
if( _EnableToLV == 0 ) then
_StatusBar:SetValue( 1 );
_NextValue:SetText( "" );
getglobal( _ButtonName .. "PointStatusBar" .. "Next" ):Hide();
getglobal( _ButtonName .. "PointStatusBar" .. "StatusText" ):Show();
else
_StatusBar:SetValue( _Plv / UnitLevel( "player" ) );
getglobal( _ButtonName .. "PointStatusBar" .. "Next" ):Show();
getglobal( _ButtonName .. "PointStatusBar" .. "StatusText" ):Hide();
end
_StatusBar:Show();
else
_StatusBar:Hide();
end
-- Àˬd¬O§_¦³¨ä¥¦µ¥¯Å¬Û¦Pªk³N
if( _Mode == 0 or _Mode == 1 )then
_Name:SetText( _SkillName );
_Name:SetColor( 1, 1, 1 );
_ItemButton:Enable();
elseif( _Mode == 2 ) then
-- ³Q°Ê§Þ¯à , ±N¦r¦ê³]¨ì¤¤¶¡
_Name:SetColor( 0.1, 0.68, 0.21 );
_Name:SetText( _SkillName );
_ItemButton:Disable();
elseif( _Mode == 100 ) then
_Name:SetText( _SkillName );
_Name:SetColor( 1, 1, 1 );
_ItemButton:Enable();
-- §ðÀ»§Þ¯Ã
--_Name:SetText( _SkillName );
--_Name:SetColor( 1, 1, 1 );
--_ItemButton:Enable();
--_PowerLV:SetText( "" );
--_NextValue:SetText( "" );
--_StatusBar:SetValue( 0 );
--getglobal( _ButtonName .. "PointStatusBar" .. "Next" ):Hide();
--getglobal( _ButtonName .. "PointStatusBar" .. "StatusText" ):Hide();
--_StatusBar:Show();
--_PowerIcon:Hide();
else
_Name:SetText( _SkillName );
_Name:SetColor( 1, 1, 1 );
_ItemButton:Disable();
end
_Button.Mode = _Mode;
_Button.EnableToLV = _EnableToLV;
_Button.bLearned = _bLearned;
_ItemButton.bLearned = _bLearned;
_Button:Show();
if( not _bLearned )then
_ItemButton:Disable();
--_Button:Disable();
_Name:SetColor( 0.5, 0.5, 0.5 );
_LV:SetColor( 0.5, 0.5, 0.5 );
end
end
------------------------------------------------------------------------
function OnEnter_SkillItemButton( this, ButtonID )
local iIndex = ( gSkillFrame.page - 1 ) * DF_MAXPAGESKILL_SKILLBOOK + ButtonID;
GameTooltip:SetOwner(this:GetParent(), "ANCHOR_RIGHT", 10, 0);
GameTooltip:SetSkillItem( gSkillFrame.type, iIndex );
gSkillFrame.index = iIndex;
end
------------------------------------------------------------------------
function OnEnter_SkillButton( this, ButtonID )
--local _Scroll = getglobal( gSkillFrame.frame:GetName() .. "ScrollBar" );
--local iPos = UIScrollBar_GetValue( _Scroll );
local iIndex = ( gSkillFrame.page - 1 ) * DF_MAXPAGESKILL_SKILLBOOK + ButtonID;
local SkillButton = this:GetParent();
if( SkillButton.EnableToLV == 1 ) then
if( gSkillFrame.SelectID ~= iIndex and gSkillFrame.type ~= 3 ) then
getglobal( this:GetName() .. "Highlight" ):Show();
end
end
GameTooltip:ClearAllAnchors();
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", 10, 0);
GameTooltip:SetSkillItem( gSkillFrame.type, iIndex );
gSkillFrame.index = iIndex;
end
------------------------------------------------------------------------
function SkillBook_UpdateItems()
Lua_Reset_SkillBook( getglobal( "UI_SkillBook" ) );
end
------------------------------------------------------------------------
function SkillBook_ReInitUI()
end
------------------------------------------------------------------------
function OnDrag_SkillButton( ItemButton, ButtonID )
local Button = ItemButton:GetParent();
local iIndex = ( gSkillFrame.page - 1 ) * DF_MAXPAGESKILL_SKILLBOOK + ButtonID;
if( Button.Mode ~= 2 ) then
DragSkillButton( gSkillFrame.type, iIndex );
end
end
------------------------------------------------------------------------
function OnClick_SkillFrameTab( this )
if( gSkillFrame.type ~= this.type ) then
SkillTab_SetActiveState( gSkillFrame.tab, false );
SkillTab_SetActiveState( this, true );
gSkillFrame.tab = this;
gSkillFrame.type = this.type;
Lua_Reset_SkillBook( gSkillFrame.frame );
end
end
function SkillTab_SetActiveState(button, isActive)
if ( not button ) then
return;
end
if ( isActive ) then
PanelTemplates_SelectTab( button );
else
PanelTemplates_DeselectTab( button );
end
end
function OnLoad_SkillBook_ItemObj( itemObj )
itemObj:RegisterEvent( "SKILL_UPDATE_COOLDOWN" );
end
function OnEvent_SkillBook_ItemObj( itemObj, event )
if( event == "SKILL_UPDATE_COOLDOWN" ) then
if( itemObj.bLearned )then
Lua_SkillBook_ItemObj_UpdateCooldown( itemObj );
end
end
end
function Lua_SkillBook_ItemObj_UpdateCooldown( itemObj )
local iIndex = ( gSkillFrame.page - 1 ) * DF_MAXPAGESKILL_SKILLBOOK + itemObj:GetParent():GetID();
local duration, remaining = GetSkillCooldown( gSkillFrame.type, iIndex );
CooldownFrame_SetTime(getglobal(itemObj:GetName().."Cooldown"), duration, remaining);
end
function SkillBookPointFlashButton_OnEnter(this)
GameTooltip:SetOwner( this, "ANCHOR_RIGHT" );
--§Þ¯à ÂI¼Æ(TP)¥i¥H´£¤É§Þ¯à ªº«Â¤O¡A±z¥²¶·¥ý¿ï¾Ü§Þ¯à ¡A¦A«ö¤U"§Þ¯à ¤É¯Å"«ö¶s¡C
--¥Ø«eTP:<TP>
--Ã`¦@TP:<TOTALTP>
local msg = TEXT("SKILLBOOK_REMNANTPOINT_TOOLTIP");
local tp = GetTpExp();
local totalTp = GetTotalTpExp();
msg = string.gsub( msg, "<TP>" , tp );
msg = string.gsub( msg, "<TOTALTP>" , totalTp );
GameTooltip:SetText( msg );
end
Code: Select all
RoMScript("SetSpellPoint( 2, 2 )") will add 1 spell point to the second skill in second skill book
SetSpellPoint( skillBook, skillNumber )
UseSkill( skillBook, skillNumber ) will use the skill
Code: Select all
local _SkillName, _SkillLV, _IconPath, _Mode, _PLV, _PPoint, _PTotalPoint, _bLearned = GetSkillDetail( gSkillFrame.type, gSkillFrame.index );
Thx for the infos. I will play a little around with that. Do you know a tool to unpack the games .*fdb files?droppen wrote:this is the game's skill book
Cool!!! THX! I will try it.droppen wrote:here is how you set the skill point:
yes. http://filebeam.com/3d87b9917faed47b4fc06e6bc9bea202d003232 wrote:Thx for the infos. I will play a little around with that. Do you know a tool to unpack the games .*fdb files?droppen wrote:this is the game's skill book
Yea. It really works. A little confusing was that the skill tab #3 is addressed be using #4. Means to level up the mage skill 'flame' for one level you have to usedroppen wrote:Code: Select all
RoMScript("SetSpellPoint( 2, 2 )") will add 1 spell point to the second skill in second skill book
Code: Select all
RoMScript("SetSpellPoint( 4, 2 );");
d003232 wrote:Yea. It really works. A little confusing was that the skill tab #3 is addressed be using #4. Means to level up the mage skill 'flame' for one level you have to usedroppen wrote:Code: Select all
RoMScript("SetSpellPoint( 2, 2 )") will add 1 spell point to the second skill in second skill book
Code: Select all
RoMScript("SetSpellPoint( 4, 2 );");
Code: Select all
<onLeaveCombat>
if( player.Level > player.free_counter1 and
player.Level == 2 ) then
player.free_counter1 = player.Level;
RoMScript("SetSpellPoint( 4, 2 );");
yrest(1000);
RoMScript("SetSpellPoint( 4, 2 );");
elseif( player.Level > player.free_counter1) then
player.free_counter1 = player.Level;
RoMScript("SetSpellPoint( 4, 2 );");
end
</onLeaveCombat>
Code: Select all
/script local _SkillName, _SkillLV, _IconPath, _Mode, _PLV, _PPoint, _PTotalPoint, _bLearned = GetSkillDetail( 4, 3 ); SendSystemChat( _SkillName );
Users browsing this forum: No registered users and 1 guest