Open Aokromes opened 5 years ago
what needs to be done with this one?
remove scriptpch, convert to modern things xd
Ill look over it and will let you know later if i am able to retain the key features. Im not familiar with the purpose of this script but i guess i will find out
Ok. I refactored the script and tested it live on my local server. I am not liking how this script operates and functions. The whole thing is completely useless unless you have the items already for a exchange and even then it this script is extremely a mess. HOWEVER....... I can propose, if i am provided a list, a way fully swap out gear for player characters with specific sets if I am provided a list of pvp and pve gear per a class for lvl 80 I can make something very use useful in its place. If not then i can provide you what I have which is a modernized version of the script that is for compiling but just know this NPC AI is going to be very useless unless you have the specific item ids per a class in your inventory.
@aokromes I have a patch file ready if you want me to send it to you directly or if you wish me to do a PR on. Currently I show no new warnings or errors when compiling but that does not mean travis ci wont have one.
What it does: We have it to where the gossip will only show up for level 80 players. Cases set so only the appropriate class is shown. I have it set up for a adjustable cost to commit with the gear exchange adjustable thru conf.
TO-DO: We need to figure out how to auto unequip or store the existing worn items. Using this will completely replace the equipment slots on the player and the old equipment is forever removed and gone. I do not know how to approach the auto unequipping. at this time without further ideas or assistance.
@Aokromes this is the script and additional world conf if anyone wants to give it a try, I can not seem to get the auto equip or move to inventory to work for existing gear, so the gear gets completely replaced. I tried storeitem, removeitem, swapitem, and clone items that i record in debugger mode from other functions in the game and i just can not get it to work for the gear on a player. If you want to make it a branch for me to push what I have that is fine, but until we can solve the existing issue of not auto unequiping the gear, it is best to leave these scripts here. https://cdn.discordapp.com/attachments/765246770316967986/810332449883947008/Equip_Changer_NPC.cpp https://cdn.discordapp.com/attachments/765246770316967986/810332536139808798/additional.conf
@Aokromes if you prefer the character templates npc i refactor would make for a better substitution. Character Templates NPC script has this to offer: Currently no confs. Gear is adjustible in sql. NPC AI script. Can add adjustible cost if you want and a announcement module via conf. Players are now AUTO leveled to 80. Does not auto unequip but it does a check preventing equipment being replaced and gives notice to unequip your gear and weapons.
Current Revision I have has no warnings when compiling but it does not mean Travis CI wont yell at me.
Currently this is what I have for the template npc if u are still interested. https://github.com/acidmanifesto/TC-Custom-Scripts/blob/main/335%20TC/Unofficial%20Trinitycore%20Custom%20Scripts/Character%20Template%20NPC%20AI/Script/charactertemplates.cpp
Currently i had a user take interest in and they resolved the issue of crashing when it comes to auto unequipping.
https://community.trinitycore.org/topic/225-npc-equip-changer/