Jump to content
Sign in to follow this  
Myruni

Fairy possession issue (SetCharaAttr)

Recommended Posts

Hi everyone,

 

I have an issue where my cloak script is conflicting with fairy possession. Basically what happens is that everytime when the fairy possession ends, it removes not only the additional stats from the poss, but also remove the stats from the cloak.

 

I suspect the following script on fairy possession (end) is what resulted in setting all ex stats to zero, as it reads - to set to 0.

function State_JLFT_Rem ( role , sklv )
	
	SetCharaAttr(0 ,role , ATTR_STATEV_STR)
	SetCharaAttr(0 ,role , ATTR_STATEV_CON)
	SetCharaAttr(0 ,role , ATTR_STATEV_STA)
	SetCharaAttr(0 ,role , ATTR_STATEV_DEX)
	SetCharaAttr(0 ,role , ATTR_STATEV_AGI)

	ALLExAttrSet(role)
end

 

The following is my script for cloak where add stat if cloak x level:

function State_NC_Add ( role , statelv ) 
    local slot         = GetChaItem(role, 2, (Cloak.conf['CloakSlot'] -1)) -- Get Cloak Slot
  	--Differences
	local str_dif 	=  Cloak.conf['Stats'] * statelv	-- Str Difference
	local agi_dif 	=  Cloak.conf['Stats'] * statelv	-- Agi Difference
	local dex_dif 	=  Cloak.conf['Stats'] * statelv	-- Acc Difference
	local con_dif 	=  Cloak.conf['Stats'] * statelv	-- Con Difference
	local sta_dif 	=  Cloak.conf['Stats'] * statelv	-- Spr Difference

	--Calculation
	local strsb = StrSb( role ) + str_dif	-- Str Calculation
	local agisb = AgiSb( role ) + agi_dif	-- Agi Calculation
	local dexsb = DexSb( role ) + dex_dif	-- Acc Calculation
	local consb = ConSb( role ) + con_dif	-- Con Calculation
	local stasb = StaSb( role ) + sta_dif	-- Spr Calculation
	
	--Stats Add
	SetCharaAttr( strsb , role , ATTR_STATEV_STR )	-- Str Add
	SetCharaAttr( agisb , role , ATTR_STATEV_AGI )	-- Agi Add
	SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )	-- Acc Add
	SetCharaAttr( consb , role , ATTR_STATEV_CON )	-- Con Add
	SetCharaAttr( stasb , role , ATTR_STATEV_STA )	-- Spr Add

	RefreshCha(role) 
end 

 

I have a zodiac system installed in my files as well which basically uses the same logic as my cloak script to add stats to the character, and thus, also having same issue.

If someone can advise and shed some light on this. 

 

Thanks

Share this post


Link to post
Share on other sites

Hello, I have replied to others using certain STATE_EFFECT stuff.

 

There is a way to solve this issue, I had received a script from Eviles/Satan you can try to contact him and see if he will release/sell it to you. It solves the following:

 

Item stat use such as elixirs, prawn dump/cloaks/fairy poss/when entering maze/teleporting keeps stats.

 

 

  • Thanks 2

Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
12 hours ago, Dan said:

Hello, I have replied to others using certain STATE_EFFECT stuff.

 

There is a way to solve this issue, I had received a script from Eviles/Satan you can try to contact him and see if he will release/sell it to you. It solves the following:

 

Item stat use such as elixirs, prawn dump/cloaks/fairy poss/when entering maze/teleporting keeps stats.

 

 

Many thanks :) This helps big time!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...