Thread: Teleport to NPC id

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Teleport to NPC id 
    Registered Member
    Join Date
    May 2020
    Posts
    8
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    Hey guys,

    I'm wondering if anyone has a command or way to teleport to certain npc's? Want this for development and to add a way to teleport to Random Boss's and such.

    I've looked around and can't find any help but if anyone knows anything I'm open! Also this would work great for implings if I could get it to work.

    Thanks everyone
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Apr 2020
    Posts
    8
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    Loops through the npc list, add a check inside the loop for the npc id and teleport to that npcs position.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2020
    Posts
    8
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    Do you have an example I could see? I'm moderately competent but I haven't seen this attempted before.
    Reply With Quote  
     

  4. #4  
    plz dont take my wizard mind bombs Women's Avatar
    Join Date
    Mar 2010
    Posts
    1,881
    Thanks given
    724
    Thanks received
    1,162
    Rep Power
    4763
    it really depends on how your npcs are stored for your server but something like

    Code:
    for (int i = 0; i < npcs.size(): i++) {//loops through all npcs
        if(npc.get(i).getId() == npc id here)//does the npcs ID match the id you've selected?
            player.teleport(npcs.get(i).getX, npcs.get(i).getY);//teleport the player to the npcs x and y coord
    }
    lmk what base you're using and I can be more specific
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    May 2020
    Posts
    8
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    Sorry Women I should've specified, I'm using Vencillio Base!
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    May 2020
    Posts
    15
    Thanks given
    0
    Thanks received
    2
    Rep Power
    9
    what a stupid concept
    Reply With Quote  
     

  7. #7  
    plz dont take my wizard mind bombs Women's Avatar
    Join Date
    Mar 2010
    Posts
    1,881
    Thanks given
    724
    Thanks received
    1,162
    Rep Power
    4763
    Quote Originally Posted by charlietrotfox View Post
    Sorry Women I should've specified, I'm using Vencillio Base!
    im not familiar with that server. Can you pastebin your NPC class? Or NPCHandler whatever you have.

    Quote Originally Posted by Emperor_ View Post
    what a stupid concept
    didnt ask
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    May 2020
    Posts
    8
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    What makes it a stupid concept? It helps for development when it comes to random npcs, making sure that they are spawning in and easier than tele to random coords. I think it could be very useful.

    I'm not 100% sure if this is exactly what you needed as it seems all the names are completely different with this base. Heres my spawn definitions,

    https://pastebin.com/RQ2Cx7Ra
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    May 2020
    Posts
    15
    Thanks given
    0
    Thanks received
    2
    Rep Power
    9
    Quote Originally Posted by Women View Post
    im not familiar with that server. Can you pastebin your NPC class? Or NPCHandler whatever you have.



    didnt ask


    wasn't talking about ur code. was refering to OP
    Reply With Quote  
     

  10. #10  
    plz dont take my wizard mind bombs Women's Avatar
    Join Date
    Mar 2010
    Posts
    1,881
    Thanks given
    724
    Thanks received
    1,162
    Rep Power
    4763
    Quote Originally Posted by charlietrotfox View Post
    What makes it a stupid concept? It helps for development when it comes to random npcs, making sure that they are spawning in and easier than tele to random coords. I think it could be very useful.

    I'm not 100% sure if this is exactly what you needed as it seems all the names are completely different with this base. Heres my spawn definitions,

    https://pastebin.com/RQ2Cx7Ra
    That file wont help much. I'd need to see whatever class handles your npc processing or just general npc junk
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. After you kill a npc teleport to?
    By Deltaz in forum Help
    Replies: 2
    Last Post: 05-08-2010, 05:42 PM
  2. Replies: 7
    Last Post: 12-31-2009, 01:56 PM
  3. Replies: 0
    Last Post: 11-06-2009, 06:23 PM
  4. Replies: 10
    Last Post: 10-27-2009, 10:27 PM
  5. Replies: 4
    Last Post: 10-27-2009, 03:31 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •