kyleflow 35 Report post Posted August 25, 2022 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 Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted August 25, 2022 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. 1 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
kyleflow 35 Report post Posted August 26, 2022 Thank you so much bro. I will try it now ! Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted August 30, 2022 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? Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted August 31, 2022 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 Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted August 31, 2022 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. Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted August 31, 2022 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. Quote Share this post Link to post Share on other sites
kyleflow 35 Report post Posted September 1, 2022 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 Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted September 1, 2022 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. Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted September 4, 2022 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. Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
kyleflow 35 Report post Posted September 8, 2022 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. 1 Quote Share this post Link to post Share on other sites