Jump to content
Sign in to follow this  
kyleflow

Ring Glow Issues (Solved)

Recommended Posts

I have a code, the ring glow is working for crusader class only but unable to work for other class. It is like the code is not checking for the job requirement. here is the code. can anyone give any other input ?

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)
		local Dina_x3 = GetEquipItemP(role,5)
		local Dina_x3_ID = GetItemID(Dina_x3)
		local job = GetChaAttr(role, ATTR_JOB)
		-- 7325 is the forsaken ring and 825 is the kylin armor. 
		
        
		
		
        if ((Dina_xl_ID == 2578 or Dina_xl_ID == 7325)   and (Dina_x2_ID == 2820 or Dina_x2_ID == 825 )) and job == 9 then
                local statelv = 1
                local statetime = 3600
                AddState ( role , role , STATE_BBRING2 , statelv , statetime ) 
        elseif ((Dina_xl_ID==2577 or Dina_x1_ID == 7325) and (Dina_x2_ID==2817 or Dina_x2_ID == 825)) and job == 8 then
                local statelv = 1
                local statetime = 3600
                AddState ( role , role , STATE_BBRING1 , statelv , statetime ) 
        elseif ((Dina_xl_ID==2579 or Dina_x1_ID == 7325) and (Dina_x2_ID==2823 or Dina_x2_ID == 825)) and job == 12 then
                local statelv = 1
                local statetime = 3600
                AddState ( role , role , STATE_BBRING3 , statelv , statetime ) 
        elseif ((Dina_xl_ID==2580 or Dina_x1_ID == 7325) and (Dina_x2_ID==2826 or Dina_x2_ID == 825)) and job == 16 then
                local statelv = 1
                local statetime = 3600
                AddState ( role , role , STATE_BBRING4 , statelv , statetime ) 
        elseif ((Dina_xl_ID==2581 or Dina_x1_ID == 7325) and (Dina_x2_ID==2832 or Dina_x2_ID == 825)) and job == 14 then
                local statelv = 1
                local statetime = 3600
                AddState ( role , role , STATE_BBRING5 , statelv , statetime ) 
        elseif ((Dina_xl_ID==2582 or Dina_x1_ID == 7325) and (Dina_x2_ID==2829 or Dina_x2_ID == 825)) and job == 13 then
                local statelv = 1
                local statetime = 3600
                AddState ( role , role , STATE_BBRING6 , statelv , statetime )
		--elseif Dina_xl_ID == 7325   and  Dina_x3_ID == 7326  then
              --  local statelv = 1
              --  local statetime = 3600
              --  AddState ( role , role , STATE_BBRING7 , 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 
				--local statelv_bbring7 = GetChaStateLv ( role , STATE_BBRING7 ) -- 45 ring
              --  if statelv_bbring7~=0 then
               --         RemoveState ( role , STATE_BBRING7 ) 
               -- end 
			
			
        end

 

Share this post


Link to post
Share on other sites

Hello @kyleflow,

 

try a different approach:

-- Start of Main script --

-- Get character job id
local job_id = GetChaAttr(role, ATTR_JOB)

-- Get ring item ID
local ring = GetEquipItemP(role, 8)
local ring_id = GetItemID(ring)

-- Get body item ID
local body = GetEquipItemP(role, 2)
local body_id = GetItemID(body)

if (CheckCrusaderGlow(job_id, ring_id, body_id) == 1) then
	
	AddState(role, role, STATE_BBRING2, 1, 3600)
	
elseif (CheckChampionGlow(job_id, ring_id, body_id) == 1) then
	
	AddState(role, role, STATE_BBRING1 , 1, 3600) 
	
elseif 

 . . .
 
end

-- End of Main script --




-- Crusader Ring Glow condition
function CheckCrusaderGlow(job_id, ring_id, body_id)

	if ( (job_id == 9) and (ring_id == 2578 or ring_id == 7325) and (body_id == 2820 or body_id == 825) ) then
		
		return 1
		
	end
	
	return 0
	
end

-- Champion Ring Glow condition
function CheckChampionGlow(job_id, ring_id, body_id)

	if ( (job_id == 8) and (ring_id == 2577  or ring_id == 7325) and (body_id == 2817 or body_id == 825) ) then
		
		return 1
		
	end
	
	return 0
	
end

-- And etc

 

This code is decomposed and easier to modify and debug.

 

Also check that STATE_BBRING1 . . . STATE_BBRING6 are valid skilleff ID constants and the visual effects below them are installed in the game client.

  • Thanks 1

Share this post


Link to post
Share on other sites

Update @V3ct0r,

 

Tried the code but still not working somehow. Any other ideas that you think would help? Should I make new STATE and individual ring for low lvl ring to use the same glow effect?

 

Share this post


Link to post
Share on other sites
22 hours ago, kyleflow said:

Update @V3ct0r,

 

Tried the code but still not working somehow. Any other ideas that you think would help? Should I make new STATE and individual ring for low lvl ring to use the same glow effect?

 

if I recall 825 is kylin armor, so if person has it + a ring on the right side, it will activate glow?

otherwise need 2 rings equipped, might also want to check skilleff.bin to see if STATE_BBRING1-6 has a .eff in the line, and then also see if STATE_BBRING skilleff is in server side STATE_BBRING = XXX


Nissan-GT-R.gif

Share this post


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

if I recall 825 is kylin armor, so if person has it + a ring on the right side, it will activate glow?

otherwise need 2 rings equipped, might also want to check skilleff.bin to see if STATE_BBRING1-6 has a .eff in the line, and then also see if STATE_BBRING skilleff is in server side STATE_BBRING = XXX

I made it right by using the method i mention above which is making item for individual job class.

The only issue is that, I can't seem to introduce new glow other than the existing one.

Do you guys know which post have details for new glow for set? I want to make cool thunder glow if possible. Saw it in some other PS.

Share this post


Link to post
Share on other sites
9 hours ago, kyleflow said:

I made it right by using the method i mention above which is making item for individual job class.

The only issue is that, I can't seem to introduce new glow other than the existing one.

Do you guys know which post have details for new glow for set? I want to make cool thunder glow if possible. Saw it in some other PS.

If you want to change the glow, you just change it in skilleff.txt and then compile the bin, you just change the skilleff glow ID to a different glow ID.

 

You can see the rings I have here, I gave it different glow.

 


Nissan-GT-R.gif

Share this post


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

If you want to change the glow, you just change it in skilleff.txt and then compile the bin, you just change the skilleff glow ID to a different glow ID.

 

You can see the rings I have here, I gave it different glow.

 

I tried yesterday and able to make the glow work by ensuring the skilleff and variable.lua have the same ID number but the difference is the skilleff ID is a new one.. 240 which is the end limit. And I did try to use ID 239 for information bank and made a new set glow with it but it will not work. I check the STATE related to the ID is not used in any function and yet unable to make it work. I also notice making the condition pertain 2 condition is the limit.. I can't go beyond Dina_xx_ID with 2 other condition for it to work. Changing the limit with mods by V3ctor also is not working and he did mentioned for skilleff, u need some skill to change the hex files which i don't have. Lastly, can you share the glow ID u used for the rings u shown in the video. I want to try it

Share this post


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

I tried yesterday and able to make the glow work by ensuring the skilleff and variable.lua have the same ID number but the difference is the skilleff ID is a new one.. 240 which is the end limit. And I did try to use ID 239 for information bank and made a new set glow with it but it will not work. I check the STATE related to the ID is not used in any function and yet unable to make it work. I also notice making the condition pertain 2 condition is the limit.. I can't go beyond Dina_xx_ID with 2 other condition for it to work. Changing the limit with mods by V3ctor also is not working and he did mentioned for skilleff, u need some skill to change the hex files which i don't have. Lastly, can you share the glow ID u used for the rings u shown in the video. I want to try it

I don't work with TOP stuff anymore, so I don't recall where I placed the client. but you should be able to find the STATE_BBRING in your skilleff  the line and just change the current skillID glow it shows.


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
On 8/30/2022 at 10:32 AM, kyleflow said:

Update @V3ct0r,

 

Tried the code but still not working somehow. Any other ideas that you think would help? Should I make new STATE and individual ring for low lvl ring to use the same glow effect?

 

Hello @kyleflow,

 

1) Make sure that required items are placed in cslots (check that you pass correct slot id in the GetEquipItemP() function);

2) Instead of the AddState() function call the Notice() one for debugging purposes:

if (CheckCrusaderGlow(job_id, ring_id, body_id) == 1) then
	
	--AddState(role, role, STATE_BBRING2, 1, 3600)
	Notice("ok, I am a Crusader, add the ring glow!")
	
elseif (CheckChampionGlow(job_id, ring_id, body_id) == 1) then
	
	--AddState(role, role, STATE_BBRING1 , 1, 3600) 
	Notice("ok, I am a Champion, add the ring glow!")

elseif 

3) Call Notice() function everywhere to find the place where script is bugged.


Share this post


Link to post
Share on other sites
On 9/4/2022 at 7:45 PM, V3ct0r said:

Hello @kyleflow,

 

1) Make sure that required items are placed in cslots (check that you pass correct slot id in the GetEquipItemP() function);

2) Instead of the AddState() function call the Notice() one for debugging purposes:


if (CheckCrusaderGlow(job_id, ring_id, body_id) == 1) then
	
	--AddState(role, role, STATE_BBRING2, 1, 3600)
	Notice("ok, I am a Crusader, add the ring glow!")
	
elseif (CheckChampionGlow(job_id, ring_id, body_id) == 1) then
	
	--AddState(role, role, STATE_BBRING1 , 1, 3600) 
	Notice("ok, I am a Champion, add the ring glow!")

elseif 

3) Call Notice() function everywhere to find the place where script is bugged.

That's a useful tips. Thanks. will try to do so later ! for now the glow is working as I intended with new individual ring but I will try to use the suggestion debug step to check also.

  • Thanks 1

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...