Jump to content
  • 0

Refine Chance Bonus


Kouta

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.09
  • Content Count:  8
  • Reputation:   1
  • Joined:  02/25/25
  • Last Seen:  

Hey, guys!

There's a way to give refine chance bonus depending on condition to a player when refining with "NPC X"?

 

Thanks in advance. ❤️

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.09
  • Content Count:  8
  • Reputation:   1
  • Joined:  02/25/25
  • Last Seen:  

Posted (edited)

Just solved!

Applied any percentage plus getequippercentrefinery(<equipped_slot>).

 

Code Sample:

Be aware that this code is not "NPC Script" structured! It's just a quote sample.

// Example: Increase the Success Refining Chance by +10%
getequippercentrefinery(EQI_ARMOR) + 10;

// Example: Working Refine Chance Applied
if ((getequippercentrefinery(EQI_ARMOR) + 10) > rand(100))
	successrefitem EQI_ARMOR;

// Do the equipped_slot dynamically through:
  setarray .@equippedParts[1],
    EQI_HEAD_TOP,
    EQI_HEAD_MID,
    EQI_HEAD_LOW,
    EQI_ARMOR,
    EQI_HAND_R,
    EQI_HAND_L,
    EQI_GARMENT,
    EQI_SHOES,
    EQI_ACC_R,
    EQI_ACC_L;

  // Create an array with all equipped items, except shadow ones
  for(.@i = 1; .@i <= getarraysize(.@equippedParts); .@i++) {
      if (getequipisequiped(.@equippedParts[.@i])) {
          .@menu$ = .@menu$ + F_getpositionname(.@equippedParts[.@i]);
      }
  }

  // .@selection will be the selected equip from the refine menu (.@selection is the dynamic equipped_slot variable).
  set .@selection, .@equippedParts[ select(.@menu$) ];

 

-- Solved!

Edited by Kouta
Link to comment
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
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

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