Last change
on this file since 965 was 965, checked in by iritscen, 11 years ago |
Latest version of glass-breaking patch (this ONCC patch does not work, though). Removed DangerousGlass as it is now a package on Depot.
|
File size:
896 bytes
|
Line | |
---|
1 | @XML_TOOLS Version "2.0"
|
---|
2 |
|
---|
3 | @CUSTOM_CODE
|
---|
4 | <code>
|
---|
5 | var myBuilder = new JSXMLBuilder();
|
---|
6 | myBuilder.load($xmlData);
|
---|
7 | var elements = myBuilder.elements[0];
|
---|
8 |
|
---|
9 | // If there are no attacks in this TRAM, ignore it
|
---|
10 | if (!elements.childElement("ONCP").childElement("Particles"))
|
---|
11 | return;
|
---|
12 |
|
---|
13 | // Check if glass_break is already registered for the character
|
---|
14 | var particles = elements.childElement("ONCP").childElement("Particles");
|
---|
15 | for (var i = 0; (particles.childElement(i)); i++)
|
---|
16 | {
|
---|
17 | var particle = particles.childElement(i);
|
---|
18 | if (particle.childElement("Name").text == "glass_break")
|
---|
19 | return;
|
---|
20 | }
|
---|
21 |
|
---|
22 | // If we're still here, register glass_break
|
---|
23 | myBuilder.addElementAt("ONCPParticle",
|
---|
24 | "",
|
---|
25 | "<Name>glass_break</Name>\
|
---|
26 | <Type>glass_break</Type>\
|
---|
27 | <BodyPart>None</BodyPart>",
|
---|
28 | particles.index + 1,
|
---|
29 | particles.level + 1);
|
---|
30 | </code>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.