emil92b
Intermediate OT User
i'm trying to delete selected monsters from the spawn.xml file, so far i've added a list of these. im not sure how i could make a script that loops through the file and deletes em in a special way
only delete the demon, but leave the rats since they are not in the list
should delete spawn block since it only contains monster from the list
PHP:
ExampleRemoveList = {"Demon", "Behemoth", "Hydra"}
only delete the demon, but leave the rats since they are not in the list
XML:
<spawn centerx="1" centery="2" centerz="7" radius="3">
<monster name="Rat" x="2" y="-2" z="12" spawntime="90" />
<monster name="Rat" x="1" y="-1" z="12" spawntime="90" />
<monster name="Demon" x="-3" y="1" z="12" spawntime="90" /> <!-- delete -->
</spawn>
should delete spawn block since it only contains monster from the list
XML:
<spawn centerx="1" centery="2" centerz="7" radius="3"> <!-- delete -->
<monster name="Behemoth" x="-3" y="1" z="12" spawntime="90" /> <!-- delete -->
<monster name="Behemoth" x="-3" y="1" z="12" spawntime="90" /> <!-- delete -->
</spawn> <!-- delete -->