Advertisement
warc222

Share]Announce The GM What NPC Spawn And Where Location

Sep 24th, 2015
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. Index: L2PcInstance.java
  2.  
  3. + private boolean _AnnSpawnLoc = true;
  4. + public void setAnnSpawnLoc(boolean x)
  5. + {
  6. + _AnnSpawnLoc = x;
  7. + }
  8. + public boolean getAnnSpawnLoc()
  9. + {
  10. + return _AnnSpawnLoc;
  11. + }
  12.  
  13. Index: AdminSpawn.java
  14. private static final String[] ADMIN_COMMANDS = { "admin_show_spawns", "admin_spawn", "admin_spawn_monster", "admin_spawn_index",
  15. "admin_unspawnall","admin_respawnall","admin_spawn_reload","admin_npc_index","admin_spawn_once",
  16. "admin_show_npcs","admin_teleport_reload","admin_spawnnight","admin_spawnday",
  17. - "admin_spawnfence","admin_deletefence","admin_listfence", "admin_deleteallfence" };
  18. + "admin_spawnfence","admin_deletefence","admin_listfence", "admin_deleteallfence", "admin_announcespawnloc" };
  19. @@
  20. else if (command.startsWith("admin_teleport_reload"))
  21. {
  22. TeleportLocationTable.getInstance().reloadAll();
  23. GmListTable.broadcastMessageToGMs("Teleport List Table reloaded.");
  24. }
  25. + else if (command.startsWith("admin_announcespawnloc"))
  26. + {
  27. + if (activeChar.getAnnSpawnLoc()) // already announce spawn location
  28. + {
  29. + activeChar.setAnnSpawnLoc(false);
  30. + activeChar.sendMessage("Your Message");
  31. + }
  32. + else
  33. + {
  34. + activeChar.setAnnSpawnLoc(true);
  35. + activeChar.sendMessage("Your Message");
  36. + }
  37. + }
  38. @@
  39. if (!permanent)
  40. spawn.stopRespawn();
  41. activeChar.sendMessage("Created " + template1.name + " on " + target.getObjectId());
  42. + if (activeChar.getAnnSpawnLoc())
  43. + Announcements.getInstance().announceToAll("GM:"+activeChar.getName()+" had spawn "+template1.name+ " in "+activeChar.getX()+" "+activeChar.getY()+" "+activeChar.getZ());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement