Jump to content
  • 0

prevent to unequip item


Question

Posted (edited)

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

4 answers to this question

Recommended Posts

  • 0
Posted

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;
    }

 

  • 0
Posted
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
  • 0
Posted
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

  • 0
Posted
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

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...