Jump to content
Ximboliex

[Guide]Wings whit Stats

Recommended Posts

 

You would need to have the stats on a state, and then add the state when the wings are in slot 1:
Add this to variable.lua (or wherever you store your variables to) changing the ID to the wings ID and the State to the state you want to add. You can add more wings, I'm just using 5 for an example.
Code:
WingID = {}
WingID[0] = {ID = 1, State = 1}
WingID[1] = {ID = 2, State = 2}
WingID[2] = {ID = 3, State = 3}
WingID[3] = {ID = 4, State = 4}
WingID[4] = {ID = 5, State = 5}
WingID[5] = {ID = 6, State = 6}

Add this into cha_timer or your cha_timer hook:

if Is_NormalMonster ( role ) ~= 1 then
local Item_bg = GetChaItem ( role , 2 , 0  )
local ID = GetItemID ( Item_bg )
for i,v in pairs(WingID.ID) do
if ID  == v then
AddState ( role , role , WingID[i].State  , 1, 3600 )
else
local HASstate = GetChaStateLv ( role , WingID[i].State )
if HASstate ~= 0 then
RemoveState ( role , WingID[i].State  )
end
Put Code in Skilleffec.lua :
---------------------------------------Wing#1------------------------------------------------
function State_Wing1_Add ( role , statelv )
    local strsb_dif = 50
    local strsb = StrSb( role ) + strsb_dif
    SetCharaAttr( strsb , role , ATTR_STATEV_STR )
    local consb_dif = 50
    local consb = ConSb( role ) + consb_dif
    SetCharaAttr( consb , role , ATTR_STATEV_CON )
    local dexsb_dif = 50
    local dexsb = DexSb( role ) + dexsb_dif
    SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
    local agisb_dif = 110
    local agisb = AgiSb( role ) + agisb_dif
    SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
    local stasb_dif = 110
    local stasb = StaSb( role ) + stasb_dif
    SetCharaAttr( stasb , role , ATTR_STATEV_STA )
    local resistsb_dif = 10 
    local resistsb = ResistSb( role ) + resistsb_dif
    SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF )
    local mspdsb_dif = 100 
    local mspdsb = MspdSb( role ) + mspdsb_dif
    SetCharaAttr( mspdsb , role , ATTR_STATEV_MSPD )
    ALLExAttrSet(role)
end
function State_Wing1_Rem ( role , statelv )
    local strsb_dif = 50
    local strsb = StrSb( role ) - strsb_dif
    SetCharaAttr( strsb , role , ATTR_STATEV_STR )
    local consb_dif = 50
    local consb = ConSb( role ) - consb_dif
    SetCharaAttr( consb , role , ATTR_STATEV_CON )
    local dexsb_dif = 50
    local dexsb = DexSb( role ) - dexsb_dif
    SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
    local agisb_dif = 110
    local agisb = AgiSb( role ) - agisb_dif
    SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
    local stasb_dif = 110
    local stasb = StaSb( role ) - stasb_dif
    SetCharaAttr( stasb , role , ATTR_STATEV_STA )
    local resistsb_dif = 10 
    local resistsb = ResistSb( role ) - resistsb_dif
    SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF )
    local mspdsb_dif = 100 
    local mspdsb = MspdSb( role ) - mspdsb_dif
    SetCharaAttr( mspdsb , role , ATTR_STATEV_MSPD )
    ALLExAttrSet(role)
end
---------------------------------------------------------------------------------------------------------------
function State_Wing4_Add ( role , statelv )
    local strsb_dif = 10
    local strsb = StrSb( role ) + strsb_dif
    SetCharaAttr( strsb , role , ATTR_STATEV_STR )
    local consb_dif = 10
    local consb = ConSb( role ) + consb_dif
    SetCharaAttr( consb , role , ATTR_STATEV_CON )
    local dexsb_dif = 10
    local dexsb = DexSb( role ) + dexsb_dif
    SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
    local agisb_dif = 50
    local agisb = AgiSb( role ) + agisb_dif
    SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
    local stasb_dif = 55
    local stasb = StaSb( role ) + stasb_dif
    SetCharaAttr( stasb , role , ATTR_STATEV_STA )
    ALLExAttrSet(role) 
end
function State_Wing4_Rem ( role , statelv )
    local strsb_dif = 10
    local strsb = StrSb( role ) - strsb_dif
    SetCharaAttr( strsb , role , ATTR_STATEV_STR )
    local consb_dif = 10
    local consb = ConSb( role ) - consb_dif
    SetCharaAttr( consb , role , ATTR_STATEV_CON )
    local dexsb_dif = 10
    local dexsb = DexSb( role ) - dexsb_dif
    SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
    local agisb_dif = 50
    local agisb = AgiSb( role ) - agisb_dif
    SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
    local stasb_dif = 55
    local stasb = StaSb( role ) - stasb_dif
    SetCharaAttr( stasb , role , ATTR_STATEV_STA )
    ALLExAttrSet(role) 
end
--------------------------------------------------------------------------------------------------------------
function State_Wing5_Add ( role , statelv )
    local strsb_dif = 15
    local strsb = StrSb( role ) + strsb_dif
    SetCharaAttr( strsb , role , ATTR_STATEV_STR )
    local consb_dif = 15
    local consb = ConSb( role ) + consb_dif
    SetCharaAttr( consb , role , ATTR_STATEV_CON )
    local dexsb_dif = 15
    local dexsb = DexSb( role ) + dexsb_dif
    SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
    local agisb_dif = 55
    local agisb = AgiSb( role ) + agisb_dif
    SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
    local stasb_dif = 60
    local stasb = StaSb( role ) + stasb_dif
    SetCharaAttr( stasb , role , ATTR_STATEV_STA )
    ALLExAttrSet(role) 
end
function State_Wing5_Rem ( role , statelv )
    local strsb_dif = 15
    local strsb = StrSb( role ) - strsb_dif
    SetCharaAttr( strsb , role , ATTR_STATEV_STR )
    local consb_dif = 15
    local consb = ConSb( role ) - consb_dif
    SetCharaAttr( consb , role , ATTR_STATEV_CON )
    local dexsb_dif = 15
    local dexsb = DexSb( role ) - dexsb_dif
    SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
    local agisb_dif = 55
    local agisb = AgiSb( role ) - agisb_dif
    SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
    local stasb_dif = 60
    local stasb = StaSb( role ) - stasb_dif
    SetCharaAttr( stasb , role , ATTR_STATEV_STA )
    ALLExAttrSet(role) 
end
---------------------------------------------------------------------------------------------------------------------------
function State_Wing6_Add ( role , statelv )
    local strsb_dif = 25
    local strsb = StrSb( role ) + strsb_dif
    SetCharaAttr( strsb , role , ATTR_STATEV_STR )
    local consb_dif = 25
    local consb = ConSb( role ) + consb_dif
    SetCharaAttr( consb , role , ATTR_STATEV_CON )
    local dexsb_dif = 25
    local dexsb = DexSb( role ) + dexsb_dif
    SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
    local agisb_dif = 60
    local agisb = AgiSb( role ) + agisb_dif
    SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
    local stasb_dif = 65
    local stasb = StaSb( role ) + stasb_dif
    SetCharaAttr( stasb , role , ATTR_STATEV_STA )
    local resistsb_dif = 5 
    local stasb = ResistSb( role ) - resistsb_dif
    SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF )
    ALLExAttrSet(role) 
end 
function State_Wing6_Rem ( role , statelv )
    local strsb_dif = 25
    local strsb = StrSb( role ) - strsb_dif
    SetCharaAttr( strsb , role , ATTR_STATEV_STR )
    local consb_dif = 25
    local consb = ConSb( role ) - consb_dif
    SetCharaAttr( consb , role , ATTR_STATEV_CON )
    local dexsb_dif = 25
    local dexsb = DexSb( role ) - dexsb_dif
    SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
    local agisb_dif = 60
    local agisb = AgiSb( role ) - agisb_dif
    SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
    local stasb_dif = 65
    local stasb = StaSb( role ) - stasb_dif
    SetCharaAttr( stasb , role , ATTR_STATEV_STA )
    local resistsb_dif = 5 
    local resistsb = ResistSb( role ) - resistsb_dif
    SetCharaAttr( resistsb , role , ATTR_STATEV_PDEF )
    ALLExAttrSet(role) 
end
--------------------And add this in skill effec----------------
522    Wing1    -1    0    State_Wing1_Add    State_Wing1_Rem    1    0    1    1    1    1    1    1    1    1    1    1    1    1    0    0    0    -1    0    0    0    0    2    0    0    0    0    0    0    0
Xxxx    -1    -1    0    State_Wing2_Add    State_Wing2_Rem    1    0    1    1    1    1    1    1    1    1    1    1    1    1    0    0    0    -1    0    0    0    0    2    0    0    0    0    0    0    0
Xxx    -1    -1    0    State_Wing3_Add    State_Wing3_Rem    1    0    1    1    1    1    1    1    1    1    1    1    1    1    0    0    0    -1    0    0    0    0    2    0    0    0    0    0    0    0
Xxxx    -1    -1    0    State_Wing4_Add    State_Wing4_Rem    1    0    1    1    1    1    1    1    1    1    1    1    1    1    0    0    0    -1    0    0    0    0    2    0    0    0    0    0    0    0
Xxxx    Wing5    -1    0    State_Wing5_Add    State_Wing5_Rem    1    0    1    1    1    1    1    1    1    1    1    1    1    1    0    0    0    -1    0    0    0    0    2    0    0    0    0    0    0    0
Xxx    -1    -1    0    State_Wing6_Add    State_Wing6_Rem    1    0    1    1    1    1    1    1    1    1    1    1    1    1    0    0    0    -1    0    0    0    0    2    0    0    0    0    0    0    0

By @Billy

Edited by Ximboliex

Share this post


Link to post
Share on other sites
Guest

You either add credits next time or I'll be asking admins to remove every other topic you post. best regards.

Share this post


Link to post
Share on other sites
5 minutes ago, qwerty said:

You either add credits next time or I'll be asking admins to remove every other topic you post. best regards.

I published it knowing that the creator of scripts would tell me I was his, did not want to steal my credit far were scripts that had kept much of serverdev ago and as the creator did not put his name in the scripts that copy why not remembered I become apologize if I offended someone

Share this post


Link to post
Share on other sites

Even when these scripts are public releases; A good way to do it, could be you to ask the owners before post.
If you don't know @who, use an small note on the bottom of your post like:

"Credits to the respective owners.", could be nice.

 

At least until you get that name.

  • Like 2

Share this post


Link to post
Share on other sites

@Ximboliex

You could show a clearer example of code.
When you say Wings ID do you mean the ID of the wings in the Iteminfo?
And when you mean a state, do you mean the Skilleff ID?
On the other hand I have some doubt with the code of Cha_timer.

I feel that the code is a bit incomplete, and when I try it I do not see changes. Thanks for your help

Share this post


Link to post
Share on other sites
8 hours ago, johan said:

@Ximboliex

You could show a clearer example of code.
When you say Wings ID do you mean the ID of the wings in the Iteminfo?
And when you mean a state, do you mean the Skilleff ID?
On the other hand I have some doubt with the code of Cha_timer.

I feel that the code is a bit incomplete, and when I try it I do not see changes. Thanks for your help

Wings ID - Correct, iteminfo wing ID

State - Yes SkilleffID

Cha_timer - Same as cloaks, you are checking if the item is there, if true activate state Example: Check if the item is in 1st slot 

if Is_NormalMonster ( role ) ~= 1

then

local Item_bg = GetChaItem ( role , 2 , 0  )

local ID = GetItemID ( Item_bg )

for i,v in pairs(WingID.ID)

do

if ID  == v then AddState ( role , role , WingID.State  , 1, 3600 )

 

Usually for testing try doing

 

Notice() and see if it spams system. when wing is on/off.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×