Jump to content
  • 0
Sign in to follow this  
fusqueta

prevent to unequip item

Question

is there anyway to prevent to unequip a single item? I'll bind a visual effect to the item sprite and player cannot unequip it

 

ps: I'm planning to execute a UnEquipScript to equip item again, but seems like a poor way to solve this problem, another better idea?

Edited by fusqueta

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I made it by source, it's ugly but works fine


 

bool pc_unequipitem(struct map_session_data *sd, int n, int flag) {

...

    if (sd->inventory_data[n]->nameid == 2220 && !(flag & 2))
    {
        clif_unequipitemack(sd, n, 0, 0);
        return false;
    }

 

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, fusqueta said:

is there anyway to prevent to unequip a single item? I'll bind a visual effect to the item sprite and player cannot unequip it

 

ps: I'm planning to execute a UnEquipScript to equip item again, but seems like a poor way to solve this problem, another better idea?

why not use OnPCLoginEvent and use changelook script?

  • Upvote 2

Share this post


Link to post
Share on other sites
  • 0
10 hours ago, Forshaken said:

why not use OnPCLoginEvent and use changelook script?

It's a good altenative, but I'm planning to add item script further on this, a flag disabling unequip would be perfect

Share this post


Link to post
Share on other sites
  • 0
17 hours ago, fusqueta said:

It's a good altenative, but I'm planning to add item script further on this, a flag disabling unequip would be perfect

you can make your own mapflag script and dig deeper on your itemdb.cpp

 

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

Sign in to follow this  

×
×
  • Create New...

Important Information

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