PDA

View Full Version : Transmogrification Script



Wise
26-07-12, 10:05 PM
Updates:
3.5 (patch)

Fixed a crash on item deletion from guild deleting etc.

3.4 (patch)
Added localization possibilities, even though I am not quite sure if it works and if it is good or good enough. Only tested that english works
Added possibility to disable gold cost before compiling
Cleaned all the code I could find to TrinityCore standards .. I think

3.3 (redone patch)
Transformed the script into a full coremod instead of having some code in the gossip script. This allows the transmogrification methods to be used on any item anywhere.
Changed the way fake display entries are stored in the core. Instead of having a new variable for the item class, I am now having a contained, much like locales have.
Changed the files into one patch file like Aokromes suggested. You can find the DB table creation SQLs from sql/characters_transmogrification/
Removed prepared statements
Fake display entries are now loaded when the server starts up. All nonexistant item guids will be deleted before loading and when loading, all invalid item entries are deleted (deleted some custom items aye?

3.2 (patch)
Fixed an issue with DB saving not taking action on login or server restart.

3.1 (patch, cpp)
Corrected the quality check, which was left to return true in any case
Fixed invisible item entries from newly created items (.additem for example)

3.0 (sql, patch, cpp)
It will have mailing and auction etc restrictions properly coded (yay, no more Fake owner!)
Having its own prepared statement now
Moved loading transmogs to the item loading part.
The script should now be added to scriptloader by the patch. So you just need to add it to solution.
Included an NPC sql for everyone with NPC problems :3

2.2 (sql, patch, cpp)
Added a few sounds, altered to use switch instead of an IF block
Modified to have a separate table
And more?

2.1 (cpp)
Fixed a crash when getting item template of item entry 0

2.0 (cpp)
Possibly more ..
Implemented cost
Changed quality checks
Fixed this (http://www.ac-web.org/forums/showpost.php?p=1611891&postcount=47) and this (http://www.ac-web.org/forums/showpost.php?p=1611858&postcount=45)
Changed some messages for more blizzlike feeling
After trying to transmogrify or remove a transmogrification, you get to the item selection screen instead of main menu
Added Remove Transmogrification buttons and update main menu button (removed nevermind)
Added more checks for safety and blizzlike feeling

1.0 (sql, patch, cpp)
Added DB saving and remove transmogrifications option -> patch, sql and script needed

Quote:


Video:
Transmogrification Trinitycore 3.3.5a - YouTube (http://youtu.be/wuNWPqiIm64)



Quote:


Key concepts:
Automatic, retail limitations, all equippable items, Trinitycore 3.3.5a tested, works with custom items automatically
The script is done with gossip menus
The items are not hardcoded, only the limitations and whatnot are in the script.



Quote:


Limitations:
So you can only transmogrify epic, uncommon and rare items.
You can also only change the displays with same type weapons only etc.
You can not try getting a level 80 looking gear with level 1 char.
Check out the full list of requirements from the video above, thats where I got them.



Quote:


Get It:
https://docs.google.com/folder/d/0Bx...RwbUN3VlE/edit (https://docs.google.com/folder/d/0Bx5knS2IsjatTlVtWHRwbUN3VlE/edit)



Quote:


To transmogrify an item you need to have the item equipped you want to change.
Then you need to have an item of the same type etc. somewhere in your inventory (doesnt matter, just in some bag).
When talking to the NPC you get to select a slot where you have an item equipped.
After selecting you see a menu with item names of the items which's displays you can use.
Select one and you are done :3



Old version 0.1 - No DB (Only this needed):
[C++] Transmogrification Full - NoDB - Pastebin.com (http://pastebin.com/PF4NiPZs)
Video of old one in use:
Old Trinitycore Transmogrification 3.3.5a - YouTube (http://www.youtube.com/watch?v=U468SaIk7fM)

Notes:
I am not a C++ scripter and I have never studied C++ in my life.
Some of the decisions and coding might not be good.
How to add a new script? (http://www.trinitycore.info/How-to:CustomScript)
How to revert an old patch? (http://drupal.org/patch/reverse)
Updating core? (http://stackoverflow.com/questions/10414769/git-pull-keeping-local-changes)

Credits to Rochet2 for making this script

Rochet2
04-08-12, 07:39 PM
Nice share :P