Output file in which all current comments are converted to fit the proper code style so everything is easier to understand. Download: http://fbe.am/pHP (updated 19-12-2013).
Git repository of development (written in C#): https://github.com/Discover-/SAI-Comment-Converter
P.S. It’s worth adding that this script will show that quite a few scripts in the database currently just won’t work because there is data in there which makes no sense. A few quick examples:
Using SMART_TARGET_NONE instead of SMART_TARGET_POSITION → won’t do ANYTHING.
It’s worth mentioning there’s 14 of these cases in the current code.
UPDATE smart_scripts
SET comment
=“Val’kyr Arbiter - On Script - Move To ” WHERE source_type
=9 AND entryorguid
=30501000 AND id
=0;
Not sure what the hell the person who wrote this was thinking, but 256 is certainly not a valid stand state type. Old comment states it’s the “wipe aggro” flag…
UPDATE smart_scripts
SET comment
=“Greater Felfire Diemetradon - On Spellhit ‘Tag Greater Felfire Diemetradon’ - Set Flag <Unknown bytes1 (UnitStandStateType)>” WHERE source_type
=0 AND entryorguid
=21462 AND id
=2;
Same as above. In this case the comment states it should make the unit hover.
UPDATE smart_scripts
SET comment
=“Bjorn Halgurdsson - On Evade - Set Flag <Unknown bytes1 (UnitStandStateType)>” WHERE source_type
=0 AND entryorguid
=24238 AND id
=16;
This is supposed to give quest credit according to the old comment; it uses SMART_ACTION_ADD_POWER…
UPDATE smart_scripts
SET comment
=“Rusty Cage - On Gameobject State Changed - Add 0 ” WHERE source_type
=1 AND entryorguid
=191544 AND id
=1;
Someone who thought you could use SET_INVINCIBILITY_HP_LEVEL with parameters 0,0 to ‘reset’ it. Not the case…
UPDATE `smart_scripts` SET `comment`="High Priest Mu'funu - On Script - Set Invincibility Hp <Unsupported parameters>" WHERE `source_type`=9 AND `entryorguid`=2875200 AND `id`=4;