PDA

View Full Version : Roaming NPC & Doors



aneta123
04-25-2016, 12:53 PM
Hello, I have 2 questions about how to deal with issue. First is a roaming NPC that sells potions is Kazo. Can anyone help with this? Normally you go to a point and talk to NPC, but he is not there, so I thought about a checker of Self.ItemCount and if wrong, go to other probable spot of NPC coz there are max 3 spots I guess that this NPC can be at, but is there any easier version?

And the other thing is door opening, but i think that would be easy if you knew the doors are closed. And what if the doors can be once opened, once closed and once closed with a key? How to check these 3 conditions?

Thanks for any help :D

aneta123
04-25-2016, 02:44 PM
I got an idea of how to solve the doors problem, please tell me if its correct:

Map.IsTileWalkable(x, y, z)
if no, click on it and check again if its walkable, if no use key on it and check again if its walkable. If yes at any point, just move forward :)