- Joined
- Mar 13, 2018
- Messages
- 7,095
- Thread Author
- #1
To clarify, I know sometimes this happens randomly with NPCs info not loading completely, but it's happening consistently with the Tai Bwo Wannai villagers and Trader Crewmembers.
I'm working on a shopping bot, and I'm finding a number of seemingly random NPCs missing names/interactions. This happens in the Development Toolkit, but it also happens if you query the info directly from code. For example, I'm near Tiadeche in Tai Bwo Wannai and if you click NPC in Dev Toolkit his name is null and interactions list is empty despite being tradeable/talk-to. The same thing happens to the nearby Tamayu, Tinsay (who should have the Talk-to interaction). But Gabooty (also nearby)'s name and interacts show up correctly using the same code/in dev toolkit.
For example, standing near Tiadeche and executing
returns an empty result, but if I search directly by ID
it works and I get Tiadeche as a result. Although if I look at the result NPC object and check it's definition actions/name, they're empty and null respectively.
And if i search by ID and the expected interaction
it returns empty set.
(I promise I'm not just spelling the names wrong, I triple checked).
Also I checked Rionasta, north of Tai Bwo Wannai and his name works correctly but his .getDefinition().getActions() returns empty list, the same as trader crewmembers below.
Another example is the Trader Crewmembers at Port Khazard and Catherby (I didn't check other locations). If you look at them with Dev Toolkit they do have the names as expected but their NpcDefinition has an empty actions list (so crewmember.getDefinition().getActions() returns empty). Although if you directly just hardcode crewmember.interact("Trade"), that works.
I think I've also seen this happen before with gameobjects, arbitrarily named null or with empty getActions() lists, but I don't have any examples of that right now.
I ran around other random areas and every other NPC I tested seems to work fine, it's just a couple obscure NPCs consistently not working correctly.
This post got really long. Tl;dr:
I'm working on a shopping bot, and I'm finding a number of seemingly random NPCs missing names/interactions. This happens in the Development Toolkit, but it also happens if you query the info directly from code. For example, I'm near Tiadeche in Tai Bwo Wannai and if you click NPC in Dev Toolkit his name is null and interactions list is empty despite being tradeable/talk-to. The same thing happens to the nearby Tamayu, Tinsay (who should have the Talk-to interaction). But Gabooty (also nearby)'s name and interacts show up correctly using the same code/in dev toolkit.
For example, standing near Tiadeche and executing
Code:
Npcs.newQuery().names("Tiadeche").results();
Code:
Npcs.newQuery().ids(6236).results();
And if i search by ID and the expected interaction
Code:
Npcs.newQuery().ids(6236).interactions("Trade").results();
(I promise I'm not just spelling the names wrong, I triple checked).
Also I checked Rionasta, north of Tai Bwo Wannai and his name works correctly but his .getDefinition().getActions() returns empty list, the same as trader crewmembers below.
Another example is the Trader Crewmembers at Port Khazard and Catherby (I didn't check other locations). If you look at them with Dev Toolkit they do have the names as expected but their NpcDefinition has an empty actions list (so crewmember.getDefinition().getActions() returns empty). Although if you directly just hardcode crewmember.interact("Trade"), that works.
I think I've also seen this happen before with gameobjects, arbitrarily named null or with empty getActions() lists, but I don't have any examples of that right now.
I ran around other random areas and every other NPC I tested seems to work fine, it's just a couple obscure NPCs consistently not working correctly.
This post got really long. Tl;dr:
- consistently name showing as null & interactions showing as empty for Tiadeche, Tamayu and Tinsay in Tai Bwo Wannai
- consistently name working correctly but interactions showing as empty for Rionasta (north of tai bwo wannai) & Trader Crewmembers in port khazard, catherby (and probably the rest of them too)
- this might happen with other obscure npcs but i couldn't find any others at a cursory glance (every other npc I tested around varrock/catherby/etc) seems to work fine