Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => "Retro-Porting" => Topic started by: Kranimal on December 19, 2014, 01:41:57 am
-
Before anybody says anything and like the title says I did not make this script, all credits go to Anthony as he is the one who made it =D.
I have seen alot of posts on many forums lately of people looking for this and I just happened to stumble across it so I am putting it here where most people would go to look for it (at least I think). Anyway, enjoy =D
// -----------------------------------
// --- 010 Editor v1.2 Script File
//
// Name: Cata / MoP 5.1.0 M2 Particle Fixer
// Author: Anthony Vang aka Kronixusa
// Revision: 1.3
// Purpose: Deletes Bytes between particle data
// And re-inserts at the end.
// -----------------------------------
RequiresVersion (4.0);
RequiresFile ();
// Define variables
int i, count;
int emitofs;
// Reads the value at 0x128 which is the amount of emitters
// This file has.
count = ReadUInt (0x128);
// Check count
if (count <= 1)
{
FileClose ();
return -1;
}
// Reads Value at 0x12c which the ofset location for the Emitter
// The sets the cursor to it and begins operation.
emitofs = ReadUInt (0x12c);
SetCursorPos (emitofs);
// Moves forward 476 bytes then deletes 16bytes that seperate the
// Emitter entries so they are next to each other.
for (i = 0; i <count; i ++)
{
SetCursorPos (GetCursorPos () + 476);
DeleteBytes (GetCursorPos (), 16);
}
// Paste 16 bytes of 0x0, amount defined by value in 0x128
for (i = 0; i <count; i ++)
{
GetCursorPos ();
InsertBytes (GetCursorPos (), 16);
WriteUInt (GetCursorPos (), 0x0000);
SetSelection (GetCursorPos (), 0);
}
FileSave ();
FileClose ();