Jump to content
  • 0
Sign in to follow this  
LyDe

function to enchant item

Question

Hey guys, I'm doing a script to enchant some itens and I started with this:

setarray .@itenstoenchan[0], ID, ID;
setarray .@firstenchan[0], Fighting_Spirit6, Expert_Archer3, Spell4, MHP1, Attack_Delay_3, Luck5;


So, I dont know what function I need to do to enchant, anyone knows?

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

There is not exactly a function to enchant an item, you should use getitem2() command to produce the item with the needed enchants. This is the usual process:

 

  1. Check if player has the gear to enchant, if not, finish the npc.
  2. Calculate the enchant to give (note 1)
  3. (Optional) Save the cards/refines attached to the gear to enchant (note 2)
  4. Delete required gear to enchant.
  5. Make the gear with getitem2 command and the enchants you want (and cards/refines as you need)

 

Note 1. About calculate the enchant to give.

Remember that "enchants" doesn't exist as that, they are cards that has a different sprite than the one from the cards. You can give any item you want as enchant, even an armor if you want. In example, Eden Group quest has a part where player can put cards (scorpion card and other) as an enchant to the weapons from Eden.

 

Note 2. About saving the cards/refines attached to the gear.

In some cases you may want to keep the cards or refines that gear has. When you delete it you will erase the actual refines or cards that gear has but you can put it again puting the according values in the getitem2() command. Use getequipcardid() and getequiprefinerycnt() script commands to store those values into variables to use in getitem2() command.

 

Please check doc\script_commands.txt to know more about getitem2(), getequipcardid() and getequiprefinerycnt() script commands.

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
Answer this question...

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

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.