Hello, i would like to ask some help me converting a ::npc spawn command.
So, heres the command i have right now:
Code:
if(command.equals("npc")) {
NPC npc = NPC.create(NPCDefinition.forId(Integer.parseInt(args[1])), player.getLocation(), null, null);
World.getWorld().getNPCs().add(npc);
}
I need to convert it so that it will also by spawning a npc save it's information in file:
in this format:
Code:
<list>
<npcSpawn>
<npcId>50</npcId> <!--The npc id to spawn.-->
<walkingType>2</walkingType> <!--The walking type-->
<spawnLocation> <!--The location to spawn the NPC.-->
<x>2272</x>
<y>4697</y>
<z>0</z>
</spawnLocation>
<minLocation> <!--The lowest location you can walk into..-->
<x>2261</x>
<y>4685</y>
<z>0</z>
</minLocation>
<maxLocation> <!--The highest location you can walk into..-->
<x>2282</x>
<y>4706</y>
<z>0</z>
</maxLocation>
</npcSpawn>
</list>
I hope someone knows how to do it, bcuz i have no clue on how to do that, thanks before.
please give me atleast a idea how it should look like...