Jump to content
Foxseiz

Creating New Set Glow Effect

Recommended Posts

First of all u go to Game editor

 

Then Press TAB and check Effects then u can preview ea by clicking on them

Choose one of the Effects then go to:-

Server files>Resouce>Skilleff.txt
Now copy BBRing effect
 

200	Lv85 BB Cow Ring	-1	0	State_BBRING1_Add	State_BBRING1_Rem	3	0	1	1	1	1	1	1	1	1	1	1	1	1	0	0	0	-1	0	0	0	574	2	0	0	0	0	0	0	0

Now lets say from sceneffectinfo you want example

271	strc.par	Lightning Bolt P	Sea Wave	0	0	-1	-1	0	1	0	-1

This effect is thunder from Lightning Bolt its the last effect with make your body with thunder
Now your costume skilleff.txt line

ID	costume1	-1	0	State_costume1_Add	State_costume1_Rem	3	0	1	1	1	1	1	1	1	1	1	1	1	1	0	0	0	-1	0	0	0	271	2	0	0	0	0	0	0	0

Now for Skilleffect.lua

Go Resource>Script>Calculate>Skilleffect.lua

BB Ring effect

-----BBRING1---85BBإ£½ن
function State_BBRING1_Add ( role , statelv )
  local strsb_dif = 10
  local strsb = StrSb( role ) + strsb_dif
  SetCharaAttr( strsb , role , ATTR_STATEV_STR )

  local consb_dif = 8
  local consb = ConSb( role ) + consb_dif
  SetCharaAttr( consb , role , ATTR_STATEV_CON )

  local defsb_dif = 100
  local defsb = DefSb(role) + defsb_dif
  SetCharaAttr( defsb , role , ATTR_STATEV_DEF )

  local fleesb_dif = 10
  local fleesb = FleeSb(role) + fleesb_dif
  SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )

  local hitsb_dif = 10
  local hitsb = HitSb(role) + hitsb_dif
  SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )

  local hrecsb_dif = 6
  local hrecsb = HrecSb(role) + hrecsb_dif
  SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )

  local pdef_dif = 4
  local pdef = ResistSb(role) + pdef_dif
  SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )

  ALLExAttrSet(role) 
end

function State_BBRING1_Rem ( role , statelv )
  local strsb_dif = 10
  local strsb = StrSb( role ) - strsb_dif
  SetCharaAttr( strsb , role , ATTR_STATEV_STR )

  local consb_dif = 8
  local consb = ConSb( role ) - consb_dif
  SetCharaAttr( consb , role , ATTR_STATEV_CON )

  local defsb_dif = 100
  local defsb = DefSb(role) - defsb_dif
  SetCharaAttr( defsb , role , ATTR_STATEV_DEF )

  local fleesb_dif = 10
  local fleesb = FleeSb(role) - fleesb_dif
  SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )

  local hitsb_dif = 10
  local hitsb = HitSb(role) - hitsb_dif
  SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )

  local hrecsb_dif = 6
  local hrecsb = HrecSb(role) - hrecsb_dif
  SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )

  local pdef_dif = 4
  local pdef = ResistSb(role) - pdef_dif
  SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )

  ALLExAttrSet(role) 
end

Lets say we will just remove all for just good looking effect no bonus
And we will edit effect name to costume1

function State_costume1_Add ( role , statelv )
end

function State_costume1_Rem ( role , statelv )
end

Now for variable.lua
Resource>script>calculate

Add your line

226 = state_costume1 --- ID = STATE_NAME

Now you have your own skilleff.txt line and effect
Also you can add bonus to skilleffect.lua line if you want

Now for the effect showing with armor+ring

Resouce>script>caculate>functions.lua
Search for Dina

local Dina_xl = GetEquipItemP(role,8)
local Dina_xl_ID= GetItemID (Dina_xl)
local Dina_x2 = GetEquipItemP(role,2)
local Dina_x2_ID= GetItemID (Dina_x2)
if Dina_xl_ID==5824 and Dina_x2_ID==289 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_HYFS , statelv , statetime )
elseif Dina_xl_ID==2578 and Dina_x2_ID==2820 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_BBRING2 , statelv , statetime )
elseif Dina_xl_ID==2579 and Dina_x2_ID==2823 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_BBRING3 , statelv , statetime )
elseif Dina_xl_ID==2580 and Dina_x2_ID==2826 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_BBRING4 , statelv , statetime )
elseif Dina_xl_ID==2581 and Dina_x2_ID==2832 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_BBRING5 , statelv , statetime )
elseif Dina_xl_ID==2582 and Dina_x2_ID==2829 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_BBRING6 , statelv , statetime )
else
  local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 )
  if statelv_bbring1~=0 then
      RemoveState ( role , STATE_BBRING1 )
  end
  local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 )
  if statelv_bbring2~=0 then
      RemoveState ( role , STATE_BBRING2 )
  end
  local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 )
  if statelv_bbring3~=0 then
      RemoveState ( role , STATE_BBRING3 )
  end
  local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 )
  if statelv_bbring4~=0 then
      RemoveState ( role , STATE_BBRING4 )
  end
  local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 )
  if statelv_bbring5~=0 then
      RemoveState ( role , STATE_BBRING5 )
  end
  local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 )
  if statelv_bbring6~=0 then
      RemoveState ( role , STATE_BBRING6 )
  end 
end

Make your own

elseif Dina_xl_ID==RINGID and Dina_x2_ID==ARMORID then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_costume1 , statelv , statetime )

And down with the removing

local statelv_costume1 = GetChaStateLv ( role , STATE_costume1 )
if statelv_costume1~=0 then
	RemoveState ( role , STATE_costume1 )
end

Now compile your skilleff.txt and open your server and go inside the game and use your armor and ring

Tadaaaaa!!!! Effect works...

 

 

 

This guide was made by Saeed

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, AnaMutaz said:

I did all the steps and the glow won't up on the new armor and ring ?? 

Sometimes its the sceneffectinfo that will also affect this. Such as the id height after the glow effect id itself, try to play between -2 to 2 and see if the effect show up. If not then, something is not right.

Share this post


Link to post
Share on other sites
On 8/29/2017 at 5:57 AM, AnaMutaz said:

I did all the steps and the glow won't up on the new armor and ring ?? 

Try around the lines of 5467 , I tested and sometimes it depends on where you put the code from line range.


Nissan-GT-R.gif

Share this post


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

i got error when i put the 226 = state_costume1 in variable.lua

Tidak berjudul.png

STATE_Costume1       =    226
 

  • Like 1

Nissan-GT-R.gif

Share this post


Link to post
Share on other sites

Here is how I tried:
I did this costume1 in the place of DUMB effect, because the limit is 240 and it wont let me go further.

155	costume1	-1	0	State_costume1_Add	State_costume1_Rem	3	0	1	1	1	1	1	1	1	1	1	1	1	1	0	0	0	-1	0	0	0	123	2	0	0	0	0	0	0	0

where  --> 123 is the effect ID

after that I edited the BBRing effect to:

function  State_costume1_Add ( role , statelv ) 
	
end 

function State_costume1_Rem ( role , statelv )
	
end

then in variable.lua -> line 91 (it didnt work if I did 155 = STATE_Costume1), but it isn't working like this either
 

STATE_Costume1       =    155

Then at Dina in functions.lua:
 

elseif Dina_x1_ID==2346 and Dina_x2_ID==7996 then
				local statelv = 1
				local statetime = 3600
				AddState( role , role , STATE_costume1 , statelv , statetime)

-- AND

local statelv_costume1 = GetChaStateLv ( role , STATE_costume1 )
				if statelv_costume1~=0 then
					RemoveState ( role , STATE_costume1 )
				end

These are the 2 conditions but I wrote them seperately at the elseif and the second one at the if where the eff is removed

 

am I doing something wrong? I also tried to edit the numbers between -2 and 2 but still nothing. 

 

Then I copied the compiled skilleff.bin and txt to client and compiled again there aswell. 


Could you guys help please?
Thank you in advance!!
 

Edited by frago12

Share this post


Link to post
Share on other sites

Hello @frago12!

 

In that case you forget an optional statement "else", which executes when the boolean expression is false, in that case the "elseif". So basically to fixing your codes just add a simple "else" before "local statelv_costume1".

 

https://www.tutorialspoint.com/lua/if_else_statement_in_lua.htm

 


lelouch_signature_by_vahntheknight-d4uafwj.png

Share this post


Link to post
Share on other sites
32 minutes ago, Satan said:

Hello @frago12!

 

In that case you forget an optional statement "else", which executes when the boolean expression is false, in that case the "elseif". So basically to fixing your codes just add a simple "else" before "local statelv_costume1".

 

https://www.tutorialspoint.com/lua/if_else_statement_in_lua.htm

 

That is written within the else statement, only in my question I posted it like this. It is inside of the else statement

 

So basically the remove condition looks like:

 

else

     if

            <my code>

     end

     if

        .... Other statements

     end

end

Edited by frago12

Share this post


Link to post
Share on other sites
On 6/19/2016 at 2:29 PM, Foxseiz said:

First of all u go to Game editor

 

Then Press TAB and check Effects then u can preview ea by clicking on them

Choose one of the Effects then go to:-

Server files>Resouce>Skilleff.txt
Now copy BBRing effect
 


200	Lv85 BB Cow Ring	-1	0	State_BBRING1_Add	State_BBRING1_Rem	3	0	1	1	1	1	1	1	1	1	1	1	1	1	0	0	0	-1	0	0	0	574	2	0	0	0	0	0	0	0

Now lets say from sceneffectinfo you want example


271	strc.par	Lightning Bolt P	Sea Wave	0	0	-1	-1	0	1	0	-1

This effect is thunder from Lightning Bolt its the last effect with make your body with thunder
Now your costume skilleff.txt line


ID	costume1	-1	0	State_costume1_Add	State_costume1_Rem	3	0	1	1	1	1	1	1	1	1	1	1	1	1	0	0	0	-1	0	0	0	271	2	0	0	0	0	0	0	0

Now for Skilleffect.lua

Go Resource>Script>Calculate>Skilleffect.lua

BB Ring effect


-----BBRING1---85BBإ£½ن
function State_BBRING1_Add ( role , statelv )
  local strsb_dif = 10
  local strsb = StrSb( role ) + strsb_dif
  SetCharaAttr( strsb , role , ATTR_STATEV_STR )

  local consb_dif = 8
  local consb = ConSb( role ) + consb_dif
  SetCharaAttr( consb , role , ATTR_STATEV_CON )

  local defsb_dif = 100
  local defsb = DefSb(role) + defsb_dif
  SetCharaAttr( defsb , role , ATTR_STATEV_DEF )

  local fleesb_dif = 10
  local fleesb = FleeSb(role) + fleesb_dif
  SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )

  local hitsb_dif = 10
  local hitsb = HitSb(role) + hitsb_dif
  SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )

  local hrecsb_dif = 6
  local hrecsb = HrecSb(role) + hrecsb_dif
  SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )

  local pdef_dif = 4
  local pdef = ResistSb(role) + pdef_dif
  SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )

  ALLExAttrSet(role) 
end

function State_BBRING1_Rem ( role , statelv )
  local strsb_dif = 10
  local strsb = StrSb( role ) - strsb_dif
  SetCharaAttr( strsb , role , ATTR_STATEV_STR )

  local consb_dif = 8
  local consb = ConSb( role ) - consb_dif
  SetCharaAttr( consb , role , ATTR_STATEV_CON )

  local defsb_dif = 100
  local defsb = DefSb(role) - defsb_dif
  SetCharaAttr( defsb , role , ATTR_STATEV_DEF )

  local fleesb_dif = 10
  local fleesb = FleeSb(role) - fleesb_dif
  SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )

  local hitsb_dif = 10
  local hitsb = HitSb(role) - hitsb_dif
  SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )

  local hrecsb_dif = 6
  local hrecsb = HrecSb(role) - hrecsb_dif
  SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )

  local pdef_dif = 4
  local pdef = ResistSb(role) - pdef_dif
  SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )

  ALLExAttrSet(role) 
end

Lets say we will just remove all for just good looking effect no bonus
And we will edit effect name to costume1


function State_costume1_Add ( role , statelv )
end

function State_costume1_Rem ( role , statelv )
end

Now for variable.lua
Resource>script>calculate

Add your line


226 = state_costume1 --- ID = STATE_NAME

Now you have your own skilleff.txt line and effect
Also you can add bonus to skilleffect.lua line if you want

Now for the effect showing with armor+ring

Resouce>script>caculate>functions.lua
Search for Dina


local Dina_xl = GetEquipItemP(role,8)
local Dina_xl_ID= GetItemID (Dina_xl)
local Dina_x2 = GetEquipItemP(role,2)
local Dina_x2_ID= GetItemID (Dina_x2)
if Dina_xl_ID==5824 and Dina_x2_ID==289 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_HYFS , statelv , statetime )
elseif Dina_xl_ID==2578 and Dina_x2_ID==2820 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_BBRING2 , statelv , statetime )
elseif Dina_xl_ID==2579 and Dina_x2_ID==2823 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_BBRING3 , statelv , statetime )
elseif Dina_xl_ID==2580 and Dina_x2_ID==2826 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_BBRING4 , statelv , statetime )
elseif Dina_xl_ID==2581 and Dina_x2_ID==2832 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_BBRING5 , statelv , statetime )
elseif Dina_xl_ID==2582 and Dina_x2_ID==2829 then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_BBRING6 , statelv , statetime )
else
  local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 )
  if statelv_bbring1~=0 then
      RemoveState ( role , STATE_BBRING1 )
  end
  local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 )
  if statelv_bbring2~=0 then
      RemoveState ( role , STATE_BBRING2 )
  end
  local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 )
  if statelv_bbring3~=0 then
      RemoveState ( role , STATE_BBRING3 )
  end
  local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 )
  if statelv_bbring4~=0 then
      RemoveState ( role , STATE_BBRING4 )
  end
  local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 )
  if statelv_bbring5~=0 then
      RemoveState ( role , STATE_BBRING5 )
  end
  local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 )
  if statelv_bbring6~=0 then
      RemoveState ( role , STATE_BBRING6 )
  end 
end

Make your own


elseif Dina_xl_ID==RINGID and Dina_x2_ID==ARMORID then
  local statelv = 1
  local statetime = 3600
  AddState ( role , role , STATE_costume1 , statelv , statetime )

And down with the removing


local statelv_costume1 = GetChaStateLv ( role , STATE_costume1 )
if statelv_costume1~=0 then
	RemoveState ( role , STATE_costume1 )
end

Now compile your skilleff.txt and open your server and go inside the game and use your armor and ring

Tadaaaaa!!!! Effect works...

 

 

 

This guide was made by Saeed

hey i make all of that and still not work can help?

 

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.


×
×
  • Create New...