Dear Metin2Dev,
I believe that many servers are still using old quests for giving mount bonuses from inventory, which are not bad but not very efficient either. Since I haven't seen anyone share something similar yet, I thought I'd share my solution for getting mount bonuses from the inventory.
You need to specify the bonuses in groups, similar to how you specify mob, etc, special drops. After you have set it up and the item is in your inventory, you will receive the bonus you have set.
How is a mount's bonus structured?
locale/germany/mount_bonus_table.txt:
Group MountTest1
{
vnum 71224 --Mount item vnum from item_proto (type must be ITEM_QUEST (18))
--You can add maximum 5 bonuses from config (it can be extended)
1 13 5 --13 = APPLY_STUN_PCT
2 14 10 --14 = APPLY_SLOW_PCT
3 15 15 --15 = APPLY_CRITICAL_PCT
4 16 20 --16 = APPLY_PENETRATE_PCT
5 17 25 --17 = APPLY_ATTBONUS_HUMAN
}
This system works with items whose type is ITEM_QUEST (18). It means that your mount item type must be ITEM_QUEST or it won't give you the bonuses. In the future, i'm planning to extend this system for costume mounts, but you can also do it for yourself. I think this is a good starting point for those are using the old quest solutions to give bonuses from inventory.
Tutorial:
CommonDefines.h:
char.cpp:
char.h:
char_item.cpp:
input_db.cpp:
item.cpp:
item_manager.cpp:
item_manager.h:
If you have any ideas on how to make this system better, please leave a comment.
I hope this will be useful for you. ?
Best Regards,
piktorvik