fusqueta Posted November 22, 2020 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 32 Reputation: 0 Joined: 10/26/20 Last Seen: February 13, 2021 Share Posted November 22, 2020 (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 November 22, 2020 by fusqueta Quote Link to comment Share on other sites More sharing options...
0 fusqueta Posted November 24, 2020 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 32 Reputation: 0 Joined: 10/26/20 Last Seen: February 13, 2021 Author Share Posted November 24, 2020 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; } Quote Link to comment Share on other sites More sharing options...
0 Forshaken Posted November 22, 2020 Group: Members Topic Count: 15 Topics Per Day: 0.01 Content Count: 152 Reputation: 21 Joined: 11/12/18 Last Seen: April 18 Share Posted November 22, 2020 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? 2 Quote Link to comment Share on other sites More sharing options...
0 fusqueta Posted November 22, 2020 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 32 Reputation: 0 Joined: 10/26/20 Last Seen: February 13, 2021 Author Share Posted November 22, 2020 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 Quote Link to comment Share on other sites More sharing options...
0 Forshaken Posted November 23, 2020 Group: Members Topic Count: 15 Topics Per Day: 0.01 Content Count: 152 Reputation: 21 Joined: 11/12/18 Last Seen: April 18 Share Posted November 23, 2020 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 Quote Link to comment Share on other sites More sharing options...
Question
fusqueta
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 fusquetaLink to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.