display npc id and name in map *lithium based*

Results 1 to 13 of 13
  1. #1
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    display npc id and name in map *lithium based*

    pretty self explanation the only issue Im facing is scripts keep returning null when it suppose the script like hontale_keroben..
    it would be nice if someone is able to give me clue on getting this working as of now it works nice..




    Code:
     public static class NpcInMap extends CommandExecute {
            public int execute(MapleClient c, String[] splitted) {
                   List<MapleNPC> mNpc = c.getPlayer().getMap().getAllNPCs();
                   for (MapleNPC mNpc2 : mNpc) {
                       c.getPlayer().dropMessage(6, " Npcs ID: " + mNpc2.getId() + " Npcs Name: " + mNpc2.getName() + " Scripts Name: " + NPCConversationManager.getInstance().getScript());
                   }
                return 1;
            }
        }
    you can use it to help you find npcs in the map without going through so much just to find the npc id in that map or you can check if a npc is there in map all by !npcinmap

    this work for odin based/lithium based source.

    have fun.
    Last edited by ExtremeDevilz; 17-04-14 at 07:36 PM.


  2. #2
    Banned SilentThief is offline
    BannedRank
    Sep 2012 Join Date
    The MatrixLocation
    466Posts

    Re: display npc id and name in map *lithium based*

    I would love to see a compilation of all of these small releases.
    Anyways, this is a neat little addition to sources, thanks.

  3. #3
    Account Upgraded | Title Enabled! AristoCat is offline
    MemberRank
    Apr 2012 Join Date
    947Posts

    Re: display npc id and name in map *lithium based*

    NPCConversationManager.getInstance().getScript()
    no wonder script is null

    There should be a command "!looknpcs" that gives you even more information about position and stuff.

  4. #4
    Member Imperative is offline
    MemberRank
    Dec 2013 Join Date
    Everywhere.Location
    57Posts

    Re: display npc id and name in map *lithium based*

    Quote Originally Posted by AristoCat View Post
    NPCConversationManager.getInstance().getScript()
    no wonder script is null

    There should be a command "!looknpcs" that gives you even more information about position and stuff.
    There is lol, His command was built around that.

    Code:
     public static class LookNPC extends CommandExecute {        
                public int execute(MapleClient c, String[] splitted) {
                List<MapleNPC> npc = c.getPlayer().getMap().getAllNPCs();
                    for (MapleNPC npc2 : npc) {
                   c.getPlayer().dropMessage(5, "NPC: oID: " + npc2.getObjectId() + " npcID: " + npc2.getId() + " Position: " + npc2.getPosition().toString() + " Name: " + npc2.getName());
                }
                return 1;
            }
        }

  5. #5
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: display npc id and name in map *lithium based*

    I was talking about getting those script names..

  6. #6
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: display npc id and name in map *lithium based*

    Of course it will return null, you can't refer to the conversation manager like that. You have to refer to the client's conversation manager, but that wouldn't work if you're not interacting with a npc. It's not the correct way to get the script name, anyway,

    The script names are not even loaded, as far as I know. Just edit the OdinMS npc loading to load the script name as well.

  7. #7
    Account Upgraded | Title Enabled! AristoCat is offline
    MemberRank
    Apr 2012 Join Date
    947Posts

    Re: display npc id and name in map *lithium based*

    Quote Originally Posted by Fraysa View Post
    Of course it will return null, you can't refer to the conversation manager like that. You have to refer to the client's conversation manager, but that wouldn't work if you're not interacting with a npc. It's not the correct way to get the script name, anyway,

    The script names are not even loaded, as far as I know. Just edit the OdinMS npc loading to load the script name as well.
    Oh really? because... HE JUST DID!!

  8. #8
    Wut. QuietCrystal is offline
    MemberRank
    Aug 2010 Join Date
    SingaporeLocation
    346Posts

    Re: display npc id and name in map *lithium based*

    Quote Originally Posted by AristoCat View Post
    Oh really? because... HE JUST DID!!
    That's the NPC name. Fraysa was referring to script name I think. Which should be something like scripts/npc/2081005.js, which is pointless to display in the first place given the NPC id is already displayed.

  9. #9
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: display npc id and name in map *lithium based*

    Quote Originally Posted by QuietCrystal View Post
    That's the NPC name. Fraysa was referring to script name I think. Which should be something like scripts/npc/2081005.js, which is pointless to display in the first place given the NPC id is already displayed.
    I was actually referring to the actual script name. OdinMS is using the npc id as the script's name, which is wrong. Nexon use the names that are located inside the wz files. Take a look at Npc.wz for more information (located in 'quest' or 'script' node).

  10. #10
    That one pokemon thing Luxray is offline
    MemberRank
    Apr 2010 Join Date
    2,043Posts

    Re: display npc id and name in map *lithium based*

    So what's the difference in showing the scriptname and the NpcID? As far as I know, those two are mostly the same.

  11. #11
    Wut. QuietCrystal is offline
    MemberRank
    Aug 2010 Join Date
    SingaporeLocation
    346Posts

    Re: display npc id and name in map *lithium based*

    Quote Originally Posted by Fraysa View Post
    I was actually referring to the actual script name. OdinMS is using the npc id as the script's name, which is wrong. Nexon use the names that are located inside the wz files. Take a look at Npc.wz for more information (located in 'quest' or 'script' node).
    Ah, that's enlightening :O Thanks

  12. #12
    I'm overrated. Fraysa is offline
    MemberRank
    Apr 2008 Join Date
    4,891Posts

    Re: display npc id and name in map *lithium based*

    Quote Originally Posted by Zoldyck View Post
    So what's the difference in showing the scriptname and the NpcID? As far as I know, those two are mostly the same.
    They are the same because that's OdinMS way. Originally, they are located in the WZ files (the scripts names). For example, Henesys taxi's script name is "taxi2" and so on. You can view more examples in NPC.wz.

  13. #13
    That one pokemon thing Luxray is offline
    MemberRank
    Apr 2010 Join Date
    2,043Posts

    Re: display npc id and name in map *lithium based*

    Quote Originally Posted by Fraysa View Post
    They are the same because that's OdinMS way. Originally, they are located in the WZ files (the scripts names). For example, Henesys taxi's script name is "taxi2" and so on. You can view more examples in NPC.wz.
    I see



Advertisement