Loops through the npc list, add a check inside the loop for the npc id and teleport to that npcs position.
|
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
Loops through the npc list, add a check inside the loop for the npc id and teleport to that npcs position.
Do you have an example I could see? I'm moderately competent but I haven't seen this attempted before.
it really depends on how your npcs are stored for your server but something like
lmk what base you're using and I can be more specificCode: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 }
Sorry Women I should've specified, I'm using Vencillio Base!
what a stupid concept
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
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |