fusqueta Posted November 22, 2020 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
0 fusqueta Posted November 24, 2020 Author 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
0 Forshaken Posted November 22, 2020 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
0 fusqueta Posted November 22, 2020 Author 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
0 Forshaken Posted November 23, 2020 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
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 fusqueta4 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.